brevno-suite/hugo
6 years agohugolib: Remove unused slice
Bjørn Erik Pedersen [Sun, 24 Mar 2019 09:08:19 +0000 (10:08 +0100)]
hugolib: Remove unused slice

6 years agoRun gofmt -s
Bjørn Erik Pedersen [Sat, 23 Mar 2019 19:15:06 +0000 (20:15 +0100)]
Run gofmt -s

6 years agoMake Page an interface
Bjørn Erik Pedersen [Wed, 2 Jan 2019 11:33:26 +0000 (12:33 +0100)]
Make Page an interface

The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  #5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

See #5074
Fixes #5763
Fixes #5758
Fixes #5090
Fixes #5204
Fixes #4695
Fixes #5607
Fixes #5707
Fixes #5719
Fixes #3113
Fixes #5706
Fixes #5767
Fixes #5723
Fixes #5769
Fixes #5770
Fixes #5771
Fixes #5759
Fixes #5776
Fixes #5777
Fixes #5778

6 years agoList future and expired dates in CSV format
Daniel Compton [Thu, 21 Feb 2019 01:34:32 +0000 (14:34 +1300)]
List future and expired dates in CSV format

It is useful to see the date that a post will be published, or the date
that it has expired, to build tooling around it. This commit writes
posts and their publish/expired date as CSV.

Fixes #5610

6 years agoUpdate to Go 1.12.1 and Go 1.11.6
Bjørn Erik Pedersen [Sun, 17 Mar 2019 07:37:42 +0000 (08:37 +0100)]
Update to Go 1.12.1 and Go 1.11.6

Fixes #5755

6 years agotpl/tplimpl: Fix mutex unlock
Bjørn Erik Pedersen [Sat, 16 Mar 2019 08:40:27 +0000 (09:40 +0100)]
tpl/tplimpl: Fix mutex unlock

6 years agocommands: Fix doLiveReload logic
Bjørn Erik Pedersen [Thu, 14 Mar 2019 20:39:00 +0000 (21:39 +0100)]
commands: Fix doLiveReload logic

Fixes #5754

6 years agodeps: Update Viper
Bjørn Erik Pedersen [Wed, 13 Mar 2019 09:42:43 +0000 (10:42 +0100)]
deps: Update Viper

6 years agohugolib: Adjust site benchmark
Bjørn Erik Pedersen [Tue, 12 Mar 2019 19:27:50 +0000 (20:27 +0100)]
hugolib: Adjust site benchmark

Having all the pages with shortcodes isn't realistic.

6 years agoUpdate to Go 1.12
Bjørn Erik Pedersen [Thu, 7 Mar 2019 09:26:26 +0000 (10:26 +0100)]
Update to Go 1.12

Fixes #5716

6 years agoRemove Gitter dev chat link
Bjørn Erik Pedersen [Wed, 6 Mar 2019 23:37:50 +0000 (00:37 +0100)]
Remove Gitter dev chat link

Almost every question we get there belong on https://discourse.gohugo.io/

6 years agotpl/tplimpl: Fix template truth logic
Bjørn Erik Pedersen [Wed, 6 Mar 2019 08:07:49 +0000 (09:07 +0100)]
tpl/tplimpl: Fix template truth logic

Before this commit, due to a bug in Go's `text/template` package, this would print different output for typed nil interface values:

```
{{ if .AuthenticatedUser }}User is authenticated!{{ else }}{{ end }}
{{ if not .AuthenticatedUser }}{{ else }}}User is authenticated!{{ end }}
```

This commit works around this by wrapping every `if` and `with` with a custom `getif` template func with truth logic that matches `not`, `and` and `or`.

Those 3 template funcs from Go's stdlib are now pulled into Hugo's source tree and adjusted to support custom zero values, e.g. types that implement `IsZero`.

This means that you can now do:

```
{{ with .Date }}{{ . }}{{ end }}
```

And it would work as expected.

Fixes #5738

6 years agoUpdate Travis config to work for forked builds
grahamjamesaddis [Tue, 5 Mar 2019 13:26:49 +0000 (13:26 +0000)]
Update Travis config to work for forked builds

