brevno-suite/hugo
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]

6 years agoreleaser: Add release notes to /docs for release of 0.39 v0.39
hugoreleaser [Mon, 16 Apr 2018 07:31:26 +0000 (07:31 +0000)]
releaser: Add release notes to /docs for release of 0.39

[ci skip]

6 years agoreleaser: Bump versions for release of 0.39
hugoreleaser [Mon, 16 Apr 2018 07:31:26 +0000 (07:31 +0000)]
releaser: Bump versions for release of 0.39

[ci skip]

6 years agoreleaser: Fix LICENSE vs LICENSE.md
Bjørn Erik Pedersen [Mon, 16 Apr 2018 07:27:39 +0000 (09:27 +0200)]
releaser: Fix LICENSE vs LICENSE.md

Fixes #4631

6 years agoRelease 0.39
Bjørn Erik Pedersen [Mon, 16 Apr 2018 07:00:42 +0000 (09:00 +0200)]
Release 0.39

6 years agoreleaser: Add release notes draft for 0.39
hugoreleaser [Mon, 16 Apr 2018 06:27:26 +0000 (06:27 +0000)]
releaser: Add release notes draft for 0.39

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

6 years agocommands: Re-add the missing releaser command
Bjørn Erik Pedersen [Mon, 16 Apr 2018 06:23:32 +0000 (08:23 +0200)]
commands: Re-add the missing releaser command

6 years agoMerge commit '047c4188dfc854f658d16f1e4a9501f9c97a31c7'
Bjørn Erik Pedersen [Mon, 16 Apr 2018 05:45:38 +0000 (07:45 +0200)]
Merge commit '047c4188dfc854f658d16f1e4a9501f9c97a31c7'

6 years agoSquashed 'docs/' changes from d9c8fc220..f9a5dc59b
Bjørn Erik Pedersen [Mon, 16 Apr 2018 05:43:59 +0000 (07:43 +0200)]
Squashed 'docs/' changes from d9c8fc220..f9a5dc59b

f9a5dc59b Code Toggle block added to doc site final batch Templates ✅ Variables ✅
4d4107968 Add eSolia as new sponsor
000fed94e Add missing closing tags for li in menu template example
f462b620f Clarify that local CSV files cannot be inside data dir
ae083641a Added hugo-search-index to list of search tools
e2b64d0b7 Remove extra link
2fb4c9af5 Release 0.38.2
59b1c9853 releaser: Prepare repository for 0.39-DEV
92f6a05ea releaser: Add release notes to /docs for release of 0.38.2
76244729e releaser: Bump versions for release of 0.38.2
0960c5fb3 Adjust gray color of tab vs pane in code-toggle.
8ae3aadd7 use code-toggle shortcode when relevant Content Management ✅
455b8b53b Update related.md
6e8d19090 Release 0.38.1
079ba044c releaser: Prepare repository for 0.39-DEV
6f23e6ec1 releaser: Add release notes to /docs for release of 0.38.1
c51692ceb releaser: Bump versions for release of 0.38.1
d37ea6a5e Update related.md
faa2707d0 Update index.md
9ce901dcb Add a forgotten language tag (go-html-template) for code
b05aaed14 Update where.md
4d4760819 Fix typo in code-toggle.md
c5a5250a1 Use the new go-html-template Chroma lexer
2de831f4b Add the full list of Chroma lexers
18114d4b4 Update Output Formats
b069d7f84 Release 0.38
caaa8355a releaser: Prepare repository for 0.39-DEV
e45b7cc9f releaser: Add release notes to /docs for release of 0.38
40f40906e releaser: Bump versions for release of 0.38
2d52e2e4e Merge commit 'ed8bf081fdbf336e026517b7e1b123c039014ab5'
1439f64a0 docs: Generate docshelper data
5b0edfd79 Add .Site.IsServer
fdb579ad1 Merge commit '0a23baa6a90901f772c234107c4f12c16c76f4aa'
7b71da1f8 hugolib: Add Reset method to delete key from Scratch
63a131664 docs: Add docs for lang.Merge
55cba056d Merge commit '3886fc1fef6ac19d58b9ba1bb642d0c6c9a54031'
6f301ebcc docs: Add docs on the new front matter configuration
7ba35ef56 Merge commit 'c0290655825e7bb36e13fb39f89d85b392cf1adc'
3d2cab754 releaser: Prepare repository for 0.38-DEV
095e888e1 releaser: Add release notes to /docs for release of 0.37.1
593fa0dcb releaser: Bump versions for release of 0.37.1
c18c1df54 releaser: Prepare repository for 0.38-DEV

