brevno-suite/hugo
6 years agocomamnds: Use overflow-x: auto; for browser errors
Bjørn Erik Pedersen [Wed, 24 Oct 2018 17:20:37 +0000 (19:20 +0200)]
comamnds: Use overflow-x: auto; for browser errors

6 years agocommon/loggers: Remove the ANSI color for the browser error version
Bjørn Erik Pedersen [Wed, 24 Oct 2018 15:22:07 +0000 (17:22 +0200)]
common/loggers: Remove the ANSI color for the browser error version

6 years agohugolib: Adjust error test to make it pass on Go tip
Bjørn Erik Pedersen [Wed, 24 Oct 2018 12:02:34 +0000 (14:02 +0200)]
hugolib: Adjust error test to make it pass on Go tip

6 years agotpl: Handle truncated identifiers in Go template errors
Bjørn Erik Pedersen [Wed, 24 Oct 2018 11:32:46 +0000 (13:32 +0200)]
tpl: Handle truncated identifiers in Go template errors

Long identifiers will give errors on the format:

```bash
 _default/single.html:5:14: executing "main" at <.ThisIsAVeryLongTitl...>: can't evaluate field ThisIsAVeryLongTitle
```

Hugo use this value to match the "base template or not", so we need to strip the "...".

Fixes #5346

6 years agoAdd some color to the relevant filenames in terminal log
Bjørn Erik Pedersen [Wed, 24 Oct 2018 09:14:51 +0000 (11:14 +0200)]
Add some color to the relevant filenames in terminal log

Fixes #5344

6 years agoRun gofmt -s
Bjørn Erik Pedersen [Tue, 23 Oct 2018 21:18:24 +0000 (23:18 +0200)]
Run gofmt -s

6 years agohugolib: Rename some page_* files
Bjørn Erik Pedersen [Tue, 23 Oct 2018 20:21:21 +0000 (22:21 +0200)]
hugolib: Rename some page_* files

To make it easier to see/work with the source files that is about the `Page` struct.

6 years agoResolve error handling/parser related TODOs
Bjørn Erik Pedersen [Tue, 23 Oct 2018 12:37:09 +0000 (14:37 +0200)]
Resolve error handling/parser related TODOs

See #5324

6 years agoherrors: Improve handling of JSON errors
Bjørn Erik Pedersen [Tue, 23 Oct 2018 06:54:10 +0000 (08:54 +0200)]
herrors: Improve handling of JSON errors

`*json.UnmarshalTypeError` and `*json.SyntaxError` has a byte `Offset`, so use that.

This commit also reworks/simplifies the errror line matching logic. This also makes the file reading unbuffered, but that should be fine in this error case.

See #5324

6 years agocommands, hugolib: Get file context in "config parse failed" errors
Bjørn Erik Pedersen [Mon, 22 Oct 2018 18:20:48 +0000 (20:20 +0200)]
commands, hugolib: Get file context in "config parse failed" errors

Fixes #5325

6 years agohugolib: Improve errors in /i18n handlling
Bjørn Erik Pedersen [Mon, 22 Oct 2018 15:42:06 +0000 (17:42 +0200)]
hugolib: Improve errors in /i18n handlling

See #5324

6 years agohugolib: Improve errors in /data handlling
Bjørn Erik Pedersen [Mon, 22 Oct 2018 14:47:23 +0000 (16:47 +0200)]
hugolib: Improve errors in /data handlling

See #5324

6 years agohugolib: Continue the file context/line number errors work
Bjørn Erik Pedersen [Sun, 21 Oct 2018 10:20:21 +0000 (12:20 +0200)]
hugolib: Continue the file context/line number errors work

See #5324

6 years agohugolib: Remove the now superflous Source struct
Bjørn Erik Pedersen [Sat, 20 Oct 2018 17:09:03 +0000 (19:09 +0200)]
hugolib: Remove the now superflous Source struct

See #5324

6 years agoConvert the rest to new page parser code paths
Bjørn Erik Pedersen [Sat, 20 Oct 2018 15:38:49 +0000 (17:38 +0200)]
Convert the rest to new page parser code paths

