Commit graph

2080 commits

Author SHA1 Message Date
Ray Lai
49c2761b28 docs: Fix typo: Janapese → Japanese 2016-02-07 12:53:13 +08:00
Bjørn Erik Pedersen
0586bf0dc3 Use filepath.Join in locale resource getting 2016-02-07 02:12:33 +01:00
Bjørn Erik Pedersen
8d8e9dde51 Minor cleanup of some of the resource getting code 2016-02-07 02:07:58 +01:00
Bjørn Erik Pedersen
b3a70abe40 tpl: Complete coverage for Humanize 2016-02-07 01:45:37 +01:00
Bjørn Erik Pedersen
7c3dceeaed Fix buggy Menu.Limit() 2016-02-06 22:53:59 +01:00
Bjørn Erik Pedersen
a95426d40c Remove Printf in test 2016-02-06 22:19:58 +01:00
Bjørn Erik Pedersen
88a320fb2d Fix buggy Pages.Limit
Also add missing page sort related tests.
2016-02-06 22:10:36 +01:00
Bjørn Erik Pedersen
b21d280c67 transform: Complete test statement coverage
"coverage: 100.0% of statements"
2016-02-06 20:50:26 +01:00
Bjørn Erik Pedersen
08b582e187 Only do one livereload replacement 2016-02-06 19:22:12 +01:00
Bjørn Erik Pedersen
dd1db334ac transform: Add missing test case in livereloadinject
* Test for both </body> and </BODY>
* This also cosmetically changes the behaviour, as the case of the end body tag is kept.
2016-02-06 18:28:26 +01:00
Bjørn Erik Pedersen
96e990456b transform: Add missing test case for NewEmptyTransforms 2016-02-06 18:17:48 +01:00
Bjørn Erik Pedersen
21cb526462 bufferpool: Add test 2016-02-06 18:01:27 +01:00
Anthony Fok
1f326ad914 Fix bash-completion for Hugo builder flags such as --theme
by placing their SetAnnotation() calls after their definitions.

See #1824 and 87ca0d0
2016-02-06 23:49:45 +08:00
Cameron Moore
45df4596bb tpl: Add humanize func and cleanup lint
Add humanize (inflect.Humanize) to the template funcMap.  Documentation and
tests are included.

Various code cleanups of the template funcs:

- Break pluralize and singularize out into stand-alone funcs.
- Sort the list of funcMap entries.
- Add some minimal godoc comments to all public funcs.
- Fix some issues found by golint and grind.
2016-02-06 15:31:25 +01:00
Gergely Brautigam
e95f3af933 helpers: Test coverage increase
Started to increase coverage in helpers package, now at 74.9% of statements.

In the process, also a few minor changes have been applied to content.go.

* Content.go has undergone a formatting refactor regarding comments
* Unused function TruncateWords has been removed
* RenderingContext's "mmark" has been changed to use MmarkRender
* Content_test.go added to cover content.go's functionality
2016-02-06 14:27:11 +01:00
Bjørn Erik Pedersen
318a984526 Apply gofmt -s 2016-02-06 13:09:52 +01:00
Bjørn Erik Pedersen
eebf00f702 Re-export HugoCmd
Caddy depends on it.

Fixes #1827
2016-02-06 12:40:16 +01:00
Michael Faille
08670e6a47 Fix README.md to list the correct -ldflags for Go 1.5+
Also remove extraneous trailing space (whitespace-mode from emacs).

See also #1365
2016-02-06 18:25:57 +08:00
Anthony Fok
ed23711e2e Optimize seven recently added Showcase thumbnails
Reducing their total size from 960KB to 308KB.
2016-02-06 17:27:06 +08:00
Bjørn Erik Pedersen
61197f9f29 Order the hugo comand flag vars 2016-02-05 23:25:07 +01:00
Bjørn Erik Pedersen
74539dea87 Unexport the remaining vars in hugo command 2016-02-05 22:58:17 +01:00
Cameron Moore
a89b2f41d6 commands: Get BaseURL from viper in server mode
Fixes #1821
2016-02-05 20:38:02 -06:00
Bjørn Erik Pedersen
792b2438ed Add --renderToMemory as an additional Travis build step 2016-02-05 21:32:55 +01:00
Bjørn Erik Pedersen
3b596b85d1 Add renderToMemory flag
Only useful for benchmark testing as the rendered content will be ... invisible.
2016-02-05 21:30:48 +01:00
Bjørn Erik Pedersen
87ca0d0cbe Clean flags
* Reduce the amount of global flags
* Unexport all flag vars and commands vars
* Some other minor flag cleaning
2016-02-05 21:18:45 +01:00
Anthony Fok
bd0176a548 Add CONTRIBUTING.md
Extracted from the current README.md
2016-02-05 12:35:42 +08:00
Anthony Fok
447228a742 Revise README.md emphasizing "good commit message"
plus some trivial changes.
2016-02-05 12:34:40 +08:00
Anthony Fok
8f368114d3 Update Travis CI status in README.md to track master branch only 2016-02-05 10:15:34 +08:00
Vladislav Supalov
5a7837cdf0 Added showcase for datapipelinearachitect.com 2016-02-04 18:35:55 +01:00
David Allen
868d0745b3 Added showcase for davidrallen.com 2016-02-03 22:26:11 +01:00
Tatsushi Demachi
68e2e63d92 Fix Hugo hang up with empty content directory
Site.ReadPagesFromSource returns nil chan error value when a site
content directory is empty but its receiver expects to be passed
something error values via the channel.

