brevno-suite/hugo
7 years agoreleaser: Update /docs to 0.24 [ci skip] v0.24
Bjørn Erik Pedersen [Wed, 21 Jun 2017 11:53:23 +0000 (13:53 +0200)]
releaser: Update /docs to 0.24 [ci skip]

7 years agoreleaser: Bump versions for release of 0.24
Bjørn Erik Pedersen [Wed, 21 Jun 2017 11:52:27 +0000 (13:52 +0200)]
releaser: Bump versions for release of 0.24

[ci skip]

7 years agoreleaser: Update /docs [ci skip]
Bjørn Erik Pedersen [Wed, 21 Jun 2017 11:52:27 +0000 (13:52 +0200)]
releaser: Update /docs [ci skip]

7 years agoreleaser: Add release notes draft for 0.24
Bjørn Erik Pedersen [Wed, 21 Jun 2017 11:51:05 +0000 (13:51 +0200)]
releaser: Add release notes draft for 0.24

7 years agooutput: Identify extension-less text types as text
Bjørn Erik Pedersen [Tue, 20 Jun 2017 15:20:08 +0000 (17:20 +0200)]
output: Identify extension-less text types as text

See #3614

7 years agoSupport non-md files as archetype files
Bjørn Erik Pedersen [Tue, 20 Jun 2017 10:46:03 +0000 (12:46 +0200)]
Support non-md files as archetype files

It now properly uses the extension of the target file to determine archetype file.

Fixes #3597
Fixes #3618

7 years agomedia, hugolib: Support extension-less media types
Bjørn Erik Pedersen [Tue, 20 Jun 2017 06:45:52 +0000 (08:45 +0200)]
media, hugolib: Support extension-less media types

This change is motivated by Netlify's `_redirects` files, which is currently not possible to generate with Hugo.

This commit adds a `Delimiter` field to media type, which defaults to ".", but can be blanked out.

Fixes #3614

7 years agohugolib: Add disableAliases
Bjørn Erik Pedersen [Tue, 20 Jun 2017 08:30:40 +0000 (10:30 +0200)]
hugolib: Add disableAliases

Note that even with this setting enabled, the aliases themselves are preserved on the pages.

The big motivation for this change is to be able to use the alias definitions to generate `.htaccess` or Netlify's `_redirect` files with server-side redirects.

Fixes #3613

7 years agoparser: Fix handling of quoted brackets in JSON front matter
Bjørn Erik Pedersen [Mon, 19 Jun 2017 14:45:52 +0000 (16:45 +0200)]
parser: Fix handling of quoted brackets in JSON front matter

Also remove a broken JSON test.

Fixes #3511

7 years agovendor: Update Viper
Bjørn Erik Pedersen [Mon, 19 Jun 2017 12:48:06 +0000 (14:48 +0200)]
vendor: Update Viper

7 years agohugolib: Fix error handling for JSON front matter
Bjørn Erik Pedersen [Mon, 19 Jun 2017 12:41:03 +0000 (14:41 +0200)]
hugolib: Fix error handling for JSON front matter

Fixes #3610

7 years agocommands, create: Add .Site to the archetype templates
Bjørn Erik Pedersen [Sun, 18 Jun 2017 17:39:42 +0000 (19:39 +0200)]
commands, create: Add .Site to the archetype templates

This commit completes the "The Revival of the Archetypes!"

If `.Site` is used in the arcetype template, the site is built and added to the template context.

Note that this may be potentially time consuming for big sites.

A more complete example would then be for the section `newsletter` and the archetype file `archetypes/newsletter.md`:

```
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
tags:
- x
categories:
- x
draft: true
---

<!--more-->

{{ range first 10 ( where .Site.RegularPages "Type" "cool" ) }}
* {{ .Title }}
{{ end }}
```

And then create a new post with:

```bash
hugo new newsletter/the-latest-cool.stuff.md
```

**Hot Tip:** If you set the `newContentEditor` configuration variable to an editor on your `PATH`, the newly created article will be opened.

The above _newsletter type archetype_ illustrates the possibilities: The full Hugo `.Site` and all of Hugo's template funcs can be used in the archetype file.

Fixes #1629

7 years agocreate: Use archetype template as-is as a Go template
Bjørn Erik Pedersen [Sun, 18 Jun 2017 17:06:28 +0000 (19:06 +0200)]
create: Use archetype template as-is as a Go template

This commit removes the fragile front matter decoding, and takes the provided archetype file as-is and processes it as a template.

