9059 Commits

Author SHA1 Message Date
Bjørn Erik Pedersen
a9a93d082d hugolib: Fall back to title in ByLinkTitle sort
Fixes #4953
2018-11-28 13:52:26 +01:00
Bjørn Erik Pedersen
b09a40333f
hugolib: Improve nil handling in IsDescendant and IsAncestor
Fixes #5461
2018-11-28 12:36:59 +01:00
Bjørn Erik Pedersen
7540a62834
parser/pageparser: Fix handling of commented out front matter
When the page parser was rewritten in 0.51, this was interpreted literally, but commented out front matter is used in the wild to "hide it from GitHub", e.g:

```
<!--
+++
title = "hello"
+++
-->
```

Fixes #5478
2018-11-28 10:28:50 +01:00
Bjørn Erik Pedersen
7e75aeca80
Remove duplicate mapstructure depdendency 2018-11-28 00:17:43 +01:00
Bjørn Erik Pedersen
e14e0b192f
Add dependency list to README 2018-11-28 00:08:27 +01:00
Cameron Moore
ed698e94c1 tpl/path: Add tests 2018-11-27 19:17:35 +01:00
Bjørn Erik Pedersen
89e2716d29
tpl: Regenerate templates 2018-11-27 18:15:55 +01:00
Max Arnold
aba2647c15 tpl: Fix whitespace issue
Introduced  in #5276.
2018-11-27 18:15:10 +01:00
Bjørn Erik Pedersen
36736ca280 tpl: Add "param" shortcode
Fixes #4010
2018-11-27 17:34:03 +01:00
Bjørn Erik Pedersen
f37c5a2567 tpl: Add "param" shortcode
Fixes #4010
2018-11-27 17:34:03 +01:00
Allison Zadrozny
378677aa65 Add Elasticsearch/bonsai.io to services doc.
Copy of this merged PR at [gohugoio/hugo](https://github.com/gohugoio/hugo/): [Add Elasticsearch/bonsai.io to services doc. #5427](https://github.com/gohugoio/hugo/pull/5427).
2018-11-27 16:54:21 +01:00
Bjørn Erik Pedersen
4c3fd4fa4d docs: Document inline shortcodes
See #4011
2018-11-27 16:14:09 +01:00
Bjørn Erik Pedersen
aded0f25fd docs: Document inline shortcodes
See #4011
2018-11-27 16:14:09 +01:00
Bjørn Erik Pedersen
bc337e6ab5 Add inline shortcode support
An inline shortcode's name must end with `.inline`, all lowercase.

E.g.:

```bash
{{< time.inline >}}{{ now }}{{< /time.inline >}}
```

The above will print the current date and time.

Note that an inline shortcode's inner content is parsed and executed as a Go text template with the same context as a regular shortcode template.

This means that the current page can be accessed via `.Page.Title` etc. This also means that there are no concept of "nested inline shortcodes".

The same inline shortcode can be reused later in the same content file, with different params if needed, using the self-closing syntax:

```
{{< time.inline />}}
```

Fixes #4011
2018-11-27 16:14:09 +01:00
Cameron Moore
112461fded tpl/collections: Add float64 support to where
Fixes #5466
2018-11-27 09:04:02 +01:00
budparr
6c64c374c5 Whitelist CSS modules from purge
PurgeCSS removes unused CSS from the output. This PR only uses PurgeCSS on the base utility classes to avoid unexpected issues where JS or content-based classes get removed.
2018-11-25 20:14:32 +01:00
budparr
817a872b9b Improve search icon position 2018-11-25 20:14:32 +01:00
budparr
cf86ff1c7b Add minification and resource cache clear to build command 2018-11-25 20:14:32 +01:00
Bud Parr
fd77e8df35 Update asset dependencies and adopt Hugo Pipes
* Swap src for assets directory

Assets directory is the default for Hugo Pipes

* Use "Typefaces" package

This method is cleaner because we can pull in our fonts with a require statement https://github.com/KyleAMathews/typefaces

* Use Hugo Pipes method of calling resources

* Update dependencies

* [wip]  Revamp Webpack

* Tweak Webpack for Tachyons

* Use simple build scripts

* Update dependencies

* Fix content that referenced files that don't exist

* Add all scripts

* Improve styles/js preload and cache

* Add to whitelist

* Add fonts to headers for preload

* Move preloads to header file

* Update styles

* Improve manifest usage

The manifest partial was in the site but not included in head

* Update readme

* Remove extra check on asset resources

* Call assets directly in header file
2018-11-25 17:08:43 +01:00
Bjørn Erik Pedersen
94ab125b27 parser/pageparser: Fix when only shortcode and then summary
Fixes #5464
2018-11-24 18:23:23 +01:00
Bjørn Erik Pedersen
dcfeed35c6
commands: Include drafts in convert command
Fixes #5457
2018-11-24 13:11:14 +01:00
Bjørn Erik Pedersen
f9b4eb4f39 Handle themes in the new file cache (for images, assets)
In the newly consolidated file cache implementation, we forgot that we also look in the theme(s) for assets (SCSS transformations etc.), which is not good for Netlify and the demo sites.

Fixes #5460
2018-11-23 21:09:00 +01:00
Bjørn Erik Pedersen
cdbe97e8c3
Update render.md 2018-11-22 15:52:40 +01:00
Kris Budhram
e82b2dc8c1 Fix ignored --config flag with 'new' command 2018-11-18 19:09:28 +01:00
Daniel Saunders
b0e2792205 git command to update submodule to latest
This is how I update my themes. It took a while to find the commands that work, so I think it would be good to have them here for other users.
2018-11-16 09:56:09 +01:00
Bjørn Erik Pedersen
5df2b79dd2 Fix Permalink for resource, baseURL with path and canonifyURLs set
Fixes #5226
2018-11-15 16:37:11 +01:00
Bjørn Erik Pedersen
12742bac71 Add tests for permalink on Resource with baseURL with path
See #5226
2018-11-15 08:45:15 +01:00
Bjørn Erik Pedersen
a1cb98c129 cache/filecache: Add a :project placeholder
This allows for "cache per Hugo project", making `hugo --gc` work as expected, even if you have several Hugo projects running on the same PC.

See #5439
2018-11-14 23:14:51 +01:00
Bjørn Erik Pedersen
fabf026f49
helpers: Add a comment about file mode for new files
See #5434
2018-11-14 23:14:51 +01:00
Bjørn Erik Pedersen
94f0f7e597
cache/filecache: Add a :project placeholder
This allows for "cache per Hugo project", making `hugo --gc` work as expected, even if you have several Hugo projects running on the same PC.

See #5439
2018-11-14 23:14:51 +01:00
Bjørn Erik Pedersen
3c29c5af8e
cache/filecache: Add a cache prune func
Fixes #5439
2018-11-14 23:14:51 +01:00
Bjørn Erik Pedersen
33502667fb
cache/filecache: Add a filecache root dir
This is just a safe guard to make sure we don't evict/remove files that do not belong to the cache.
2018-11-14 23:14:51 +01:00
Bjørn Erik Pedersen
07c1b2b46f cache/filecache: Use time.Duration for maxAge
Fixes #5438
2018-11-14 23:14:50 +01:00
Bjørn Erik Pedersen
d3489eba5d
cache/filecache: Use time.Duration for maxAge
Fixes #5438
2018-11-14 23:14:50 +01:00
Bjørn Erik Pedersen
17d7ecde2b
cache/filecache: Split implementation and config into separate files 2018-11-14 23:14:50 +01:00
Bjørn Erik Pedersen
e4b2572880 Update to LibSASS 3.5.5
Fixes #5432
See #5435
2018-11-14 17:47:08 +01:00
Bjørn Erik Pedersen
ffa9b165ef
Add AND as a title 2018-11-14 15:51:06 +01:00
Bjørn Erik Pedersen
6e7733b408
Add OR as a sub title to make it easier to find in search 2018-11-14 15:48:40 +01:00
Bjørn Erik Pedersen
782dd15858
More spelling corrections 2018-11-13 18:28:40 +01:00
Bjørn Erik Pedersen
aff9c09166
cache/filecache: Spelling corrections 2018-11-13 18:16:53 +01:00
Bjørn Erik Pedersen
fdd4a768f0
Remove appveyor
We now build on Travis for all platforms.
2018-11-13 14:36:17 +01:00
Bjørn Erik Pedersen
72b6791a16 docs: Document the new file cache
See #5404
2018-11-13 14:29:45 +01:00
Bjørn Erik Pedersen
abeeff1325
docs: Document the new file cache
See #5404
2018-11-13 14:29:45 +01:00
Bjørn Erik Pedersen
f7aeaa6129 Add a consolidated file cache
This commits reworks how file caching is performed in Hugo. Now there is only one way, and it can be configured.

This is the default configuration:

```toml
[caches]
[caches.getjson]
dir = ":cacheDir"
maxAge = -1
[caches.getcsv]
dir = ":cacheDir"
maxAge = -1
[caches.images]
dir = ":resourceDir/_gen"
maxAge = -1
[caches.assets]
dir = ":resourceDir/_gen"
maxAge = -1
```

You can override any of these cache setting in your own `config.toml`.

The placeholders explained:

`:cacheDir`: This is the value of the `cacheDir` config option if set (can also be set via OS env variable `HUGO_CACHEDIR`). It will fall back to `/opt/build/cache/hugo_cache/` on Netlify, or a `hugo_cache` directory below the OS temp dir for the others.
`:resourceDir`: This is the value of the `resourceDir` config option.

`maxAge` is the time in seconds before a cache entry will be evicted, -1 means forever and 0 effectively turns that particular cache off.

This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see 6c3960a8f4/.circleci/config.yml

Fixes #5404
2018-11-13 14:19:42 +01:00
Emir Beganović
7d78a2afd3 Add Windows build config to Travis 2018-11-13 11:39:54 +01:00
Bud Parr
714d3ca91c Fix minification issues
* Move Gopher SVG from partial to image

In minification, Gopher gets wonked. This may also help build times with minification.

fixes #604

* Add margin around external link icon

In minification the links got pushed up against the nav item.

ref #604

* Move Hugo logo in footer/hero to image from partial

This may help with build-time when using minification.

* Move gopher image from site to theme static folder

I put this in the wrong directory in commit: 0e2f2f8f33588f826f26c3b3a581f1014a3d41ac

* Add alt tag copy to Gopher image
2018-11-12 15:29:05 +01:00
Bjørn Erik Pedersen
cd1e961dad Revert "Add Elasticsearch/bonsai.io to services doc."
This reverts commit c0b3a1af0354e3aa9979cc00ae8630d7f0be63dc.
2018-11-09 23:12:27 +01:00
Bjørn Erik Pedersen
5570a6e478
Revert "Add Elasticsearch/bonsai.io to services doc."
This reverts commit c0b3a1af0354e3aa9979cc00ae8630d7f0be63dc.
2018-11-09 23:12:27 +01:00
Allison Zadrozny
15a0cda6ed Add Elasticsearch/bonsai.io to services doc.
Hip hip for OSS! 🙌
2018-11-09 22:56:38 +01:00
Allison Zadrozny
c0b3a1af03 Add Elasticsearch/bonsai.io to services doc.
Hip hip for OSS! 🙌
2018-11-09 22:56:38 +01:00