git-subtree-dir: docs
git-subtree-split: f9a5dc59b77d15cc2c7534e10bcd90bcfeda7bb4

6 years agoRemove old LICENSE.md
Bjørn Erik Pedersen [Sun, 15 Apr 2018 22:03:56 +0000 (00:03 +0200)]
Remove old LICENSE.md

Closes #4623

6 years agoAdd a GitHub compatible Apache 2 license text
Bjørn Erik Pedersen [Sun, 15 Apr 2018 22:03:30 +0000 (00:03 +0200)]
Add a GitHub compatible Apache 2 license text

6 years agotpl/urls: Add anchorize template func
Bjørn Erik Pedersen [Sun, 15 Apr 2018 21:17:50 +0000 (23:17 +0200)]
tpl/urls: Add anchorize template func

6 years agotpl/path: Add path.Join
Bjørn Erik Pedersen [Sun, 15 Apr 2018 19:06:57 +0000 (21:06 +0200)]
tpl/path: Add path.Join

6 years agotpl: Add path.Split template func
Bjørn Erik Pedersen [Sun, 15 Apr 2018 18:54:22 +0000 (20:54 +0200)]
tpl: Add path.Split template func

6 years agohugolib: Do not reset .Page.Scratch on rebuilds
Bjørn Erik Pedersen [Sun, 15 Apr 2018 17:31:42 +0000 (19:31 +0200)]
hugolib: Do not reset .Page.Scratch on rebuilds

Fixes #4627

6 years agoresource: Implement Resource.Content
Bjørn Erik Pedersen [Sun, 15 Apr 2018 15:07:49 +0000 (17:07 +0200)]
resource: Implement Resource.Content

Fixes #4622

6 years agoMake Page.Content a method that returns interface{}
Bjørn Erik Pedersen [Sun, 15 Apr 2018 14:42:54 +0000 (16:42 +0200)]
Make Page.Content a method that returns interface{}

To prepare for a `Resource.Content` method.

See #4622

6 years agosource: Remove deprecated File.Bytes
Bjørn Erik Pedersen [Sun, 15 Apr 2018 12:34:34 +0000 (14:34 +0200)]
source: Remove deprecated File.Bytes

6 years agocommands: Remove accidental and breaking space in baseURL flag
Bjørn Erik Pedersen [Sun, 15 Apr 2018 07:46:02 +0000 (09:46 +0200)]
commands: Remove accidental and breaking space in baseURL flag

And added key-trimming to prevent future mishaps.

See #4607

6 years agocommands: Properly handle CLI slice arguments
Bjørn Erik Pedersen [Sat, 14 Apr 2018 08:34:02 +0000 (10:34 +0200)]
commands: Properly handle CLI slice arguments

Like `--disableKinds` -- this handling was kind of broken when we recently moved this from global vars

See #4607

6 years agocommands: Correctly handle destination and i18n-warnings
Bjørn Erik Pedersen [Sat, 14 Apr 2018 07:17:30 +0000 (09:17 +0200)]
commands: Correctly handle destination and i18n-warnings

And add some more CLI tests.

See #4607

6 years agocommands: Fix handling of persistent CLI flags
Bjørn Erik Pedersen [Fri, 13 Apr 2018 06:42:29 +0000 (08:42 +0200)]
commands: Fix handling of persistent CLI flags

See #4607

6 years agohugolib: Fix livereload of bundled pages
Bjørn Erik Pedersen [Thu, 12 Apr 2018 10:19:46 +0000 (12:19 +0200)]
hugolib: Fix livereload of bundled pages

Fixes #4607