This also means that we no longer will attempt to fill in default values for `title` and `date`.

The upside is that it is now easy to create these values in a dynamic way:

```toml
+++
title = {{ .BaseFileName | title }}
date = {{ .Date }}
draft = true
+++
```

You can currently use all of Hugo's template funcs, but the data context is currently very shallow:

* `.Type` gives the archetype kind provided
* `.Name` gives the target file name without extension.
* `.Path` gives the target file name
* `.Date` gives the current time as RFC3339 formatted string

The above  will probably be extended in #1629.

Fixes #452
Updates #1629

7 years agoUpdate links to new discuss URL
Bjørn Erik Pedersen [Sat, 17 Jun 2017 08:06:49 +0000 (10:06 +0200)]
Update links to new discuss URL

7 years agovendor: Update deps
Bjørn Erik Pedersen [Fri, 16 Jun 2017 12:24:40 +0000 (14:24 +0200)]
vendor: Update deps

7 years agoreleaser: Add TODO
Bjørn Erik Pedersen [Fri, 16 Jun 2017 08:11:02 +0000 (10:11 +0200)]
releaser: Add TODO

7 years agoreleaser: Prepare repository for 0.24-DEV
Bjørn Erik Pedersen [Fri, 16 Jun 2017 07:52:02 +0000 (09:52 +0200)]
releaser: Prepare repository for 0.24-DEV

[ci skip]

7 years agoreleaser: Update /docs to 0.23 [ci skip] v0.23
Bjørn Erik Pedersen [Fri, 16 Jun 2017 07:47:25 +0000 (09:47 +0200)]
releaser: Update /docs to 0.23 [ci skip]

7 years agoreleaser: Bump versions for release of 0.23
Bjørn Erik Pedersen [Fri, 16 Jun 2017 07:41:39 +0000 (09:41 +0200)]
releaser: Bump versions for release of 0.23

[ci skip]

7 years agoreleaser: Update /docs [ci skip]
Bjørn Erik Pedersen [Fri, 16 Jun 2017 07:41:39 +0000 (09:41 +0200)]
releaser: Update /docs [ci skip]

7 years agoreleaser: Adjust
Bjørn Erik Pedersen [Fri, 16 Jun 2017 07:21:44 +0000 (09:21 +0200)]
releaser: Adjust

7 years agoreleaser: Add release notes draft for 0.23
Bjørn Erik Pedersen [Fri, 16 Jun 2017 06:55:36 +0000 (08:55 +0200)]
releaser: Add release notes draft for 0.23

[ci skip]

7 years agoreleaser: Adapt release logic to docs submodule
Bjørn Erik Pedersen [Thu, 15 Jun 2017 18:36:40 +0000 (20:36 +0200)]
releaser: Adapt release logic to docs submodule

7 years agoUpdate logo link in README
Bjørn Erik Pedersen [Wed, 14 Jun 2017 09:24:09 +0000 (11:24 +0200)]
Update logo link in README

7 years agoRemove docs building from CI builds
Bjørn Erik Pedersen [Wed, 14 Jun 2017 09:16:06 +0000 (11:16 +0200)]
Remove docs building from CI builds

We could probably get it working, but we have plenty of site tests now.

7 years agocommands: Adjust docs path
Bjørn Erik Pedersen [Wed, 14 Jun 2017 08:37:58 +0000 (10:37 +0200)]
commands: Adjust docs path

7 years agoAdd docs as submodule
Bjørn Erik Pedersen [Wed, 14 Jun 2017 08:35:24 +0000 (10:35 +0200)]
Add docs as submodule

7 years agodocs: Remove
Bjørn Erik Pedersen [Wed, 14 Jun 2017 08:32:16 +0000 (10:32 +0200)]
docs: Remove

Docs site is moved to https://github.com/gohugoio/hugoDocs

Will be re-added here as a Git submodule.

7 years agoUpdate Gitter link in README
Bjørn Erik Pedersen [Tue, 13 Jun 2017 21:39:55 +0000 (23:39 +0200)]
Update Gitter link in README

That is still running under spf13.

7 years agovendor: Update to new org name
Bjørn Erik Pedersen [Tue, 13 Jun 2017 20:11:05 +0000 (22:11 +0200)]
vendor: Update to new org name

7 years agoChange Windows build badge link, take #3
Bjørn Erik Pedersen [Tue, 13 Jun 2017 20:05:39 +0000 (22:05 +0200)]
Change Windows build badge link, take #3