6 years agoAdd skipHTML option to blackfriday config
arrtchiu [Mon, 4 Mar 2019 10:27:18 +0000 (18:27 +0800)]
Add skipHTML option to blackfriday config

6 years agoUpdate stretchr/testify to 1.3.0.
Elliott Sales de Andrade [Sat, 2 Mar 2019 06:21:48 +0000 (01:21 -0500)]
Update stretchr/testify to 1.3.0.

6 years agoRewrite relative action URLS
Berin Larson [Tue, 26 Feb 2019 08:11:06 +0000 (13:41 +0530)]
Rewrite relative action URLS

Fixes #5701

6 years agoSupport Docker args TAGS, WORKDIR, CGO; speed up repetitive builds
Anthony Metzidis [Thu, 7 Feb 2019 01:01:26 +0000 (17:01 -0800)]
Support Docker args TAGS, WORKDIR, CGO; speed up repetitive builds

6 years agohugolib: Adjust test for Go 1.12
Bjørn Erik Pedersen [Tue, 19 Feb 2019 20:47:03 +0000 (21:47 +0100)]
hugolib: Adjust test for Go 1.12

6 years agoSupport nested keys/fields with missing values with the `where` function
Anton Harniakou [Sun, 3 Feb 2019 11:03:44 +0000 (14:03 +0300)]
Support nested keys/fields with missing values with the `where` function

Before this commit `where` would produce an error and bail building the
site. Now, `where` simply skips an element of a collection and does not
add it to the final result.

Closes #5637
Closes #5416

6 years agocommands: Update debouncer version
Bjørn Erik Pedersen [Sat, 2 Feb 2019 11:04:42 +0000 (12:04 +0100)]
commands: Update debouncer version

6 years agocommon/herrors: Fix args order in strings.TrimPrefix
Iskander (Alex) Sharipov [Sat, 2 Feb 2019 07:19:12 +0000 (10:19 +0300)]
common/herrors: Fix args order in strings.TrimPrefix

Old code always returned "." or "" (if filepath.Ext(filename) returned ".").
Now it properly trims the prefix.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
6 years agotpl: Fix strings.HasPrefix args order
Iskander (Alex) Sharipov [Sat, 2 Feb 2019 00:26:05 +0000 (03:26 +0300)]
tpl: Fix strings.HasPrefix args order

6 years agoreleaser: Prepare repository for 0.55.0-DEV
hugoreleaser [Fri, 1 Feb 2019 09:42:55 +0000 (09:42 +0000)]
releaser: Prepare repository for 0.55.0-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.54.0 v0.54.0
hugoreleaser [Fri, 1 Feb 2019 09:40:32 +0000 (09:40 +0000)]
releaser: Add release notes to /docs for release of 0.54.0

[ci skip]

6 years agoreleaser: Bump versions for release of 0.54.0
hugoreleaser [Fri, 1 Feb 2019 09:40:32 +0000 (09:40 +0000)]
releaser: Bump versions for release of 0.54.0

[ci skip]

6 years agoRelease 0.54.0
Bjørn Erik Pedersen [Fri, 1 Feb 2019 09:34:37 +0000 (10:34 +0100)]
Release 0.54.0

6 years agoreleaser: Add release notes draft for 0.54.0
hugoreleaser [Fri, 1 Feb 2019 09:31:43 +0000 (09:31 +0000)]
releaser: Add release notes draft for 0.54.0

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

6 years agoreleaser: Adjust patch logic
Bjørn Erik Pedersen [Fri, 1 Feb 2019 09:09:14 +0000 (10:09 +0100)]
releaser: Adjust patch logic

See #5639

6 years agocommon/hugo: Use official semver even for main releases
Bjørn Erik Pedersen [Fri, 1 Feb 2019 08:44:12 +0000 (09:44 +0100)]
common/hugo: Use official semver even for main releases

Closes #5639

6 years agoMerge commit 'f27faf9afd0a8db768a21954b8755f1bf1a14f1b'
Bjørn Erik Pedersen [Fri, 1 Feb 2019 08:08:24 +0000 (09:08 +0100)]
Merge commit 'f27faf9afd0a8db768a21954b8755f1bf1a14f1b'

