Bjørn Erik Pedersen [Thu, 13 Apr 2017 14:00:30 +0000 (16:00 +0200)]
Prepare release 0.20.1
Bjørn Erik Pedersen [Thu, 13 Apr 2017 09:38:55 +0000 (11:38 +0200)]
docs: Add 0.20.1 release notes
Bjørn Erik Pedersen [Wed, 12 Apr 2017 18:40:36 +0000 (20:40 +0200)]
output: Fix base theme vs project base template logic
Fixes #3323
Sanjay Saxena [Tue, 11 Apr 2017 22:03:28 +0000 (15:03 -0700)]
docs: Add sanjay-saxena.github.io to the showcase
Bjørn Erik Pedersen [Wed, 12 Apr 2017 19:01:22 +0000 (21:01 +0200)]
hugolib, output: Do not lower case template names
This regression was introduced in Hugo 0.20.
Fixes #3333
Bjørn Erik Pedersen [Wed, 12 Apr 2017 16:11:37 +0000 (18:11 +0200)]
hugolib: Must recreate Paginator on live-reload
The structure may potentially have changed, and then it fails.
Fixes #3315
Bjørn Erik Pedersen [Wed, 12 Apr 2017 11:00:44 +0000 (13:00 +0200)]
hugolib: Avoid recreating the Paginator on copy
See #3315
Bjørn Erik Pedersen [Wed, 12 Apr 2017 08:07:08 +0000 (10:07 +0200)]
hugolib: Avoid processing the same notify event twice
On `macOS`, at least, we've seen multiple WRITE events for same file, and no need to do the same job twice.
Anthony Fok [Wed, 12 Apr 2017 09:05:01 +0000 (03:05 -0600)]
snapcraft: Go 1.8.1
Bjørn Erik Pedersen [Mon, 10 Apr 2017 19:26:55 +0000 (21:26 +0200)]
hugolib: Final fix of rssURI deprecation
Fixes #3319
Bjørn Erik Pedersen [Mon, 10 Apr 2017 15:54:55 +0000 (17:54 +0200)]
hugolib: Only show rssUri deprecation WARNING if it is actually set
Fixes #3319
Bjørn Erik Pedersen [Mon, 10 Apr 2017 07:33:21 +0000 (09:33 +0200)]
all Bump to 0.21-DEV
Bjørn Erik Pedersen [Mon, 10 Apr 2017 07:10:53 +0000 (09:10 +0200)]
all: Prepare Hugo 0.20 release version
Bjørn Erik Pedersen [Mon, 10 Apr 2017 07:07:01 +0000 (09:07 +0200)]
docs: AddHugo 0.20 Release Notes
Masashi Miyaura [Sat, 8 Apr 2017 19:08:41 +0000 (04:08 +0900)]
docs: Add Emacs plugin easy-hugo
ssc2015 [Sat, 8 Apr 2017 15:47:28 +0000 (15:47 +0000)]
docs: Add siba.ai to the showcase
Bjørn Erik Pedersen [Sat, 8 Apr 2017 16:04:12 +0000 (18:04 +0200)]
hugolib: Remove unused line
Bjørn Erik Pedersen [Sat, 8 Apr 2017 16:02:36 +0000 (18:02 +0200)]
hugolib: Delay deletion of Page.Now()
Looking at the state of the themes, it will be too painful to log ERROR now.
Bjørn Erik Pedersen [Sat, 8 Apr 2017 14:33:20 +0000 (16:33 +0200)]
docs: Add docs about output format linking
Fixes #3301
Fixes #3302
Bjørn Erik Pedersen [Sat, 8 Apr 2017 09:15:28 +0000 (11:15 +0200)]
hugolib, output: Add NotAlternative to OutputFormat
To make sure CSS and similar does not appear in the AlternativeOutputFormats list.
Bjørn Erik Pedersen [Sat, 8 Apr 2017 08:45:11 +0000 (10:45 +0200)]
hugolib: Deprecate rssURI
Bjørn Erik Pedersen [Fri, 7 Apr 2017 18:30:45 +0000 (20:30 +0200)]
travis: Go 1.8.1
Bjørn Erik Pedersen [Fri, 7 Apr 2017 16:33:28 +0000 (18:33 +0200)]
hubolib: Do not add missing trailing slash to command line baseURL
This makes it consistent with how it behaves when it's set in config.toml.
This commit also unifies BaseURL in Site.Info so we now have one source for this value.
Fixes #3262
Li-Wen Yip [Thu, 6 Apr 2017 21:24:53 +0000 (22:24 +0100)]
Update press.md
Add "Getting started with Hugo and the plain-blog theme, on NearlyFreeSpeech.Net"
Bjørn Erik Pedersen [Fri, 7 Apr 2017 11:03:34 +0000 (13:03 +0200)]
hugolib: Add .Site.Params.mainSections
Fixes #3206
Bjørn Erik Pedersen [Fri, 7 Apr 2017 09:01:36 +0000 (11:01 +0200)]
hugolib: Only do link transforms etc. on HTML type of pages
See #2828
Bjørn Erik Pedersen [Wed, 5 Apr 2017 14:18:53 +0000 (16:18 +0200)]
all: Document the Output Formats feature
This commit also adds a new command, docshelper, with some utility funcs that adds a JSON datafiles to /docs/data that would be a pain to create and maintain by hand.
Fixes #3242
Bjørn Erik Pedersen [Fri, 7 Apr 2017 08:48:09 +0000 (10:48 +0200)]
hugolib: Update deprecation vs Hugo 0.20
Fixes #3271
Bjørn Erik Pedersen [Fri, 7 Apr 2017 08:43:48 +0000 (10:43 +0200)]
output: Add some sane defaults for output format
Fixes #3290
Albert Nigmatzianov [Thu, 6 Apr 2017 17:38:24 +0000 (19:38 +0200)]
tpl: Set RenderingContext.Config in markdownify
Albert Nigmatzianov [Thu, 6 Apr 2017 17:37:41 +0000 (19:37 +0200)]
helpers: Add new properties to ContentSpec
Bjørn Erik Pedersen [Thu, 6 Apr 2017 15:39:20 +0000 (17:39 +0200)]
all: Handle all errors
As reported by `errcheck`.
Bjørn Erik Pedersen [Thu, 6 Apr 2017 13:28:56 +0000 (15:28 +0200)]
media, output: Fix spelling
Bjørn Erik Pedersen [Thu, 6 Apr 2017 11:49:06 +0000 (13:49 +0200)]
docs: Disable GitInfo by default
Use `--enableGitInfo` when publishing.
This gives a much better out-of-the-box editing experience.
Chris Hager [Thu, 6 Apr 2017 11:48:22 +0000 (13:48 +0200)]
docs: Add info about Pygments installation in installing.md
Additional information about the Pygments dependency in the "installing from source" chapter.
Li-Wen Yip [Thu, 6 Apr 2017 11:38:32 +0000 (12:38 +0100)]
docs: Add article by Li-Wen Yip to press section
Bjørn Erik Pedersen [Wed, 5 Apr 2017 20:11:24 +0000 (22:11 +0200)]
tpl: Fix nil pointer in Tree()
Fixes #3285
Ricardo N Feliciano [Wed, 5 Apr 2017 16:41:23 +0000 (12:41 -0400)]
docs: Properly capitalize GitHub
Bjørn Erik Pedersen [Tue, 4 Apr 2017 16:14:41 +0000 (18:14 +0200)]
hugolib: Add optional outputFormat to Ref/RelRef
Fixes #3224
Bjørn Erik Pedersen [Tue, 4 Apr 2017 16:05:19 +0000 (18:05 +0200)]
Register all media types when in server mode
Fixes #3274
Bjørn Erik Pedersen [Tue, 4 Apr 2017 15:21:04 +0000 (17:21 +0200)]
tplimpl: Reintroduce the double template lookup in Partial
So it works as before without the html suffix.
Fixes #3272
Bjørn Erik Pedersen [Tue, 4 Apr 2017 12:10:20 +0000 (14:10 +0200)]
all: Use the configured output types to resolve template type
Closes #320
Bjørn Erik Pedersen [Tue, 4 Apr 2017 11:32:29 +0000 (13:32 +0200)]
hugolib: Improve render error handling
Catch and return the "template not found" error earlier.
Bjørn Erik Pedersen [Tue, 4 Apr 2017 09:02:12 +0000 (11:02 +0200)]
commands, helpers: Add correct verbose log level to the global loggers
We still use those in some cases.
Bjørn Erik Pedersen [Tue, 4 Apr 2017 08:29:26 +0000 (10:29 +0200)]
output: Make template name lower cased
Bjørn Erik Pedersen [Tue, 4 Apr 2017 07:12:33 +0000 (09:12 +0200)]
hugolib: Read media types and output formats from site config
Closes #3222
Closes #3223
Bjørn Erik Pedersen [Mon, 3 Apr 2017 20:39:37 +0000 (22:39 +0200)]
media: Add DecodeTypes
And clean up the media package.
Bjørn Erik Pedersen [Mon, 3 Apr 2017 15:00:23 +0000 (17:00 +0200)]
output: Add output formats decoder
And clean up the output package.
Bjørn Erik Pedersen [Mon, 3 Apr 2017 10:16:32 +0000 (12:16 +0200)]
output: Add CSV to the global output formats list
Albert Nigmatzianov [Mon, 3 Apr 2017 06:34:12 +0000 (08:34 +0200)]
vendor: Update go-i18n
Kamil Samigullin [Sun, 2 Apr 2017 23:29:53 +0000 (02:29 +0300)]
docs: Remove localhost part from link
Fixes #3264
Bjørn Erik Pedersen [Mon, 27 Mar 2017 18:43:49 +0000 (20:43 +0200)]
tpl: Rework to handle both text and HTML templates
Before this commit, Hugo used `html/template` for all Go templates.
While this is a fine choice for HTML and maybe also RSS feeds, it is painful for plain text formats such as CSV, JSON etc.
This commit fixes that by using the `IsPlainText` attribute on the output format to decide what to use.
A couple of notes:
* The above requires a nonambiguous template name to type mapping. I.e. `/layouts/_default/list.json` will only work if there is only one JSON output format, `/layouts/_default/list.mytype.json` will always work.
* Ambiguous types will fall back to HTML.
* Partials inherits the text vs HTML identificator of the container template. This also means that plain text templates can only include plain text partials.
* Shortcode templates are, by definition, currently HTML templates only.
Fixes #3221
Albert Nigmatzianov [Sun, 2 Apr 2017 12:50:13 +0000 (14:50 +0200)]
hugolib: Don't ignore errors from applyDepsIfNeeded
Albert Nigmatzianov [Sat, 1 Apr 2017 20:36:07 +0000 (22:36 +0200)]
hugolib, i18n: Update tests with flat format and TOML files
Albert Nigmatzianov [Sat, 1 Apr 2017 20:34:59 +0000 (22:34 +0200)]
vendor: Update go-i18n
Fix #2577
Albert Nigmatzianov [Fri, 31 Mar 2017 13:04:52 +0000 (15:04 +0200)]
docs, examples: Use TOML for i18n config files
Fix #3200
Chase Adams [Sun, 2 Apr 2017 16:16:55 +0000 (09:16 -0700)]
vendor: update goorgeous
Enrique Saez [Sun, 2 Apr 2017 10:06:31 +0000 (12:06 +0200)]
docs: Add blog of Enrique Saez Gil to the site showcase
Bjørn Erik Pedersen [Sun, 2 Apr 2017 12:20:34 +0000 (14:20 +0200)]
Revert "tpl: Rework to handle both text and HTML templates"
Will have to take another stab at this ...
This reverts commit
5c5efa03d2512749950b0d05a7d4bde35ecbdc37.
Closes #3260
Bjørn Erik Pedersen [Sun, 2 Apr 2017 10:22:54 +0000 (12:22 +0200)]
hugolib: Use Page Kind in template errors to prevent log spam
Having the content page name in the log key for the distinct error logger isnt't very usable when you have an error in a commonly used partial.
Using the Page Kind reduces the amount of log entries. Here is an example from an error in the partial menu.html, used in all the page templates:
```
Started building sites ...
ERROR 2017/04/02 12:19:43 Error while rendering "page": template: /Users/bep/sites/bepsays.com/layouts/_default/single.html:17:7: executing "/Users/bep/sites/bepsays.com/layouts/_default/single.html" at <partial "menu.html" ...>: error calling partial: template: partials/menu.html:9:11: executing "partials/menu.html" at <.DoesNotExist>: can't evaluate field DoesNotExist in type *hugolib.PageOutput
ERROR 2017/04/02 12:19:43 Error while rendering "section": template: /Users/bep/sites/bepsays.com/layouts/_default/section.html:17:7: executing "/Users/bep/sites/bepsays.com/layouts/_default/section.html" at <partial "menu.html" ...>: error calling partial: template: partials/menu.html:9:11: executing "partials/menu.html" at <.DoesNotExist>: can't evaluate field DoesNotExist in type *hugolib.PageOutput
ERROR 2017/04/02 12:19:43 Error while rendering "taxonomy": template: /Users/bep/sites/bepsays.com/layouts/_default/list.html:17:7: executing "/Users/bep/sites/bepsays.com/layouts/_default/list.html" at <partial "menu.html" ...>: error calling partial: template: partials/menu.html:9:11: executing "partials/menu.html" at <.DoesNotExist>: can't evaluate field DoesNotExist in type *hugolib.PageOutput
ERROR 2017/04/02 12:19:43 Error while rendering "home": template: /Users/bep/sites/bepsays.com/layouts/index.html:17:7: executing "/Users/bep/sites/bepsays.com/layouts/index.html" at <partial "menu.html" ...>: error calling partial: template: partials/menu.html:9:11: executing "partials/menu.html" at <.DoesNotExist>: can't evaluate field DoesNotExist in type *hugolib.PageOutput
ERROR 2017/04/02 12:19:43 Error while rendering "404": template: 404.html:2:3: executing "404.html" at <partial "menu.html" ...>: error calling partial: template: partials/menu.html:9:11: executing "partials/menu.html" at <.DoesNotExist>: can't evaluate field DoesNotExist in type *hugolib.PageOutput
Built site for language nn:
```
Which is pretty good.
Bjørn Erik Pedersen [Sun, 2 Apr 2017 10:06:21 +0000 (12:06 +0200)]
tplimpl: Add test with failing partial
Main motivation to see that the containing template name is included in the error message name.
It is.
Bjørn Erik Pedersen [Mon, 27 Mar 2017 18:43:49 +0000 (20:43 +0200)]
tpl: Rework to handle both text and HTML templates
Before this commit, Hugo used `html/template` for all Go templates.
While this is a fine choice for HTML and maybe also RSS feeds, it is painful for plain text formats such as CSV, JSON etc.
This commit fixes that by using the `IsPlainText` attribute on the output format to decide what to use.
A couple of notes:
* The above requires a nonambiguous template name to type mapping. I.e. `/layouts/_default/list.json` will only work if there is only one JSON output format, `/layouts/_default/list.mytype.json` will always work.
* Ambiguous types will fall back to HTML.
* Partials inherits the text vs HTML identificator of the container template. This also means that plain text templates can only include plain text partials.
* Shortcode templates are, by definition, currently HTML templates only.
Fixes #3221
Albert Nigmatzianov [Sat, 1 Apr 2017 18:17:42 +0000 (20:17 +0200)]
vendor: Update cobra
Really fix #2349
b7a672f didn't actually the issue.
Bjørn Erik Pedersen [Sat, 1 Apr 2017 13:12:31 +0000 (15:12 +0200)]
media, output: Add CSV type and format
And make CSS correclty behave as plain text.
digitalcraftsman [Fri, 31 Mar 2017 20:49:09 +0000 (22:49 +0200)]
docs: Fix typo/source link in firstname.club showcase addition
Pedro Gomes [Fri, 31 Mar 2017 20:41:22 +0000 (22:41 +0200)]
docs: Update link to Disqus alternative Livefyre.com
Livefyre.com is down.
Livefyre was integrated into Adobe's offering.
The product is now called Adobe Experience Manager Livefyre.
Wikipedia points to web.livefyre.com which redirects to the link I provided in the commit.
bit swarm [Fri, 31 Mar 2017 20:38:22 +0000 (23:38 +0300)]
docs: Add firstname.club to the showcase
Bjørn Erik Pedersen [Fri, 31 Mar 2017 08:40:33 +0000 (10:40 +0200)]
tplimpl: Fix map data race in URLLock
Bjørn Erik Pedersen [Fri, 31 Mar 2017 06:54:22 +0000 (08:54 +0200)]
tplimpl: Fix deadlock in getJSON
Fixes #3211
Bjørn Erik Pedersen [Wed, 29 Mar 2017 11:30:31 +0000 (13:30 +0200)]
vendor: Update fsnotify with several Linux-fixes
Bjørn Erik Pedersen [Wed, 29 Mar 2017 06:08:45 +0000 (08:08 +0200)]
hugolib, helpers: Reduce log level to WARN on .Render for non-regular pages
We will eventually support all types in the Render method.
Bjørn Erik Pedersen [Mon, 27 Mar 2017 23:19:46 +0000 (01:19 +0200)]
helpers, output: Fix spelling
Bjørn Erik Pedersen [Mon, 27 Mar 2017 23:18:15 +0000 (01:18 +0200)]
hugolib, output: Gofmt
Bjørn Erik Pedersen [Mon, 27 Mar 2017 22:09:25 +0000 (00:09 +0200)]
media: Add some more relevant MIME types
Bjørn Erik Pedersen [Mon, 27 Mar 2017 08:25:29 +0000 (10:25 +0200)]
tplimpl: Fix lookup with non-standard layout folder
Bjørn Erik Pedersen [Sun, 26 Mar 2017 17:34:30 +0000 (19:34 +0200)]
hugolib, output: Restrict Render to regular Pages
Using it for list pages doesn't work and has potential weird side-effects.
The user probably meant to range over .Site.ReqularPages, and that is now marked clearly in the log.
Bjørn Erik Pedersen [Sun, 26 Mar 2017 16:51:12 +0000 (18:51 +0200)]
hugolib: Fix Render layouts for list pages
Bjørn Erik Pedersen [Sun, 26 Mar 2017 09:45:12 +0000 (11:45 +0200)]
hugolib: Wrap pageOutput create in sync.Once
Bjørn Erik Pedersen [Sat, 25 Mar 2017 19:31:43 +0000 (20:31 +0100)]
hugolib: Fix panic for Permalink in 404 etc. templates
Bjørn Erik Pedersen [Sat, 25 Mar 2017 18:48:28 +0000 (19:48 +0100)]
commands: Fix broken commandeer
Bjørn Erik Pedersen [Sat, 25 Mar 2017 18:36:50 +0000 (19:36 +0100)]
output: Rename HTMLType etc. to HTMLFormat
Bjørn Erik Pedersen [Sat, 25 Mar 2017 18:21:19 +0000 (19:21 +0100)]
hugolib: Revise paginator alias path handling
Bjørn Erik Pedersen [Sat, 25 Mar 2017 17:28:38 +0000 (18:28 +0100)]
hugolib: More TODO fixes
Bjørn Erik Pedersen [Sat, 25 Mar 2017 16:46:09 +0000 (17:46 +0100)]
hugolib, layout: Consolidate RSS template handling
Bjørn Erik Pedersen [Sat, 25 Mar 2017 15:09:56 +0000 (16:09 +0100)]
Remove the now superflous defaultExtension
And some other unsed fields and methods.
Bjørn Erik Pedersen [Sat, 25 Mar 2017 13:37:04 +0000 (14:37 +0100)]
all: Propagate baseURL error to the callers
Bjørn Erik Pedersen [Sat, 25 Mar 2017 09:14:12 +0000 (10:14 +0100)]
hugolib, tplimpl: Use OutputFormats to create atom links
Bjørn Erik Pedersen [Fri, 24 Mar 2017 16:16:17 +0000 (17:16 +0100)]
hugolib: Add 404 test
Bjørn Erik Pedersen [Fri, 24 Mar 2017 15:54:37 +0000 (16:54 +0100)]
hugolib, output: Fix RSSLink vs output formats
And remove the now superflous setPageURLs method.
Bjørn Erik Pedersen [Fri, 24 Mar 2017 10:25:25 +0000 (11:25 +0100)]
hugolib, output: Handle aliases for all HTML formats
Bjørn Erik Pedersen [Fri, 24 Mar 2017 08:19:51 +0000 (09:19 +0100)]
hugolib: Update site stats to take output formats into account
Bjørn Erik Pedersen [Thu, 23 Mar 2017 19:05:10 +0000 (20:05 +0100)]
Add custom protocol support in Permalink
Bjørn Erik Pedersen [Thu, 23 Mar 2017 16:31:05 +0000 (17:31 +0100)]
media, output: Add Calendar type
Bjørn Erik Pedersen [Wed, 22 Mar 2017 10:34:17 +0000 (11:34 +0100)]
hugolib: Read default output formats from site config
Bjørn Erik Pedersen [Wed, 22 Mar 2017 10:03:42 +0000 (11:03 +0100)]
hugolib, media: Make the MediaType available to the templates
Bjørn Erik Pedersen [Wed, 22 Mar 2017 08:54:56 +0000 (09:54 +0100)]
hugolib, output: Add Rel to the output format
To make it super-easy to create rel-links.
Bjørn Erik Pedersen [Wed, 22 Mar 2017 07:26:22 +0000 (08:26 +0100)]
docs: Move the rough custom output formats spec to docs
This isn't meant to be the final useer docs on this feature!
Bjørn Erik Pedersen [Tue, 21 Mar 2017 23:25:55 +0000 (00:25 +0100)]
hugolib: Add OutputFormats with permalinks to Page
Bjørn Erik Pedersen [Sun, 19 Mar 2017 20:09:31 +0000 (21:09 +0100)]
output: Rework the base template logic
Extract the logic to a testable function and add support for custom output types.
Fixes #2995
Bjørn Erik Pedersen [Sun, 19 Mar 2017 14:25:32 +0000 (15:25 +0100)]
hubolib: Pick layout per output format