7 years agoChange Windows build badge link, take #2
Bjørn Erik Pedersen [Tue, 13 Jun 2017 20:04:36 +0000 (22:04 +0200)]
Change Windows build badge link, take #2

7 years agoUpdate Windows build link
Bjørn Erik Pedersen [Tue, 13 Jun 2017 20:03:05 +0000 (22:03 +0200)]
Update Windows build link

7 years agohugolib: Disable shaky leaktest on CI
Bjørn Erik Pedersen [Tue, 13 Jun 2017 19:22:47 +0000 (21:22 +0200)]
hugolib: Disable shaky leaktest on CI

7 years agoUpdate links in CONTRIBUTING.md due to the org transition
digitalcraftsman [Tue, 13 Jun 2017 17:37:30 +0000 (19:37 +0200)]
Update links in CONTRIBUTING.md due to the org transition

7 years agoUpdate source path in Dockerfile due to the org transition
digitalcraftsman [Tue, 13 Jun 2017 17:34:20 +0000 (19:34 +0200)]
Update source path in Dockerfile due to the org transition

7 years agoUpdate clone folder in appveyor.yml due to the org transition
digitalcraftsman [Tue, 13 Jun 2017 17:32:14 +0000 (19:32 +0200)]
Update clone folder in appveyor.yml due to the org transition

7 years agoUpdate import path in snapcraft.yaml due to the org transition
digitalcraftsman [Tue, 13 Jun 2017 17:28:34 +0000 (19:28 +0200)]
Update import path in snapcraft.yaml due to the org transition

7 years agoRun gofmt to get imports in line vs gohugoio/hugo
Bjørn Erik Pedersen [Tue, 13 Jun 2017 17:07:35 +0000 (19:07 +0200)]
Run gofmt to get imports in line vs gohugoio/hugo

7 years agoUpdate Makefile vs gohugoio/hugo
Bjørn Erik Pedersen [Tue, 13 Jun 2017 17:06:34 +0000 (19:06 +0200)]
Update Makefile vs gohugoio/hugo

7 years agoUpdate README to point to gohugoio/hugo
Bjørn Erik Pedersen [Tue, 13 Jun 2017 17:00:10 +0000 (19:00 +0200)]
Update README to point to gohugoio/hugo

7 years agoexamples: Update examples to point to gohugoio/hugo
Bjørn Erik Pedersen [Tue, 13 Jun 2017 16:59:38 +0000 (18:59 +0200)]
examples: Update examples to point to gohugoio/hugo

7 years ago docs: Update layout references to gohugoio/hugo
Bjørn Erik Pedersen [Tue, 13 Jun 2017 16:56:22 +0000 (18:56 +0200)]
 docs: Update layout references to gohugoio/hugo

7 years agodocs: Update content references to gohugoio/hugo
Bjørn Erik Pedersen [Tue, 13 Jun 2017 16:54:42 +0000 (18:54 +0200)]
docs: Update content references to gohugoio/hugo

7 years agoall: Update textual references in Go source to point to gohugoio/hugo
Bjørn Erik Pedersen [Tue, 13 Jun 2017 16:47:17 +0000 (18:47 +0200)]
all: Update textual references in Go source to point to gohugoio/hugo

7 years agoall: Update import paths to gohugoio/hugo
Bjørn Erik Pedersen [Tue, 13 Jun 2017 16:42:45 +0000 (18:42 +0200)]
all: Update import paths to gohugoio/hugo

7 years agovendor: Improve GitInfo
Bjørn Erik Pedersen [Tue, 13 Jun 2017 15:47:54 +0000 (17:47 +0200)]
vendor: Improve GitInfo

Closes #3533
Closes #3552

7 years agoFix handling of duplicate footnotes
Bjørn Erik Pedersen [Tue, 13 Jun 2017 13:03:08 +0000 (15:03 +0200)]
Fix handling of duplicate footnotes

Closes #1912

7 years agoRevert "releaser: Bump versions for release of 0.22.1"
Bjørn Erik Pedersen [Tue, 13 Jun 2017 12:26:56 +0000 (14:26 +0200)]
Revert "releaser: Bump versions for release of 0.22.1"

This reverts commit dce70fb7c5845ec5e410e4bf97c862d38cfec9a5.

7 years agoreleaser: Prepare repository for 0.23-DEV
Bjørn Erik Pedersen [Tue, 13 Jun 2017 12:25:19 +0000 (14:25 +0200)]
releaser: Prepare repository for 0.23-DEV

