brevno-suite/hugo
6 years agoMerge commit '5a83bf314f4c0ce1d61341e0a1df21c9998e8154'
Bjørn Erik Pedersen [Fri, 21 Dec 2018 08:45:41 +0000 (09:45 +0100)]
Merge commit '5a83bf314f4c0ce1d61341e0a1df21c9998e8154'

6 years agoSquashed 'docs/' changes from d1cf9adc4..bd91d1cfd
Bjørn Erik Pedersen [Fri, 21 Dec 2018 08:45:41 +0000 (09:45 +0100)]
Squashed 'docs/' changes from d1cf9adc4..bd91d1cfd

bd91d1cfd Fix typo
0d45ea9cf Fix order of arguments in another strings.TrimLeft example
0982f65c1 Fix the order of arguments to strings.TrimRight
f1f9b7cd6 Arguments in example
5d9c7327f Fix shortcode example escape chars

git-subtree-dir: docs
git-subtree-split: bd91d1cfddf87fa693c1e2e7a2de555d2cee19f3

6 years agohugolib: Improve logic of output path trimming
Cameron Moore [Fri, 21 Dec 2018 08:42:37 +0000 (02:42 -0600)]
hugolib: Improve logic of output path trimming

Fixes #4666

6 years agosnap: Revert build-snap to 1.11/stable channel for go
Anthony Fok [Fri, 21 Dec 2018 04:46:47 +0000 (21:46 -0700)]
snap: Revert build-snap to 1.11/stable channel for go

This is to fix the following snap build error:

    Failed to install or refresh a snap: 'go' does not exist
    or is not available on the desired channel '1.11.4/stable'.
    Use `snap info go` to get a list of channels the snap is available on.

`snap info go` reveals that the '1.11/stable' channel automatically
follows the latest minor point release as it becomes available.

6 years agocommands: Remove the benchmark command
Bjørn Erik Pedersen [Thu, 20 Dec 2018 19:55:26 +0000 (20:55 +0100)]
commands: Remove the benchmark command

It's not particulary useful, and when we start to get bug reports about it, it is easier to remove it.

Closes #5543

6 years agoMove the emoji parsing to pageparser
Bjørn Erik Pedersen [Mon, 17 Dec 2018 20:03:23 +0000 (21:03 +0100)]
Move the emoji parsing to pageparser

This avoids double parsing the page content when `enableEmoji=true`.

This commit also adds some general improvements to the parser, making it in general much faster:

```bash
benchmark                     old ns/op     new ns/op     delta
BenchmarkShortcodeLexer-4     90258         101730        +12.71%
BenchmarkParse-4              148940        15037         -89.90%

benchmark                     old allocs     new allocs     delta
BenchmarkShortcodeLexer-4     456            700            +53.51%
BenchmarkParse-4              28             33             +17.86%

benchmark                     old bytes     new bytes     delta
BenchmarkShortcodeLexer-4     69875         81014         +15.94%
BenchmarkParse-4              8128          8304          +2.17%
```

Running some site benchmarks with Emoji support turned on:

```bash
benchmark                                                                                     old ns/op     new ns/op     delta
BenchmarkSiteBuilding/TOML,num_langs=3,num_pages=5000,tags_per_page=5,shortcodes,render-4     924556797     818115620     -11.51%

benchmark                                                                                     old allocs     new allocs     delta
BenchmarkSiteBuilding/TOML,num_langs=3,num_pages=5000,tags_per_page=5,shortcodes,render-4     4112613        4133787        +0.51%

benchmark                                                                                     old bytes     new bytes     delta
BenchmarkSiteBuilding/TOML,num_langs=3,num_pages=5000,tags_per_page=5,shortcodes,render-4     426982864     424363832     -0.61%
```

Fixes #5534

6 years agoparser/pageparser: Split the page lexer into some more files
Bjørn Erik Pedersen [Mon, 17 Dec 2018 19:54:06 +0000 (20:54 +0100)]
parser/pageparser: Split the page lexer into some more files

See #5534

