Commit graph

2854 commits

Author SHA1 Message Date
digitalcraftsman
01b8bc1b26 docs: Update description of querify 2016-12-03 20:23:59 +01:00
digitalcraftsman
0ba9fb9631 docs: Document querify template func
Closes #2733
2016-12-03 20:12:12 +01:00
Bjørn Erik Pedersen
ba8a00a6f9 hugolib: Add regular content page count in publish summary
Fixes #2759
2016-12-03 17:42:45 +01:00
Bjørn Erik Pedersen
15622c80ee hugolib: Remove superfluous assignment 2016-12-02 16:09:18 +01:00
Bjørn Erik Pedersen
2f026ab3f3 hugolib: Make RawContent raw again
This was a regression introduced in Hugo 0.17.

Fixes #2601
2016-12-01 17:29:49 +01:00
Cameron Moore
971d1baf13 commands: Add noChmod option to disable perm sync
Includes updates to docs.

Fixes #2749
2016-11-30 08:35:30 +01:00
Bjørn Erik Pedersen
a4b9abf0b3 vendor: Update fsync 2016-11-30 08:34:18 +01:00
Bjørn Erik Pedersen
529574e6f9 create: Run all the test variants in TestNewContent
See #2750
2016-11-30 08:34:17 +01:00
Chase Adams
c87331ae84 hugolib: Fix rendered empty msg
Changes `%q` to `%s`. `%q` was safely escaping the `\` in windows so that it was printing `\\`.
2016-11-30 00:03:47 +01:00
Bjørn Erik Pedersen
b2eadd93d3 create: Simplify archetype logic
See ##2750
2016-11-29 20:32:26 +01:00
Bjørn Erik Pedersen
96018ab98c create: Fix archetype title and date handling
Fixes #2750
2016-11-29 20:18:09 +01:00
Bjørn Erik Pedersen
65d4d96e7f vendor: Update go-toml
See #2745
2016-11-28 16:10:16 +01:00
Bjørn Erik Pedersen
b7e800454f makefile: Add test-cover-html 2016-11-27 23:21:10 +01:00
Bjørn Erik Pedersen
20d82a7a1b hugolib: Create the permalink once only 2016-11-27 19:25:28 +01:00
Bjørn Erik Pedersen
046320d3f4 tpl: Fix params case issue with nested template funcs
Fixes #2740
2016-11-27 19:02:43 +01:00
Bjørn Erik Pedersen
c38bfda43b hugolib: Fix regressions with uglyURLs
Fixes #2734
2016-11-27 14:36:17 +01:00
Bjørn Erik Pedersen
1f6e0de361 hugolib: Avoid repeated Viper loads of sectionPagesMenu
See #2728
2016-11-24 10:54:15 +01:00
Victor Kropp
dbb0c1cfc9 hugolib: Add shortcode for Instagram 2016-11-23 20:28:42 +01:00
digitalcraftsman
001e2bbe8a docs: Set correct default archetype directory in overview
Fixes #2719.
2016-11-23 19:53:24 +01:00
bogem
2c7cbca8b1 examples: Update blog example
Use RSSLink instead of deprecated RSSlink
2016-11-23 19:49:49 +01:00
bogem
68ebf61613 examples: Update multilingual example
Use new i18n concept

Fixes #2417
2016-11-23 19:47:09 +01:00
Bjørn Erik Pedersen
4c72eb12dc commands: Simplify 2016-11-23 18:55:51 +01:00
Bjørn Erik Pedersen
65e5959bad helpers: Simplify 2016-11-23 18:54:57 +01:00
Bjørn Erik Pedersen
139585f84a tpl: Simplify 2016-11-23 18:53:50 +01:00
Bjørn Erik Pedersen
a721fbed1d target: Simplify 2016-11-23 18:46:32 +01:00
Bjørn Erik Pedersen
3739871f1e transform: Simplify 2016-11-23 18:42:47 +01:00
Bjørn Erik Pedersen
4360452001 hugolib: Simplify 2016-11-23 18:32:17 +01:00
Bjørn Erik Pedersen
f1ed89fec4 Revise the deprecation strategy
Git users and theme authors two Hugo releases to fix:

1. With a visible warning
2. Then with an ERROR that exits with -1

Fixes #2726
2016-11-23 17:26:13 +01:00
Bjørn Erik Pedersen
0a0db9cd25 hubolib: Simplify map range 2016-11-23 16:46:16 +01:00
Bjørn Erik Pedersen
ff2498ee89 Remove ShowPlan
It is out of sync with reality, has some disabled tests, and the cost
of getting it up-to-date is too high to be worth it.
2016-11-23 16:35:49 +01:00
Bjørn Erik Pedersen
a6d584bfb6 vendor: Update go-toml 2016-11-23 16:05:40 +01:00
Cameron Moore
1156be3b13 vendor: remove afero/sftp deps 2016-11-23 16:04:03 +01:00
Evan Purkhiser
e0b278205a Fix alignment of go gets in Dockerfile 2016-11-23 10:52:17 +01:00
bogem
c06c3234eb helpers: Fix typo in language.Get documentation 2016-11-23 10:51:33 +01:00
Bjørn Erik Pedersen
c8d4114171 hugolib: Add missing paginator test case 2016-11-23 10:44:35 +01:00
Bjørn Erik Pedersen
c33eb93548 tpl: Add some missing test cases 2016-11-23 10:37:09 +01:00
Bjørn Erik Pedersen
174f97a9dd tpl: Fix spelling in test 2016-11-23 09:17:47 +01:00
bogem
7665dd239e tpl: Drop an else block in checkCondition
Fix golint warning: tpl/template_funcs.go:853:10: if block ends with a
return statement, so drop this else and outdent its block

See #2014
2016-11-23 09:13:00 +01:00
bogem
581291dc3b hugolib: Omit type from declaration of var lang
Fix golint warning: hugolib/site.go:922:13: should omit type
*helpers.Language from declaration of var lang; it will be inferred from
the right-hand side

See #2014
2016-11-23 09:13:00 +01:00
bogem
32336e9ec6 hugolib: Camelcase ALL_CAPS vars and const in tests
See #2014
2016-11-23 09:13:00 +01:00
bogem
75e55cd06f hugolib, source, tpl: Fix docs
See #2014
2016-11-23 09:13:00 +01:00
bogem
e81c06c3f0 helpers: Rename WalkRootTooShortError to ErrWalkRootTooShort
Fix golint warning: helpers/path.go:473:5: error var
WalkRootTooShortError should have name of the form ErrFoo

See #2014
2016-11-23 09:13:00 +01:00
bogem
647540d0ef helpers: Add documentation to some Language methods
See #2014
2016-11-23 09:13:00 +01:00
bogem
700d531a2c helpers: Use iterate operator by int in Emojify
Fix golint warning: helpers/emoji.go:56:4: should replace start += 1
with start++

See #2014
2016-11-23 09:13:00 +01:00
bogem
713f577a27 commands, hugolib: Unify case of config variable names 2016-11-22 23:43:55 +01:00
bogem
dec1706ae0 commands, hugolib, parser, tpl: Use errors.New instead of fmt.Errorf 2016-11-22 23:43:55 +01:00
bogem
1f130fd692 commands, hugolib, source, target, tpl: Get rid of some fmt statements 2016-11-22 23:43:55 +01:00
bogem
120f6b0cf2 all: Use jww instead of fmt for printing
This is an attempt to unify method for printing.
2016-11-22 22:06:48 +01:00
Bjørn Erik Pedersen
e1da7cb320 Fix case issues with Params
There are currently several Params and case related issues floating around in Hugo.

This is very confusing for users and one of the most common support questions on the forum.

And while there have been done some great leg work in Viper etc., this is of limited value since this and similar doesn't work:

`Params.myCamelCasedParam`

Hugo has control over all the template method invocations, and can take care of all the lower-casing of the map lookup keys.

But that doesn't help with direct template lookups of type `Site.Params.TWITTER_CONFIG.USER_ID`.

This commit solves that by doing some carefully crafted modifications of the templates' AST -- lowercasing the params keys.

This is low-level work, but it's not like the template API wil change -- and this is important enough to defend such "bit fiddling".

Tests are added for all the template engines: Go templates, Ace and Amber.

Fixes #2615
Fixes #1129
Fixes #2590
2016-11-22 17:33:52 +01:00
Bjørn Erik Pedersen
a5b3b07657 docs: Add Pages to variables section
And some other minor doc fixes.

Closes #2297
Closes #2649
2016-11-22 09:57:03 +01:00