1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

3319 Commits

Author SHA1 Message Date
544f0a6394 hugolib: The deprecated Extension, Now and TargetPath will now ERROR 2017-05-10 20:05:52 +02:00
5794a265b4 commands, hugolib: Deprecate disable404, disableRSS, disableSitemap, disableRobotsTXT
Use disableKinds instead.

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

Updates #3418
2017-05-01 21:44:15 +02:00
e2b067f050 tpl/partials: Remouve unused method 2017-05-01 15:57:52 +02:00
0e2260421e tpl: Fix the remaining template funcs namespace issues
See #3042
2017-05-01 15:13:41 +02:00
4714085a10 tpl/urls: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
55f90a3a0d tpl/transform: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
ee5aa84f2a tpl/time: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
4a3463463f tpl/safe: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
b958c0c109 tpl/os: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
fc77b6303c tpl/inflect: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
a432c90aee tpl/images: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
9aee8ace4e tpl/encoding: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
744dccbea4 tpl/crypto: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
8a49c0b3b8 tpl/collections: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
a3bf118eaa tpl/compare: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
6561557367 tpl/data: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
0ab23eb5a8 tpl/strings: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
eefa0703cb tpl/math: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
c5373efcf0 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
2017-05-01 15:13:41 +02:00
8f95172c7a releaser: Disable shaky test 2017-05-01 13:38:29 +02:00
4b637ac041 docs: Replace cdn.mathjax.org with cdnjs.cloudflare.com 2017-04-30 21:43:38 +02:00
de7c32a1a8 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
2017-04-30 10:56:38 +02:00
154e18ddb9 Render 404 in default language only
This prevents 404.html from being re-rendered for each site.

Fixes #3075
2017-04-30 10:40:37 +02:00
565a78b110 netlify: Add some security headers 2017-04-30 10:37:46 +02:00
355736ec35 livereload: Fix data race in close
Fixes #2625
2017-04-30 01:10:57 +02:00
93a447c5dd docs: Fix typos 2017-04-28 07:36:38 +02:00
eaf75a18ec vendor: Update cobra and pflag
See https://github.com/spf13/cobra/issues/426
2017-04-27 15:37:55 +02:00
8d0917af0a hubolib: Narrow a test assertion 2017-04-27 13:00:24 +02:00