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.
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
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
Gregorio Martinez [Tue, 2 Oct 2018 02:08:10 +0000 (22:08 -0400)]
hugolib: Use stdlib context package
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
Gregorio Martinez [Wed, 3 Oct 2018 07:01:30 +0000 (03:01 -0400)]
hugolib: Fix FuzzyWordCount test error message
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.
Kaushal Modi [Tue, 2 Oct 2018 17:56:31 +0000 (13:56 -0400)]
Re-organize the figure shortcode for better readability
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
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
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"
Cameron Moore [Wed, 3 Oct 2018 01:54:36 +0000 (20:54 -0500)]
hugolib: Cast taxonomy weight parameters to int
Fixes #4628
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
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
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
Anthony Fok [Sun, 30 Sep 2018 22:28:11 +0000 (16:28 -0600)]
snap: Add custom x-nodejs plugin to support ppc64el and s390x
Anthony Fok [Sun, 30 Sep 2018 20:22:01 +0000 (14:22 -0600)]
snap: Fetch mage with GO111MODULE=off
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.
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
Bjørn Erik Pedersen [Wed, 26 Sep 2018 07:26:53 +0000 (09:26 +0200)]
hugolib: Be a litle more specific in NextPage TODO
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
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.
Anthony Fok [Tue, 25 Sep 2018 13:21:09 +0000 (07:21 -0600)]
releaser: Update path to snap/snapcraft.yaml
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
Anthony Fok [Tue, 25 Sep 2018 13:03:51 +0000 (07:03 -0600)]
snap: Move snapcraft.yaml to snap/snapcraft.yaml
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.
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
Bjørn Erik Pedersen [Mon, 24 Sep 2018 10:41:12 +0000 (12:41 +0200)]
build: Update the temp docker script
hugoreleaser [Mon, 24 Sep 2018 10:04:24 +0000 (10:04 +0000)]
releaser: Prepare repository for 0.50-DEV
[ci skip]
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]
hugoreleaser [Mon, 24 Sep 2018 10:01:04 +0000 (10:01 +0000)]
releaser: Bump versions for release of 0.49
[ci skip]
Bjørn Erik Pedersen [Mon, 24 Sep 2018 09:52:47 +0000 (11:52 +0200)]
Release 0.49
Bjørn Erik Pedersen [Mon, 24 Sep 2018 09:52:25 +0000 (11:52 +0200)]
docs: Document directory based archetypes
See #4535
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]
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.
Bjørn Erik Pedersen [Mon, 24 Sep 2018 08:11:41 +0000 (10:11 +0200)]
docs: Regenerate CLI docs
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
Bjørn Erik Pedersen [Sun, 23 Sep 2018 21:48:53 +0000 (23:48 +0200)]
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
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
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
Ricardo N Feliciano [Sun, 23 Sep 2018 01:34:51 +0000 (21:34 -0400)]
Build on CircleCI outside of GOPATH
Fixes #5135
Bjørn Erik Pedersen [Sun, 23 Sep 2018 15:00:33 +0000 (17:00 +0200)]
Prevent symbolic links from themes
Ricardo N Feliciano [Sat, 22 Sep 2018 18:58:46 +0000 (14:58 -0400)]
tpl/collections: Allow first function to return an empty slice
Fixes #5235
Ricardo N Feliciano [Fri, 21 Sep 2018 22:36:15 +0000 (18:36 -0400)]
tpl/opengraph: Use safeHTMLAttr instead of safeHTML for HTML attributes
Fixes #5236
Bjørn Erik Pedersen [Fri, 21 Sep 2018 12:30:57 +0000 (14:30 +0200)]
hugolib: Remove deprecated rssURI
Bjørn Erik Pedersen [Fri, 21 Sep 2018 12:27:35 +0000 (14:27 +0200)]
commands: Remove deprecated flags
Bjørn Erik Pedersen [Fri, 21 Sep 2018 12:23:00 +0000 (14:23 +0200)]
hugolib: Deprecate Pages.Sort
In favour of ByWeight.
Bjørn Erik Pedersen [Fri, 21 Sep 2018 12:13:45 +0000 (14:13 +0200)]
hugolib: Minor cleaning in the sorting code
Bjørn Erik Pedersen [Fri, 21 Sep 2018 09:01:59 +0000 (11:01 +0200)]
hugolib: Clear the page cache per render
This is a slight performance optimization with no functional effect.
See #5239
Bjørn Erik Pedersen [Fri, 21 Sep 2018 08:10:11 +0000 (10:10 +0200)]
hugolib: Compare every element in pages cache
It is slightly slower, but correctnes is, of course, more important:
```bash
benchmark old ns/op new ns/op delta
BenchmarkSortByWeightAndReverse-4 367 645 +75.75%
benchmark old allocs new allocs delta
BenchmarkSortByWeightAndReverse-4 2 2 +0.00%
benchmark old bytes new bytes delta
BenchmarkSortByWeightAndReverse-4 64 64 +0.00%
```
Running the same benchmark without any cache (i.e. resorting the slice on every iteration) and then compare it to the current version shows that it still is plenty worth it:
```bash
▶ benchcmp 2.bench 1.bench
benchmark old ns/op new ns/op delta
BenchmarkSortByWeightAndReverse-4
1358757 645 -99.95%
benchmark old allocs new allocs delta
BenchmarkSortByWeightAndReverse-4 17159 2 -99.99%
benchmark old bytes new bytes delta
BenchmarkSortByWeightAndReverse-4 274573 64 -99.98%
```
Closes #5239
Bjørn Erik Pedersen [Tue, 18 Sep 2018 07:27:49 +0000 (09:27 +0200)]
Revert "hugolib: Normalize permalink path segments"
This reverts commit
06976ebb8778e08fea89dbd9fcb875f6c8d650d4.
Fixes #5223
Bjørn Erik Pedersen [Fri, 14 Sep 2018 21:25:54 +0000 (23:25 +0200)]
Update releasenotes_writer.go
Add @onedrawingperday to the release credit list. The activity on the theme repo is increasing and the work he and @digitalcraftsman
is doing is very much appreciated.
Cameron Moore [Fri, 14 Sep 2018 09:35:26 +0000 (04:35 -0500)]
hugolib: Normalize permalink path segments
When constructing permalinks, ensure that path segments are normalized
with PathSpec.MakeSegment instead of PathSpec.URLize.
Fixes #4926
Bjørn Erik Pedersen [Fri, 14 Sep 2018 09:04:33 +0000 (11:04 +0200)]
hugolib: Do not set RSS as Kind in RSS output
Before Hugo this commit we set the pseudo page kind RSS on the page when output to RSS. This had some unintended side effects, esp. when the only output format for that page was RSS.
For the page kinds that can have multiple output formats, the Kind should be one of the standard home, page etc.
Fixes #5138
Bjørn Erik Pedersen [Wed, 5 Sep 2018 08:31:15 +0000 (10:31 +0200)]
hugolib: Make sure ambiguous lookups in GetPage gets an error
See #5138
Bjørn Erik Pedersen [Fri, 14 Sep 2018 07:55:44 +0000 (09:55 +0200)]
docs: Add docs for append
See #5190
Bjørn Erik Pedersen [Mon, 10 Sep 2018 07:48:10 +0000 (09:48 +0200)]
tpl/collections: Add collections.Append
Before this commit you would typically use `.Scratch.Add` to manually create slices in a loop.
With variable overwrite in Go 1.11, we can do better. This commit adds the `append` template func.
A made-up example:
```bash
{{ $p1 := index .Site.RegularPages 0 }}{{ $p2 := index .Site.RegularPages 1 }}
{{ $pages := slice }}
{{ if true }}
{{ $pages = $pages | append $p2 $p1 }}
{{ end }}
```
Note that with 2 slices as arguments, the two examples below will give the same result:
```bash
{{ $s1 := slice "a" "b" | append (slice "c" "d") }}
{{ $s2 := slice "a" "b" | append "c" "d" }}
```
Both of the above will give `[]string{a, b, c, d}`.
This commit also improves the type handling in the `slice` template function. Now `slice "a" "b"` will give a `[]string` slice. The old behaviour was to return a `[]interface{}`.
Fixes #5190
Bjørn Erik Pedersen [Fri, 14 Sep 2018 06:35:23 +0000 (08:35 +0200)]
Bjørn Erik Pedersen [Fri, 14 Sep 2018 06:34:58 +0000 (08:34 +0200)]
Squashed 'docs/' changes from
9b494a58c..
6b00298bb
6b00298bb Remove outdated "related example"
987f1e1cd Fix dead links (#601)
96287a20a Add config option "summaryLength" (#600)
ced7f2085 Adjust Over showcase
e334a6354 Add new showcase: over
10435b502 Add warning about privacy options only work with internal templates (#525)
48c6b0e4d Minor grammatical fix
684670ebc Add quote
0e9fada52 Improvements to taxonomy template examples
e06c4bf73 Add syntax highlighting; consistent 4-space indentation
c1cb3f081 Remove dead links for custom permalinks
3e3aefd04 Fix
0a671bc3751479e74a0a9d2132736c61d239707c
d65888685 fix file name in 'Add Non-content Entries to a Menu' code toggle (#547)
1a0563857 Add Solus install guide (#590)
8a0d65b0d Update Windows Installation instructions (#564)
c4348636a Fix typo
0a671bc37 Add post to menu example
af14497c6 Add notes for `os.Stat` (Hugo 0.47) (#557)
e49f65bb3 Singular to plural
cb5608dbf Update introduction.md
30b060dff Add variable re-definition example (Hugo v0.48+)
21123967e Minor edits
fac3df043 Refresh the Go Templates introduction
4a9600e92 Updating URL to how-to-guide for hosting hugo site on firebase
bfaa7779c add missing word
c2cb5d09b Tweak 'name: weight' to 'name: date' in example (#582)
5ea938ad6 Remove some Scratch
2708dcd57 Release 0.48
e375d0f05 Merge branch 'temp48'
75e36c160 releaser: Prepare repository for 0.49-DEV
a6102f253 releaser: Add release notes to /docs for release of 0.48
41fc35db4 releaser: Bump versions for release of 0.48
64b9ecc74 Spell out the npm command for installing PostCSS
19e900a17 Improved Related Content doc
fe21600e7 Merge commit '
844aef544c19e9d8f529b4f8144e089d0982bb34'
844aef544 Squashed 'themes/gohugoioTheme/' changes from
66249819..
68ddff44
069828db8 Update git.md
d881d1433 Make default "related" behavior more explicit
60b9160eb Add docs for displaying 404 page on CloudFront
b72ebc760 Add .gitattributes to /resources
000cf85f4 Make the pros/cons styling consistent for summaries; use desc list
ebf1da97a Add note about outputStyle compressed
e3338ee91 Triple backquote syntax fix
361962a7c Add one more Blogger to Hugo tool for Windows (.NET Framework 4.5) (#540)
066606a21 Fix wrong link about Mmark Syntax Document
faee70757 Added exitwp-for-hugo
6b4108051 Add hugo-wrapper to starter-kits
4695dfba2 Added Utterances as Comments Alternatives.
c7ba9e3e1 Correct typo
beb850d9f Release 0.47.1
1cf417c8a Merge branch 'temp471'
0843bc46c releaser: Prepare repository for 0.48-DEV
8ff5c8b70 releaser: Add release notes to /docs for release of 0.47.1
e2353434d releaser: Bump versions for release of 0.47.1
ffb1300af Update development.md
c22234ea5 netlify: Minify output
5b9191c56 Release 0.47
bfd92cf52 releaser: Prepare repository for 0.48-DEV
ac7acf730 releaser: Add release notes to /docs for release of 0.47
b0096099d releaser: Bump versions for release of 0.47
86a7ae459 docs: Regenerate CLI docs
d2c8b72bc Merge commit '
a95896878f4b4a79448b39ce93a4e0d3258b4a43'
84de7ef59 Merge commit '
3a44bf182fed5f34621f450114083a6dd7e88a07'
git-subtree-dir: docs
git-subtree-split:
6b00298bb26b700281df28817b6556e7480cdd1e
Alexandros [Thu, 13 Sep 2018 06:16:20 +0000 (09:16 +0300)]
minifiers: Set minifier to KeepEndTags
See: https://github.com/tdewolff/minify/blob/
948b6490cf3cacab5f4d7474104c3d21bf6eda46/README.md#L171
James Kiefer [Wed, 12 Sep 2018 17:33:14 +0000 (11:33 -0600)]
minifiers: Make JSON minification more generic
Add a regex matcher for json types. Specifically support LD+JSON which
allows for google seo minification out of the box. Expanded JS/JSON
minification testing.
Bjørn Erik Pedersen [Tue, 11 Sep 2018 15:54:30 +0000 (17:54 +0200)]
Update Mage
Bjørn Erik Pedersen [Mon, 10 Sep 2018 19:02:18 +0000 (21:02 +0200)]
tpl/data: Revise error handling in getJSON and getCSV
The most important part being: Log ERROR, but do not stop the build on remote errors.
Fixes #5076
Cameron Moore [Mon, 10 Sep 2018 19:16:05 +0000 (14:16 -0500)]
tpl: Show error on union or intersect of uncomparable types
Fixes #3820
Bjørn Erik Pedersen [Sun, 9 Sep 2018 08:15:11 +0000 (10:15 +0200)]
tpl/collections: Improve type handling in collections.Slice
Fixes #5188
Bjørn Erik Pedersen [Sat, 8 Sep 2018 19:56:36 +0000 (21:56 +0200)]
tpl/collections: Allow pointer receiver in Group
See #4865
Bjørn Erik Pedersen [Sat, 8 Sep 2018 11:00:36 +0000 (13:00 +0200)]
tpl/collections: Add group template func
This extends the page grouping in Hugo with a template function that allows for ad-hoc grouping.
A made-up example:
```
{{ $cool := where .Site.RegularPages "Params.cool" true | group "cool" }}
{{ $blue := where .Site.RegularPages "Params.blue" true | group "blue" }}
{{ $paginator := .Paginate (slice $cool $blue) }}
```
Closes #4865
Vincent Danjean [Sat, 8 Sep 2018 09:14:09 +0000 (11:14 +0200)]
hugolib: Allow creating page groups from any page collection
This also adjusts the pagination logic to allow for these new collections.
Note that we will follow up with a template function named `group` that will be the end user API. The `.Group` method on `Page` should be considered as internal.
Updates #4865
Bjørn Erik Pedersen [Fri, 7 Sep 2018 07:49:29 +0000 (09:49 +0200)]
Update dependencies
Bjørn Erik Pedersen [Fri, 7 Sep 2018 07:05:25 +0000 (09:05 +0200)]
tpl/strings: Add strings.FirstUpper
Fixes #5174
Cameron Moore [Fri, 7 Sep 2018 01:52:20 +0000 (20:52 -0500)]
hugofs: Fix filepath issue in test
Cameron Moore [Fri, 7 Sep 2018 01:41:59 +0000 (20:41 -0500)]
resource: Fix golint issues
Fix godoc comments and the following:
resource/image.go:33:2: a blank import should be only in a main or test package, or have a comment justifying it
resource/image.go:35:2: a blank import should be only in a main or test package, or have a comment justifying it
resource/image.go:41:2: a blank import should be only in a main or test package, or have a comment justifying it
resource/image.go:538:10: if block ends with a return statement, so drop this else and outdent its block
resource/resource.go:54:7: exported const DefaultResourceType should have comment or be unexported
resource/resource.go:233:1: receiver name r1 should be consistent with previous receiver name r for Resources
resource/resource.go:254:1: receiver name r1 should be consistent with previous receiver name r for Resources
Cameron Moore [Fri, 7 Sep 2018 01:40:37 +0000 (20:40 -0500)]
Improve some godoc comments
Cameron Moore [Thu, 6 Sep 2018 22:25:30 +0000 (17:25 -0500)]
tpl: Fix golint godoc issues
Cameron Moore [Thu, 6 Sep 2018 22:24:23 +0000 (17:24 -0500)]
media: Fix golint issues
Fix godoc issues and the following:
media/mediaType.go:228:1: receiver name t should be consistent with previous receiver name m for Type
Cameron Moore [Thu, 6 Sep 2018 22:00:19 +0000 (17:00 -0500)]
output: Fix golint godoc issues
Cameron Moore [Thu, 6 Sep 2018 21:05:17 +0000 (16:05 -0500)]
publisher: Fix golint godoc issue
Cameron Moore [Thu, 6 Sep 2018 20:28:13 +0000 (15:28 -0500)]
langs: Fix golint godoc issue
Cameron Moore [Thu, 6 Sep 2018 20:27:44 +0000 (15:27 -0500)]
i18n: Fix golint issue
i18n/translationProvider.go:48:21: error strings should not be capitalized or end with punctuation or a newline
Cameron Moore [Thu, 6 Sep 2018 19:57:58 +0000 (14:57 -0500)]
related: Fix golint issues
related/inverted_index.go:76:1: exported method Config.Add should have comment or be unexported
related/inverted_index.go:255:1: exported method IndexConfig.ToKeywords should have comment or be unexported
Cameron Moore [Thu, 6 Sep 2018 19:50:54 +0000 (14:50 -0500)]
releaser: Fix golint issues
struct field HtmlURL should be HTMLURL
Cameron Moore [Thu, 6 Sep 2018 19:42:55 +0000 (14:42 -0500)]
source: Fix golint godoc issues
Cameron Moore [Thu, 6 Sep 2018 19:21:18 +0000 (14:21 -0500)]
hugofs: Fix golint issues
Fix godoc issues and the following:
hugofs/noop_fs.go:25:2: error var noOpErr should have name of the form errFoo
Cameron Moore [Thu, 6 Sep 2018 18:34:29 +0000 (13:34 -0500)]
helpers: Fix golint issues
helpers/general.go:448:1: comment on exported function DiffStrings should be of the form "DiffStrings ..."
helpers/hugo.go:42:6: exported type HugoVersionString should have comment or be unexported
helpers/hugo.go:48:1: exported method HugoVersion.Version should have comment or be unexported
helpers/hugo.go:56:1: comment on exported method HugoVersionString.Compare should be of the form "Compare ..."
helpers/hugo.go:62:1: comment on exported method HugoVersionString.Eq should be of the form "Eq ..."
helpers/path.go:548:1: comment on exported function OpenFilesForWriting should be of the form "OpenFilesForWriting ..."
helpers/processing_stats.go:24:6: exported type ProcessingStats should have comment or be unexported
helpers/processing_stats.go:55:1: exported function NewProcessingStats should have comment or be unexported
helpers/processing_stats.go:59:1: exported method ProcessingStats.Incr should have comment or be unexported
helpers/processing_stats.go:63:1: exported method ProcessingStats.Add should have comment or be unexported
helpers/processing_stats.go:67:1: exported method ProcessingStats.Table should have comment or be unexported
helpers/processing_stats.go:83:1: exported function ProcessingStatsTable should have comment or be unexported
Cameron Moore [Thu, 6 Sep 2018 18:23:56 +0000 (13:23 -0500)]
deps: Fix most golint issues
deps/deps.go:79:6: exported type Listeners should have comment or be unexported
deps/deps.go:86:1: exported method Listeners.Add should have comment or be unexported
deps/deps.go:92:1: exported method Listeners.Notify should have comment or be unexported
Cameron Moore [Thu, 6 Sep 2018 16:08:23 +0000 (11:08 -0500)]
config: Fix golint issues
config/configProvider.go:54:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
config/privacy/privacyConfig.go:99:1: exported function DecodeConfig should have comment or be unexported
config/services/servicesConfig.go:64:1: exported function DecodeConfig should have comment or be unexported
Cameron Moore [Thu, 6 Sep 2018 16:02:32 +0000 (11:02 -0500)]
common: Fix golint errors
common/errors/errors.go:21:1: comment on exported var FeatureNotAvailableErr should be of the form "FeatureNotAvailableErr ..."
common/errors/errors.go:23:5: error var FeatureNotAvailableErr should have name of the form ErrFoo
common/maps/scratch.go:76:1: comment on exported method Scratch.Delete should be of the form "Delete ..."
common/maps/scratch.go:133:1: exported function NewScratch should have comment or be unexported
common/types/types.go:44:1: exported function NewKeyValuesStrings should have comment or be unexported
Cameron Moore [Thu, 6 Sep 2018 15:53:18 +0000 (10:53 -0500)]
commands: Fix golint issues
commands/hugo.go:65:1: exported method Response.IsUserError should have comment or be unexported
commands/import_jekyll.go:100:21: error strings should not be capitalized or end with punctuation or a newline
commands/server.go:417:1: receiver name sc should be consistent with previous receiver name s for serverCmd
Thomas Jost [Thu, 6 Sep 2018 13:45:29 +0000 (15:45 +0200)]
hugolib: Do not FirstUpper taxonomy titles
Doing so was probably a mistake. This may be a breaking change for some people,
but it's easy to restore the previous behaviour in the layouts.
Fixes #5172
Bjørn Erik Pedersen [Thu, 6 Sep 2018 07:34:09 +0000 (09:34 +0200)]
Fix broken Travis config
See https://github.com/magefile/mage/issues/79
Bjørn Erik Pedersen [Sun, 2 Sep 2018 12:21:33 +0000 (14:21 +0200)]
Update to latest Mage
And run the Appveyor tests without GOPATH.
Fixes https://github.com/magefile/mage/issues/79
Bjørn Erik Pedersen [Mon, 3 Sep 2018 07:22:36 +0000 (09:22 +0200)]
resource: Fix broken build
Bjørn Erik Pedersen [Sun, 2 Sep 2018 21:57:42 +0000 (23:57 +0200)]
resource: Remove some duplicate code
zyfdegh [Fri, 31 Aug 2018 07:05:52 +0000 (15:05 +0800)]
Update Dockerfile to Go 1.11
Fixes #5145
Cameron Moore [Tue, 28 Aug 2018 20:51:44 +0000 (15:51 -0500)]
hugolib: Simplify some code
Cameron Moore [Tue, 28 Aug 2018 20:49:57 +0000 (15:49 -0500)]
hugolib: Add missing error checks
Cameron Moore [Tue, 28 Aug 2018 20:45:51 +0000 (15:45 -0500)]
hugolib: Remove extraneous createStaticFs call
This looks like a copy+paste error. We have the same line a few lines
below this call and we actually handle the err value there.
Cameron Moore [Tue, 28 Aug 2018 20:44:42 +0000 (15:44 -0500)]
hugolib: Fix godoc comment
Cameron Moore [Tue, 28 Aug 2018 20:43:42 +0000 (15:43 -0500)]
hugolib: Fix typo in private func name