daftaupe [Mon, 12 Jun 2017 17:44:16 +0000 (19:44 +0200)]
docs: Add note on updates for rpm-based distros
Bjørn Erik Pedersen [Mon, 12 Jun 2017 07:07:46 +0000 (09:07 +0200)]
releaser: Prepare repository for 0.23-DEV
[ci skip]
Bjørn Erik Pedersen [Mon, 12 Jun 2017 07:02:57 +0000 (09:02 +0200)]
releaser: Add relase notes to /docs for release of 0.22
[ci skip]
Bjørn Erik Pedersen [Mon, 12 Jun 2017 07:01:59 +0000 (09:01 +0200)]
releaser: Bump versions for release of 0.22
[ci skip]
Bjørn Erik Pedersen [Sun, 11 Jun 2017 15:27:00 +0000 (17:27 +0200)]
releaser: Spelling
Bjørn Erik Pedersen [Mon, 12 Jun 2017 06:39:30 +0000 (08:39 +0200)]
releaser: Add release notes draft for release of 0.22
David Turnbull [Mon, 12 Jun 2017 06:03:08 +0000 (16:03 +1000)]
docs: Rewrite “Archetypes” article
Matthieu Bresson [Fri, 9 Jun 2017 18:55:02 +0000 (20:55 +0200)]
docs: change .Site to $.Site where the global context is masked by the term's context
Torbjörn Lönnemark [Sun, 7 May 2017 01:49:12 +0000 (03:49 +0200)]
docs: Use single link element for RSS in example
The rel attribute supports specifying a set of values, not only a single
one.
Using two link elements can also cause browsers to show the feed twice
in menus.
Bjørn Erik Pedersen [Thu, 8 Jun 2017 23:08:37 +0000 (01:08 +0200)]
hugolib: Make the RSS feed use the date for the node it represents
Closes #2708
Alexandros [Thu, 8 Jun 2017 21:12:39 +0000 (00:12 +0300)]
Add noindex tag to HTML generated by Hugo Aliases
So that Googlebot can stop keeping the old URLs in the SERPs.
Bjørn Erik Pedersen [Thu, 8 Jun 2017 20:32:01 +0000 (22:32 +0200)]
hugolib: Unexport some internal methods
Cameron Moore [Mon, 22 May 2017 02:10:27 +0000 (21:10 -0500)]
tpl/collections: Add uint support to In
Cameron Moore [Sat, 20 May 2017 16:54:13 +0000 (11:54 -0500)]
tpl/collections: Support interfaces in union
Fixes #3411
Bjørn Erik Pedersen [Thu, 8 Jun 2017 18:00:05 +0000 (20:00 +0200)]
hugolib, commands: Improve live-reload on directory structure changes
This issue is more visible now that we support nested sections.
This commit makes operations like pasting new content folders or deleting content folders during server watch just work.
Fixes #3570
Bjørn Erik Pedersen [Sun, 9 Apr 2017 08:33:04 +0000 (10:33 +0200)]
hugolib: Enable nested sections
Fixes #465
Bjørn Erik Pedersen [Wed, 7 Jun 2017 20:31:57 +0000 (22:31 +0200)]
Revert "hugolib: Fix live-reload regression for add/removal of dirs"
Never mind. The "adding dir" scenario didn't work anyway, so that will need another fix.
This reverts commit
49a104309d53af243b32443a59bdc2a6fc9beeef.
Closes ##3325
Bjørn Erik Pedersen [Wed, 7 Jun 2017 20:11:15 +0000 (22:11 +0200)]
hugolib: Fix live-reload regression for add/removal of dirs
This reverts commit
b5b6e81c0269abf9b0f4bc6a127744a25344e5c6.
That change breaks watching of new directories (new dirs, deleted dirs).
Reopens #3325
Fixes #3569
Bjørn Erik Pedersen [Tue, 6 Jun 2017 07:15:42 +0000 (09:15 +0200)]
hugolib: Fix disablePathToLower regression
Fixes #3374
Bjørn Erik Pedersen [Tue, 6 Jun 2017 06:43:33 +0000 (08:43 +0200)]
hugolib: Simplify some test loops
Bjørn Erik Pedersen [Tue, 6 Jun 2017 06:09:25 +0000 (08:09 +0200)]
hugolib: Add test for no 404 in sitemap
Closes #3563
Peter Cossey [Sun, 4 Jun 2017 11:33:48 +0000 (21:33 +1000)]
docs: Add thislittleduck.com to the showcase
Nathan Sharfi [Mon, 29 May 2017 19:03:38 +0000 (12:03 -0700)]
tpl: Add uniq function
Bjørn Erik Pedersen [Sat, 3 Jun 2017 15:32:47 +0000 (17:32 +0200)]
hugolib: Remove some superflous TODO comments
Bjørn Erik Pedersen [Sat, 3 Jun 2017 10:31:31 +0000 (12:31 +0200)]
parser: Add horizontal YAML tags to benchmark
jeremielondon [Sat, 3 Jun 2017 06:51:51 +0000 (07:51 +0100)]
docs: Add Nutspubcrawl.com to the showcase
Bjørn Erik Pedersen [Wed, 31 May 2017 10:10:46 +0000 (13:10 +0300)]
all: Temporarily revert to BurntSushi for TOML front matter handling
We still have go-toml as a transitive dependency, and it is the way to go eventually, but we care about speed, so let us wait that one out.
Note that the issue this fixes is about taxonomies, but I guess this is a general issue for sites with many pages that uses TOML as front matter.
```
benchmark old ns/op new ns/op delta
BenchmarkFrontmatterTags/TOML:1-4 23206 8543 -63.19%
BenchmarkFrontmatterTags/TOML:11-4 80117 18495 -76.92%
BenchmarkFrontmatterTags/TOML:21-4 140676 28727 -79.58%
benchmark old allocs new allocs delta
BenchmarkFrontmatterTags/TOML:1-4 173 60 -65.32%
BenchmarkFrontmatterTags/TOML:11-4 625 138 -77.92%
BenchmarkFrontmatterTags/TOML:21-4 1106 210 -81.01%
benchmark old bytes new bytes delta
BenchmarkFrontmatterTags/TOML:1-4 9231 2912 -68.45%
BenchmarkFrontmatterTags/TOML:11-4 19808 5184 -73.83%
BenchmarkFrontmatterTags/TOML:21-4 31200 7536 -75.85%
```
See #3541
Updates #3464
Bjørn Erik Pedersen [Sat, 3 Jun 2017 06:32:52 +0000 (08:32 +0200)]
parser: Add BenchmarkFrontmatterTags
The list handling is surprisingly expensive:
```
▶ go test -run="NONE" -bench="BenchmarkFrontmatterTags" -test.benchmem=true ./parser | prettybench
PASS
benchmark iter time/iter bytes alloc allocs
--------- ---- --------- ----------- ------
BenchmarkFrontmatterTags/JSON:1-4
1000000 2039.00 ns/op 912 B/op 20 allocs/op
BenchmarkFrontmatterTags/JSON:11-4 300000 5202.00 ns/op 1640 B/op 44 allocs/op
BenchmarkFrontmatterTags/JSON:21-4 200000 7993.00 ns/op 2392 B/op 65 allocs/op
BenchmarkFrontmatterTags/YAML:1-4 200000 9359.00 ns/op 5928 B/op 66 allocs/op
BenchmarkFrontmatterTags/YAML:11-4 100000 21218.00 ns/op 8408 B/op 140 allocs/op
BenchmarkFrontmatterTags/YAML:21-4 50000 32852.00 ns/op 10920 B/op 211 allocs/op
BenchmarkFrontmatterTags/TOML:1-4 100000 21505.00 ns/op 9231 B/op 173 allocs/op
BenchmarkFrontmatterTags/TOML:11-4 20000 82919.00 ns/op 19808 B/op 625 allocs/op
BenchmarkFrontmatterTags/TOML:21-4 10000 141847.00 ns/op 31200 B/op 1106 allocs/op
ok github.com/spf13/hugo/parser 17.890s
```
See #3464
Bjørn Erik Pedersen [Fri, 2 Jun 2017 16:40:10 +0000 (18:40 +0200)]
hugolib: Add some more tags to benchmark
Bjørn Erik Pedersen [Fri, 2 Jun 2017 14:50:44 +0000 (16:50 +0200)]
hugolib: Bump leaktest timeout to 30 seconds
To try to make it less flaky.
Bjørn Erik Pedersen [Fri, 2 Jun 2017 07:21:51 +0000 (09:21 +0200)]
Write CPU and mem profiles from site benchmark script
Bjørn Erik Pedersen [Fri, 2 Jun 2017 07:13:45 +0000 (09:13 +0200)]
hugolib: Fix tag calculation in benchmark test
Bjørn Erik Pedersen [Thu, 1 Jun 2017 16:51:51 +0000 (18:51 +0200)]
hugolib: Add number of tags as a benchmark know
Bjørn Erik Pedersen [Thu, 1 Jun 2017 10:00:47 +0000 (12:00 +0200)]
hubolib: Make the site benchmark output more compact
So you can do and get:
```
▶ ./benchSite.sh "YAML,num_pages=10"
Running with BenchmarkSiteBuilding/YAML,num_pages=10
BenchmarkSiteBuilding/YAML,num_pages=10-4 1000
1611261 ns/op 730749 B/op 6458 allocs/op
PASS
ok github.com/spf13/hugo/hugolib 8.168s
```
Bjørn Erik Pedersen [Wed, 31 May 2017 11:48:49 +0000 (14:48 +0300)]
hubolib: Add 10k pages as a benchmark variant
Bjørn Erik Pedersen [Wed, 31 May 2017 10:23:22 +0000 (13:23 +0300)]
hugolib: Increase leaktest timeout
To try to less flaky test.
Bjørn Erik Pedersen [Wed, 31 May 2017 09:55:51 +0000 (12:55 +0300)]
hugolib: Break early from sitemap disabled check
See #3544
Bjørn Erik Pedersen [Wed, 31 May 2017 07:57:19 +0000 (10:57 +0300)]
hugolib: Respect disableKinds=["sitemap"]
Fixes #3544
Bjørn Erik Pedersen [Wed, 31 May 2017 07:35:02 +0000 (10:35 +0300)]
Add benchSite.sh
And change site benchmark separator to comma to make it Bash and regexp friendly, example:
./benchSite.sh "frontmatter=YAML,num_root_sections=1,num_pages=.*,tags_per_page=20,shortcodes=false,render=false"
Bjørn Erik Pedersen [Tue, 30 May 2017 18:39:57 +0000 (21:39 +0300)]
vendor: Update go-toml
Slightly better:
```
benchmark old ns/op new ns/op delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4
204522447 200702508 -1.87%
benchmark old allocs new allocs delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4
1943677 1784437 -8.19%
benchmark old bytes new bytes delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4
102665182 100925773 -1.69%
```
Bjørn Erik Pedersen [Tue, 30 May 2017 16:07:01 +0000 (19:07 +0300)]
source: Cache language config
```
benchmark old ns/op new ns/op delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4
552742744 501838152 -9.21%
benchmark old allocs new allocs delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4
3047393 2957378 -2.95%
benchmark old bytes new bytes delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4
356533864 354291924 -0.63%
```
Bjørn Erik Pedersen [Tue, 30 May 2017 15:10:48 +0000 (18:10 +0300)]
hugolib: Add TOML/YAML switch to benchmark
Bjørn Erik Pedersen [Tue, 30 May 2017 13:38:10 +0000 (16:38 +0300)]
hugolib: Adjust timeout for leaktest
Bjørn Erik Pedersen [Tue, 30 May 2017 12:33:37 +0000 (15:33 +0300)]
hugolib: Add slightly more realistic tag distribution to benchmark
Bjørn Erik Pedersen [Tue, 30 May 2017 07:01:54 +0000 (10:01 +0300)]
hugolib: Add site building benchmarks
To run a subset of these benchmark, one can do something like this:
```
go test -run="NONE" -bench="BenchmarkSiteBuilding/tags_per_page=0.*shortcodes=true.*render=false" -test.benchmem=true ./hugolib
```
Which will run without any tags, with shortcodes, but will skip rendering.
Fixes #3535
Albert Nigmatzianov [Tue, 23 May 2017 19:55:35 +0000 (21:55 +0200)]
docs: Update overview/usage
Bjørn Erik Pedersen [Sat, 27 May 2017 21:38:14 +0000 (00:38 +0300)]
Update snapcraft.yaml
Bump to latest Go version.
Bjørn Erik Pedersen [Fri, 26 May 2017 18:31:45 +0000 (21:31 +0300)]
hubolib: Remove the regular page restriction from .Site.GetPage
See #2844
Bryan Klein [Fri, 26 May 2017 12:05:19 +0000 (05:05 -0700)]
docs: Fix parameter name in YouTube shortcode section
Since 'autostart' is not the correct name of the parameter, I changed the words to make this section more clear.
Bjørn Erik Pedersen [Fri, 26 May 2017 07:51:17 +0000 (10:51 +0300)]
hugolib: Refine allKindsInPages
Bjørn Erik Pedersen [Thu, 25 May 2017 18:14:02 +0000 (21:14 +0300)]
travis: Update Go versions
Bjørn Erik Pedersen [Fri, 26 May 2017 07:12:19 +0000 (10:12 +0300)]
hugolib: Fix ref/relref issue with duplicate base filenames
This commit also makes that function 80x faster.
Fixes #2507
Bjørn Erik Pedersen [Thu, 25 May 2017 18:13:03 +0000 (21:13 +0300)]
hugolib: Add a cache to GetPage
Looks to be slightly slower with the low number of section pages, but the 1000 regular pages seem to add value.
```
benchmark old ns/op new ns/op delta
BenchmarkGetPage-4 97.7 145 +48.41%
BenchmarkGetPageRegular-4 7933 161 -97.97%
benchmark old allocs new allocs delta
BenchmarkGetPage-4 0 0 +0.00%
BenchmarkGetPageRegular-4 0 0 +0.00%
benchmark old bytes new bytes delta
BenchmarkGetPage-4 0 0 +0.00%
BenchmarkGetPageRegular-4 0 0 +0.00%
```
Bjørn Erik Pedersen [Thu, 25 May 2017 09:32:02 +0000 (12:32 +0300)]
hugolib: Support regular pages in .Site.GetPage
Fixes #2844
Bjørn Erik Pedersen [Thu, 25 May 2017 14:14:23 +0000 (17:14 +0300)]
cache: Add a simple partitioned lazy cache
Mahmud Ridwan [Wed, 24 May 2017 06:23:46 +0000 (12:23 +0600)]
docs: Add furqansoftware.com to the showcase
Albert Nigmatzianov [Wed, 24 May 2017 16:57:27 +0000 (18:57 +0200)]
docs: Delete `brew update` from docs
Fix #3518
Albert Nigmatzianov [Wed, 24 May 2017 08:51:48 +0000 (10:51 +0200)]
cmd: Replace flagChanged with pflag.FlagSet.Changed
Chankey Pathak [Tue, 23 May 2017 07:47:06 +0000 (13:17 +0530)]
docs: Add tutswiki.com to the showcase
Bjørn Erik Pedersen [Tue, 23 May 2017 18:00:36 +0000 (21:00 +0300)]
docs: Regenerate commands docs
Closes #3400
Bjørn Erik Pedersen [Wed, 22 Feb 2017 08:39:57 +0000 (09:39 +0100)]
hugolib: Enable leaktest
See #3082
Bjørn Erik Pedersen [Tue, 23 May 2017 15:52:00 +0000 (18:52 +0300)]
commands: Remove the rlimit tweaking on macOS
Fixes #3512
Bjørn Erik Pedersen [Tue, 23 May 2017 15:02:36 +0000 (18:02 +0300)]
vendor: Update libs
Bjørn Erik Pedersen [Mon, 22 May 2017 22:20:31 +0000 (01:20 +0300)]
hugolib: Speed up GetPage
When we know to look into the index pages collection, do that:
```
benchmark old ns/op new ns/op delta
BenchmarkGetPage-4 51483 7072 -86.26%
benchmark old allocs new allocs delta
BenchmarkGetPage-4 71 71 +0.00%
benchmark old bytes new bytes delta
BenchmarkGetPage-4 2648 2648 +0.00%
```
This commit also returns an error if .Site.GetPage is called with the regular Page Kind, as that is currently not supported.
Fixes #3503
Bjørn Erik Pedersen [Tue, 23 May 2017 09:10:15 +0000 (12:10 +0300)]
hugolib: Add BenchmarkGetPage
Bjørn Erik Pedersen [Mon, 22 May 2017 20:23:52 +0000 (23:23 +0300)]
releaser: Disable flaky test
Cameron Moore [Mon, 22 May 2017 20:05:58 +0000 (15:05 -0500)]
tpl/cast: Handle template.HTML and friends in ToInt
Also add tests for ToInt and ToString.
Resolves #3308
Alexandros [Mon, 22 May 2017 09:08:03 +0000 (12:08 +0300)]
Remove Unmaintaned Frontends from Tools.
The unmaintained Rango frontend and the Hugopit "experiment" should be removed from the Hugo Tools/Frontends section of the documentation as they are unusable.
Rango can mess up with other dependencies installed in the Go Path as reported here:
https://github.com/stayradiated/rango/issues/4
Hugopit's developer himself stated that this is an unmaintained experiment and he seemed a bit surprised that it is included in Hugo's documentation over here: https://github.com/sjardim/Hugopit/issues/3
Bjørn Erik Pedersen [Mon, 22 May 2017 13:18:26 +0000 (16:18 +0300)]
releaser: Prepare repository for 0.22-DEV
[ci skip]
Bjørn Erik Pedersen [Mon, 22 May 2017 13:11:22 +0000 (16:11 +0300)]
releaser: Add relase notes to /docs for release of 0.21
[ci skip]
Bjørn Erik Pedersen [Mon, 22 May 2017 13:09:42 +0000 (16:09 +0300)]
releaser: Bump versions for release of 0.21
[ci skip]
Bjørn Erik Pedersen [Mon, 22 May 2017 13:04:40 +0000 (16:04 +0300)]
releaser: Add a new step
When doing it step-by-step, we need to update the version numbers in its own step.
Bjørn Erik Pedersen [Mon, 22 May 2017 09:23:22 +0000 (12:23 +0300)]
releaser: Update ldflags
Bjørn Erik Pedersen [Mon, 22 May 2017 08:56:19 +0000 (11:56 +0300)]
vendor: Update golang.org/x/sys/unix
To hopefully fix a broken Dragonfly build.
Bjørn Erik Pedersen [Mon, 22 May 2017 07:51:11 +0000 (10:51 +0300)]
releaser: Add release notes draft for 0.21
* releaser: Add relase notes draft for release of 0.21
[ci skip]
Bjørn Erik Pedersen [Sat, 20 May 2017 08:41:43 +0000 (11:41 +0300)]
tpl/time: Re-add the time example
Bjørn Erik Pedersen [Sat, 20 May 2017 08:28:33 +0000 (11:28 +0300)]
tpl: Make the Namespace func signature explicit
This makes it cleaner and avoids breaking client code, such as the docs helper JSON generator.
Bjørn Erik Pedersen [Sat, 20 May 2017 08:11:23 +0000 (11:11 +0300)]
releaser: Delay the version bumping
So we can do the release notes in its own branch if needed.
Bjørn Erik Pedersen [Sat, 20 May 2017 07:58:08 +0000 (10:58 +0300)]
releaser: Fix tag detection for changelog when doing a main release
Also improve the changelog slightly.
Fixes #3482
Cameron Moore [Wed, 17 May 2017 19:26:02 +0000 (14:26 -0500)]
tpl/time: Remove asTime template func mapping
Cameron Moore [Wed, 10 May 2017 01:24:23 +0000 (20:24 -0500)]
tpl/time: Support overlapping namespace and template func
Fixes #3421
Bjørn Erik Pedersen [Fri, 19 May 2017 18:13:55 +0000 (21:13 +0300)]
tpl/collections: Make IsSet WARNING less chatty
Updates #3092
ronen [Fri, 19 May 2017 08:21:02 +0000 (11:21 +0300)]
docs: Add ttsreader.com to the showcase
Bjørn Erik Pedersen [Thu, 18 May 2017 20:23:29 +0000 (23:23 +0300)]
tpl/images: Fix error handling in Config
Cameron Moore [Thu, 18 May 2017 18:23:03 +0000 (13:23 -0500)]
tpl/collections: Use Feedback log instead of Error in IsSet
Using the Error log will cause Hugo to exit with an error, which could
break site build workflows.
Cameron Moore [Thu, 18 May 2017 02:29:35 +0000 (21:29 -0500)]
tpl/collections: Log an error on unsupported types in IsSet
Unsupported types are currently silently ignored by IsSet. An earlier
attempt was made to solve the issue by returning an error. That attempt
was reverted since it broke some existing themes.
So instead, we'll log an error. Hopefully, people will stop using IsSet
in this way, and we can eventually return an error outright.
Updates #3092
Bjørn Erik Pedersen [Thu, 18 May 2017 18:38:16 +0000 (21:38 +0300)]
docs: Regenerate docs helper
Bjørn Erik Pedersen [Thu, 18 May 2017 18:37:29 +0000 (21:37 +0300)]
output: Fix output format mixup in example
See #3481
Munif Tanjim [Thu, 18 May 2017 15:12:23 +0000 (21:12 +0600)]
docs: Fix incorrect path in templates/list
Cameron Moore [Tue, 2 May 2017 02:25:39 +0000 (21:25 -0500)]
tpl/collections: Add support for interfaces to intersect
Fixes #1952
Cameron Moore [Thu, 29 Dec 2016 04:09:31 +0000 (22:09 -0600)]
tpl/lang: Add NumFmt function
NumFmt formats a number with a given precision using the requested
decimal, grouping, and negative characters.
Fixes #1444
James [Thu, 18 May 2017 05:55:15 +0000 (15:55 +1000)]
docs: Update references to JSON
Looks like this was a bad copy/paste where CSV should've been JSON
Sharon L [Thu, 18 May 2017 05:54:10 +0000 (08:54 +0300)]
docs: Fix minor grammar issue in shortcodes.md
Bjørn Erik Pedersen [Wed, 17 May 2017 16:57:44 +0000 (19:57 +0300)]
hugolib: Fix RSSLink vs RSS Output Format
Fixes #3450
Bjørn Erik Pedersen [Tue, 16 May 2017 07:53:40 +0000 (10:53 +0300)]
tmplimpl: Add support for ellipsed paginator
Fixes #3466
Bjørn Erik Pedersen [Wed, 17 May 2017 15:04:07 +0000 (18:04 +0300)]
hugolib: Fix output formats override when no outputs definition given
A common use case for this is to redefine the built-in output format `RSS` to give it a different URL.
Before this commit, that was not possible without also providing an `outputs` definition.
Fixes #3447
Albert Nigmatzianov [Mon, 15 May 2017 10:58:02 +0000 (12:58 +0200)]
commands: Skip .git directories
Fix #3468
Gilbert Gilb's [Sun, 14 May 2017 07:56:03 +0000 (09:56 +0200)]
Dockerfile: Remove ENTRYPOINT
It's pointless to set `/bin/sh` as entrypoint. `/bin/sh` is already the default command, and on the top of that, setting `/bin/sh` as entrypoint ignores the command.
Bjørn Erik Pedersen [Sat, 6 May 2017 18:15:28 +0000 (20:15 +0200)]
hugolib: Handle shortcode per output format
This commit allows shortcode per output format, a typical use case would be the special AMP media tags.
Note that this will only re-render the "overridden" shortcodes and only in pages where these are used, so performance in the normal case should not suffer.
Closes #3220
Bjørn Erik Pedersen [Sat, 6 May 2017 08:48:27 +0000 (10:48 +0200)]
hugolib: Handle any errors in processShortcodes