6 years agocommands: Fix failing Travis server test
Bjørn Erik Pedersen [Thu, 12 Apr 2018 07:31:53 +0000 (09:31 +0200)]
commands: Fix failing Travis server test

6 years agoAllow "*/" inside commented out shortcodes
Bjørn Erik Pedersen [Wed, 11 Apr 2018 20:41:48 +0000 (22:41 +0200)]
Allow "*/" inside commented out shortcodes

Fixes #4608

6 years agocommands: Make commands.Execute return a Response object
Bjørn Erik Pedersen [Wed, 11 Apr 2018 18:17:28 +0000 (20:17 +0200)]
commands: Make commands.Execute return a Response object

We have no global `Hugo` object no more (yay!), and there are some external tools that depends on that value.

These tools need to use get that value from `Response.Result`.

Note that `commands.Execute` now also takes the arguments as a string slice. This should also make it easier to use, not having to modify `os.Args`.

This commit also wraps up this particular issue. Phew!

Test coverage in /commands before: 14.4%
Now:  53.5%

Still work to do, now it is at least possible.

Closes #4598

6 years agocommands: Remove some TODOs
Bjørn Erik Pedersen [Wed, 11 Apr 2018 08:15:01 +0000 (10:15 +0200)]
commands: Remove some TODOs

See #4598

6 years agocommands: Fix the config command
Bjørn Erik Pedersen [Wed, 11 Apr 2018 08:09:45 +0000 (10:09 +0200)]
commands: Fix the config command

It now also accepts the `-s` (source) flag.

See #4598

6 years agocommands: Fix some flag diff
Bjørn Erik Pedersen [Wed, 11 Apr 2018 07:57:43 +0000 (09:57 +0200)]
commands: Fix some flag diff

The CLI docs output is now identical with the master version.

See #4598

6 years agocommands: Add basic server test
Bjørn Erik Pedersen [Wed, 11 Apr 2018 07:38:58 +0000 (09:38 +0200)]
commands: Add basic server test

See #4598

6 years agocommands: Fix TestFixURL
Bjørn Erik Pedersen [Wed, 11 Apr 2018 06:55:50 +0000 (08:55 +0200)]
commands: Fix TestFixURL

See #4598

6 years agocommands: Remove the Hugo global
Bjørn Erik Pedersen [Wed, 11 Apr 2018 06:39:39 +0000 (08:39 +0200)]
commands: Remove the Hugo global

There are still some cleaning to do, but that felt good.

See #4598

6 years agocommands: Make the limit command work again
Bjørn Erik Pedersen [Wed, 11 Apr 2018 06:31:18 +0000 (08:31 +0200)]
commands: Make the limit command work again

See #4598

6 years agocommands: Move the commands related logic to its own file
Bjørn Erik Pedersen [Wed, 11 Apr 2018 05:54:08 +0000 (07:54 +0200)]
commands: Move the commands related logic to its own file

See #4598

6 years agocommands: Add CLI tests
Bjørn Erik Pedersen [Tue, 10 Apr 2018 17:16:09 +0000 (19:16 +0200)]
commands: Add CLI tests

See #4598

6 years agocommands: Make the hugo command non-global
Bjørn Erik Pedersen [Tue, 10 Apr 2018 07:19:26 +0000 (09:19 +0200)]
commands: Make the hugo command non-global

See #4598

6 years agocommands: Extract some common types into its own file
Bjørn Erik Pedersen [Tue, 10 Apr 2018 06:55:13 +0000 (08:55 +0200)]
commands: Extract some common types into its own file

See #4598

6 years agocommands: Make the server command non-global
Bjørn Erik Pedersen [Mon, 9 Apr 2018 20:28:03 +0000 (22:28 +0200)]
commands: Make the server command non-global

See #4598

6 years agocommands: Make the gen commands non-global
Bjørn Erik Pedersen [Mon, 9 Apr 2018 20:09:11 +0000 (22:09 +0200)]
commands: Make the gen commands non-global

See #4598

6 years agocommands: Make the list commands non-global
Bjørn Erik Pedersen [Mon, 9 Apr 2018 18:42:08 +0000 (20:42 +0200)]
commands: Make the list commands non-global

See #4598