7 years agoreleaser: Prepare repository for 0.22.1-DEV
Bjørn Erik Pedersen [Tue, 13 Jun 2017 12:22:14 +0000 (14:22 +0200)]
releaser: Prepare repository for 0.22.1-DEV

[ci skip]

7 years agoreleaser: Add relase notes to /docs for release of 0.22.1 v0.22.1
Bjørn Erik Pedersen [Tue, 13 Jun 2017 12:17:45 +0000 (14:17 +0200)]
releaser: Add relase notes to /docs for release of 0.22.1

[ci skip]

7 years agoreleaser: Bump versions for release of 0.22.1
Bjørn Erik Pedersen [Tue, 13 Jun 2017 12:17:15 +0000 (14:17 +0200)]
releaser: Bump versions for release of 0.22.1

[ci skip]

7 years agoreleaser: Add release notes draft for 0.22.1
Bjørn Erik Pedersen [Tue, 13 Jun 2017 12:07:17 +0000 (14:07 +0200)]
releaser: Add release notes draft for 0.22.1

[ci skip]

7 years agohugolib: Fix section logic for root folders with subfolders
Bjørn Erik Pedersen [Tue, 13 Jun 2017 09:26:17 +0000 (11:26 +0200)]
hugolib: Fix section logic for root folders with subfolders

This commit fixes an issue introduced in the recently released Hugo 0.22.

This logic did not handle the case with root sections with non-section subfolders very well.

Fixes #3586

7 years agohugolib: Support sub-sections in permalink settings
Bjørn Erik Pedersen [Mon, 12 Jun 2017 17:14:29 +0000 (19:14 +0200)]
hugolib: Support sub-sections in permalink settings

This enables both the variants below:

Current (first level only):

```
"blog": ":section/:title",
```

Nested (all levels):

```
"blog": ":sections/:title",
```

Should ideally been part of Hugo 0.22, but better late than never ...

Fixes #3580

7 years agocommands: Adjust rlimit to 64000
Bjørn Erik Pedersen [Mon, 12 Jun 2017 18:43:19 +0000 (20:43 +0200)]
commands: Adjust rlimit to 64000

See #3582

7 years agocommands: Make error on setting rlimit a warning only
Bjørn Erik Pedersen [Mon, 12 Jun 2017 18:32:30 +0000 (20:32 +0200)]
commands: Make error on setting rlimit a warning only

And reduce it to 10000.

Closes #3582

7 years agoRevert "commands: Remove the rlimit tweaking on macOS"
Bjørn Erik Pedersen [Mon, 12 Jun 2017 18:29:47 +0000 (20:29 +0200)]
Revert "commands: Remove the rlimit tweaking on macOS"

This reverts commit bcd32f1086c8c604fb22a7496924e41cc46b1605.

See #3582

7 years agodocs: Add note on updates for rpm-based distros
daftaupe [Mon, 12 Jun 2017 17:44:16 +0000 (19:44 +0200)]
docs: Add note on updates for rpm-based distros

7 years agoreleaser: Prepare repository for 0.23-DEV
Bjørn Erik Pedersen [Mon, 12 Jun 2017 07:07:46 +0000 (09:07 +0200)]
releaser: Prepare repository for 0.23-DEV

[ci skip]

7 years agoreleaser: Add relase notes to /docs for release of 0.22 v0.22
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]

7 years agoreleaser: Bump versions for release of 0.22
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]

7 years agoreleaser: Spelling
Bjørn Erik Pedersen [Sun, 11 Jun 2017 15:27:00 +0000 (17:27 +0200)]
releaser: Spelling

7 years agoreleaser: Add release notes draft for release of 0.22
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

7 years agodocs: Rewrite “Archetypes” article
David Turnbull [Mon, 12 Jun 2017 06:03:08 +0000 (16:03 +1000)]
docs: Rewrite “Archetypes” article

7 years agodocs: change .Site to $.Site where the global context is masked by the term's context
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

7 years agodocs: Use single link element for RSS in example
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.

7 years agohugolib: Make the RSS feed use the date for the node it represents
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

7 years agoAdd noindex tag to HTML generated by Hugo Aliases
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.

7 years agohugolib: Unexport some internal methods
Bjørn Erik Pedersen [Thu, 8 Jun 2017 20:32:01 +0000 (22:32 +0200)]
hugolib: Unexport some internal methods

7 years agotpl/collections: Add uint support to In
Cameron Moore [Mon, 22 May 2017 02:10:27 +0000 (21:10 -0500)]
tpl/collections: Add uint support to In