6 years agohugolib: Enable Emoji in site benchmark
Bjørn Erik Pedersen [Thu, 20 Dec 2018 16:24:51 +0000 (17:24 +0100)]
hugolib: Enable Emoji in site benchmark

6 years agoparser/pageparser: Add a benchmark
Bjørn Erik Pedersen [Wed, 19 Dec 2018 19:07:49 +0000 (20:07 +0100)]
parser/pageparser: Add a benchmark

6 years agotpl: Fix case handling in cast params
Bjørn Erik Pedersen [Wed, 19 Dec 2018 09:25:53 +0000 (10:25 +0100)]
tpl: Fix case handling in cast params

Fixes #5538

6 years agoUpdate to Go 1.11.4
Bjørn Erik Pedersen [Wed, 19 Dec 2018 09:06:57 +0000 (10:06 +0100)]
Update to Go 1.11.4

Fixes #5524

6 years agoreleaser: Get ldflags for build date etc. in line for all builds
Bjørn Erik Pedersen [Wed, 19 Dec 2018 09:01:26 +0000 (10:01 +0100)]
releaser: Get ldflags for build date etc. in line for all builds

Closes #5539
Closes ##5388

6 years agotransform/urlreplacers: Simplify implementation
Bjørn Erik Pedersen [Mon, 17 Dec 2018 16:42:46 +0000 (17:42 +0100)]
transform/urlreplacers: Simplify implementation

6 years agotransform/urlreplacers: Support unquoted URLs in canonifyURLs replacer
Bjørn Erik Pedersen [Mon, 17 Dec 2018 13:25:00 +0000 (14:25 +0100)]
transform/urlreplacers: Support unquoted URLs in canonifyURLs replacer

Fixes #5529

6 years agohugolib: Remove "double layout" lookup
Bjørn Erik Pedersen [Mon, 17 Dec 2018 09:47:11 +0000 (10:47 +0100)]
hugolib: Remove "double layout" lookup

Fixes #5390

6 years agoFix "failed to create file caches from configuration: file exists" on Windows
Bjørn Erik Pedersen [Mon, 17 Dec 2018 09:01:35 +0000 (10:01 +0100)]
Fix "failed to create file caches from configuration: file exists" on Windows

Fixes #5497

6 years agohugolib: Restore taxonomy term path separation
Bjørn Erik Pedersen [Thu, 13 Dec 2018 10:52:26 +0000 (11:52 +0100)]
hugolib: Restore taxonomy term path separation

Fixes #5513

6 years agoimporter: fix jekyll import highlight options
Jean-François YUEN [Mon, 19 Nov 2018 16:33:54 +0000 (17:33 +0100)]
importer: fix jekyll import highlight options

6 years agodocs: Regenerate CLI docs
Bjørn Erik Pedersen [Wed, 12 Dec 2018 08:09:45 +0000 (09:09 +0100)]
docs: Regenerate CLI docs

Fixes #5507

6 years agoMerge commit 'eb16165694f868d73e57b6aed5c26ba5e98229de'
Bjørn Erik Pedersen [Wed, 12 Dec 2018 08:06:42 +0000 (09:06 +0100)]
Merge commit 'eb16165694f868d73e57b6aed5c26ba5e98229de'

6 years agoSquashed 'docs/' changes from 37095d540..d1cf9adc4
Bjørn Erik Pedersen [Wed, 12 Dec 2018 08:05:31 +0000 (09:05 +0100)]
Squashed 'docs/' changes from 37095d540..d1cf9adc4