And remove some now unused code.

See #5324

6 years agoparser/metadecoders: Consolidate the metadata decoders
Bjørn Erik Pedersen [Sat, 20 Oct 2018 09:16:18 +0000 (11:16 +0200)]
parser/metadecoders: Consolidate the metadata decoders

See #5324

6 years agohugolib: Redo the summary delimiter logic
Bjørn Erik Pedersen [Fri, 19 Oct 2018 09:30:57 +0000 (11:30 +0200)]
hugolib: Redo the summary delimiter logic

Now that we have a proper page parse tree, this can be greatly simplified.

See #5324

6 years agohugolib: Integrate new page parser
Bjørn Erik Pedersen [Thu, 18 Oct 2018 08:21:23 +0000 (10:21 +0200)]
hugolib: Integrate new page parser

See #5324

6 years agohugolib: Use []byte in shortcode parsing
Bjørn Erik Pedersen [Thu, 18 Oct 2018 07:47:39 +0000 (09:47 +0200)]
hugolib: Use []byte in shortcode parsing

See #5324

6 years agoparser/pageparser: Use []byte in page lexer
Bjørn Erik Pedersen [Thu, 18 Oct 2018 07:04:48 +0000 (09:04 +0200)]
parser/pageparser: Use []byte in page lexer

See #5324

6 years agoparser/pageparser: Add front matter etc. support
Bjørn Erik Pedersen [Wed, 17 Oct 2018 11:48:55 +0000 (13:48 +0200)]
parser/pageparser: Add front matter etc. support

See #5324

6 years agoparser/pageparser: File renames and splitting
Bjørn Erik Pedersen [Wed, 17 Oct 2018 11:16:45 +0000 (13:16 +0200)]
parser/pageparser: File renames and splitting

See #5324

6 years agoMove the shortcode parser to the new pageparser package
Bjørn Erik Pedersen [Wed, 17 Oct 2018 10:57:09 +0000 (12:57 +0200)]
Move the shortcode parser to the new pageparser package

See #5324

6 years agocommands: Avoid panic in error handler on config errors
Bjørn Erik Pedersen [Mon, 22 Oct 2018 17:50:27 +0000 (19:50 +0200)]
commands: Avoid panic in error handler on config errors

6 years agotpl: Update Jsonify to return pretty-print output
Sean Prashad [Sun, 21 Oct 2018 02:44:15 +0000 (22:44 -0400)]
tpl: Update Jsonify to return pretty-print output

Fixes #5040

6 years agoPrevent stale content in Fast Render Mode
Bjørn Erik Pedersen [Wed, 17 Oct 2018 07:28:04 +0000 (09:28 +0200)]
Prevent stale content in Fast Render Mode

We do that by re-render visited pages that is not already in the stack. This may potentially do some double work, but that small penalty should be well worth it.

Fixes #5281

6 years agohugolib: Fix test on Windows
Bjørn Erik Pedersen [Wed, 17 Oct 2018 06:37:02 +0000 (08:37 +0200)]
hugolib: Fix test on Windows

6 years agotpl: Improve the Execute panic error message
Bjørn Erik Pedersen [Wed, 17 Oct 2018 06:24:45 +0000 (08:24 +0200)]
tpl: Improve the Execute panic error message

See #5327

6 years agoAllow date and slug from filename for leaf bundles
Janus [Tue, 16 Oct 2018 21:51:48 +0000 (23:51 +0200)]
Allow date and slug from filename for leaf bundles

Fixes #4558

6 years agocommands: Show server error info in browser
Bjørn Erik Pedersen [Wed, 3 Oct 2018 12:58:09 +0000 (14:58 +0200)]
commands: Show server error info in browser

The main item in this commit is showing of errors with a file context when running `hugo server`.

