brevno-suite/hugo
6 years agoMerge tag 'v0.41'
Bjørn Erik Pedersen [Fri, 25 May 2018 17:07:52 +0000 (19:07 +0200)]
Merge tag 'v0.41'

releaser: 0.41 [ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.41 v0.41
hugoreleaser [Fri, 25 May 2018 16:57:18 +0000 (16:57 +0000)]
releaser: Add release notes to /docs for release of 0.41

[ci skip]

6 years agoreleaser: Bump versions for release of 0.41
hugoreleaser [Fri, 25 May 2018 16:57:17 +0000 (16:57 +0000)]
releaser: Bump versions for release of 0.41

[ci skip]

6 years agoRelease 0.41
Bjørn Erik Pedersen [Fri, 25 May 2018 16:43:31 +0000 (18:43 +0200)]
Release 0.41

6 years agoreleaser: Add release notes draft for 0.41
hugoreleaser [Fri, 25 May 2018 16:01:30 +0000 (16:01 +0000)]
releaser: Add release notes draft for 0.41

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

6 years agoreleaser: Put release notes below /en
Bjørn Erik Pedersen [Fri, 25 May 2018 15:53:03 +0000 (17:53 +0200)]
releaser: Put release notes below /en

Fixes #4712

6 years agocreate: Provide the correct .Site object to archetype templates
Bjørn Erik Pedersen [Fri, 25 May 2018 15:35:06 +0000 (17:35 +0200)]
create: Provide the correct .Site object to archetype templates

Fixes #4732

6 years agodocs: Document the GDPR Privacy Config
Bjørn Erik Pedersen [Fri, 25 May 2018 15:25:33 +0000 (17:25 +0200)]
docs: Document the GDPR Privacy Config

See #4751

6 years agoFix GA anonymizeIp order
Bjørn Erik Pedersen [Fri, 25 May 2018 14:05:45 +0000 (16:05 +0200)]
Fix GA anonymizeIp order

6 years agoAdd no-cookie variants of the Google Analytics templates
Bjørn Erik Pedersen [Fri, 25 May 2018 12:52:06 +0000 (14:52 +0200)]
Add no-cookie variants of the Google Analytics templates

The current full set of options for GA is now:

```toml
[privacy]
[privacy.googleAnalytics]
disable = false
respectDoNotTrack = true
anonymizeIP = true
useSessionStorage = true
```

Fixes #4775

6 years agoMerge commit 'd2b1030060d3c91d5f9ffa3456418da16bd74f1d'
Bjørn Erik Pedersen [Fri, 25 May 2018 13:05:23 +0000 (15:05 +0200)]
Merge commit 'd2b1030060d3c91d5f9ffa3456418da16bd74f1d'

6 years agoSquashed 'docs/' changes from e161ea09d..0fd7b4169
Bjørn Erik Pedersen [Fri, 25 May 2018 13:04:07 +0000 (15:04 +0200)]
Squashed 'docs/' changes from e161ea09d..0fd7b4169

0fd7b4169 Fix typo: pygmentsUseClasses -> pygmentsUseClassic
9a3e1c19a Clarify that lower weight gets higher precedence
820d8b581 Clarify the true behavior of hrefTargetBlank #blackfriday
eb3aa5e46 Fix typo
9aedb9269 Add examples for removing default taxonomies
772a26f84 Fix source link on maintainance
975c215ae Minor edits.
2bdb1a150 Fix invalid iink
991d2e139 Fix misspelling
60af8dfb0 Update eSolia link
d7426b76e Release 0.40.3
4977bd9cf Merge branch 'release-0.40.3'
9946f7108 releaser: Prepare repository for 0.41-DEV
beef16b01 releaser: Add release notes to /docs for release of 0.40.3
80c51c55a releaser: Bump versions for release of 0.40.3
21e2934c5 rename `taxonomies.html` to `taxonomy.html`
34a02c289 Add release notes from Hugo 0.7 to 0.15 for completeness
b593f512e Update related.md
7c2bf528b Fix the "edit this page" link
e8fbc163e Add warning about cond
ae15a8831 Add link to Markdown Guide
e077dfd65 Added documentation for a new migration tool: BlogMl2Hugo
957bfb6a8 Add Talkayrd, a new commenting system, & fix txtpen link
86acea7f8 Tomango showcase
3c2fc32f1 Fix snap classic command in installing.md
9a76f1737 Merge commit '83bef6955e014d40c0f00db9cebe09113154e999'
a4b71fb84 Fix typo

git-subtree-dir: docs
git-subtree-split: 0fd7b416997bf76cd99e3ae2dfae406cb8b6724a

6 years agotpl: Remove the shortcode assets for now
Bjørn Erik Pedersen [Fri, 25 May 2018 12:34:40 +0000 (14:34 +0200)]
tpl: Remove the shortcode assets for now

Not in use.

6 years agotpl: Adjust instagram_simple margins
Bjørn Erik Pedersen [Fri, 25 May 2018 10:38:25 +0000 (12:38 +0200)]
tpl: Adjust instagram_simple margins

6 years agoRemove youtube_simple for now
Bjørn Erik Pedersen [Fri, 25 May 2018 09:16:23 +0000 (11:16 +0200)]
Remove youtube_simple for now

We need to revisit and complete that.

See #4751

6 years agoAdd anonymizeIP to GA privacy config
Bjørn Erik Pedersen [Fri, 25 May 2018 08:53:39 +0000 (10:53 +0200)]
Add anonymizeIP to GA privacy config

See #4751

6 years agoFix broken test
Bjørn Erik Pedersen [Thu, 24 May 2018 11:03:23 +0000 (13:03 +0200)]
Fix broken test

6 years agoSupport DNT in Twitter shortcode for GDPR
Bjørn Erik Pedersen [Thu, 24 May 2018 10:25:52 +0000 (12:25 +0200)]
Support DNT in Twitter shortcode for GDPR

Fixes #4765

6 years agotpl: Alias tweet shortode to twitter
Bjørn Erik Pedersen [Thu, 24 May 2018 09:24:38 +0000 (11:24 +0200)]
tpl: Alias tweet shortode to twitter

See #4765

6 years agoRegenerate embedded templates
Bjørn Erik Pedersen [Wed, 23 May 2018 19:25:04 +0000 (21:25 +0200)]
Regenerate embedded templates

See #4761

6 years agoFix youtube_simple thumb scaling
Alexandros [Wed, 23 May 2018 19:22:25 +0000 (22:22 +0300)]
Fix youtube_simple thumb scaling

Fixes #4761

6 years agoAdd instagram_simple shortcode
Bjørn Erik Pedersen [Wed, 23 May 2018 10:26:10 +0000 (12:26 +0200)]
Add instagram_simple shortcode

Fixes #4748

6 years agodeps: Go fmt
Bjørn Erik Pedersen [Wed, 23 May 2018 14:33:11 +0000 (16:33 +0200)]
deps: Go fmt

6 years agoRemove the id from youtube_simple
Bjørn Erik Pedersen [Wed, 23 May 2018 08:24:01 +0000 (10:24 +0200)]
Remove the id from youtube_simple

For now, anyway.

See #4751

6 years agoFix some recently broken embedded templates
Bjørn Erik Pedersen [Wed, 23 May 2018 08:03:11 +0000 (10:03 +0200)]
Fix some recently broken embedded templates

And add tests for them.

Fixes #4757

6 years agoAdd an unified .Site.Config with a services section
Bjørn Erik Pedersen [Tue, 22 May 2018 12:40:06 +0000 (14:40 +0200)]
Add an unified .Site.Config with a services section

Fixes #4751

6 years agoMove the privacy config into a parent
Bjørn Erik Pedersen [Tue, 22 May 2018 12:00:36 +0000 (14:00 +0200)]
Move the privacy config into a parent

See #4751

6 years agocommands: Avoid ANSI character output on Windows
Lorenz Cuno Klopfenstein [Tue, 22 May 2018 15:15:19 +0000 (17:15 +0200)]
commands: Avoid ANSI character output on Windows

Fixes #4462

6 years agotpl: Add another class and an id to youtube_simple
Bjørn Erik Pedersen [Tue, 22 May 2018 07:11:34 +0000 (09:11 +0200)]
tpl: Add another class and an id to youtube_simple

To provide some more styling options.

See #4616

6 years agoMake the simple mode YouTube links schemaless
Bjørn Erik Pedersen [Mon, 21 May 2018 20:25:04 +0000 (22:25 +0200)]
Make the simple mode YouTube links schemaless

See #4616

6 years agoAdd YouTube shortcode simple mode
Bjørn Erik Pedersen [Mon, 21 May 2018 15:34:21 +0000 (17:34 +0200)]
Add YouTube shortcode simple mode

Adapted from the work of @onedrawingperday.

See #4616

6 years agoDo not return error on .Get "class" and vice versa in shortcodes
Bjørn Erik Pedersen [Mon, 21 May 2018 15:47:52 +0000 (17:47 +0200)]
Do not return error on .Get "class" and vice versa in shortcodes

The current error handling makes parameter checking in shortcodes too verbose for no good reason.

Fixes #4745

6 years agoCreate SUPPORT.md
Christian Oliff [Mon, 21 May 2018 14:47:16 +0000 (23:47 +0900)]
Create SUPPORT.md

To help cut down on the number of general questions, it'd be good to add a `SUPPORT.md` to the `.github` folder.

A link to this would then be displayed automatically when a user opens a New Issue (https://github.com/gohugoio/hugo/issues/new).

To see an example of this take a look at: https://github.com/twbs/bootstrap/issues/new

6 years agoAdd PrivacyEnhanced mode for YouTube to the GDPR Policy
Bjørn Erik Pedersen [Mon, 21 May 2018 12:02:30 +0000 (14:02 +0200)]
Add PrivacyEnhanced mode for YouTube to the GDPR Policy

See #4616

6 years agoAdd RespectDoNotTrack to GDPR privacy policy for Google Analytics
Bjørn Erik Pedersen [Mon, 21 May 2018 08:18:36 +0000 (10:18 +0200)]
Add RespectDoNotTrack to GDPR privacy policy for Google Analytics

See #4616

6 years agotpl/tplimpl: Adjust GA templates
Bjørn Erik Pedersen [Mon, 21 May 2018 08:21:36 +0000 (10:21 +0200)]
tpl/tplimpl: Adjust GA templates

See #4616

6 years agotpl/tplimpl/embedded: Wrap the relevant templates with the privacy policy disable...
Bjørn Erik Pedersen [Sun, 20 May 2018 18:00:29 +0000 (20:00 +0200)]
tpl/tplimpl/embedded: Wrap the relevant templates with the privacy policy disable check

See #4616

6 years agoconfig: Add the foundation for GDPR privacy configuration
Bjørn Erik Pedersen [Fri, 4 May 2018 08:18:45 +0000 (10:18 +0200)]
config: Add the foundation for GDPR privacy configuration

See #4616

6 years agoShow site build warning in TestPageBundlerSiteRegular
Anthony Fok [Fri, 27 Apr 2018 14:39:36 +0000 (08:39 -0600)]
Show site build warning in TestPageBundlerSiteRegular

So that a timeout warning does appear if it does happen
especially on a slow machine with soft floating-point CPU.

Special thanks to @bep for the solution.

See #4672

6 years agocommands: Do not show empty BuildDate in version
Anthony Fok [Thu, 26 Apr 2018 12:35:04 +0000 (06:35 -0600)]
commands: Do not show empty BuildDate in version

6 years agohugolib: Use double quotes instead of back quotes
Anthony Fok [Thu, 26 Apr 2018 20:17:42 +0000 (14:17 -0600)]
hugolib: Use double quotes instead of back quotes

so that '\n' is interpreted in the timeout warning.

6 years agoImprove markup determination logic
Vas Sudanagunta [Sat, 5 May 2018 00:17:16 +0000 (20:17 -0400)]
Improve markup determination logic

Sets Page.markup earlier (as early as possible, when the page is
loaded). Sets it once and only once, removing many redundant calls
to determineMarkupType().

This kills a sleeping bug that was avoided by the parts of the
code depending on this value making those redundant calls.

6 years agoMerge branch 'release-0.40.3'
Bjørn Erik Pedersen [Wed, 9 May 2018 07:54:25 +0000 (09:54 +0200)]
Merge branch 'release-0.40.3'

6 years agoreleaser: Prepare repository for 0.41-DEV
hugoreleaser [Wed, 9 May 2018 07:48:57 +0000 (07:48 +0000)]
releaser: Prepare repository for 0.41-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.40.3 v0.40.3
hugoreleaser [Wed, 9 May 2018 07:46:30 +0000 (07:46 +0000)]
releaser: Add release notes to /docs for release of 0.40.3

[ci skip]

6 years agoreleaser: Bump versions for release of 0.40.3
hugoreleaser [Wed, 9 May 2018 07:46:30 +0000 (07:46 +0000)]
releaser: Bump versions for release of 0.40.3

[ci skip]

6 years agoRelease 0.40.3
Bjørn Erik Pedersen [Wed, 9 May 2018 07:42:15 +0000 (09:42 +0200)]
Release 0.40.3

6 years agoreleaser: Add release notes draft for 0.40.3
hugoreleaser [Wed, 9 May 2018 07:16:28 +0000 (07:16 +0000)]
releaser: Add release notes draft for 0.40.3

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

6 years agohugolib: Fix possible .Content cut
Bjørn Erik Pedersen [Tue, 8 May 2018 08:10:13 +0000 (10:10 +0200)]
hugolib: Fix possible .Content cut

There have been one report of a site with truncated `.Content` after the Hugo `0.40.1` release.

This commit fixes this so that race should not be possible anymore. It also adds a stress test with focus on content rendering and multiple output formats.

Fixes #4706

6 years agohugolib: Fix possible .Content cut
Bjørn Erik Pedersen [Tue, 8 May 2018 08:10:13 +0000 (10:10 +0200)]
hugolib: Fix possible .Content cut

There have been one report of a site with truncated `.Content` after the Hugo `0.40.1` release.

This commit fixes this so that race should not be possible anymore. It also adds a stress test with focus on content rendering and multiple output formats.

Fixes #4706

6 years agotpl/tplimpl: Move README one level up
Bjørn Erik Pedersen [Sat, 5 May 2018 09:00:39 +0000 (11:00 +0200)]
tpl/tplimpl: Move README one level up

6 years agotpl/tplimpl: Extract internal templates
Bjørn Erik Pedersen [Fri, 4 May 2018 15:53:56 +0000 (17:53 +0200)]
tpl/tplimpl: Extract internal templates

Having them in separate files should make maintainance easier.

When adding new or making changes to the templates:

```bash
mage generate
```

This will get the Go code in sync.

Fixes #4457

6 years agoMerge commit '83bef6955e014d40c0f00db9cebe09113154e999'
Bjørn Erik Pedersen [Fri, 4 May 2018 07:44:59 +0000 (09:44 +0200)]
Merge commit '83bef6955e014d40c0f00db9cebe09113154e999'

6 years agoSquashed 'docs/' changes from 896bad9f4..e161ea09d
Bjørn Erik Pedersen [Fri, 4 May 2018 07:44:21 +0000 (09:44 +0200)]
Squashed 'docs/' changes from 896bad9f4..e161ea09d

e161ea09d Add one more Chinese file to workaround reflect: Zero(nil)
b595b3a21 Add more Chinese translation
56e4e95d9 Use lang.Merge to "fill in the gaps" for untranslated pages
ef079406c Merge commit '650fac3a4e7d256f4505402ab44cfc3c804b8dea'
650fac3a4 Squashed 'themes/gohugoioTheme/' changes from a1768ebb..f31a3dc8
322eff899 Add Chinese language for menus
d90b886e0 Fix Markdown table syntax in previous commit
737f3dfca Update the leaf bundle vs branch bundle table
09fa1bc4e Clarify that `.Now` is obsolete
879ea3f6a Make release notes somewhat more consistent
0113e2051 Move 0.40.2-relnotes into content/en/news
77578f5bf Move content/ into new contentDir content/en/
4dcf7c709 Fix "reflect: Zero(nil)" error in showcase
63dd25505 Release 0.40.2
2076c0d56 releaser: Prepare repository for 0.41-DEV
070fe565e releaser: Add release notes to /docs for release of 0.40.2
4ce52e913 releaser: Bump versions for release of 0.40.2
41907c487 Fix typos in syntax-highlighting.md
91753ef3d Add missing backtick
b77274301 Remove duplicate release notes (0.27, 0.27.1, 0.35)
6e00da316 Remove obsolete content/release-notes/ directory
00a6d8c02 Change en dash back to `--` in 0.38.2-relnotes
51b32dc00 Update archetypes.md
d0e5c2307 Release 0.40.1
4538a6d5b releaser: Prepare repository for 0.41-DEV
91b391d70 releaser: Add release notes to /docs for release of 0.40.1
e0979d143 releaser: Bump versions for release of 0.40.1
7983967c2 Clean images
fe3fdd77d Polish showcase for Flesland Flis
e6dde3989 Showcase - Flesland Flis AS by Absoluttweb
73aa62290 Revive @spf13's special Hugo font
add67b335 Release Hugo 0.40
c0a26e5a6 Merge branch 'temp40'
beeabaaae releaser: Prepare repository for 0.41-DEV
e67d5e985 releaser: Add release notes to /docs for release of 0.40
6cdd95273 releaser: Bump versions for release of 0.40
bee21fb9b Revive the other Hugo logos too
4f45e8fe1 Fix the link type attribute for RSS in examples
8c67dc89a Fix example in delimit doc
e7f6c00d5 Revive the logo used on the forum
82b0cd26e Merge commit 'a215abf70e018f4bf40d6c09d8bd148d8684b33d'
119c8ca58 Merge commit 'd2ec1a06df8ab6b17ad05cb008d5701b40327d47'
db4683bd2 Improve .Get docs
05260b886 .Get function: fix syntax signature

git-subtree-dir: docs
git-subtree-split: e161ea09d33e3199f4998e4d2e9068d5a850f042

6 years agoFix typo
Hélène Martin [Tue, 2 Jan 2018 21:14:03 +0000 (16:14 -0500)]
Fix typo

This could either be "check out Hugo's themes" or "check out the Hugo themes". I think the latter reads better.

6 years agoUpdate CONTRIBUTING.md
Adam Jones [Tue, 1 May 2018 15:55:33 +0000 (16:55 +0100)]
Update CONTRIBUTING.md

Fix typos, simplify language

6 years agoreleaser: Prepare repository for 0.41-DEV
hugoreleaser [Mon, 30 Apr 2018 06:50:00 +0000 (06:50 +0000)]
releaser: Prepare repository for 0.41-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.40.2 v0.40.2
hugoreleaser [Mon, 30 Apr 2018 06:47:41 +0000 (06:47 +0000)]
releaser: Add release notes to /docs for release of 0.40.2

[ci skip]

6 years agoreleaser: Bump versions for release of 0.40.2
hugoreleaser [Mon, 30 Apr 2018 06:47:41 +0000 (06:47 +0000)]
releaser: Bump versions for release of 0.40.2

[ci skip]

6 years agoRelease 0.40.2
Bjørn Erik Pedersen [Mon, 30 Apr 2018 06:42:04 +0000 (08:42 +0200)]
Release 0.40.2

6 years agoreleaser: Add release notes draft for 0.40.2
hugoreleaser [Mon, 30 Apr 2018 06:39:05 +0000 (06:39 +0000)]
releaser: Add release notes draft for 0.40.2

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

6 years agoReset .Page.Scratch on live-reload
Bjørn Erik Pedersen [Sun, 29 Apr 2018 16:24:53 +0000 (18:24 +0200)]
Reset .Page.Scratch on live-reload

Fixes #4683

6 years agoFix .WordCount, .FuzzyWordCount, .ReadingTime when summary marker is set
Bjørn Erik Pedersen [Fri, 27 Apr 2018 08:17:01 +0000 (10:17 +0200)]
Fix .WordCount, .FuzzyWordCount, .ReadingTime when summary marker is set

This bug was introduced in Hugo 0.40. It is when you use the `<!--more-->` summary marker.

Note that this affects the word stats only. The related `PlainWords`, `Plain`, `Content` all return correct values.

Fixes #4675
Fixes #4682

6 years agoreleaser: Prepare repository for 0.41-DEV
hugoreleaser [Wed, 25 Apr 2018 13:23:15 +0000 (13:23 +0000)]
releaser: Prepare repository for 0.41-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.40.1 v0.40.1
hugoreleaser [Wed, 25 Apr 2018 13:20:44 +0000 (13:20 +0000)]
releaser: Add release notes to /docs for release of 0.40.1

[ci skip]

6 years agoreleaser: Bump versions for release of 0.40.1
hugoreleaser [Wed, 25 Apr 2018 13:20:44 +0000 (13:20 +0000)]
releaser: Bump versions for release of 0.40.1

[ci skip]

6 years agoRelease 0.40.1
Bjørn Erik Pedersen [Wed, 25 Apr 2018 13:17:21 +0000 (15:17 +0200)]
Release 0.40.1

6 years agoreleaser: Add release notes draft for 0.40.1
hugoreleaser [Wed, 25 Apr 2018 12:58:03 +0000 (12:58 +0000)]
releaser: Add release notes draft for 0.40.1

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

6 years agohugolib: Fix some shortcode vs .Content corner cases
Bjørn Erik Pedersen [Tue, 24 Apr 2018 03:57:33 +0000 (05:57 +0200)]
hugolib: Fix some shortcode vs .Content corner cases

This is a follow-up to #4632. There were some assumptions in that implementation that did not hold water in all situations.

This commit simplifies the content lazy initalization making it more robust.

Fixes #4664

6 years agoreleaser: Prepare repository for 0.41-DEV
hugoreleaser [Mon, 23 Apr 2018 07:43:27 +0000 (07:43 +0000)]
releaser: Prepare repository for 0.41-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.40 v0.40
hugoreleaser [Mon, 23 Apr 2018 07:40:57 +0000 (07:40 +0000)]
releaser: Add release notes to /docs for release of 0.40

[ci skip]

6 years agoreleaser: Bump versions for release of 0.40
hugoreleaser [Mon, 23 Apr 2018 07:40:57 +0000 (07:40 +0000)]
releaser: Bump versions for release of 0.40

[ci skip]

6 years agoRelease 0.40
Bjørn Erik Pedersen [Mon, 23 Apr 2018 07:37:05 +0000 (09:37 +0200)]
Release 0.40

6 years agoreleaser: Add release notes draft for 0.40
hugoreleaser [Mon, 23 Apr 2018 07:14:30 +0000 (07:14 +0000)]
releaser: Add release notes draft for 0.40

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

6 years agohugolib: Add .Page.BundleType
Bjørn Erik Pedersen [Mon, 23 Apr 2018 06:41:19 +0000 (08:41 +0200)]
hugolib: Add .Page.BundleType

I eturn either:

1. leaf
2. branch
3. empty string

The above sits well with constructs like:

```
{{ with .BundleType }}
// Now we know it is a bundle
{{ end }}
```

Fixes #4662

6 years agohugolib: Add zero-based Ordinal to shortcode
Bjørn Erik Pedersen [Mon, 23 Apr 2018 06:09:56 +0000 (08:09 +0200)]
hugolib: Add zero-based Ordinal to shortcode

The count starts at 0 relative to the shortcode's parent: Either the page or the surrounding shortcode.

Access it in a shortcode like this:

```bash
Ordinal is {{ .Ordinal }}
```

Note that this is a shared ordinal for all shortcodes in the relevant context, so, as an example, you have this in a content page:

```markdown
This is a shortcode:

{{< hello >}}

This is another shortcode:

{{< hugo >}}

The `.Ordinal` you get in the two shortcodes above is 0 and 1.
```

See #3359

6 years agohugolib: Defer the unlock in orderedMap.Add
Bjørn Erik Pedersen [Sun, 22 Apr 2018 19:32:05 +0000 (21:32 +0200)]
hugolib: Defer the unlock in orderedMap.Add

Just in case someone tries to recover from the potential panic.

6 years agoSquashed 'docs/' changes from 76e881257..896bad9f4
Bjørn Erik Pedersen [Sun, 22 Apr 2018 15:57:24 +0000 (17:57 +0200)]
Squashed 'docs/' changes from 76e881257..896bad9f4

896bad9f4 Remove unused files below /static

git-subtree-dir: docs
git-subtree-split: 896bad9f4f7ed487b357e2842bccc55fb8d090cd

6 years agoMerge commit 'a215abf70e018f4bf40d6c09d8bd148d8684b33d'
Bjørn Erik Pedersen [Sun, 22 Apr 2018 15:57:24 +0000 (17:57 +0200)]
Merge commit 'a215abf70e018f4bf40d6c09d8bd148d8684b33d'

6 years agohugolib: Process and render shortcodes in their order of appearance
Bjørn Erik Pedersen [Sun, 22 Apr 2018 12:07:29 +0000 (14:07 +0200)]
hugolib: Process and render shortcodes in their order of appearance

Fixes #3359

6 years agohugolib: Init the content and shortcodes early
Bjørn Erik Pedersen [Sun, 22 Apr 2018 09:18:39 +0000 (11:18 +0200)]
hugolib: Init the content and shortcodes early

In most cases we could delay the content init until rendering time, but there could be use cases where the templates would depend on state set in the shortcodes (.Page.Scratch.Set), so we  need to do this early.

See #4632

6 years agotpl/path: Add path.Ext, path.Dir and path.Base
Bjørn Erik Pedersen [Sun, 22 Apr 2018 08:26:26 +0000 (10:26 +0200)]
tpl/path: Add path.Ext, path.Dir and path.Base

6 years agotpl/os: Make fileExist use the same filesystem as readFile
Bjørn Erik Pedersen [Sat, 21 Apr 2018 21:46:34 +0000 (23:46 +0200)]
tpl/os: Make fileExist use the same filesystem as readFile

Fixes #4633

6 years agoMerge commit 'd2ec1a06df8ab6b17ad05cb008d5701b40327d47'
Bjørn Erik Pedersen [Sat, 21 Apr 2018 21:02:48 +0000 (23:02 +0200)]
Merge commit 'd2ec1a06df8ab6b17ad05cb008d5701b40327d47'

6 years agoSquashed 'docs/' changes from f9a5dc59b..76e881257
Bjørn Erik Pedersen [Sat, 21 Apr 2018 21:01:55 +0000 (23:01 +0200)]
Squashed 'docs/' changes from f9a5dc59b..76e881257

76e881257 Improve .Scratch entry (#454)
37ed09702 Remove zero-byte .gitmodules file altogether
943f21619 Add a note about valid values for taxonomies in front-matter
ebcfa30d7 Update definition list formatting
46050042a Corrected formatting
87c539101 Updated readFile documentation
8fd130395 commands: Regenerate the CLI docs
6ce0ce8d6 data: Regenereate the docshelper
9fe78fabd Release 0.39
33039c6ba releaser: Prepare repository for 0.40-DEV
e3a780907 releaser: Add release notes to /docs for release of 0.39
54406e3fa releaser: Bump versions for release of 0.39
21017660b Merge commit '047c4188dfc854f658d16f1e4a9501f9c97a31c7'

git-subtree-dir: docs
git-subtree-split: 76e88125760c140541edab2061aed31c6db2d800

6 years agoMake .Content (almost) always available in shortcodes
Bjørn Erik Pedersen [Thu, 19 Apr 2018 16:06:40 +0000 (18:06 +0200)]
Make .Content (almost) always available in shortcodes

This resolves some surprising behaviour when reading other pages' content from shortcodes. Before this commit, that behaviour was undefined. Note that this has never been an issue from regular templates.

It will still not be possible to get **the current shortcode's  page's rendered content**. That would have impressed Einstein.

The new and well defined rules are:

* `.Page.Content` from a shortcode will be empty. The related `.Page.Truncated` `.Page.Summary`, `.Page.WordCount`, `.Page.ReadingTime`, `.Page.Plain` and `.Page.PlainWords` will also have empty values.
* For _other pages_ (retrieved via `.Page.Site.GetPage`, `.Site.Pages` etc.) the `.Content` is there to use as you please as long as you don't have infinite content recursion in your shortcode/content setup. See below.
* `.Page.TableOfContents` is good to go (but does not support shortcodes in headlines; this is unchanged)

If you get into a situation of infinite recursion, the `.Content` will be empty. Run `hugo -v` for more information.

Fixes #4632
Fixes #4653
Fixes #4655

6 years agoRevert "Improve .Content vs shortcodes"
Bjørn Erik Pedersen [Thu, 19 Apr 2018 15:40:57 +0000 (17:40 +0200)]
Revert "Improve .Content vs shortcodes"

This reverts commit e590cc26eb1363a4b84603f051b20bd43fd1f7bd.

6 years agoRevert "hugolib: Prepare child page resources before the page itself"
Bjørn Erik Pedersen [Thu, 19 Apr 2018 15:40:54 +0000 (17:40 +0200)]
Revert "hugolib: Prepare child page resources before the page itself"

This reverts commit 3238e14fdfeedf189a5af122e20bff040ac059bd.

6 years agohugolib: Prepare child page resources before the page itself
Bjørn Erik Pedersen [Thu, 19 Apr 2018 14:35:21 +0000 (16:35 +0200)]
hugolib: Prepare child page resources before the page itself

To make sure that the child resources' content is ready before any shortcode is processed in their owner.

See #4632

6 years agoAdd language merge support for Pages in resource.Resources
Bjørn Erik Pedersen [Thu, 19 Apr 2018 07:02:18 +0000 (09:02 +0200)]
Add language merge support for Pages in resource.Resources

Fixes #4644

6 years agoImprove .Content vs shortcodes
Bjørn Erik Pedersen [Thu, 19 Apr 2018 10:04:34 +0000 (12:04 +0200)]
Improve .Content vs shortcodes

For the content from other pages in shortcodes there are some chicken and
egg dependencies that is hard to get around. But we can improve on this  by preparing the pages in a certain order:

 1. The headless bundles goes first. These are page typically page and image collections..
 2. Leaf bundles
 3. Regular single pages
 4. Branch bundles

Fixes #4632

6 years agoImprove .Get docs
cmal [Tue, 17 Apr 2018 09:29:25 +0000 (11:29 +0200)]
Improve .Get docs

6 years agoUpdate missing positional parameter test for .Get
cmal [Tue, 17 Apr 2018 09:29:00 +0000 (11:29 +0200)]
Update missing positional parameter test for .Get

6 years ago.Get doesn't crash on missing positional param
cmal [Tue, 17 Apr 2018 09:24:03 +0000 (11:24 +0200)]
.Get doesn't crash on missing positional param
fixes #4619

6 years ago.Get function: fix syntax signature
cmal [Tue, 17 Apr 2018 08:49:17 +0000 (10:49 +0200)]
.Get function: fix syntax signature

6 years agoImprove error message in metadata parse
Bjørn Erik Pedersen [Tue, 17 Apr 2018 13:37:05 +0000 (15:37 +0200)]
Improve error message in metadata parse

Fixes #3696

6 years agohugolib: Fix broken test
Bjørn Erik Pedersen [Tue, 17 Apr 2018 08:28:32 +0000 (10:28 +0200)]
hugolib: Fix broken test

6 years agoparser: Add some context to front matter parse error
Bjørn Erik Pedersen [Tue, 17 Apr 2018 08:20:16 +0000 (10:20 +0200)]
parser: Add some context to front matter parse error

Fixes #4638

6 years agoUpdated GetCSV error message (#4636)
Lucas Liberacki [Tue, 17 Apr 2018 05:20:14 +0000 (01:20 -0400)]
Updated GetCSV error message (#4636)

6 years agoreleaser: Prepare repository for 0.40-DEV
hugoreleaser [Mon, 16 Apr 2018 07:33:49 +0000 (07:33 +0000)]
releaser: Prepare repository for 0.40-DEV

[ci skip]