This fixes it by returning a channel which will be immediately closed.

Fix #1797
2016-02-03 08:19:02 +09:00
digitalcraftsman
ec02b9908c Fixed example and cross-reference in content/variables.md
Fixed a path in a Page Params example to reflect real directory
structure, removed extra quotes from sample code, and fixed link to
Archetypes which read "cross-references" before.

See #1805
2016-02-01 16:54:27 +01:00
Rick Cogley
243fbbf0f9 Update lastmod date and screenshot for Rick Cogley site 2016-02-01 16:18:16 +01:00
Cameron Moore
9b8d2ce52b Remove destination from config file docs 2016-01-30 07:47:41 -06:00
digitalcraftsman
9015aa5b84 Docs: fix some typos in templates/variables.md 2016-01-30 11:12:24 +01:00
Anthony Fok
57eebbf243 Use FEEDBACK instead of ERROR for empty home page warning
jww.ERROR.Println() seems to have become too verbose,
making the warning message intended for new users
a lot less readable.
2016-01-30 17:39:17 +08:00
Anthony Fok
ca0c67dc69 Fix a minor typo discovered by Lintian (Debian) 2016-01-30 16:46:48 +08:00
Renato Vargas
817d69487c Expanded the Page Params section in variables.md
Expanded on the use of Page Params in the templates/variables.md
documentation. Added sample code for something that keeps coming up on
discuss.github.io
2016-01-30 01:24:55 +01:00
Steve Francia
d158f7e339 Provide more detail on static sync when running with verbose 2016-01-29 16:54:33 -05:00
digitalcraftsman
cd36d752a3 Add autostart option to YouTube shortcode 2016-01-29 16:23:41 -05:00
Anthony Fok
e8eb618166 Do not call watchConfig() when not in watch mode
See #1772

Also, force DisableLiveReload to true when running "hugo --watch"
(build-only non-server mode) to prevent livereload.ForceRefresh(),
which would end up blocking watchConfig() forever, from being called
because livereload.Initialize() is never called in this case.

This fixes the bug where "hugo --watch" could only reload config.toml
once before it gets stuck for good at livereload.ForceRefresh().

This is also consistent with Hugo's existing behaviour:
Non-server "hugo --watch" has never injected livereload.js
since the inception of the "watch" feature in Hugo v0.12.
2016-01-29 16:21:55 -05:00
Steve Francia
c438f45629 Add flag --cleanDestinationDir=false to retain prior behavior 2016-01-29 16:14:23 -05:00
Bjørn Erik Pedersen
5def6d9aee Make the watch logger less chatty 2016-01-28 15:33:41 +01:00
Bjørn Erik Pedersen
3054a46185 Make the DistinctErrorLogger more generic 2016-01-28 15:33:41 +01:00
Tatsushi Demachi
3b3e771d61 Check for exported fields in embedded structs
This fixes a exported field check condition in a way described at Go
issue https://golang.org/issue/12367

According to the issue comments, this fix should be safe under Go 1.6.
2016-01-28 19:27:35 +09:00
Bjørn Erik Pedersen
12876ec991 Fix hugo benchmark
Appending to the site 13 times doesn't sound realistic.
2016-01-27 22:28:05 +01:00
Steve Francia
d08e4c87a7 Rewrite commentary on static event handling 2016-01-26 14:56:42 -05:00
Steve Francia
b0b4b82165 Permit directory removal during static sync 2016-01-26 14:33:56 -05:00
Steve Francia
db18fd1582 Ignore .DS_Store changes (thumbnail cache file on mac) 2016-01-26 14:33:51 -05:00
Steve Francia
9413cf8499 Handle self rename operations gracefully 2016-01-26 14:33:08 -05:00