This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`).

But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files.

Fixes #5284
Fixes #5290
See #5325
See #5324

6 years agoSimple doc fix in CONTRIBUTING.md
Kris Budhram [Mon, 15 Oct 2018 03:03:38 +0000 (23:03 -0400)]
Simple doc fix in CONTRIBUTING.md

6 years agotpl: Use .Lastmod in embedded schema template
Akshay Raj Gollahalli [Tue, 16 Oct 2018 09:52:32 +0000 (22:52 +1300)]
tpl: Use .Lastmod in embedded schema template

Fixes #5320

6 years agoRevert "commands: Add .gitignore "hugo new site""
Bjørn Erik Pedersen [Tue, 16 Oct 2018 06:43:38 +0000 (08:43 +0200)]
Revert "commands: Add .gitignore "hugo new site""

This fails on Windows, so it needs to be reconsidered.

This reverts commit 92979d92889ff8991acfadd42982c2e55d01b163.

6 years agocommands: Add .gitignore "hugo new site"
Nathaniel Peiffer [Tue, 16 Oct 2018 06:36:27 +0000 (17:36 +1100)]
commands: Add .gitignore "hugo new site"

6 years agoresource: Optimize integrity string generation
Cameron Moore [Tue, 16 Oct 2018 01:52:46 +0000 (20:52 -0500)]
resource: Optimize integrity string generation

Remove use of fmt.Sprintf for simple string concatenation.  A simple
change for a small perf boost.

```
name         old time/op    new time/op    delta
Integrity-4     525ns ± 2%     268ns ± 2%  -48.92%  (p=0.000 n=10+10)

name         old alloc/op   new alloc/op   delta
Integrity-4      144B ± 0%      112B ± 0%  -22.22%  (p=0.000 n=10+10)

