Commit graph

3345 commits

Author SHA1 Message Date
Cameron Moore
3954160a21 tpl/time: Support overlapping namespace and template func
Fixes #3421
2017-05-20 00:00:20 +03:00
Bjørn Erik Pedersen
93c5774dd7 tpl/collections: Make IsSet WARNING less chatty
Updates #3092
2017-05-19 21:14:37 +03:00
ronen
77d2fe7866 docs: Add ttsreader.com to the showcase 2017-05-19 19:53:12 +02:00
Bjørn Erik Pedersen
405c2f6899 tpl/images: Fix error handling in Config 2017-05-18 23:24:55 +03:00
Cameron Moore
58d4c25e50 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.
2017-05-18 21:54:42 +03:00
Cameron Moore
38661c17bb 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
2017-05-18 21:54:42 +03:00
Bjørn Erik Pedersen
42fbded105 docs: Regenerate docs helper 2017-05-18 21:38:16 +03:00
Bjørn Erik Pedersen
10287263f5 output: Fix output format mixup in example
See #3481
2017-05-18 21:37:29 +03:00
Munif Tanjim
27e88154af docs: Fix incorrect path in templates/list 2017-05-18 17:12:23 +02:00
Cameron Moore
f1c29b017b tpl/collections: Add support for interfaces to intersect
Fixes #1952
2017-05-18 10:13:44 +03:00
Cameron Moore
93b3b13867 tpl/lang: Add NumFmt function
NumFmt formats a number with a given precision using the requested
decimal, grouping, and negative characters.

Fixes #1444
2017-05-18 09:49:20 +03:00
James
e92ce83d5e docs: Update references to JSON
Looks like this was a bad copy/paste where CSV should've been JSON
2017-05-18 07:55:15 +02:00
Sharon L
4c427f6aaa docs: Fix minor grammar issue in shortcodes.md 2017-05-18 07:54:10 +02:00
Bjørn Erik Pedersen
e682fcc622 hugolib: Fix RSSLink vs RSS Output Format
Fixes #3450
2017-05-17 22:14:31 +03:00
Bjørn Erik Pedersen
b6ea492b7a tmplimpl: Add support for ellipsed paginator
Fixes #3466
2017-05-17 21:47:05 +03:00
Bjørn Erik Pedersen
6e2f2dd8d3 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
2017-05-17 19:00:15 +03:00
Albert Nigmatzianov
94b5be67fc commands: Skip .git directories
Fix #3468
2017-05-15 14:38:04 +03:00
Gilbert Gilb's
c7646551be 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.
2017-05-14 09:56:03 +02:00
Bjørn Erik Pedersen
af72db806f 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
2017-05-13 22:44:15 +03:00
Bjørn Erik Pedersen
e951d65771 hugolib: Handle any errors in processShortcodes 2017-05-13 22:44:15 +03:00
Bjørn Erik Pedersen
2bcbf10400 hugolib: Prepare render per output format
See #3220
2017-05-13 22:44:15 +03:00
Bjørn Erik Pedersen
1e4d082cf5 hubolib: Refactor site rendering with an "output format context"
Fixes #3397
2017-05-13 22:44:15 +03:00
Tom Bennet
1d70aa9826 docs: Add carnivorousplants.co.uk to the showcase 2017-05-13 19:39:02 +02:00
luxpir
6fc7337aac docs: Add worldtowriters.com to the showcase 2017-05-13 12:47:43 +02:00
Kaitlin Newson
ddaf694183 docs: Add ocul.on.ca/topomaps to the showcase 2017-05-13 12:41:41 +02:00
Tejas Kumar
a28fbca6dc 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.
2017-05-11 12:46:24 +02:00
Bjørn Erik Pedersen
544f0a6394 hugolib: The deprecated Extension, Now and TargetPath will now ERROR 2017-05-10 20:05:52 +02:00
Bjørn Erik Pedersen
5794a265b4 commands, hugolib: Deprecate disable404, disableRSS, disableSitemap, disableRobotsTXT
Use disableKinds instead.

Fixes #3345
2017-05-10 20:00:08 +02:00
Bjørn Erik Pedersen
ebf677a583 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
2017-05-09 23:58:25 +02:00
Bjørn Erik Pedersen
58d9cbd31b hugolib: Improve shortcode error message 2017-05-09 18:43:48 +02:00
Albert Nigmatzianov
7d39990497 helpers: Don't clean the path before Join
Join will call Clean anyway.
2017-05-09 14:07:43 +02:00
Albert Nigmatzianov
9b2028626e commands: Use paths from PathSpec for walker 2017-05-09 14:07:43 +02:00
Hans Ott
c99761555c docs: Fix bash command in tutorials/github-pages-blog 2017-05-08 22:14:14 +02:00
Albert Nigmatzianov
9b080dc625 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
2017-05-07 17:16:36 +02:00
Albert Nigmatzianov
231c0a7e09 docs: Fix typo in templates/functions.md
Fix #3440
2017-05-06 21:32:51 +02:00
Robert Starbuck
5575ed4469 docs: Update datafiles.md 2017-05-06 21:31:24 +02:00
Chase Adams
42f4ce15a9 hugolib: Add default config for ignoreFiles 2017-05-06 09:41:24 +02:00
Bjørn Erik Pedersen
cff2f31334 tpl: Add some GoDoc info to template func docs
Closes #3418
2017-05-04 10:46:19 +02:00
Bjørn Erik Pedersen
f9e41f6497 releaser: Push the tag before goreleaser is run
Fixes #3405
2017-05-03 09:29:59 +02:00
Albert Nigmatzianov
8f2ab5f498 i18n: Simplify code for detecting of untranslated id 2017-05-03 09:23:13 +02:00
Albert Nigmatzianov
cce49997a4 i18n: Add tests 2017-05-03 09:23:13 +02:00
Bjørn Erik Pedersen
3dd949d956 tpl/urls: Make urlize return a string
Like it did in 0.20.
2017-05-02 23:46:36 +02:00
Albert Nigmatzianov
a40d1f6ed2 i18n: Improve the detection of untranslated string
Fix #2607
2017-05-02 22:45:37 +02:00
xavi blanch
635b3bb4eb docs: Add documentation on slug translation 2017-05-02 18:31:06 +02:00
Cameron Moore
08c0de5cc3 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.
2017-05-02 09:18:41 +02:00
Cameron Moore
1cf2f3dc4f tpl/data: Move cache logic to separate file 2017-05-02 09:18:41 +02:00
Cameron Moore
5f095c27ea tpl/data: Shorten some internal func names 2017-05-02 09:18:41 +02:00
Cameron Moore
f604076de1 tpl/images: Fix embedded sync.Mutex 2017-05-02 09:17:14 +02:00
Cameron Moore
f69df916df tpl: Add basic tests for all namespace init funcs 2017-05-02 00:07:33 +02:00
Bjørn Erik Pedersen
690b0f8ff5 tpl: Add docshelper for template funcs
And fix some other minor related issues.

Updates #3418
2017-05-01 21:44:15 +02:00