summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-10-22parser/pageparser: File renames and splittingBjørn Erik Pedersen
See #5324
2018-10-22Move the shortcode parser to the new pageparser packageBjørn Erik Pedersen
See #5324
2018-10-22commands: Avoid panic in error handler on config errorsBjørn Erik Pedersen
2018-10-21tpl: Update Jsonify to return pretty-print outputSean Prashad
Fixes #5040
2018-10-17Prevent stale content in Fast Render ModeBjørn Erik Pedersen
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
2018-10-17hugolib: Fix test on WindowsBjørn Erik Pedersen
2018-10-17tpl: Improve the Execute panic error messageBjørn Erik Pedersen
See #5327
2018-10-16Allow date and slug from filename for leaf bundles Janus
Fixes #4558
2018-10-16commands: Show server error info in browserBjørn Erik Pedersen
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
2018-10-16Simple doc fix in CONTRIBUTING.mdKris Budhram
2018-10-16tpl: Use .Lastmod in embedded schema templateAkshay Raj Gollahalli
Fixes #5320
2018-10-16Revert "commands: Add .gitignore "hugo new site""Bjørn Erik Pedersen
This fails on Windows, so it needs to be reconsidered. This reverts commit 92979d92889ff8991acfadd42982c2e55d01b163.
2018-10-16commands: Add .gitignore "hugo new site"Nathaniel Peiffer
2018-10-16resource: Optimize integrity string generationCameron Moore
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) ```
2018-10-15commands: Add help text to "hugo new"Elliot Forbes
2018-10-12snap: Set "extended" tag based on build_url on LaunchpadAnthony Fok
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.
2018-10-11helpers: Call rst2html directly on *nixShreyansh Khajanchi
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.
2018-10-11Update URLs to stop 301 redirectsBen Abbott
2018-10-11Merge branch 'release-0.49.2'Bjørn Erik Pedersen
2018-10-11releaser: Prepare repository for 0.50-DEVhugoreleaser
[ci skip]
2018-10-11releaser: Add release notes to /docs for release of 0.49.2v0.49.2hugoreleaser
[ci skip]
2018-10-11releaser: Bump versions for release of 0.49.2hugoreleaser
[ci skip]
2018-10-11Release 0.49.2Bjørn Erik Pedersen
2018-10-11releaser: Add release notes draft for 0.49.2hugoreleaser
Rename to *-ready.md to continue. [ci skip]
2018-10-11common/collections: Fix type checking in AppendBjørn Erik Pedersen
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
2018-10-11common/collections: Fix type checking in AppendBjørn Erik Pedersen
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
2018-10-10Merge branch 'release-0.49.1'Bjørn Erik Pedersen
2018-10-10releaser: Prepare repository for 0.50-DEVhugoreleaser
[ci skip]
2018-10-10releaser: Add release notes to /docs for release of 0.49.1v0.49.1hugoreleaser
[ci skip]
2018-10-10releaser: Bump versions for release of 0.49.1hugoreleaser
[ci skip]
2018-10-10Relase 0.49.1Bjørn Erik Pedersen
2018-10-10releaser: Add release notes draft for 0.49.1hugoreleaser
Rename to *-ready.md to continue. [ci skip]
2018-10-10common/maps: Improve append in ScratchBjørn Erik Pedersen
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
2018-10-10tpl/collections: Fix handling of different interface types in SliceBjørn Erik Pedersen
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
2018-10-09Add GOPATH Hugo building tipBjørn Erik Pedersen
2018-10-08common/maps: Improve append in ScratchBjørn Erik Pedersen
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
2018-10-07Revert "tpl: Fix baseof.html in error message"Bjørn Erik Pedersen
I need to rethink this. This reverts commit 646a52a5c5f52890f2d0270b68ba0f863047484a.
2018-10-06tpl: Fix baseof.html in error messageBjørn Erik Pedersen
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
2018-10-03helpers: Consolidate MakeSegment vs MakePathSanitizedBjørn Erik Pedersen
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
2018-10-03hugolib: Use stdlib context packageGregorio Martinez
2018-10-03hugolib: Normalize permalink path segmentsCameron Moore
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
2018-10-03hugolib: Fix FuzzyWordCount test error messageGregorio Martinez
2018-10-03Render Markdown in figure shortcode "caption" and "attr" paramsKaushal Modi
Fixes https://github.com/gohugoio/hugo/issues/4406.
2018-10-03Re-organize the figure shortcode for better readabilityKaushal Modi
2018-10-03Update README & CONTRIBUTINGGregorio Martinez
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
2018-10-03tpl: Cast IsSet key to int for indexed typesCameron Moore
Don't assume that the user sends an int as the key when checking against indexed types. Fixes #3681
2018-10-03hugolib: Improve error message for bad taxonomy weightsCameron Moore
Error is now "Unable to convert taxonomy weight []string{"40"} to int for variables/files.md"
2018-10-03hugolib: Cast taxonomy weight parameters to intCameron Moore
Fixes #4628
2018-10-03hugolib: Allow nil to be unwrapped as *PageCameron Moore
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
2018-10-02tpl/collections: Fix handling of different interface types in SliceBjørn Erik Pedersen
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