name         old allocs/op  new allocs/op  delta
Integrity-4      5.00 ± 0%      3.00 ± 0%  -40.00%  (p=0.000 n=10+10)
```

6 years agocommands: Add help text to "hugo new"
Elliot Forbes [Mon, 15 Oct 2018 15:48:19 +0000 (16:48 +0100)]
commands: Add help text to "hugo new"

6 years agosnap: Set "extended" tag based on build_url on Launchpad
Anthony Fok [Thu, 11 Oct 2018 14:56:53 +0000 (22:56 +0800)]
snap: Set "extended" tag based on build_url on Launchpad

Read build_url from $SNAPCRAFT_IMAGE_INFO to determine whether
to add the "extended" build tag or not.  This allows us to do away
with the extended-snap-master and extended-snap-stable branches.

6 years agohelpers: Call rst2html directly on *nix
Shreyansh Khajanchi [Thu, 11 Oct 2018 20:46:10 +0000 (20:46 +0000)]
helpers: Call rst2html directly on *nix

Initially, rst2html was called via the python interpreter which would
fail if the script was wrapped in a launcher as on NixOS.
Ideally, on *nix, binaries should be invoked directly to ensure that
shebangs work properly as is being done now.
Handle the case of windows as it doesn't do shebangs.

6 years agoUpdate URLs to stop 301 redirects
Ben Abbott [Tue, 9 Oct 2018 23:46:48 +0000 (12:46 +1300)]
Update URLs to stop 301 redirects

6 years agoMerge branch 'release-0.49.2'
Bjørn Erik Pedersen [Thu, 11 Oct 2018 10:01:51 +0000 (12:01 +0200)]
Merge branch 'release-0.49.2'

6 years agoreleaser: Prepare repository for 0.50-DEV
hugoreleaser [Thu, 11 Oct 2018 09:49:59 +0000 (09:49 +0000)]
releaser: Prepare repository for 0.50-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.49.2 v0.49.2
hugoreleaser [Thu, 11 Oct 2018 09:47:57 +0000 (09:47 +0000)]
releaser: Add release notes to /docs for release of 0.49.2

[ci skip]

6 years agoreleaser: Bump versions for release of 0.49.2
hugoreleaser [Thu, 11 Oct 2018 09:47:57 +0000 (09:47 +0000)]
releaser: Bump versions for release of 0.49.2

[ci skip]

6 years agoRelease 0.49.2
Bjørn Erik Pedersen [Thu, 11 Oct 2018 09:41:46 +0000 (11:41 +0200)]
Release 0.49.2

6 years agoreleaser: Add release notes draft for 0.49.2
hugoreleaser [Thu, 11 Oct 2018 09:39:29 +0000 (09:39 +0000)]
releaser: Add release notes draft for 0.49.2

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

6 years agocommon/collections: Fix type checking in Append
Bjørn Erik Pedersen [Thu, 11 Oct 2018 09:05:30 +0000 (11:05 +0200)]
common/collections: Fix type checking in Append

The fix introduced in Hugo `0.49.1` had an unintended side-effect in the `Append` func used in both `append` and `.Scratch.Add`.

This commit fixes that by loosen/fixing the type checking so concrete types can be appended to interface slices.

Fixes #5303

6 years agocommon/collections: Fix type checking in Append
Bjørn Erik Pedersen [Thu, 11 Oct 2018 09:05:30 +0000 (11:05 +0200)]
common/collections: Fix type checking in Append

The fix introduced in Hugo `0.49.1` had an unintended side-effect in the `Append` func used in both `append` and `.Scratch.Add`.

This commit fixes that by loosen/fixing the type checking so concrete types can be appended to interface slices.

Fixes #5303

6 years agoMerge branch 'release-0.49.1'
Bjørn Erik Pedersen [Wed, 10 Oct 2018 11:00:01 +0000 (13:00 +0200)]
Merge branch 'release-0.49.1'

6 years agoreleaser: Prepare repository for 0.50-DEV
hugoreleaser [Wed, 10 Oct 2018 10:38:45 +0000 (10:38 +0000)]
releaser: Prepare repository for 0.50-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.49.1 v0.49.1
hugoreleaser [Wed, 10 Oct 2018 10:36:37 +0000 (10:36 +0000)]
releaser: Add release notes to /docs for release of 0.49.1

[ci skip]

6 years agoreleaser: Bump versions for release of 0.49.1
hugoreleaser [Wed, 10 Oct 2018 10:36:37 +0000 (10:36 +0000)]
releaser: Bump versions for release of 0.49.1

[ci skip]

6 years agoRelase 0.49.1
Bjørn Erik Pedersen [Wed, 10 Oct 2018 10:31:46 +0000 (12:31 +0200)]
Relase 0.49.1

6 years agoreleaser: Add release notes draft for 0.49.1
hugoreleaser [Wed, 10 Oct 2018 10:28:25 +0000 (10:28 +0000)]
releaser: Add release notes draft for 0.49.1

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

6 years agocommon/maps: Improve append in Scratch
Bjørn Erik Pedersen [Mon, 8 Oct 2018 08:25:15 +0000 (10:25 +0200)]
common/maps: Improve append in Scratch

This commit consolidates the reflective collections handling in `.Scratch` vs the `tpl` package so they use the same code paths.

This commit also adds support for a corner case where a typed slice is appended to a nil or empty `[]interface{}`.

Fixes #5275

6 years agotpl/collections: Fix handling of different interface types in Slice
Bjørn Erik Pedersen [Tue, 2 Oct 2018 15:35:33 +0000 (17:35 +0200)]
tpl/collections: Fix handling of different interface types in Slice

In Hugo `0.49` we improved type support in `slice`. This has an unfortunate side effect in that `resources.Concat` now expects something that can resolve to `resource.Resources`.

This worked for most situations, but when you try to `slice` different `Resource` objects, you would be getting `[]interface {}` and not `resource.Resources`. And `concat` would fail:

```bash
error calling Concat: slice []interface {} not supported in concat.
```

This commit fixes that by simplifying the type checking logic in `Slice`:

* If the first item implements the `Slicer` interface, we try that
* If the above fails or the first item does not implement `Slicer`, we just return the `[]interface {}`

Fixes #5269

6 years agoAdd GOPATH Hugo building tip
Bjørn Erik Pedersen [Tue, 9 Oct 2018 09:09:00 +0000 (11:09 +0200)]
Add GOPATH Hugo building tip

6 years agocommon/maps: Improve append in Scratch
Bjørn Erik Pedersen [Mon, 8 Oct 2018 08:25:15 +0000 (10:25 +0200)]
common/maps: Improve append in Scratch

This commit consolidates the reflective collections handling in `.Scratch` vs the `tpl` package so they use the same code paths.

This commit also adds support for a corner case where a typed slice is appended to a nil or empty `[]interface{}`.

Fixes #5275

6 years agoRevert "tpl: Fix baseof.html in error message"
Bjørn Erik Pedersen [Sun, 7 Oct 2018 19:08:41 +0000 (21:08 +0200)]
Revert "tpl: Fix baseof.html in error message"

I need to rethink this.

This reverts commit 646a52a5c5f52890f2d0270b68ba0f863047484a.

6 years agotpl: Fix baseof.html in error message
Bjørn Erik Pedersen [Sat, 6 Oct 2018 10:04:29 +0000 (12:04 +0200)]
tpl: Fix baseof.html in error message

This fix should also make the template loadin slightly faster, as we avoid to reparse the baseof.html files more than one time.

Fixes #5288

6 years agohelpers: Consolidate MakeSegment vs MakePathSanitized
Bjørn Erik Pedersen [Wed, 3 Oct 2018 08:14:45 +0000 (10:14 +0200)]
helpers: Consolidate MakeSegment vs MakePathSanitized

In short:

* Avoid double tolower in MakeSegment
* Use MakePathSanitized for taxonomies in pageToPermalinkTitle; this matches what MakeSegment does.
* Move the "double hyphen and space" logic into UnicodeSanitize

The last bullet may be slightly breaking for some that now does not get the "--" in some URLs, but we need to reduce the amount of URL logic.

See #4926

6 years agohugolib: Use stdlib context package
Gregorio Martinez [Tue, 2 Oct 2018 02:08:10 +0000 (22:08 -0400)]
hugolib: Use stdlib context package

6 years agohugolib: Normalize permalink path segments
Cameron Moore [Fri, 21 Sep 2018 19:03:17 +0000 (14:03 -0500)]
hugolib: Normalize permalink path segments

When constructing permalinks, ensure that most inputs used as path
segments are normalized with PathSpec.MakeSegment instead of
PathSpec.URLize.

The primary exception to that rule is with taxonomy titles in
pageToPermalinkTitle(). The approach taken here is to use URLize for
taxonomy pages. Everything else will use MakeSegment. The reason for
this exception is that people use taxonomies such as "s1/p1" to generate
URLs precisely they way they wish (see #5223). Tests have been added to
check for this case.

Fixes #4926

6 years agohugolib: Fix FuzzyWordCount test error message
Gregorio Martinez [Wed, 3 Oct 2018 07:01:30 +0000 (03:01 -0400)]
hugolib: Fix FuzzyWordCount test error message

6 years agoRender Markdown in figure shortcode "caption" and "attr" params
Kaushal Modi [Tue, 2 Oct 2018 19:23:10 +0000 (15:23 -0400)]
Render Markdown in figure shortcode "caption" and "attr" params

Fixes https://github.com/gohugoio/hugo/issues/4406.

6 years agoRe-organize the figure shortcode for better readability
Kaushal Modi [Tue, 2 Oct 2018 17:56:31 +0000 (13:56 -0400)]
Re-organize the figure shortcode for better readability

6 years agoUpdate README & CONTRIBUTING
Gregorio Martinez [Wed, 3 Oct 2018 01:14:51 +0000 (21:14 -0400)]
Update README & CONTRIBUTING

Fix broken links for Dev Chat that point to broken gitter.im room.
Remove lines about `mage vendor` target that is no longer available.
Remove broken table of contents links for headings in CONTRIBUTING.md
Fix typo

6 years agotpl: Cast IsSet key to int for indexed types
Cameron Moore [Wed, 3 Oct 2018 01:29:20 +0000 (20:29 -0500)]
tpl: Cast IsSet key to int for indexed types

Don't assume that the user sends an int as the key when checking against
indexed types.

Fixes #3681

6 years agohugolib: Improve error message for bad taxonomy weights
Cameron Moore [Wed, 3 Oct 2018 03:26:08 +0000 (22:26 -0500)]
hugolib: Improve error message for bad taxonomy weights

Error is now "Unable to convert taxonomy weight []string{"40"} to int
for variables/files.md"

6 years agohugolib: Cast taxonomy weight parameters to int
Cameron Moore [Wed, 3 Oct 2018 01:54:36 +0000 (20:54 -0500)]
hugolib: Cast taxonomy weight parameters to int

Fixes #4628

6 years agohugolib: Allow nil to be unwrapped as *Page
Cameron Moore [Wed, 3 Oct 2018 02:46:32 +0000 (21:46 -0500)]
hugolib: Allow nil to be unwrapped as *Page

Previously, calls to *Page.Eq(nil) would always return false because the
unwrapPage func didn't support the nil case.  Add support for unwrapping
nil to a *Page.

Fixes #5043

6 years agotpl/collections: Fix handling of different interface types in Slice
Bjørn Erik Pedersen [Tue, 2 Oct 2018 15:35:33 +0000 (17:35 +0200)]
tpl/collections: Fix handling of different interface types in Slice

In Hugo `0.49` we improved type support in `slice`. This has an unfortunate side effect in that `resources.Concat` now expects something that can resolve to `resource.Resources`.

This worked for most situations, but when you try to `slice` different `Resource` objects, you would be getting `[]interface {}` and not `resource.Resources`. And `concat` would fail:

```bash
error calling Concat: slice []interface {} not supported in concat.
```

This commit fixes that by simplifying the type checking logic in `Slice`:

* If the first item implements the `Slicer` interface, we try that
* If the above fails or the first item does not implement `Slicer`, we just return the `[]interface {}`

Fixes #5269

6 years agotpl: Add a delimiter parameter to lang.NumFmt
Cameron Moore [Tue, 2 Oct 2018 14:41:48 +0000 (09:41 -0500)]
tpl: Add a delimiter parameter to lang.NumFmt

The original implementation of NumFmt did not take into account that the
options delimiter (a space) could be a valid option.  Adding a delim
parameter seems like the simplest, safest, and most flexible way to
solve this oversight in a backwards-compatible way.

Fixes #5260

6 years agosnap: Add custom x-nodejs plugin to support ppc64el and s390x
Anthony Fok [Sun, 30 Sep 2018 22:28:11 +0000 (16:28 -0600)]
snap: Add custom x-nodejs plugin to support ppc64el and s390x

6 years agosnap: Fetch mage with GO111MODULE=off
Anthony Fok [Sun, 30 Sep 2018 20:22:01 +0000 (14:22 -0600)]
snap: Fetch mage with GO111MODULE=off

6 years agosnap: Revert 'Skip "mage -v test" due to build failure on Launchpad'
Anthony Fok [Sun, 30 Sep 2018 05:31:06 +0000 (23:31 -0600)]
snap: Revert 'Skip "mage -v test" due to build failure on Launchpad'

This reverts commit 52ac85fbc4d4066b5e13df454593597df0166262.

6 years agosnap: Use build-snaps instead of building go from source
Anthony Fok [Sun, 30 Sep 2018 05:29:57 +0000 (23:29 -0600)]
snap: Use build-snaps instead of building go from source

See https://forum.snapcraft.io/t/go-part-fails-with-go1-11-if-go-mod-exists-in-the-top-level-directory/7546/11

6 years agohugolib: Be a litle more specific in NextPage TODO
Bjørn Erik Pedersen [Wed, 26 Sep 2018 07:26:53 +0000 (09:26 +0200)]
hugolib: Be a litle more specific in NextPage TODO

6 years agohugolib: Introduce Page.NextPage and Page.PrevPage
Ricardo N Feliciano [Mon, 24 Sep 2018 22:06:29 +0000 (18:06 -0400)]
hugolib: Introduce Page.NextPage and Page.PrevPage

Introduce new page position variables in order to fix the ordering issue
of `.Next` and `.Prev` while also allowing an upgrade path via
deprecation.

`.NextInSection` becomes `.NextPageInSection`.
`.PrevInSection` becomes `.PrevPageInSection`.

`.Next` becomes a function returning `.PrevPage`.
`.Prev` becomes a function returning `.NextPage`.

Fixes #1061

6 years agosnap: Skip "mage -v test" due to build failure on Launchpad
Anthony Fok [Tue, 25 Sep 2018 22:08:22 +0000 (16:08 -0600)]
snap: Skip "mage -v test" due to build failure on Launchpad

The run "go test ./... -tags none" fails with multiple errors of

    use of internal package github.com/gohugoio/hugo/tpl/internal not allowed

See https://launchpadlibrarian.net/390252700/buildlog_snap_ubuntu_xenial_amd64_hugo-dev_BUILDING.txt.gz

I was unable to reproduce it with snapcraft in LXD
on my local Debian laptop, so this error is still a mystery to me.

6 years agoreleaser: Update path to snap/snapcraft.yaml
Anthony Fok [Tue, 25 Sep 2018 13:21:09 +0000 (07:21 -0600)]
releaser: Update path to snap/snapcraft.yaml

6 years agosnap: Fix go plugin build failure by renaming go.mod
Anthony Fok [Tue, 25 Sep 2018 13:05:55 +0000 (07:05 -0600)]
snap: Fix go plugin build failure by renaming go.mod

as a temporary workaround.

See https://forum.snapcraft.io/t/go-plugin-go1-11-fails-if-go-mod-exists-in-the-top-level-directory/7546
and https://discourse.gohugo.io/t/hugo-0-48-released/13908/12

6 years agosnap: Move snapcraft.yaml to snap/snapcraft.yaml
Anthony Fok [Tue, 25 Sep 2018 13:03:51 +0000 (07:03 -0600)]
snap: Move snapcraft.yaml to snap/snapcraft.yaml

6 years agosnapcraft: Try installing postcss again
Anthony Fok [Tue, 25 Sep 2018 04:20:45 +0000 (22:20 -0600)]
snapcraft: Try installing postcss again

Revert "snap: Skip installing postcss due to failure on build server"

This reverts commit 66f688f7120560ca787c1a23e3e7fbc3aa617956.

6 years agosnapcraft: Set GO111MODULE=on in override-build script
Anthony Fok [Tue, 25 Sep 2018 04:15:42 +0000 (22:15 -0600)]
snapcraft: Set GO111MODULE=on in override-build script

Apparently, snapcraft's yet-to-be-documented environment declaration
feature is for run-time only.

See https://discourse.gohugo.io/t/hugo-0-48-released/13908/9
and https://forum.snapcraft.io/t/declaratively-defining-environment-variables/175/29

6 years agobuild: Update the temp docker script
Bjørn Erik Pedersen [Mon, 24 Sep 2018 10:41:12 +0000 (12:41 +0200)]
build: Update the temp docker script

6 years agoreleaser: Prepare repository for 0.50-DEV
hugoreleaser [Mon, 24 Sep 2018 10:04:24 +0000 (10:04 +0000)]
releaser: Prepare repository for 0.50-DEV

[ci skip]

6 years agoreleaser: Add release notes to /docs for release of 0.49 v0.49
hugoreleaser [Mon, 24 Sep 2018 10:01:04 +0000 (10:01 +0000)]
releaser: Add release notes to /docs for release of 0.49

[ci skip]

6 years agoreleaser: Bump versions for release of 0.49
hugoreleaser [Mon, 24 Sep 2018 10:01:04 +0000 (10:01 +0000)]
releaser: Bump versions for release of 0.49

[ci skip]

6 years agoRelease 0.49
Bjørn Erik Pedersen [Mon, 24 Sep 2018 09:52:47 +0000 (11:52 +0200)]
Release 0.49

6 years agodocs: Document directory based archetypes
Bjørn Erik Pedersen [Mon, 24 Sep 2018 09:52:25 +0000 (11:52 +0200)]
docs: Document directory based archetypes

See #4535

6 years agoreleaser: Add release notes draft for 0.49
hugoreleaser [Mon, 24 Sep 2018 09:02:14 +0000 (09:02 +0000)]
releaser: Add release notes draft for 0.49

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

6 years agoci: Add "go mod download" to CI scripts
Bjørn Erik Pedersen [Mon, 24 Sep 2018 08:31:59 +0000 (10:31 +0200)]
ci: Add "go mod download" to CI scripts

To hopefully make them less flaky.

6 years agodocs: Regenerate CLI docs
Bjørn Erik Pedersen [Mon, 24 Sep 2018 08:11:41 +0000 (10:11 +0200)]
docs: Regenerate CLI docs

6 years agodocs: Document group
Bjørn Erik Pedersen [Mon, 24 Sep 2018 08:07:50 +0000 (10:07 +0200)]
docs: Document group

Fixes https://github.com/gohugoio/hugoDocs/issues/597

6 years agoMerge commit '807c551922707fc5ae0eb26e8f01638c0c63fdb3'
Bjørn Erik Pedersen [Sun, 23 Sep 2018 21:48:53 +0000 (23:48 +0200)]
Merge commit '807c551922707fc5ae0eb26e8f01638c0c63fdb3'

6 years agoSquashed 'docs/' changes from 6b00298bb..e5e98b950
Bjørn Erik Pedersen [Sun, 23 Sep 2018 21:48:53 +0000 (23:48 +0200)]
Squashed 'docs/' changes from 6b00298bb..e5e98b950

e5e98b950 Update code-toggle.md
340c9c623 Update 'Fetch from Github' installation instructions in line with Github README
d9f06c23c Add tip about clearing browser cache (#608)
7c9df4731 Adding Remark as additional Comments Alternatives for hugo (#607)
b1ce8bf02 Revert "Temp change of baseURL"
fdbc582ff Temp change of baseURL
5ec663bd6 Fix wrong date in frontmatter config example (#602)
0b3022eb1 Fix broken link to https://www.wercker.com (#603)
b4a7e31a6 Turn off minification
bfcc1ac21 Add a Tweet
8be09c0b4 Remove unused data file

git-subtree-dir: docs
git-subtree-split: e5e98b950ca631c3135ac2f4446c79d71d2196be

6 years agoresource/integrity: Make Data.Integrity be of type template.HTMLAttr
Bjørn Erik Pedersen [Sun, 23 Sep 2018 21:40:35 +0000 (23:40 +0200)]
resource/integrity: Make Data.Integrity be of type template.HTMLAttr

6 years agoAdd directory based archetypes
Bjørn Erik Pedersen [Wed, 19 Sep 2018 05:48:17 +0000 (07:48 +0200)]
Add directory based archetypes

Given this content:

```bash
archetypes
├── default.md
└── post-bundle
    ├── bio.md
    ├── images
    │   └── featured.jpg
    └── index.md
```

```bash
hugo new --kind post-bundle post/my-post
```

Will create a new folder in `/content/post/my-post` with the same set of files as in the `post-bundle` archetypes folder.

This commit also improves the archetype language detection, so, if you use template code in your content files, the `.Site` you get is for the correct language. This also means that it is now possible to translate strings defined in  the `i18n` bundles,  e.g. `{{ i18n "hello" }}`.

Fixes #4535

6 years agoBuild on CircleCI outside of GOPATH
Ricardo N Feliciano [Sun, 23 Sep 2018 01:34:51 +0000 (21:34 -0400)]
Build on CircleCI outside of GOPATH

Fixes #5135

6 years agoPrevent symbolic links from themes
Bjørn Erik Pedersen [Sun, 23 Sep 2018 15:00:33 +0000 (17:00 +0200)]
Prevent symbolic links from themes