d1cf9adc4 Fix typo
26e10a690 Fix the name and arg mismatch between partial defn and call
2db0e53cd Merge commit '9c36cff15224f6cbd19058ad61311229b7a23c83'
9c36cff15 Squashed 'themes/gohugoioTheme/' changes from 68ddff44..b8202f53
4b021eff8 Update lang.Merge.md
b37af2916 Add title to yaml
a9a281233 Fixed incorrect usage of the code-toggle shortcode
4560a0169 Update Warning for Theme Links (#676)
0305e3c6b Document .File.ContentBaseName
6d30c5aa1 Update configuration.md
158df174a Document .Sites and .Sites.First
0c0f583b8 Add stale config
e2531afd8 Document path template functions
4dd779057 Clarify that partialCached is per site/language
19e5bbe0c Update index.md
44b000857 Add missing dot
a41300cf9 Release 0.52
2d1d92b88 Merge branch 'temp52'
c5925250d releaser: Prepare repository for 0.53-DEV
d000b04a2 releaser: Add release notes to /docs for release of 0.52
4bb983a0a releaser: Bump versions for release of 0.52
36736ca28 tpl: Add "param" shortcode
378677aa6 Add Elasticsearch/bonsai.io to services doc.
4c3fd4fa4 docs: Document inline shortcodes
6c64c374c Whitelist CSS modules from purge
817a872b9 Improve search icon position
cf86ff1c7 Add minification and resource cache clear to build command
fd77e8df3 Update asset dependencies and adopt Hugo Pipes
cdbe97e8c Update render.md
b0e279220 git command to update submodule to latest
a1cb98c12 cache/filecache: Add a :project placeholder
07c1b2b46 cache/filecache: Use time.Duration for maxAge
ffa9b165e Add AND as a title
6e7733b40 Add OR as a sub title to make it easier to find in search
72b6791a1 docs: Document the new file cache
714d3ca91 Fix minification issues
cd1e961da Revert "Add Elasticsearch/bonsai.io to services doc."
15a0cda6e Add Elasticsearch/bonsai.io to services doc.
f931d86de Release 0.51
e2ffe867a Merge branch 'temp51'
423e7f5c8 releaser: Prepare repository for 0.52-DEV
c6f2d6ae1 releaser: Add release notes to /docs for release of 0.51
5bbb556dc releaser: Bump versions for release of 0.51
3b2b172b9 docs: Document shortcode error handling
b8672f3d4 docs: Document symdiff
4bc6071e6 docs: Document complement
d1baab752 docs: Re-generate CLI docs
9ea667e24 Revert "tpl: Update Jsonify to return pretty-print output"
ce5a1403d docs: Regenerate the docs helper
99a1f4a94 Fix note for reserved partial name(starting with -> including).
eba3cbc42 fix accidentally modification on paragraph.
3eebd98c3 Add note for reserved partial name.
40b881cc2 Document templates.Exists
b5c3bcd3b Update multilingual.md
61c59c67e Fix misspelling (#648)
f21d8c4a4 Correct minor typo (#5372)
e967001b9 Release 0.50
685fd6b08 releaser: Prepare repository for 0.51-DEV
f245a9faa releaser: Add release notes to /docs for release of 0.50
4354da30d releaser: Bump versions for release of 0.50
feaa05469 docs: Regenerate CLI docs
5c724200c Merge commit 'd6a4af7018e8618944a6471ceeb7aae1d4df6afa'
2ddab36c2 Merge commit '74309fe5699a595080fdb3a14711e0869babce99'
8cf296a7c docs: Regenerate CLI docs
9097683dd tpl: Update Jsonify to return pretty-print output

git-subtree-dir: docs
git-subtree-split: d1cf9adc412245c96d9d32592a903370d3972aef

6 years agoAdd /config dir support
Bjørn Erik Pedersen [Thu, 15 Nov 2018 08:28:02 +0000 (09:28 +0100)]
Add /config dir support

This commit adds support for a configuration directory (default `config`). The different pieces in this puzzle are:

* A new `--environment` (or `-e`) flag. This can also be set with the `HUGO_ENVIRONMENT` OS environment variable. The value for `environment` defaults to `production` when running `hugo` and `development` when running `hugo server`. You can set it to any value you want (e.g. `hugo server -e "Sensible Environment"`), but as it is used to load configuration from the file system, the letter case may be important. You can get this value in your templates with `{{ hugo.Environment }}`.
* A new `--configDir` flag (defaults to `config` below your project). This can also be set with `HUGO_CONFIGDIR` OS environment variable.

If the `configDir` exists, the configuration files will be read and merged on top of each other from left to right; the right-most value will win on duplicates.

Given the example tree below:

If `environment` is `production`, the left-most `config.toml` would be the one directly below the project (this can now be omitted if you want), and then `_default/config.toml` and finally `production/config.toml`. And since these will be merged, you can just provide the environment specific configuration setting in you production config, e.g. `enableGitInfo = true`. The order within the directories will be lexical (`config.toml` and then `params.toml`).

```bash
config
├── _default
│   ├── config.toml
│   ├── languages.toml
│   ├── menus
│   │   ├── menus.en.toml
│   │   └── menus.zh.toml
│   └── params.toml
├── development
│   └── params.toml
└── production
    ├── config.toml
    └── params.toml
```

Some configuration maps support the language code in the filename (e.g. `menus.en.toml`): `menus` (`menu` also works) and `params`.

Also note that the only folders with "a meaning" in the above listing is the top level directories below `config`. The `menus` sub folder is just added for better organization.

We use `TOML` in the example above, but Hugo also supports `JSON` and `YAML` as configuration formats. These can be mixed.

Fixes #5422

6 years agoresource/image: Fix "always false" condition
Iskander (Alex) Sharipov [Mon, 10 Dec 2018 14:31:44 +0000 (17:31 +0300)]
resource/image: Fix "always false" condition

Found using gocritic linter.

6 years agotpl: Add reflect namespace
Cameron Moore [Fri, 7 Dec 2018 22:29:37 +0000 (16:29 -0600)]
tpl: Add reflect namespace

Add a reflect namespace that offers a two boolean functions for
testing if a value is a map or slice.

Fixes #4081

6 years agominifiers: Fixx CSS2 color code handling
Bjørn Erik Pedersen [Fri, 7 Dec 2018 06:49:26 +0000 (07:49 +0100)]
minifiers: Fixx CSS2 color code handling

Fixes #5506

6 years agotpl/hugo: Use the correct Hugo var
Bjørn Erik Pedersen [Thu, 6 Dec 2018 13:57:56 +0000 (14:57 +0100)]
tpl/hugo: Use the correct Hugo var

See #5467

6 years agohugolib: Add .Site.Sites
Bjørn Erik Pedersen [Thu, 6 Dec 2018 09:29:28 +0000 (10:29 +0100)]
hugolib: Add .Site.Sites

Fixes #5504

6 years agoAdd tpl/site and tpl/hugo
Bjørn Erik Pedersen [Mon, 26 Nov 2018 09:11:22 +0000 (10:11 +0100)]
Add tpl/site and tpl/hugo

This means that the current `.Site` and ´.Hugo` is available as a globals, so you can do `site.IsServer`, `hugo.Version` etc.

Fixes #5470
Fixes #5467
Fixes #5503

6 years agocache/filecache: Simplify test
Bjørn Erik Pedersen [Tue, 4 Dec 2018 17:19:37 +0000 (18:19 +0100)]
cache/filecache: Simplify test

See #5497

6 years agocache/filecache: Use OS fs for test
Bjørn Erik Pedersen [Tue, 4 Dec 2018 09:52:04 +0000 (10:52 +0100)]
cache/filecache: Use OS fs for test

See #5497

6 years agotpl: Add godoc packages comments
Cameron Moore [Fri, 30 Nov 2018 03:32:53 +0000 (21:32 -0600)]
tpl: Add godoc packages comments

Also fix package name in tpl/templates.

6 years agocommon/collections: Fix defines typo
Christian Oliff [Thu, 29 Nov 2018 08:57:51 +0000 (17:57 +0900)]
common/collections: Fix defines typo

6 years agoreleaser: Prepare repository for 0.53-DEV
hugoreleaser [Wed, 28 Nov 2018 14:08:36 +0000 (14:08 +0000)]
releaser: Prepare repository for 0.53-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.52 v0.52
hugoreleaser [Wed, 28 Nov 2018 14:06:31 +0000 (14:06 +0000)]
releaser: Add release notes to /docs for release of 0.52

[ci skip]

6 years agoreleaser: Bump versions for release of 0.52
hugoreleaser [Wed, 28 Nov 2018 14:06:31 +0000 (14:06 +0000)]
releaser: Bump versions for release of 0.52

[ci skip]

6 years agoRelease 0.52
Bjørn Erik Pedersen [Wed, 28 Nov 2018 13:58:27 +0000 (14:58 +0100)]
Release 0.52

6 years agoreleaser: Add release notes draft for 0.52
hugoreleaser [Wed, 28 Nov 2018 13:14:49 +0000 (13:14 +0000)]
releaser: Add release notes draft for 0.52

Rename to *-ready.md to continue. [ci skip]

6 years agohugolib: Fall back to title in ByLinkTitle sort
Bjørn Erik Pedersen [Wed, 28 Nov 2018 11:28:24 +0000 (12:28 +0100)]
hugolib: Fall back to title in ByLinkTitle sort

Fixes #4953

6 years agohugolib: Improve nil handling in IsDescendant and IsAncestor
Bjørn Erik Pedersen [Wed, 28 Nov 2018 11:36:59 +0000 (12:36 +0100)]
hugolib: Improve nil handling in IsDescendant and IsAncestor

Fixes #5461

6 years agoparser/pageparser: Fix handling of commented out front matter
Bjørn Erik Pedersen [Wed, 28 Nov 2018 09:21:54 +0000 (10:21 +0100)]
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

6 years agoRemove duplicate mapstructure depdendency
Bjørn Erik Pedersen [Tue, 27 Nov 2018 23:17:43 +0000 (00:17 +0100)]
Remove duplicate mapstructure depdendency

6 years agoAdd dependency list to README
Bjørn Erik Pedersen [Tue, 27 Nov 2018 23:08:27 +0000 (00:08 +0100)]
Add dependency list to README

6 years agotpl/path: Add tests
Cameron Moore [Tue, 27 Nov 2018 18:17:35 +0000 (12:17 -0600)]
tpl/path: Add tests

6 years agotpl: Regenerate templates
Bjørn Erik Pedersen [Tue, 27 Nov 2018 17:15:55 +0000 (18:15 +0100)]
tpl: Regenerate templates

6 years agotpl: Fix whitespace issue
Max Arnold [Tue, 27 Nov 2018 17:15:10 +0000 (00:15 +0700)]
tpl: Fix whitespace issue

 Introduced  in #5276.

6 years agotpl: Add "param" shortcode
Bjørn Erik Pedersen [Tue, 27 Nov 2018 15:53:11 +0000 (16:53 +0100)]
tpl: Add "param" shortcode

Fixes #4010

6 years agodocs: Document inline shortcodes
Bjørn Erik Pedersen [Tue, 27 Nov 2018 13:43:12 +0000 (14:43 +0100)]
docs: Document inline shortcodes

See #4011

6 years agoAdd inline shortcode support
Bjørn Erik Pedersen [Mon, 26 Nov 2018 10:01:27 +0000 (11:01 +0100)]
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

6 years agotpl/collections: Add float64 support to where
Cameron Moore [Tue, 27 Nov 2018 00:40:35 +0000 (18:40 -0600)]
tpl/collections: Add float64 support to where

Fixes #5466

6 years agoparser/pageparser: Fix when only shortcode and then summary
Bjørn Erik Pedersen [Sat, 24 Nov 2018 16:06:26 +0000 (17:06 +0100)]
parser/pageparser: Fix when only shortcode and then summary

Fixes #5464

6 years agocommands: Include drafts in convert command
Bjørn Erik Pedersen [Sat, 24 Nov 2018 12:11:14 +0000 (13:11 +0100)]
commands: Include drafts in convert command

Fixes #5457

6 years agoHandle themes in the new file cache (for images, assets)
Bjørn Erik Pedersen [Fri, 23 Nov 2018 08:16:42 +0000 (09:16 +0100)]
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

6 years agoFix ignored --config flag with 'new' command
Kris Budhram [Sun, 18 Nov 2018 03:20:43 +0000 (22:20 -0500)]
Fix ignored --config flag with 'new' command

6 years agoFix Permalink for resource, baseURL with path and canonifyURLs set
Bjørn Erik Pedersen [Thu, 15 Nov 2018 12:35:28 +0000 (13:35 +0100)]
Fix Permalink for resource, baseURL with path and canonifyURLs set

Fixes #5226

6 years agoAdd tests for permalink on Resource with baseURL with path
Bjørn Erik Pedersen [Thu, 15 Nov 2018 06:21:14 +0000 (07:21 +0100)]
Add tests for permalink on Resource with baseURL with path

See #5226

6 years agohelpers: Add a comment about file mode for new files
Bjørn Erik Pedersen [Wed, 14 Nov 2018 16:44:04 +0000 (17:44 +0100)]
helpers: Add a comment about file mode for new files

See #5434

6 years agocache/filecache: Add a :project placeholder
Bjørn Erik Pedersen [Wed, 14 Nov 2018 16:18:32 +0000 (17:18 +0100)]
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

6 years agocache/filecache: Add a cache prune func
Bjørn Erik Pedersen [Wed, 14 Nov 2018 11:06:46 +0000 (12:06 +0100)]
cache/filecache: Add a cache prune func

Fixes #5439

6 years agocache/filecache: Add a filecache root dir
Bjørn Erik Pedersen [Wed, 14 Nov 2018 10:53:45 +0000 (11:53 +0100)]
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.

6 years agocache/filecache: Use time.Duration for maxAge
Bjørn Erik Pedersen [Wed, 14 Nov 2018 09:51:41 +0000 (10:51 +0100)]
cache/filecache: Use time.Duration for maxAge

Fixes #5438

6 years agocache/filecache: Split implementation and config into separate files
Bjørn Erik Pedersen [Wed, 14 Nov 2018 09:44:04 +0000 (10:44 +0100)]
cache/filecache: Split implementation and config into separate files

6 years agoUpdate to LibSASS 3.5.5
Bjørn Erik Pedersen [Wed, 14 Nov 2018 09:35:42 +0000 (10:35 +0100)]
Update to LibSASS 3.5.5

Fixes #5432
See #5435

6 years agoMore spelling corrections
Bjørn Erik Pedersen [Tue, 13 Nov 2018 17:28:40 +0000 (18:28 +0100)]
More spelling corrections

6 years agocache/filecache: Spelling corrections
Bjørn Erik Pedersen [Tue, 13 Nov 2018 17:16:53 +0000 (18:16 +0100)]
cache/filecache: Spelling corrections

6 years agoRemove appveyor
Bjørn Erik Pedersen [Tue, 13 Nov 2018 13:36:17 +0000 (14:36 +0100)]
Remove appveyor

We now build on Travis for all platforms.

6 years agodocs: Document the new file cache
Bjørn Erik Pedersen [Tue, 13 Nov 2018 13:29:45 +0000 (14:29 +0100)]
docs: Document the new file cache

See #5404

6 years agoAdd a consolidated file cache
Bjørn Erik Pedersen [Thu, 8 Nov 2018 09:24:13 +0000 (10:24 +0100)]
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 https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml

Fixes #5404

6 years agoAdd Windows build config to Travis
Emir Beganović [Tue, 13 Nov 2018 10:39:54 +0000 (10:39 +0000)]
Add Windows build config to Travis

6 years agoRevert "Add Elasticsearch/bonsai.io to services doc."
Bjørn Erik Pedersen [Fri, 9 Nov 2018 22:12:27 +0000 (23:12 +0100)]
Revert "Add Elasticsearch/bonsai.io to services doc."

This reverts commit c0b3a1af0354e3aa9979cc00ae8630d7f0be63dc.

6 years agoAdd Elasticsearch/bonsai.io to services doc.
Allison Zadrozny [Fri, 9 Nov 2018 21:51:22 +0000 (15:51 -0600)]
Add Elasticsearch/bonsai.io to services doc.

Hip hip for OSS! 🙌

6 years agotpl: Fix test to pass with gccgo
Ian Lance Taylor [Fri, 9 Nov 2018 07:54:08 +0000 (02:54 -0500)]
tpl: Fix test to pass with gccgo

When run under gccgo, the test looks for the name that gccgo gives to
a thunk method.  This name is not normally visible, but can be seen
when using reflect.FuncForPC as this code does.  That name changed in
https://golang.org/cl/89555.  Change the test to work with both the
old name "$thunk0" and the new name "thunk0".

Fixes golang/go#28669

6 years agoreleaser: Prepare repository for 0.52-DEV
hugoreleaser [Wed, 7 Nov 2018 10:11:48 +0000 (10:11 +0000)]
releaser: Prepare repository for 0.52-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.51 v0.51
hugoreleaser [Wed, 7 Nov 2018 10:09:43 +0000 (10:09 +0000)]
releaser: Add release notes to /docs for release of 0.51

[ci skip]

6 years agoreleaser: Bump versions for release of 0.51
hugoreleaser [Wed, 7 Nov 2018 10:09:43 +0000 (10:09 +0000)]
releaser: Bump versions for release of 0.51

[ci skip]

6 years agoRelease 0.51
Bjørn Erik Pedersen [Wed, 7 Nov 2018 09:56:52 +0000 (10:56 +0100)]
Release 0.51

6 years agoreleaser: Add release notes draft for 0.51
hugoreleaser [Wed, 7 Nov 2018 09:48:47 +0000 (09:48 +0000)]
releaser: Add release notes draft for 0.51

Rename to *-ready.md to continue. [ci skip]

6 years agodocs: Document shortcode error handling
Bjørn Erik Pedersen [Wed, 7 Nov 2018 09:20:08 +0000 (10:20 +0100)]
docs: Document shortcode error handling

Closes https://github.com/gohugoio/hugoDocs/issues/660

6 years agodocs: Document symdiff
Bjørn Erik Pedersen [Wed, 7 Nov 2018 09:00:33 +0000 (10:00 +0100)]
docs: Document symdiff

Closes https://github.com/gohugoio/hugoDocs/issues/659

6 years agodocs: Document complement
Bjørn Erik Pedersen [Wed, 7 Nov 2018 07:52:41 +0000 (08:52 +0100)]
docs: Document complement

Closes https://github.com/gohugoio/hugoDocs/issues/658

6 years agohugolib: Improve error message on duplicate menu items
Bjørn Erik Pedersen [Wed, 7 Nov 2018 07:36:35 +0000 (08:36 +0100)]
hugolib: Improve error message on duplicate menu items

6 years agotpl/collections: Properly handle pointer types in complement/symdiff
Bjørn Erik Pedersen [Wed, 7 Nov 2018 07:59:21 +0000 (08:59 +0100)]
tpl/collections: Properly handle pointer types in complement/symdiff

We cannot compare them by values, because that gets `hash of unhashable type` for the prime use case.

6 years agodeps: Update minify
Bjørn Erik Pedersen [Tue, 6 Nov 2018 19:10:02 +0000 (20:10 +0100)]
deps: Update minify

No functional changes, just support for Go Modules.

6 years agotpl/collections: Add collections.SymDiff
Bjørn Erik Pedersen [Tue, 6 Nov 2018 12:04:11 +0000 (13:04 +0100)]
tpl/collections: Add collections.SymDiff

Fixes #5410

6 years agohugolib: Fix changing paginators in lazy render
Bjørn Erik Pedersen [Tue, 6 Nov 2018 09:04:37 +0000 (10:04 +0100)]
hugolib: Fix changing paginators in lazy render

Fixes #5406

6 years agotpl/collections: Add collections.Complement
Bjørn Erik Pedersen [Mon, 5 Nov 2018 17:50:11 +0000 (18:50 +0100)]
tpl/collections: Add collections.Complement

Fixes #5400

6 years agocommands: Fix spelling
秦世成 [Tue, 6 Nov 2018 07:45:19 +0000 (15:45 +0800)]
commands: Fix spelling

6 years agodocs: Re-generate CLI docs
Bjørn Erik Pedersen [Mon, 5 Nov 2018 13:18:45 +0000 (14:18 +0100)]
docs: Re-generate CLI docs

6 years agoFix shortcode directly following a shortcode delimiter
Bjørn Erik Pedersen [Mon, 5 Nov 2018 12:30:16 +0000 (13:30 +0100)]
Fix shortcode directly following a shortcode delimiter

Fixes #5402

6 years agocommands: Add --minify to hugo server
Bjørn Erik Pedersen [Sun, 4 Nov 2018 17:39:14 +0000 (18:39 +0100)]
commands: Add --minify to hugo server

6 years agocommands: Fix recently broken error template
Bjørn Erik Pedersen [Sat, 3 Nov 2018 15:55:45 +0000 (16:55 +0100)]
commands: Fix recently broken error template

We need a test for this ...

6 years agoMake WARN the new default log log level
Bjørn Erik Pedersen [Thu, 1 Nov 2018 21:27:42 +0000 (22:27 +0100)]
Make WARN the new default log log level

This commit also pulls down the log level for a set of WARN statements to INFO. There should be no ERRORs or WARNINGs in a regular Hugo build. That is the story about the Boy Who Cried Wolf.

Since the WARN log is now more visible, this commit also improves on some of them, most notable the "layout not found", which now would look something like this:

```bash
WARN 2018/11/02 09:02:18 Found no layout for "home", language "en", output format "CSS": create a template below /layouts with one of these filenames: index.en.css.css, home.en.css.css, list.en.css.css, index.css.css, home.css.css, list.css.css, index.en.css, home.en.css, list.en.css, index.css, home.css, list.css, _default/index.en.css.css, _default/home.en.css.css, _default/list.en.css.css, _default/index.css.css, _default/home.css.css, _default/list.css.css, _default/index.en.css, _default/home.en.css, _default/list.en.css, _default/index.css, _default/home.css, _default/list.css
```

Fixes #5203

6 years agoRevert "tpl: Update Jsonify to return pretty-print output"
Bjørn Erik Pedersen [Fri, 2 Nov 2018 18:03:48 +0000 (19:03 +0100)]
Revert "tpl: Update Jsonify to return pretty-print output"

This reverts commit 5a52cd5f920bb3d067ab1682adece9f813c67ba1.

Closes #5394

6 years agodocs: Regenerate the docs helper
Bjørn Erik Pedersen [Fri, 2 Nov 2018 11:56:19 +0000 (12:56 +0100)]
docs: Regenerate the docs helper

6 years agotpl: Fix the docshelper
Bjørn Erik Pedersen [Fri, 2 Nov 2018 11:55:09 +0000 (12:55 +0100)]
tpl: Fix the docshelper

6 years agoSkip watcher event files if matched in ignoreFiles
Kris Budhram [Mon, 15 Oct 2018 03:04:52 +0000 (23:04 -0400)]
Skip watcher event files if matched in ignoreFiles

6 years agodeps: Update Chroma
Bjørn Erik Pedersen [Fri, 2 Nov 2018 08:31:27 +0000 (09:31 +0100)]
deps: Update Chroma

Fixes #5392

6 years agoFix ANSI character output regression on Windows
Lorenz Cuno Klopfenstein [Fri, 2 Nov 2018 08:09:02 +0000 (09:09 +0100)]
Fix ANSI character output regression on Windows

Fixes #5377

6 years agohugolib: Remove deprecated useModTimeAsFallback
Bjørn Erik Pedersen [Thu, 1 Nov 2018 20:14:30 +0000 (21:14 +0100)]
hugolib: Remove deprecated useModTimeAsFallback

6 years agohugolib: Bump to ERROR for the deprecated Pages.Sort
Bjørn Erik Pedersen [Thu, 1 Nov 2018 20:11:45 +0000 (21:11 +0100)]
hugolib: Bump to ERROR for the deprecated Pages.Sort

6 years agohugolib: Deprecate .Site.Ref and .Site.RelRef
Bjørn Erik Pedersen [Thu, 1 Nov 2018 20:08:12 +0000 (21:08 +0100)]
hugolib: Deprecate .Site.Ref and .Site.RelRef

Fixes #5386