6 years agoSquashed 'docs/' changes from 49809a038..4f4d1f48c
Bjørn Erik Pedersen [Fri, 1 Feb 2019 08:08:24 +0000 (09:08 +0100)]
Squashed 'docs/' changes from 49809a038..4f4d1f48c

4f4d1f48c Merge commit 'ccb3ee5c57a00d5d32c53c882cf9893181a6ec10'
ccb3ee5c5 Squashed 'themes/gohugoioTheme/' changes from dafc91ff1..042112e2d

git-subtree-dir: docs
git-subtree-split: 4f4d1f48cd3da268c108f1ea6c204dd30f516bb1

6 years agoMerge commit '5e078383a787e8b5ec3ba73f05ea4130840afbe2'
Bjørn Erik Pedersen [Fri, 1 Feb 2019 08:01:04 +0000 (09:01 +0100)]
Merge commit '5e078383a787e8b5ec3ba73f05ea4130840afbe2'

6 years agoSquashed 'docs/' changes from 785e375f..49809a03
Bjørn Erik Pedersen [Fri, 1 Feb 2019 08:01:04 +0000 (09:01 +0100)]
Squashed 'docs/' changes from 785e375f..49809a03

49809a03 Merge commit '20a631b4964fc0ab9137cce1e41774cbc17de044'
20a631b4 Squashed 'themes/gohugoioTheme/' changes from b8202f539..dafc91ff1
8b58f565 Re-generate CLI docs
4653a724 Add Netlify deployment badge
2d6246bc Remove some deprecated site variables
e6777153 Improve Algolia Search Display Styling
1570999f Add missing "." in front of gitlab-ci.yaml example
b922ae7d This adds documentation to the new configDir/Environment logic from .53 (#729)
7cff379f Correctly escape multi-word taxonomy terms in example
2dfeeda4 fix typo by removing stray paren
0870bd9a Fix typo in `paginate` description
91e8be85 Fixes https://github.com/gohugoio/hugo/issues/5609
c1db65ec Make the dummy URL more obvious
b4589ff0 Fix a link
b73dcb9a Consistently use "posts" as section name in examples
7a56abbc Format definitions
a9c6fd9b Minor clarification over the last commit
5c86bdc8 Add alternative instructions for Quick Start for non-git users
dafe7ee9 Add Visual Studio Code plug-ins
110ed19e Update HUGO_VERSION
2abd031a Update page.md
b332f7b9 Update page.md
f5a8c9d4 Update static-files.md
6d0c155c Add note about relative protocol URLs
a13751ac Theme Warning: Remove note about unquoted URLs
4c8f7d68 Incorporate feedback
6f2b9cf0 Update Creating Themes Warning
40d88d98 Fix ToC example to use binary true/false
4a11f3f1 Fix typo
2dbfc0a4 Fix a typo in taxonomies
d63790ef Do not mark UndocumentedFeature issues as stale
d7aff095 Regenerate docs.json
71c0826f Update transform.Unmarshal.md

git-subtree-dir: docs
git-subtree-split: 49809a038b2691637bab7f3f2e385dde654a88b8

6 years agotpl/data: Adjust tests
Bjørn Erik Pedersen [Fri, 1 Feb 2019 07:54:30 +0000 (08:54 +0100)]
tpl/data: Adjust tests

See #5643

6 years agotpl/data: Prevent getJSON and getCSV fetch failure from aborting build
Anthony Fok [Mon, 28 Jan 2019 23:27:43 +0000 (16:27 -0700)]
tpl/data: Prevent getJSON and getCSV fetch failure from aborting build

Fixes #5643

6 years agocommands: Add test for --configDir
Bjørn Erik Pedersen [Fri, 1 Feb 2019 07:40:53 +0000 (08:40 +0100)]
commands: Add test for --configDir

See #5662

6 years agoIgnore unknown config files in config dir
Bjørn Erik Pedersen [Fri, 1 Feb 2019 06:45:35 +0000 (07:45 +0100)]
Ignore unknown config files in config dir

Swap files etc.

Fixes #5646

6 years agoStore supported config formats in a variable
Anton Harniakou [Thu, 31 Jan 2019 12:06:18 +0000 (15:06 +0300)]
Store supported config formats in a variable

6 years agoFix some inline shortcode issues
Bjørn Erik Pedersen [Thu, 31 Jan 2019 10:53:21 +0000 (11:53 +0100)]
Fix some inline shortcode issues

Fixes #5645
Fixes #5653

6 years agoBump to Go 1.11.5
Bjørn Erik Pedersen [Thu, 31 Jan 2019 10:35:27 +0000 (11:35 +0100)]
Bump to Go 1.11.5

Fixes #5654

6 years agoUpdate Afero
Bjørn Erik Pedersen [Wed, 30 Jan 2019 08:35:55 +0000 (09:35 +0100)]
Update Afero

Fixes #5650

6 years agohugolib: Expand TestPageWithEmoji to cover '+', '-' and '_' too
Anthony Fok [Tue, 29 Jan 2019 20:03:42 +0000 (13:03 -0700)]
hugolib: Expand TestPageWithEmoji to cover '+', '-' and '_' too

See #5635 and commit 3038464e

6 years agoAccept hyphen and plus sign in emoji detection
Anthony Fok [Tue, 29 Jan 2019 12:38:36 +0000 (05:38 -0700)]
Accept hyphen and plus sign in emoji detection

Fixes #5635

6 years agoFix OpenGraph image fallback to site params
Elliot Murphy [Fri, 25 Jan 2019 04:19:59 +0000 (23:19 -0500)]
Fix OpenGraph image fallback to site params

Signed-off-by: Elliot Murphy <statik@users.noreply.github.com>
6 years agoSupport numeric sort in ByParam
Anton Harniakou [Tue, 15 Jan 2019 12:41:54 +0000 (15:41 +0300)]
Support numeric sort in ByParam

With this commit ByParam takes into account a type of a value under a
key. If both values are numeric then they're coerced into float64 and
then get compared.
If any value isn't numeric, for example it's nil or string, then both
values coerced into string and get compared as strings
(lexicographicaly)

Nil values are always sent to the end.

Numeric values confirm to any type listed below:
uint8, uint16, uint32, uint64, int, int8, int16, int32, int64, float32, float64

Closes #5305

6 years agoFix Params case handling in the new site global
Bjørn Erik Pedersen [Fri, 18 Jan 2019 17:48:19 +0000 (17:48 +0000)]
Fix Params case handling in the new site global

Fixes #5615

6 years agoMake hugo server -t work again
Anton Harniakou [Sun, 13 Jan 2019 09:44:38 +0000 (12:44 +0300)]
Make hugo server -t work again

This commit solves an issue where hugo would ignore the cli -t flag
and only use a theme defined in config.toml.

Also allow -t flag to accept a string slice.

Closes #5569
Closes #5061
Related #4868

6 years agoAdd configFile(s) back to the watch list after RENAME event too
Anthony Fok [Thu, 10 Jan 2019 22:57:30 +0000 (15:57 -0700)]
Add configFile(s) back to the watch list after RENAME event too

Alleviates #5205

6 years agoRemove historical rssURI config
mywaiting [Thu, 10 Jan 2019 17:24:38 +0000 (01:24 +0800)]
Remove historical rssURI config

6 years agoUse subtests with server_test.go
Anton Harniakou [Mon, 7 Jan 2019 16:25:27 +0000 (19:25 +0300)]
Use subtests with server_test.go

Use Golang's subtests to provide a convenient way
to run specific tests.
Example:
go test -run=TestFixURL/Basic_production

6 years agoresources: Move resource interfaces into its own package
Bjørn Erik Pedersen [Wed, 2 Jan 2019 10:58:32 +0000 (11:58 +0100)]
resources: Move resource interfaces into its own package

6 years agoresource: Move resource processors into sub-packages
Bjørn Erik Pedersen [Wed, 2 Jan 2019 09:36:12 +0000 (10:36 +0100)]
resource: Move resource processors into sub-packages

6 years agoUpdate _index.md
Marc Robinson [Tue, 1 Jan 2019 22:27:56 +0000 (17:27 -0500)]
Update _index.md

Corrects misspelling of sync (synch)

6 years agohugolib: Restore 0.48 slash handling in taxonomies
Bjørn Erik Pedersen [Sat, 29 Dec 2018 09:35:46 +0000 (10:35 +0100)]
hugolib: Restore 0.48 slash handling in taxonomies

Fixes #5571

6 years agoRevert " Fix handling of taxonomy terms containing slashes"
Bjørn Erik Pedersen [Sat, 29 Dec 2018 09:14:37 +0000 (10:14 +0100)]
Revert " Fix handling of taxonomy terms containing slashes"

See #4090
See #5571

This reverts commit fff132537b4094221f4f099e2251f3cda613060f.

6 years agoUpdate go.sum
Bjørn Erik Pedersen [Sun, 30 Dec 2018 16:07:31 +0000 (17:07 +0100)]
Update go.sum

6 years agoRevert "hugolib: Restore taxonomy term path separation"
Bjørn Erik Pedersen [Sat, 29 Dec 2018 09:00:17 +0000 (10:00 +0100)]
Revert "hugolib: Restore taxonomy term path separation"

See #5571

This reverts commit 9ce0a1fb7011bd75eb0e2262e35354c49ce98ac5.

6 years agotpl: Fix reflect
Cameron Moore [Fri, 28 Dec 2018 09:41:46 +0000 (03:41 -0600)]
tpl: Fix reflect

Fixes #5564

6 years agocache/namedmemcache: Fix data race
Bjørn Erik Pedersen [Thu, 27 Dec 2018 11:05:42 +0000 (12:05 +0100)]
cache/namedmemcache: Fix data race

6 years agoUpdate Chroma
Bjørn Erik Pedersen [Thu, 27 Dec 2018 09:58:34 +0000 (10:58 +0100)]
Update Chroma

Fixes #4993

6 years agoMake docshelper run again
Bjørn Erik Pedersen [Thu, 27 Dec 2018 09:08:44 +0000 (10:08 +0100)]
Make docshelper run again

Fixes #5568

6 years agoreleaser: Use Git short commit in release binaries
Bjørn Erik Pedersen [Wed, 26 Dec 2018 10:31:58 +0000 (11:31 +0100)]
releaser: Use Git short commit in release binaries

Fixes #5562

6 years agoreleaser: Bump Goreleaser version
Bjørn Erik Pedersen [Wed, 26 Dec 2018 10:30:05 +0000 (11:30 +0100)]
releaser: Bump Goreleaser version

6 years agoMerge commit '978856e2ad12d2bcaf37bb9e31f806b30a4c42f4'
Bjørn Erik Pedersen [Wed, 26 Dec 2018 09:27:54 +0000 (10:27 +0100)]
Merge commit '978856e2ad12d2bcaf37bb9e31f806b30a4c42f4'

6 years agoSquashed 'docs/' changes from bd91d1cfd..785e375f5
Bjørn Erik Pedersen [Wed, 26 Dec 2018 09:27:12 +0000 (10:27 +0100)]
Squashed 'docs/' changes from bd91d1cfd..785e375f5

785e375f5 Change 'my-another-post' to 'my-other-post'
ba9a69d25 Update reflect.IsSlice.md
806344258 Update reflect.IsMap.md
757c0dafa Update index.md
d3f20a2d5 Update index.md
9952e72a0 Formatting
70458ccf2 Formatting
7e0dd3969 Merge branch 'config-dir'
06a5c11fc Release 0.53
01c00229f releaser: Prepare repository for 0.54-DEV
29b223f78 releaser: Add release notes to /docs for release of 0.53
4f61d1194 releaser: Bump versions for release of 0.53
320a0ac68 Refactor config below /config
ec16b611e docs: Adjust CSV example
cecf97dfc Rename CSV option from comma to delimiter
18d06df58 docs: Document transform.Unmarshal
fdace78b5 docs: Regenerate CLI docs
b8f84ac59 hugolib: Add .Name as a shortcode variable
6612dd1b8 Merge commit '5a83bf314f4c0ce1d61341e0a1df21c9998e8154'
9b211089f docs: Regenerate CLI docs
9af46af3c Merge commit 'eb16165694f868d73e57b6aed5c26ba5e98229de'
12f46f356 tpl: Add reflect namespace

git-subtree-dir: docs
git-subtree-split: 785e375f577394c6f782ef51796e2efe88d52cbb

6 years agoreleaser: Prepare repository for 0.54-DEV
hugoreleaser [Mon, 24 Dec 2018 08:26:54 +0000 (08:26 +0000)]
releaser: Prepare repository for 0.54-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.53 v0.53
hugoreleaser [Mon, 24 Dec 2018 08:24:42 +0000 (08:24 +0000)]
releaser: Add release notes to /docs for release of 0.53

[ci skip]

6 years agoreleaser: Bump versions for release of 0.53
hugoreleaser [Mon, 24 Dec 2018 08:24:42 +0000 (08:24 +0000)]
releaser: Bump versions for release of 0.53

[ci skip]

6 years agorelease: Fix goreleaser config
Bjørn Erik Pedersen [Mon, 24 Dec 2018 08:20:09 +0000 (09:20 +0100)]
release: Fix goreleaser config

6 years agoRelease 0.53
hugoreleaser [Mon, 24 Dec 2018 07:16:18 +0000 (07:16 +0000)]
Release 0.53

6 years agotpl/transform: Include options in cache key
Bjørn Erik Pedersen [Sun, 23 Dec 2018 20:34:17 +0000 (21:34 +0100)]
tpl/transform: Include options in cache key

See #5555

6 years agodocs: Adjust CSV example
Bjørn Erik Pedersen [Sun, 23 Dec 2018 20:12:41 +0000 (21:12 +0100)]
docs: Adjust CSV example

See #5555

6 years agoRename CSV option from comma to delimiter
Bjørn Erik Pedersen [Sun, 23 Dec 2018 20:08:12 +0000 (21:08 +0100)]
Rename CSV option from comma to delimiter

See #5555

6 years agodocs: Document transform.Unmarshal
Bjørn Erik Pedersen [Sun, 23 Dec 2018 18:43:17 +0000 (19:43 +0100)]
docs: Document transform.Unmarshal

Fixes #5556

6 years agohugolib: Adjust test
Bjørn Erik Pedersen [Sun, 23 Dec 2018 18:42:51 +0000 (19:42 +0100)]
hugolib: Adjust test

See #5544

6 years agodocs: Regenerate CLI docs
Bjørn Erik Pedersen [Sun, 23 Dec 2018 18:05:40 +0000 (19:05 +0100)]
docs: Regenerate CLI docs

Fixes #5544

6 years agotpl/transform: Simplify transform.Unmarshal func
Bjørn Erik Pedersen [Sun, 23 Dec 2018 15:43:04 +0000 (16:43 +0100)]
tpl/transform: Simplify transform.Unmarshal func

See #5428

6 years agoAdd CSV support to transform.Unmarshal
Bjørn Erik Pedersen [Sun, 23 Dec 2018 09:40:32 +0000 (10:40 +0100)]
Add CSV support to transform.Unmarshal

Fixes #5555

6 years agotpl/transform: Add transform.Unmarshal func
Bjørn Erik Pedersen [Fri, 21 Dec 2018 15:21:13 +0000 (16:21 +0100)]
tpl/transform: Add transform.Unmarshal func

Fixes #5428

6 years agoPrevent resource publishing for transformed inline resources
Bjørn Erik Pedersen [Fri, 21 Dec 2018 09:05:57 +0000 (10:05 +0100)]
Prevent resource publishing for transformed inline resources

That is, if only `.Content` is accessed.

This means that, for a transformed resource to be published to `/public`, you need to access either `.RelPermalink` or `Permalink`.

Fixes #4944

6 years agohugolib: Add .Name as a shortcode variable
Bjørn Erik Pedersen [Fri, 21 Dec 2018 08:51:15 +0000 (09:51 +0100)]
hugolib: Add .Name as a shortcode variable

Fixes #5546

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 agoMerge commit '5a83bf314f4c0ce1d61341e0a1df21c9998e8154'
Bjørn Erik Pedersen [Fri, 21 Dec 2018 08:45:41 +0000 (09:45 +0100)]
Merge commit '5a83bf314f4c0ce1d61341e0a1df21c9998e8154'

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