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
Bjørn Erik Pedersen [Fri, 5 May 2017 07:24:37 +0000 (09:24 +0200)]
hugolib: Prepare render per output format
See #3220
Bjørn Erik Pedersen [Fri, 28 Apr 2017 07:40:50 +0000 (09:40 +0200)]
hubolib: Refactor site rendering with an "output format context"
Fixes #3397
Tom Bennet [Sat, 13 May 2017 16:14:36 +0000 (17:14 +0100)]
docs: Add carnivorousplants.co.uk to the showcase
luxpir [Fri, 12 May 2017 21:52:16 +0000 (22:52 +0100)]
docs: Add worldtowriters.com to the showcase
Kaitlin Newson [Tue, 9 May 2017 15:17:09 +0000 (11:17 -0400)]
docs: Add ocul.on.ca/topomaps to the showcase
Tejas Kumar [Thu, 11 May 2017 10:46:24 +0000 (12:46 +0200)]
docs: Fixed incorrect specification of directory structure
Hugo looks for the list/single templates of a taxonomy in `/layouts/taxonomy`, not `/layouts/taxonomies` as correctly mentioned in [this doc page](https://gohugo.io/templates/list/). This change is simply a minor reconciliation.
Bjørn Erik Pedersen [Wed, 10 May 2017 18:05:52 +0000 (20:05 +0200)]
hugolib: The deprecated Extension, Now and TargetPath will now ERROR
Bjørn Erik Pedersen [Wed, 10 May 2017 18:00:08 +0000 (20:00 +0200)]
commands, hugolib: Deprecate disable404, disableRSS, disableSitemap, disableRobotsTXT
Use disableKinds instead.
Fixes #3345
Bjørn Erik Pedersen [Thu, 4 May 2017 17:14:43 +0000 (19:14 +0200)]
hubolib: Embed Page in WeightedPage
People can still say `.Page`, but by embedding it `WeightedPages` can be used interchangeably with `Pages` in templates.
Fixes #3435
Bjørn Erik Pedersen [Tue, 9 May 2017 16:37:43 +0000 (18:37 +0200)]
hugolib: Improve shortcode error message
Albert Nigmatzianov [Mon, 8 May 2017 15:56:22 +0000 (17:56 +0200)]
helpers: Don't clean the path before Join
Join will call Clean anyway.
Albert Nigmatzianov [Mon, 8 May 2017 15:55:48 +0000 (17:55 +0200)]
commands: Use paths from PathSpec for walker
Hans Ott [Mon, 8 May 2017 20:14:14 +0000 (22:14 +0200)]
docs: Fix bash command in tutorials/github-pages-blog
Albert Nigmatzianov [Sun, 7 May 2017 15:16:36 +0000 (17:16 +0200)]
helpers: Don't clean path twice
Join calls Clean as it says in docs.
Minor performance improvement:
Before:
Average time per operation: 432ms
Average memory allocated per operation: 127322kB
Average allocations per operation:
2138137
After:
Average time per operation: 428ms
Average memory allocated per operation: 127350kB
Average allocations per operation:
2137892
Albert Nigmatzianov [Sat, 6 May 2017 19:32:51 +0000 (21:32 +0200)]
docs: Fix typo in templates/functions.md
Fix #3440
Robert Starbuck [Sat, 6 May 2017 19:31:24 +0000 (20:31 +0100)]
docs: Update datafiles.md
Chase Adams [Sat, 6 May 2017 07:41:24 +0000 (00:41 -0700)]
hugolib: Add default config for ignoreFiles
Bjørn Erik Pedersen [Tue, 2 May 2017 09:03:08 +0000 (11:03 +0200)]
tpl: Add some GoDoc info to template func docs
Closes #3418
Bjørn Erik Pedersen [Wed, 3 May 2017 07:29:59 +0000 (09:29 +0200)]
releaser: Push the tag before goreleaser is run
Fixes #3405
Albert Nigmatzianov [Wed, 3 May 2017 07:11:14 +0000 (09:11 +0200)]
i18n: Simplify code for detecting of untranslated id
Albert Nigmatzianov [Wed, 3 May 2017 07:11:25 +0000 (09:11 +0200)]
i18n: Add tests
Bjørn Erik Pedersen [Tue, 2 May 2017 21:46:36 +0000 (23:46 +0200)]
tpl/urls: Make urlize return a string
Like it did in 0.20.
Albert Nigmatzianov [Tue, 2 May 2017 17:01:05 +0000 (19:01 +0200)]
i18n: Improve the detection of untranslated string
Fix #2607
xavi blanch [Tue, 2 May 2017 16:31:06 +0000 (18:31 +0200)]
docs: Add documentation on slug translation
Cameron Moore [Tue, 2 May 2017 03:41:08 +0000 (22:41 -0500)]
tpl/data: Clean up data namespace
- Move the main GetCSV and GetJSON into data.go.
- Add error returns to GetCSV and GetJSON.
- Add http client to Namespace for test mocking.
- Send accept headers on remote requests. Fixes #3395
- Return an error on non-2XX HTTP response codes and don't retry.
- Move cache tests to cache_test.go.
Cameron Moore [Mon, 1 May 2017 19:08:46 +0000 (14:08 -0500)]
tpl/data: Move cache logic to separate file
Cameron Moore [Mon, 1 May 2017 19:04:21 +0000 (14:04 -0500)]
tpl/data: Shorten some internal func names
Cameron Moore [Tue, 2 May 2017 07:17:14 +0000 (02:17 -0500)]
tpl/images: Fix embedded sync.Mutex
Cameron Moore [Mon, 1 May 2017 14:13:21 +0000 (09:13 -0500)]
tpl: Add basic tests for all namespace init funcs
Bjørn Erik Pedersen [Mon, 1 May 2017 16:40:34 +0000 (18:40 +0200)]
tpl: Add docshelper for template funcs
And fix some other minor related issues.
Updates #3418
Bjørn Erik Pedersen [Mon, 1 May 2017 13:57:52 +0000 (15:57 +0200)]
tpl/partials: Remouve unused method
Bjørn Erik Pedersen [Mon, 1 May 2017 07:06:42 +0000 (09:06 +0200)]
tpl: Fix the remaining template funcs namespace issues
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 21:33:14 +0000 (23:33 +0200)]
tpl/urls: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 21:16:54 +0000 (23:16 +0200)]
tpl/transform: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 21:10:46 +0000 (23:10 +0200)]
tpl/time: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 21:06:28 +0000 (23:06 +0200)]
tpl/safe: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 20:52:47 +0000 (22:52 +0200)]
tpl/os: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 20:43:26 +0000 (22:43 +0200)]
tpl/inflect: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 20:36:26 +0000 (22:36 +0200)]
tpl/images: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 20:32:40 +0000 (22:32 +0200)]
tpl/encoding: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 20:19:49 +0000 (22:19 +0200)]
tpl/crypto: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 19:52:56 +0000 (21:52 +0200)]
tpl/collections: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 17:33:19 +0000 (19:33 +0200)]
tpl/compare: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 17:11:18 +0000 (19:11 +0200)]
tpl/data: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 16:41:13 +0000 (18:41 +0200)]
tpl/strings: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 15:45:56 +0000 (17:45 +0200)]
tpl/math: Make it a package that stands on its own
See #3042
Bjørn Erik Pedersen [Sun, 30 Apr 2017 09:34:45 +0000 (11:34 +0200)]
tpl: Add TemplateFuncsNamespaceRegistry
As a first step to remove the hard ties between `tplimpl` and the different namespace packages.
The `lang` package is used as the first example use case.
See #3042
Bjørn Erik Pedersen [Mon, 1 May 2017 11:38:29 +0000 (13:38 +0200)]
releaser: Disable shaky test
Takuya Kitazawa [Sun, 30 Apr 2017 19:43:38 +0000 (04:43 +0900)]
docs: Replace cdn.mathjax.org with cdnjs.cloudflare.com
Cameron Moore [Mon, 13 Mar 2017 22:55:02 +0000 (17:55 -0500)]
tpl: Add template function namespaces
This commit moves almost all of the template functions into separate
packages under tpl/ and adds a namespace framework. All changes should
be backward compatible for end users, as all existing function names in
the template funcMap are left intact.
Seq and DoArithmatic have been moved out of the helpers package and into
template namespaces.
Most of the tests involved have been refactored, and many new tests have
been written. There's still work to do, but this is a big improvement.
I got a little overzealous and added some new functions along the way:
- strings.Contains
- strings.ContainsAny
- strings.HasSuffix
- strings.TrimPrefix
- strings.TrimSuffix
Documentation is forthcoming.
Fixes #3042
Mitchell Cohen [Sun, 30 Apr 2017 08:40:37 +0000 (04:40 -0400)]
Render 404 in default language only
This prevents 404.html from being re-rendered for each site.
Fixes #3075
Bjørn Erik Pedersen [Sat, 29 Apr 2017 20:20:36 +0000 (22:20 +0200)]
netlify: Add some security headers
Bjørn Erik Pedersen [Sat, 29 Apr 2017 23:10:03 +0000 (01:10 +0200)]
livereload: Fix data race in close
Fixes #2625
Tom Harvey [Fri, 28 Apr 2017 05:36:38 +0000 (22:36 -0700)]
docs: Fix typos
Albert Nigmatzianov [Thu, 27 Apr 2017 13:36:57 +0000 (15:36 +0200)]
vendor: Update cobra and pflag
See https://github.com/spf13/cobra/issues/426
Bjørn Erik Pedersen [Thu, 27 Apr 2017 11:00:24 +0000 (13:00 +0200)]
hubolib: Narrow a test assertion
Bjørn Erik Pedersen [Thu, 27 Apr 2017 09:15:24 +0000 (11:15 +0200)]
releaser: Fix broken test build
Bjørn Erik Pedersen [Thu, 27 Apr 2017 08:59:00 +0000 (10:59 +0200)]
releaser: Skip Git test on Travis
Bjørn Erik Pedersen [Thu, 27 Apr 2017 08:13:31 +0000 (10:13 +0200)]
release: Add relase notes for 0.20.6
[ci skip]
Bjørn Erik Pedersen [Thu, 27 Apr 2017 07:33:40 +0000 (09:33 +0200)]
hugolib: Avoid index.md in /index/index.html
Hugo 0.20 broke some sites that grouped their blog post and images together in subfolders.
This commit re-introduces that behaviour:
* If the file base name resolves to the same as the base name for the output type (i.e. "index" for HTML), the user probably meant it, so we treat that as an `uglyURL`, i.e. `my-blog-post-1.md`=> `/my-blog-post-1/index.html`
* The main use case for this is to group blog post and images together.
* Note that for the top level folder there will be a potential name conflict with a `section` `index.html` (if enabled)
* This issue will not be relevant for subfolders in sections
* Hugo will soon add support for nested sections, but we will have to find a way to separate them from the rest (`/content/_mysubsection` maybe).
Fixes #3396
Bjørn Erik Pedersen [Wed, 26 Apr 2017 20:40:21 +0000 (22:40 +0200)]
docs: Regenerate commands docs
Albert Nigmatzianov [Wed, 26 Apr 2017 19:58:10 +0000 (21:58 +0200)]
commands: Make first letter of flags' usage lowercase
Albert Nigmatzianov [Wed, 26 Apr 2017 19:26:20 +0000 (21:26 +0200)]
vendor: Update cobra and pflag
* Faster help message
* Faster docs
* Adds help flag in usage
Anthony Fok [Wed, 26 Apr 2017 16:51:05 +0000 (10:51 -0600)]
releaser: Fix some of the fpm fields for deb
Bjørn Erik Pedersen [Wed, 26 Apr 2017 09:03:12 +0000 (11:03 +0200)]
hugolib: Make missing GitInfo a WARNING
And not an ERROR.
Fixes #3376
Jordan [Tue, 25 Apr 2017 17:37:35 +0000 (14:37 -0300)]
docs: Add notes about some output format behaviour
Bjørn Erik Pedersen [Tue, 25 Apr 2017 12:30:48 +0000 (14:30 +0200)]
releaser: Fix ldflags setting
Closes #3382
Bjørn Erik Pedersen [Tue, 25 Apr 2017 07:48:23 +0000 (09:48 +0200)]
docs: Remove temp release notes
Bjørn Erik Pedersen [Tue, 25 Apr 2017 07:17:06 +0000 (09:17 +0200)]
docs: Add relase notes for 0.20.5
[ci skip]
Bjørn Erik Pedersen [Mon, 24 Apr 2017 19:46:00 +0000 (21:46 +0200)]
docs: Add a time to 0.20.4 release docs
To make it newer than the one earlier today :-)
Bjørn Erik Pedersen [Mon, 24 Apr 2017 18:30:20 +0000 (20:30 +0200)]
releaser: Add relase notes for release of 0.20.4
[ci skip]
James Munnelly [Mon, 24 Apr 2017 14:36:18 +0000 (15:36 +0100)]
Add -linkmode external
James Munnelly [Mon, 24 Apr 2017 14:22:23 +0000 (15:22 +0100)]
Set extldflags to static when building