7 years agotpl/collections: Support interfaces in union
Cameron Moore [Sat, 20 May 2017 16:54:13 +0000 (11:54 -0500)]
tpl/collections: Support interfaces in union

Fixes #3411

7 years agohugolib, commands: Improve live-reload on directory structure changes
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

7 years agohugolib: Enable nested sections
Bjørn Erik Pedersen [Sun, 9 Apr 2017 08:33:04 +0000 (10:33 +0200)]
hugolib: Enable nested sections

Fixes #465

7 years agoRevert "hugolib: Fix live-reload regression for add/removal of dirs"
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

7 years agohugolib: Fix live-reload regression for add/removal of dirs
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

7 years agohugolib: Fix disablePathToLower regression
Bjørn Erik Pedersen [Tue, 6 Jun 2017 07:15:42 +0000 (09:15 +0200)]
hugolib: Fix disablePathToLower regression

Fixes #3374

7 years agohugolib: Simplify some test loops
Bjørn Erik Pedersen [Tue, 6 Jun 2017 06:43:33 +0000 (08:43 +0200)]
hugolib: Simplify some test loops

7 years agohugolib: Add test for no 404 in sitemap
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

7 years agodocs: Add thislittleduck.com to the showcase
Peter Cossey [Sun, 4 Jun 2017 11:33:48 +0000 (21:33 +1000)]
docs: Add thislittleduck.com to the showcase

7 years agotpl: Add uniq function
Nathan Sharfi [Mon, 29 May 2017 19:03:38 +0000 (12:03 -0700)]
tpl: Add uniq function

7 years agohugolib: Remove some superflous TODO comments
Bjørn Erik Pedersen [Sat, 3 Jun 2017 15:32:47 +0000 (17:32 +0200)]
hugolib: Remove some superflous TODO comments

7 years agoparser: Add horizontal YAML tags to benchmark
Bjørn Erik Pedersen [Sat, 3 Jun 2017 10:31:31 +0000 (12:31 +0200)]
parser: Add horizontal YAML tags to benchmark

7 years agodocs: Add Nutspubcrawl.com to the showcase
jeremielondon [Sat, 3 Jun 2017 06:51:51 +0000 (07:51 +0100)]
docs: Add Nutspubcrawl.com to the showcase

7 years agoall: Temporarily revert to BurntSushi for TOML front matter handling
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

7 years agoparser: Add BenchmarkFrontmatterTags
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

7 years agohugolib: Add some more tags to benchmark
Bjørn Erik Pedersen [Fri, 2 Jun 2017 16:40:10 +0000 (18:40 +0200)]
hugolib: Add some more tags to benchmark

7 years agohugolib: Bump leaktest timeout to 30 seconds
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.

7 years agoWrite CPU and mem profiles from site benchmark script
Bjørn Erik Pedersen [Fri, 2 Jun 2017 07:21:51 +0000 (09:21 +0200)]
Write CPU and mem profiles from site benchmark script

7 years agohugolib: Fix tag calculation in benchmark test
Bjørn Erik Pedersen [Fri, 2 Jun 2017 07:13:45 +0000 (09:13 +0200)]
hugolib: Fix tag calculation in benchmark test

7 years agohugolib: Add number of tags as a benchmark know
Bjørn Erik Pedersen [Thu, 1 Jun 2017 16:51:51 +0000 (18:51 +0200)]
hugolib: Add number of tags as a benchmark know

7 years agohubolib: Make the site benchmark output more compact
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
```

7 years agohubolib: Add 10k pages as a benchmark variant
Bjørn Erik Pedersen [Wed, 31 May 2017 11:48:49 +0000 (14:48 +0300)]
hubolib: Add 10k pages as a benchmark variant

7 years agohugolib: Increase leaktest timeout
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.

7 years agohugolib: Break early from sitemap disabled check
Bjørn Erik Pedersen [Wed, 31 May 2017 09:55:51 +0000 (12:55 +0300)]
hugolib: Break early from sitemap disabled check

See #3544

7 years agohugolib: Respect disableKinds=["sitemap"]
Bjørn Erik Pedersen [Wed, 31 May 2017 07:57:19 +0000 (10:57 +0300)]
hugolib: Respect disableKinds=["sitemap"]

Fixes #3544

7 years agoAdd benchSite.sh
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"

7 years agovendor: Update go-toml
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%
```

7 years agosource: Cache language config
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%
```