Compare commits

..

3926 Commits

Author SHA1 Message Date
hugoreleaser c7b9347be0 releaser: Add release notes to /docs for release of 0.33
[ci skip]
2018-01-18 10:13:30 +00:00
hugoreleaser c6b9037294 releaser: Bump versions for release of 0.33
[ci skip]
2018-01-18 10:13:30 +00:00
Bjørn Erik Pedersen 09a934b321 Release 0.33 2018-01-18 11:09:11 +01:00
hugoreleaser e6cc2a6551 releaser: Add release notes draft for 0.33
Rename to *-ready.md to continue. [ci skip]
2018-01-18 09:24:11 +00:00
Bjørn Erik Pedersen a39ae4bb07 output: Redo the docshelper layouts examples 2018-01-18 10:16:21 +01:00
Bjørn Erik Pedersen b3eeb97642 Merge commit '3cf4300097610bb8b5bd0686d96d1df5db641895' 2018-01-17 22:33:07 +01:00
Bjørn Erik Pedersen 3cf4300097 Squashed 'docs/' changes from ddb7d8fae..56c34962c
56c34962c Fix multilingual config examples
14fa0b4ed Release 0.32.4
18779d54a releaser: Add release notes to /docs for release of 0.32.4
0d47d0673 releaser: Bump versions for release of 0.32.4
424acf02e Release 0.32.3
f6f04e084 releaser: Prepare repository for 0.33-DEV
1a9b36286 releaser: Add release notes to /docs for release of 0.32.3
9284c3284 releaser: Bump versions for release of 0.32.3
796082289 Fix min Go version in installing
74625a654 Add alias to multilingual.md
bf65732b4 Add some new tweets to the front page
7f263353e Bump Netlify to 0.32.2
cbb3a4f1c Update 0.32.2 release notes
e90ae4b4e releaser: Prepare repository for 0.33-DEV
ee74a8f4f releaser: Add release notes to /docs for release of 0.32.2
d889c4fa4 releaser: Bump versions for release of 0.32.2
4a46d3aca Merge commit 'eb738cd35cca1ffc68c5ed688dbe2a19108e8761'
b98d95ff2 releaser: Prepare repository for 0.33-DEV

git-subtree-dir: docs
git-subtree-split: 56c34962c9
2018-01-17 22:31:25 +01:00
Bjørn Erik Pedersen 9409bc0f79 Improve .Site.GetPage for regular translated pages
You can still use the full path with extensions, but to get the current language version:

* If the content file lives in `/content/blog/mypost.en.md`
* Use `.Site.GetPage "page" "blog/mypost"`

Fixes #4285
2018-01-17 22:27:25 +01:00
Bjørn Erik Pedersen 4eb1650bec resource: Use path.Match instead of filepath.Match
They behave similar, but it is a path we're matching.

See #4244
2018-01-17 20:48:31 +01:00
Bjørn Erik Pedersen 20c9b6ec81 resource: Add front matter metadata to Resource
This commit expands the Resource interface with 3 new methods:

* Name
* Title
* Params

All of these can be set in the Page front matter. `Name` will get its default value from the base filename, and is the value used in the ByPrefix and GetByPrefix lookup methods.

Fixes #4244
2018-01-17 16:22:33 +01:00
Bjørn Erik Pedersen f8a119b606 Update Afero to avoid panic on "file name is too long"
Fixes #4240
2018-01-15 20:33:03 +01:00
Bjørn Erik Pedersen ecaf14514e resource: Fix handling of very long image file names
Fixes #4261
2018-01-15 20:22:14 +01:00
Bjørn Erik Pedersen d4f8f88e67 commands: And now really fix the server watch logic
See #4275
2018-01-15 10:02:17 +01:00
Bjørn Erik Pedersen 4e524ffcff commands: Fix server without watch
This was broken in Hugo 0.30.

Fixes #4275
2018-01-14 20:58:52 +01:00
Bjørn Erik Pedersen 64f0e9d1c1 Update Chroma and other third-party deps
Fixes #4267
2018-01-14 20:32:42 +01:00
Bjørn Erik Pedersen 13d53b31f1 commands: Remove superflous BuildDate logic
Fixes #4272
2018-01-14 20:08:28 +01:00
Bjørn Erik Pedersen 51dd462c39 layout: Respect Type and Layout for list template selection
This commit also has some other nice side-effects:

* The layout logic is unified for all page types, which should make it less surprising
* Page.Render now supports all types
* The legacy "indexes" type is removed from the template lookup order. This is an undocumented type from early Hugo days. This means that having a template in, say, `/layouts/indexes/list.html` will no longer work.
* The theme override logic is improved. As an example, an `index.html` in theme will now wn over a `_default/list.html` in the project, which most will expect.

Fixes #3005
Fixes #3245
2018-01-14 19:59:51 +01:00
Bjørn Erik Pedersen b6ea6d07d0 Run benchmarks 3 times 2018-01-14 00:49:01 +01:00
Bjørn Erik Pedersen 4dac1781e3 resource: Add some GoDoc 2018-01-13 00:08:21 +01:00
Bjørn Erik Pedersen 8a409894bd hugolib: Allow url in front matter for list type pages
This enables some potential foot-shooting, but is needed for some special URL requirements.

Fixes #4263
2018-01-12 18:10:40 +01:00
Bjørn Erik Pedersen 46db900dab resource: Implement Resources.ByPrefix
Fixes #4266
2018-01-12 18:06:35 +01:00
Bjørn Erik Pedersen 60c9f3b1c3 resource: Make GetByPrefix work for Page resources
Fixes #4264
2018-01-12 17:46:50 +01:00
Bjørn Erik Pedersen 57e10f174e Support uglyURLs per section
Fixes #4256
2018-01-12 10:39:09 +01:00
Bjørn Erik Pedersen db85e83403 resource: Make .Resources.GetByPrefix case insensitive
Fixes #4258
2018-01-11 18:58:53 +01:00
Vas Sudanagunta 1046e9363f Update CONTRIBUTING.md 2018-01-11 17:22:12 +01:00
Vas Sudanagunta d5803da1be Support offline builds 2018-01-11 17:22:12 +01:00
hugoreleaser 27c77e1ab9 releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-11 09:00:51 +00:00
hugoreleaser 218773a82b releaser: Add release notes to /docs for release of 0.32.4
[ci skip]
2018-01-11 08:58:01 +00:00
hugoreleaser a97ef61bad releaser: Bump versions for release of 0.32.4
[ci skip]
2018-01-11 08:58:01 +00:00
Bjørn Erik Pedersen 4aaf27dc55 Release 0.32.4 2018-01-11 09:52:32 +01:00
hugoreleaser f7d0b05f93 releaser: Add release notes draft for 0.32.4
Rename to *-ready.md to continue. [ci skip]
2018-01-11 08:48:10 +00:00
Bjørn Erik Pedersen f82428d2e0 releaser: Git info bounds checking 2018-01-11 09:39:42 +01:00
Bjørn Erik Pedersen 50fb49c3d9 resource: Remove superflous comment 2018-01-11 09:17:48 +01:00
Alexander Borsuk 5235a5bf5e Correct fix for --cleanDestinationDir flag
Fixes #4246
Fixes #4248
2018-01-10 18:26:42 +01:00
Alexander Borsuk 1921a70ab1 Revert "Remove the --cleanDestinationDir flag", there is a better fix.
This reverts commit 768ec5df9f.
2018-01-10 18:26:42 +01:00
Bjørn Erik Pedersen f0eecc6a4f Fix non-ASCII path handling for Page resources
Fixes #4241
2018-01-10 18:23:41 +01:00
Bjørn Erik Pedersen 768ec5df9f Remove the --cleanDestinationDir flag
This is no longer supported. Since Hugo 0.32 we do static sync and build in parallel.

Closes #4246
2018-01-10 09:34:40 +01:00
hugoreleaser 238e7f7fbe releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-08 11:12:41 +00:00
hugoreleaser 0aaa38544d releaser: Add release notes to /docs for release of 0.32.3
[ci skip]
2018-01-08 11:10:08 +00:00
hugoreleaser fdec5e3084 releaser: Bump versions for release of 0.32.3
[ci skip]
2018-01-08 11:10:08 +00:00
Bjørn Erik Pedersen 71abb53fff Release 0.32.2 2018-01-08 12:05:52 +01:00
hugoreleaser db5d79862b releaser: Add release notes draft for 0.32.3
Rename to *-ready.md to continue. [ci skip]
2018-01-08 10:57:07 +00:00
Bjørn Erik Pedersen 2d3189b227 hugolib: Fix handling of mixed-case taxonomy folders with content file
* We match by path vs taxonomy to determine if we have a content page for that taxonomy
* The taxonomy name is (if `preserveTaxonomyNames` is not set) normalized to `maxmustermann` while you have the disk folder called `MaxMustermann`.
* This isn't a new issue, but I suspect most people will just name the folder `authors/maxmustermann` and it will just work.
* The inconsistent behaviour you see here is that you will end up with two pages with the same target filename, so it is a little random who will win.

This fixes that by also normalizing the taxonomy path when doing the comparison.

Fixes #4238
2018-01-08 11:47:26 +01:00
Bjørn Erik Pedersen 4b04db0f08 resource: Avoid processing and storing same image for each language
Fixes #4231
2018-01-07 11:58:16 +01:00
Bjørn Erik Pedersen 97c1866e32 resource: Resources.ByType should return Resources
Currently it returns []Resource.

This way the invocations can be nested.

Fixes #4234
2018-01-07 10:53:45 +01:00
Bjørn Erik Pedersen 8969331f5b Fix multihost detection for sites without language definition
Static content was wrongly put into the lang-code subfolder.

Fixes #4221
2018-01-06 19:14:31 +01:00
Bjørn Erik Pedersen 6feb138785 commands: Report build time on config.toml change
Fixes #4232
See #4224
2018-01-06 10:54:16 +01:00
Bjørn Erik Pedersen 059e8458d6 Fix hugo benchmark --renderToMemory
Fixes #4218
2018-01-06 10:37:04 +01:00
Bjørn Erik Pedersen ab82a27d05 Fix URLs for bundle resources in multihost mode
Fixes #4217
2018-01-06 10:29:13 +01:00
Bjørn Erik Pedersen f25d8a9e17 Fix sub-folder baseURL handling for Page resources
I.e. images etc.

Fixes #4228
2018-01-06 10:29:13 +01:00
hugoreleaser 54a89cde69 releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-03 09:56:18 +00:00
hugoreleaser 2cd962233f releaser: Add release notes to /docs for release of 0.32.2
[ci skip]
2018-01-03 09:54:04 +00:00
hugoreleaser 865877cd05 releaser: Bump versions for release of 0.32.2
[ci skip]
2018-01-03 09:54:04 +00:00
Bjørn Erik Pedersen 1ff80a8bbe Release 0.32.2 2018-01-03 10:50:57 +01:00
hugoreleaser 956ef40978 releaser: Add release notes draft for 0.32.2
Rename to *-ready.md to continue. [ci skip]
2018-01-03 09:49:11 +00:00
Bjørn Erik Pedersen 196da49c9d resource: Handle publish to /public on fresh build
Fixes #4213
2018-01-03 10:28:16 +01:00
Bjørn Erik Pedersen 2aa4c009ee Merge commit 'eb738cd35cca1ffc68c5ed688dbe2a19108e8761' 2018-01-03 10:19:56 +01:00
Bjørn Erik Pedersen eb738cd35c Squashed 'docs/' changes from fc61378a3..ddb7d8fae
ddb7d8fae Fix spelling in error message
84f7e09ff Add an "sharing image" to the 0.32 doc
a6d39884c Add image processing examples
717e25400 Release 0.32.1
07a4fc1c1 Merge branch 'temp321'
401ed894b releaser: Add release notes to /docs for release of 0.32.1
aa040d965 releaser: Bump versions for release of 0.32.1
6d22558ec Close shortcode
442afa7f5 Add a link to the 0.32 HOWTO with a searchable title
9a9a7e475 Add a note about the shortcode issue
76d731ce2 Add title etc. to release notes
eac596de8 Release v0.32
ede3e25dc Merge branch 'tmp32'
c92f1701b releaser: Prepare repository for 0.33-DEV
e498e97f9 releaser: Add release notes to /docs for release of 0.32
1d476fc59 Fix typo
9bac78a2f Merge commit 'f3cd083961f36dc96d05e98aaf67f650102bc757'
7d8c78391 Add Pandoc support, refactor external helpers

git-subtree-dir: docs
git-subtree-split: ddb7d8fae0
2018-01-03 10:16:56 +01:00
hugoreleaser 3dd8c1c026 releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-02 09:10:11 +00:00
hugoreleaser fd301c3c05 releaser: Add release notes to /docs for release of 0.32.1
[ci skip]
2018-01-02 09:07:55 +00:00
hugoreleaser 54ef60b03a releaser: Bump versions for release of 0.32.1
[ci skip]
2018-01-02 09:07:55 +00:00
Bjørn Erik Pedersen 14a758ff24 Release Hugo 0.32.1 2018-01-02 10:04:51 +01:00
hugoreleaser e64eb5ec2b releaser: Add release notes draft for 0.32.1
Rename to *-ready.md to continue. [ci skip]
2018-01-02 08:59:40 +00:00
Bjørn Erik Pedersen d36d71edd3 commands: Fix broken hugo --renderToMemory
The `--renderToMemory` flag stopped working on `hugo` in 0.32.

Note that this is only useful for benchmark testing, as there is no easy way to actually view the result.

Fixes #4212
2018-01-02 09:40:58 +01:00
Bjørn Erik Pedersen a54fd7df21 resource: Use the correct Destination FS
Source and destination will be the same when this happens, but it should be correct.

See #4202
2018-01-01 14:28:19 +01:00
Bjørn Erik Pedersen 16e1d99c6d resource: Create target dir if not exists
This is the case where image processing is triggered from shortcodes, i.e. before the target page's folder in /public is created.

Fixes #4202
2018-01-01 14:23:51 +01:00
Bjørn Erik Pedersen bf8a61fde5 hugolib: Add test for image processing from shortcodes
See #4202
2018-01-01 12:11:36 +01:00
hugoreleaser 72158ab2e8 releaser: Prepare repository for 0.33-DEV
[ci skip]
2017-12-31 09:26:48 +00:00
hugoreleaser cb359a75c1 releaser: Add release notes to /docs for release of 0.32
[ci skip]
2017-12-31 09:24:45 +00:00
hugoreleaser 82db039436 releaser: Bump versions for release of 0.32
[ci skip]
2017-12-31 09:24:45 +00:00
Bjørn Erik Pedersen 2d2289c79b Release v0.32 2017-12-31 10:17:39 +01:00
hugoreleaser 6894f121b7 releaser: Add release notes draft for 0.32
Rename to *-ready.md to continue. [ci skip]
2017-12-31 10:16:17 +01:00
Bjørn Erik Pedersen 245212a5b7 Merge commit 'f3cd083961f36dc96d05e98aaf67f650102bc757' 2017-12-30 09:17:23 +01:00
Bjørn Erik Pedersen f3cd083961 Squashed 'docs/' changes from 3e663efb2..fc61378a3
fc61378a3 Add Hugo 0.32 related docs
77edf7fd7 commands: Regenerate
af9d25458 Fix Blackfriday's Markdown extension name
1223dd63a Remove roadmap
b8bcb2fb8 Include note to allow hugo write permissions outside home dir
7dbccb936 Fix typo in roadmap
3a38da6f5 Fix spelling
94ebe50ff Merge branch 'master' of github.com:gohugoio/hugoDocs
89376e21d Clarify Hugo Roadmap
03d191fec Mention Reverse function in taxonomy tpl page.
a4ea3402d Fix ref and relref function pages.
b36632b31 Remove non-existing source variable
a638160dc Update Content Organization to match the world
47eb431ca Correct one link in templates/output-formats.md
8bf933629 Spell fix
ce2d48728 Add docs for .AllTranslations
de94b4942 Move sponsor data to theme data
41fe75254 Merge commit 'f463ef99ed2862e4042557e28aece7ca858e1d0a'
f463ef99e Squashed 'themes/gohugoioTheme/' changes from bc851da9..75da2f6b
532c65f2a Move sponsor logo to theme
899e2defe Add sponsor logos to home page and footer
3ca53db97 Release 0.31.1
bb9876ce2 Merge branch 'temp0311'
c7c3ee7e5 releaser: Prepare repository for 0.32-DEV
4ac554792 releaser: Add release notes to /docs for release of 0.31.1
52bfb5c15 releaser: Bump versions for release of 0.31.1
cfdc2e4ea Fix output formats example
5746c10c2 More on output format
de2ee0fe0 Improve suffix redefinition example
c9997839e Update gitlab CI submodule management
82d74e306 Add Bootstrap styling to breadcrumb example
c8c9601a8 Use the code shortcode for the breadcrumb example
16be43e7d Clean up formatting in variable definition lists
149c2c157 Add nested section docs
783c3d636 Sync theme
60a220bbd Squashed 'themes/gohugoioTheme/' changes from 6b632895..bc851da9
4b33a04d0 Fix typo
94cffc43c Fix little typo
a5d4f762f Fix typo
36c5a0b43 Add a note about the 2 in staticDir2
087bd9a9f Add KeyCDN to menu
4ac8aae38 Hugo 0.31 Released
8fdd995e7 releaser: Prepare repository for 0.32-DEV
eb0f38fbb releaser: Add release notes to /docs for release of 0.31
60efdfff7 releaser: Bump versions for release of 0.31
44dafb10b Merge commit '30c0d485eaff6d70df1be0353911ddca485d52bf'
e6b847b95 Merge commit '05e42bc643f1840ed2ad9c2eff82a269d1381683'
15d86a525 Handle Taxonomy permalinks
5c3c18d7f Add support for height argument to figure shortcode

git-subtree-dir: docs
git-subtree-split: fc61378a32
2017-12-30 09:15:31 +01:00
Bjørn Erik Pedersen 407c24020e hugolib: Add test for homepage content for all rendering engines
Update #4166
2017-12-29 10:16:50 +01:00
Bjørn Erik Pedersen c067f34558 tpl/transform: Do not unescape input to highlight
Fixes #4179
2017-12-29 09:52:43 +01:00
Bjørn Erik Pedersen 72903be587 commands: Make sure all language homes are always re-rendered in fast render mode
Fixes #4125
2017-12-29 09:37:37 +01:00
Bjørn Erik Pedersen 1c114d539b hugolib: Do not tolower result from Page.GetParam
We still do lowering of the param strings in some internal use of this, but the exported `GetParam` method is changed to a more sensible default.

This was used for the `disqus_title` etc. in the internal Disqus template, which was obviously not right.

If you really want to lowercase your params, do it with `.GetParam "myparam" | lower` or similar.

Fixes #4187
2017-12-29 08:58:38 +01:00
Bjørn Erik Pedersen e141294619 resource: Avoid potential case issue in image names 2017-12-28 22:56:48 +01:00
Bjørn Erik Pedersen 612dcc1944 helpers: Avoid writing the last MD5 buff part twice 2017-12-28 22:52:27 +01:00
Bjørn Erik Pedersen e50a8c7a14 resource: Use MD5 to identify image files
But only a set of byte chunks spread around in the image file to calculate the fingerprint, which is much faster than reading the whole file:

```bash
BenchmarkMD5FromFileFast/full=false-4         	  300000	      4356 ns/op	     240 B/op	       5 allocs/op
BenchmarkMD5FromFileFast/full=true-4          	   30000	     42899 ns/op	   32944 B/op	       5 allocs/op
```

Fixes #4186
2017-12-28 17:41:51 +01:00
Bjørn Erik Pedersen 7e76a6fd3b source: Fix test on Windows 2017-12-28 13:54:23 +01:00
Bjørn Erik Pedersen 1b0780dbeb source: Make sure .File.Dir() ends with a slash
Updates #4190
2017-12-28 11:32:02 +01:00
Bjørn Erik Pedersen 3cdf19e9b7 Implement Page bundling and image handling
This commit is not the smallest in Hugo's history.

Some hightlights include:

* Page bundles (for complete articles, keeping images and content together etc.).
* Bundled images can be processed in as many versions/sizes as you need with the three methods `Resize`, `Fill` and `Fit`.
* Processed images are cached inside `resources/_gen/images` (default) in your project.
* Symbolic links (both files and dirs) are now allowed anywhere inside /content
* A new table based build summary
* The "Total in nn ms" now reports the total including the handling of the files inside /static. So if it now reports more than you're used to, it is just **more real** and probably faster than before (see below).

A site building  benchmark run compared to `v0.31.1` shows that this should be slightly faster and use less memory:

```bash
▶ ./benchSite.sh "TOML,num_langs=.*,num_root_sections=5,num_pages=(500|1000),tags_per_page=5,shortcodes,render"

benchmark                                                                                                         old ns/op     new ns/op     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      101785785     78067944      -23.30%
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     185481057     149159919     -19.58%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      103149918     85679409      -16.94%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     203515478     169208775     -16.86%

benchmark                                                                                                         old allocs     new allocs     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      532464         391539         -26.47%
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     1056549        772702         -26.87%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      555974         406630         -26.86%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     1086545        789922         -27.30%

benchmark                                                                                                         old bytes     new bytes     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      53243246      43598155      -18.12%
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     105811617     86087116      -18.64%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      54558852      44545097      -18.35%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     106903858     86978413      -18.64%
```

Fixes #3651
Closes #3158
Fixes #1014
Closes #2021
Fixes #1240
Updates #3757
2017-12-27 18:44:47 +01:00
Bjørn Erik Pedersen 02f2735f68 tpl/strings: Fix broken test 2017-12-17 18:06:55 +01:00
Victor Kropp 22cd89adc4 Make chomp return the type it receives
fixes #2187
2017-12-16 23:59:36 +01:00
Bjørn Erik Pedersen db4b7a5c67 Reuse the BlackFriday instance when possible
This is in heavy use in rendering, so this makes a difference:

```bash
benchmark                                                                                    old ns/op     new ns/op     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4     124551144     107743429     -13.49%

benchmark                                                                                    old allocs     new allocs     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4     528684         435118         -17.70%

benchmark                                                                                    old bytes     new bytes     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4     53306848      45147832      -15.31%
```
2017-12-16 19:44:33 +01:00
Ivan Vyshnevskyi 2511498608 livereload: Fix host comparison when ports aren't present
Compare the original hosts from 'Origin' and 'Host' headers before
attempting to do a port-less comparison.  This helps in the case when
hugo server was started with a '--port=80' so both headers do not
contain a port.

Fixes #4141
2017-12-16 19:06:00 +01:00
Richard Metzler 9df3736fec Add .Title and .Page to MenuEntry
It uses `title` if configured on the menu entry. If not, it uses the `Page.Title` when possible.

Fixes #2784
2017-12-15 18:49:21 +01:00
Bjørn Erik Pedersen 243694102a Remove the goroutines from the shortcode lexer
It was clever, but storing the items in a slice is faster -- and it gives room to more goroutines in other places.

```bash
benchmark                     old ns/op     new ns/op     delta
BenchmarkShortcodeLexer-4     180173        79614         -55.81%

benchmark                     old allocs     new allocs     delta
BenchmarkShortcodeLexer-4     309            328            +6.15%

benchmark                     old bytes     new bytes     delta
BenchmarkShortcodeLexer-4     35456         47008         +32.58%
```
2017-12-07 23:08:25 +01:00
Bjørn Erik Pedersen 3153526161 mage: Do not run Go Fmt check on Go tip 2017-12-07 22:38:54 +01:00
Bjørn Erik Pedersen fdbef2a81c Adjust the stale setup 2017-12-06 14:03:04 +01:00
Bjørn Erik Pedersen 426ac9c18e Add Github stale bot config 2017-12-06 10:03:25 +01:00
Bjørn Erik Pedersen 84805a68ca Use StopTimer in site benchmarks 2017-12-05 16:17:11 +01:00
Bjørn Erik Pedersen a2d81ce983 Add output formats definition to benchmarks 2017-12-02 12:05:12 +01:00
Bjørn Erik Pedersen 051fa343d0 Improve site benchmarks 2017-12-02 11:44:36 +01:00
Christian Nolte 23f69efb39 Fix context of opengraph video range
Fixes #4136
2017-12-01 20:59:11 +01:00
Brian Chen e69da7a4cb Add Pandoc support, refactor external helpers
Recognize the Pandoc format under the file extension .pandoc or .pdc,
and shell out to pandoc as an external helper to format Pandoc content.

Refactor out repeated code with external helpers. Change the error
output formatting. I did not see any of the external helpers print the
string "<input>" to represent stdin as a file; just prepending the file
name to error output is more general and doesn't sacrifice that much in
terms of readability.

Closes #234
2017-11-30 12:15:52 +01:00
Bjørn Erik Pedersen e7652180a1 vendor: Fix Humanize for multi-byte runes
Fixes #4133
2017-11-28 21:16:01 +01:00
Bjørn Erik Pedersen 7989210120 vendor: Update Chroma to v0.2.0
Closes #4087
2017-11-27 17:16:42 +01:00
Chase Adams 7f2ae3ef39 vendor: update goorgeous@v1.1.0 2017-11-27 17:12:22 +01:00
hugoreleaser 8a8ba63c7e releaser: Prepare repository for 0.32-DEV
[ci skip]
2017-11-27 11:27:33 +00:00
hugoreleaser c1c04d74a0 releaser: Add release notes to /docs for release of 0.31.1
[ci skip]
2017-11-27 11:26:08 +00:00
hugoreleaser aa68205d16 releaser: Bump versions for release of 0.31.1
[ci skip]
2017-11-27 11:26:08 +00:00
Bjørn Erik Pedersen 94115888e3 Release 0.31.1 2017-11-27 12:18:44 +01:00
hugoreleaser bf8aa4ac5a releaser: Add release notes draft for 0.31.1
Rename to *-ready.md to continue. [ci skip]
2017-11-27 10:33:13 +00:00
Bjørn Erik Pedersen 6d79beb5f6 tpl/images: Close image file 2017-11-25 18:38:33 +01:00
Bjørn Erik Pedersen 8afd7d9ceb commands: Fix broken --appendPort=false
Also make sure to log the correct server URL to the console.

Fixes #4111
2017-11-24 11:29:01 +01:00
hugoreleaser 42fbf15fb7 releaser: Prepare repository for 0.32-DEV
[ci skip]
2017-11-20 10:30:09 +00:00
hugoreleaser 288723a049 releaser: Add release notes to /docs for release of 0.31
[ci skip]
2017-11-20 10:28:21 +00:00
hugoreleaser f4b416bbef releaser: Bump versions for release of 0.31
[ci skip]
2017-11-20 10:28:21 +00:00
Bjørn Erik Pedersen 058f25146c Release 0.31 2017-11-20 11:24:19 +01:00
hugoreleaser 3dd7e8b7a7 releaser: Add release notes draft for 0.31
Rename to *-ready.md to continue. [ci skip]
2017-11-20 11:22:36 +01:00
Bjørn Erik Pedersen 30c0d485ea Squashed 'docs/' changes from a042b67b5..3e663efb2
3e663efb2 Add poster for Hugo 0.31 release
b3c98ba65 Add doc about the new static dir support
2e62e4bdf Update multilingual docs for Hugo 0.31
8eff394b3 commands: Regenerate

git-subtree-dir: docs
git-subtree-split: 3e663efb2b
2017-11-20 11:19:16 +01:00
Bjørn Erik Pedersen 14786c4d8f Merge commit '30c0d485eaff6d70df1be0353911ddca485d52bf' 2017-11-20 11:19:16 +01:00
Bjørn Erik Pedersen 089fe49309 hugolib: Make sure everything ends up in its lang root in multihost mode
Fixes #4105
2017-11-20 11:17:46 +01:00
Bjørn Erik Pedersen 118b83d74b helpers: Properly handle []interface{} as staticDir
And now with a proper integration test ...
2017-11-19 15:44:20 +01:00
Bjørn Erik Pedersen adbd5bc47f source: Enable disabled test 2017-11-19 14:35:49 +01:00
Bjørn Erik Pedersen c1d325934e helpers: Remove (now) unused GetStaticDir
* In Hugo there is no single static dir
* It was used as a filter in the content dir, which makes no sense since any overlap here is impossible
2017-11-19 14:03:21 +01:00
Bjørn Erik Pedersen d99db71ab5 livereload: Fix recently broken window.location.reload logic
Closes #4100
2017-11-18 10:54:07 +01:00
Bjørn Erik Pedersen 503ca6de6c Fix broken shortcodes for Ace and Amber
Fixes #4051
2017-11-18 10:41:31 +01:00
Bjørn Erik Pedersen b3daa1f4bf hugolib: Fix .IsTranslated with identical filenames
This commit refines the key used to map translations:

* Use `translationKey` set in front matter
* Fall back to path + base filename (i.e. the filename without extension and language code)

Note that the Page Kinde will be prepended to both cases above. It does not make sense to have a section as translation for the home page.

Fixes #2699
2017-11-17 19:46:32 +01:00
Bjørn Erik Pedersen df1677a6e8 Merge commit '05e42bc643f1840ed2ad9c2eff82a269d1381683' 2017-11-17 13:48:33 +01:00
Bjørn Erik Pedersen 05e42bc643 Squashed 'docs/' changes from e65df1059..a042b67b5
a042b67b5 Update installation instructions for Fedora, CentOS, Red Hat
e99dcb0b5 Document `:sections` placeholder for permalinks
f33c88a27 Fix and clarify documentation about Blackfriday extensions (mask)
5cab109c2 Add .Page.File documentation
62df7bb80 Add .Page.CurrentSection and .Page.Sections documentation
60b4414de Add .Page.Dir documentation
22038d1a8 shortcode-templates.md: Update year example
850d5ca41 Add note about theme versions in hosting-on-netlify.md
0509b8055 Update permalink example URL
c68d61d3a Mention the available 'width' argument in 'figure' shortcode
ed83b483a Update Nanobox deployment tutorial
a7422f35d shortcode-templates.md: Remove stray period
af2905fe4 Fix order of releases in news section
19d3ea064 Bump to 0.30.2
bbfa10343 Merge branch 'next'
36ed7cbe4 releaser: Prepare repository for 0.31-DEV
f689770f6 releaser: Add release notes to /docs for release of 0.30.2
0045e712a releaser: Bump versions for release of 0.30.2
a9efc3bbd Add slug to 0.30.1 relnotes
9cf47a4a1 Release 0.30.1
1fa0bb23d releaser: Prepare repository for 0.31-DEV
5582208b6 releaser: Add release notes to /docs for release of 0.30.1
09693d155 releaser: Bump versions for release of 0.30.1
58adf5d0d Merge commit '325009c3fd4ac90021897b7e3e025c14e70ce162'
4ef5dcb9b releaser: Prepare repository for 0.31-DEV
02938a788 releaser: Add release notes to /docs for release of 0.30.1
7cfd01fc6 releaser: Bump versions for release of 0.30.1
db3a68e24 Fix typo
95a5d8b46 Fix format of summaryLength in TOML example config
2ad649a92 Make terms in taxonomy examples more coherent
1fac1e662 Make a link specifically point to Pygments HTML Formatter docs
11ae6be03 Fix minor typos in v0.30 release notes

git-subtree-dir: docs
git-subtree-split: a042b67b5b
2017-11-17 13:46:40 +01:00
Bjørn Erik Pedersen 0a81a6b4ba output: Fall back to unstranslated base template
Fixes #3893
2017-11-17 13:08:18 +01:00
Bjørn Erik Pedersen 60dfb9a6e0 Add support for multiple staticDirs
This commit adds support for multiple statDirs both on the global and language level.

A simple `config.toml` example:

```bash
staticDir = ["static1", "static2"]
[languages]
[languages.no]
staticDir = ["staticDir_override", "static_no"]
baseURL = "https://example.no"
languageName = "Norsk"
weight = 1
title = "På norsk"

[languages.en]
staticDir2 = "static_en"
baseURL = "https://example.com"
languageName = "English"
weight = 2
title = "In English"
```

In the above, with no theme used:

the English site will get its static files as a union of "static1", "static2" and "static_en". On file duplicates, the right-most version will win.
the Norwegian site will get its static files as a union of "staticDir_override" and "static_no".

This commit also concludes the Multihost support in #4027.

Fixes #36
Closes #4027
2017-11-17 11:01:46 +01:00
Bjørn Erik Pedersen 2e0465764b Add multilingual multihost support
This commit adds multihost support when more than one language is configured and `baseURL` is set per language.

Updates #4027
2017-11-17 11:01:46 +01:00
Bjørn Erik Pedersen 6233ddf9d1 tpl/partials: Fix the lock contention in cached partial
Fixes #4086
2017-11-16 11:59:45 +01:00
Bjørn Erik Pedersen e66d813bcb gopkg: Update Chroma to get SVG support 2017-11-16 08:30:51 +01:00
Bjørn Erik Pedersen f5ed04bd4a tpl/partials: Fix cache locking
To make sure a cached partial is ony executed  exactly once.

Performance same:

```bash
name                         old time/op    new time/op    delta
TemplateParamsKeysToLower-4    17.2µs ± 0%    16.5µs ± 0%   ~     (p=1.000 n=1+1)
Partial-4                      18.6µs ± 0%    19.4µs ± 0%   ~     (p=1.000 n=1+1)
PartialCached-4                64.2ns ± 0%    63.7ns ± 0%   ~     (p=1.000 n=1+1)

name                         old alloc/op   new alloc/op   delta
TemplateParamsKeysToLower-4    2.66kB ± 0%    2.66kB ± 0%   ~     (all equal)
Partial-4                      1.31kB ± 0%    1.31kB ± 0%   ~     (all equal)
PartialCached-4                 0.00B          0.00B        ~     (all equal)

name                         old allocs/op  new allocs/op  delta
TemplateParamsKeysToLower-4      92.0 ± 0%      92.0 ± 0%   ~     (all equal)
Partial-4                        41.0 ± 0%      41.0 ± 0%   ~     (all equal)
```
2017-11-16 01:23:37 +01:00
Bjørn Erik Pedersen 7730d683e8 tplimpl: Make partial benchmarks use RunParallel
See #4086
2017-11-16 01:13:07 +01:00
Bjørn Erik Pedersen bb048d811d Use ms precision for static change logging 2017-11-15 08:52:29 +01:00
Bjørn Erik Pedersen 9299a16c99 circleci: Bump to Go 1.9.2
Closes #4064
2017-11-11 09:46:35 +01:00
Bjørn Erik Pedersen a9be687b81 hugolib: Pre-allocate some slices 2017-11-11 09:39:43 +01:00
Bjørn Erik Pedersen b32ffed6ab Update Chroma to get the latest SASS lexer
Fixes #4069
2017-11-09 14:15:12 +01:00
Bjørn Erik Pedersen 77cbd001ff Update Travis and snapcraft to Go 1.9.2
See #4064
2017-11-08 00:37:59 +01:00
Bjørn Erik Pedersen 764f1304e1 hugolib: Add some more taxonomy permalinks test cases
See #1208
2017-11-07 23:42:47 +01:00
Brian Chen d9a78b61ad Handle Taxonomy permalinks
Return the correct virtual Section for Taxonomy and TaxonomyTerm.
Restrict permalink expansion to only Pages and Taxonomies, but then
actually use expanded permalinks even for non-Pages.

Fixes #1208.
2017-11-07 23:05:48 +01:00
Bjørn Erik Pedersen 23ba779fab i18n: Support unknown language codes
Fixes #3564
2017-11-06 20:27:41 +01:00
Bjørn Erik Pedersen 550cec0b1f gopkg: Bump go-i18n version
See #3564
2017-11-06 20:27:41 +01:00
Bjørn Erik Pedersen b88a105a7c Revert "i18n: Allow custom language codes"
This reverts commit bb04010cbf.
2017-11-05 10:20:39 +01:00
Bjørn Erik Pedersen b3443b3d0c Revert "i18n: Prevent data race in lang code handling"
This reverts commit c97216e4f0.
2017-11-05 10:20:30 +01:00
Bjørn Erik Pedersen c97216e4f0 i18n: Prevent data race in lang code handling
See #3564
2017-11-04 10:48:29 +01:00
Kevin Gimbel bb04010cbf i18n: Allow custom language codes
Use the new `RegisterPluralSpec` function to register all defined
languages. This allows the usage of language identifiers which are not
part of the Unicode CLDR standard.

Closes #3564
2017-11-04 10:48:29 +01:00
Artem Sidorenko 76dc811c65 tpl/math: Refactor Mod with cast
It makes the code smaller
2017-10-30 21:55:36 +01:00
Kaushal Modi 488631fe0a Add support for height argument to figure shortcode
Fixes #4014
2017-10-29 20:46:57 +01:00
Rizky Agung fdd62eb4c3 Add linebreak to README.md for better readability 2017-10-28 12:57:15 +02:00
Kaushal Modi b6f2e3b438 Update toml dependency revision in Gopkg.lock too
Part 2 of
https://github.com/gohugoio/hugo/commit/c61998d3ac2e9c2756ba72d2e7381638cbe01a1f

Related: #3998
2017-10-23 21:15:44 +02:00
Kaushal Modi c61998d3ac Update toml dep to fetch its latest master branch instead of v0.3.0
toml v0.3.0 was released in March 2017 and is missing few fixes made in toml
package after the fact. So use the master branch instead.

This fixes a regression when switch was made from govendor vendor.json dep
management to Go dep.

Fixes #3998
2017-10-23 19:44:41 +02:00
Bjørn Erik Pedersen 45ad8ac381 vendor: Lock mage to v1
Dep insists on adding a dependency for it, so we might as well lock it to the correct version.

Fixes #3997
2017-10-23 13:37:59 +02:00
Bjørn Erik Pedersen 133cfd1710 mage: Skip Check on Go 1.8
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen db1a5af15d Gopk.toml cleanup
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen 9ccc958ce7 Update Dockerfile and Snap build to reflect move to dep
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen 30e471b8c6 Update CONTRIBUTING to reflect Go Dep
Closes #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen f711b170e4 Update magefile to use Go Dep
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen 9536f7cd05 Adjust some deps versions
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen 1ac47cd88a Run dep init
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen ba0b22ef44 vendor: Remove to prepare for dep
See #3988
2017-10-21 19:30:23 +02:00
Nate Finch c9c19d7945 Fix error handling in mage build
* print gofmt errors
* don't error on lint failures
* explanatory comments and fix an error text
2017-10-21 17:37:00 +02:00
hugoreleaser 1d52bfbb47 releaser: Prepare repository for 0.31-DEV
[ci skip]
2017-10-19 11:35:38 +00:00
hugoreleaser 142ebba2c5 releaser: Add release notes to /docs for release of 0.30.2
[ci skip]
2017-10-19 11:34:09 +00:00
hugoreleaser bf633ea2f2 releaser: Bump versions for release of 0.30.2
[ci skip]
2017-10-19 11:34:09 +00:00
Bjørn Erik Pedersen 6faf47e8dd 0.30.2 Release 2017-10-19 13:30:39 +02:00
hugoreleaser 7954bc0f0f releaser: Add release notes draft for 0.30.2
Rename to *-ready.md to continue. [ci skip]
2017-10-19 11:28:20 +00:00
Bjørn Erik Pedersen c4bf03a558 releaser: Improve release notes front matter 2017-10-19 12:34:03 +02:00
Bjørn Erik Pedersen 3164103310 commands: Support Fast Render mode with sub-path in baseURL
Fixes #3981
2017-10-19 10:09:04 +02:00
Bjørn Erik Pedersen 6a5170116c Merge commit '325009c3fd4ac90021897b7e3e025c14e70ce162' 2017-10-19 07:59:48 +02:00
Bjørn Erik Pedersen 325009c3fd Squashed 'docs/' changes from 4628b9ec2..e65df1059
e65df1059 Bump to v0.30
e9e118730 releaser: Prepare repository for 0.31-DEV
e6f2508d4 releaser: Add release notes to /docs for release of 0.30
9c5d6a65b releaser: Bump versions for release of 0.30
88bf0e663 Merge commit 'ecf5e081b5540e69f4af330233f39a07baf53846'
6c7191331 Merge commit 'dae5a7c61cceeb0de59f2d755f63e453f71dd9b2'
efd1821bd tpl: Add errorf template function
0cf8dc046 Change SummaryLength to be configurable (#3924)
9e8c09652 tpl: Add os.fileExists template function
e969cfcd7 Merge commit '9d68f695e782c6a83c77aff13317c7a22c694c98'
1a2d516a0 tpl: Add float template function
5310162dc releaser: Prepare repository for 0.30-DEV
648fdf2d0 releaser: Add release notes to /docs for release of 0.29
b2f46992c releaser: Bump versions for release of 0.29
ec447e043 releaser: Prepare repository for 0.29-DEV
9f469e93a releaser: Add release notes to /docs for release of 0.28
c91c18ebc releaser: Bump versions for release of 0.28
253d2ede2 Merge commit '61c27b58b353c73772aae572c7d822fdfdf7791b'
e35b93cc7 Merge commit '30694a133a88d5f76a51d0372646e10cbeca7691'
9fad59f66 Merge commit '7a89dce53bfbd67a17442a8f9be8fa895fc4f9b1'
4221c2855 Merge commit 'ba45da9d03056447e4873de13d4e0f8d658a769b'
0010b6743 releaser: Prepare repository for 0.28-DEV
9e71765cd releaser: Add release notes to /docs for release of 0.27.1
56206b90d releaser: Bump versions for release of 0.27.1
59522fca0 releaser: Prepare repository for 0.28-DEV
4686686d2 releaser: Add release notes to /docs for release of 0.27
0cd9a5d58 releaser: Bump versions for release of 0.27
d21a59d2d docs: Merge commit '1b4319be62ba071f79e90ef32dbe92eb893429f7'
9c4ff2d8e docs: Document Related Content
887fb1af7 docs: Merge commit '7d63a23b0c68d9cd7c7c09c2755619237bc03485'
c8163b51b Update docs versiona and README
f782c9959 Merge commit 'ec4e6f9df2ab9ffdc62a3f59675369096e0d3f77' as 'docs'
d384c661f docs: Re-integrate
9a2eb0f1d Revert "Squashed 'docs/' changes from 35abbc86..f887bd7b"
0373e4310 Squashed 'docs/' changes from 35abbc86..f887bd7b
ea2cc26b3 Remove the theme submodule from /docs
0f9f73cce Add support for multiple config files via --config a.toml,b.toml,c.toml
c8257f8b7 Render task list item inside label for correct accessibility
0abdeeef6 source: Normalize UniqueID between Windows & Linux
e2f8664ef hugolib: More spelling
46ac74537 all: Fix spelling
4b54fb070 all: gofmt -s
40d7d3baa releaser: Prepare repository for 0.27-DEV
f090c2711 releaser: Add release notes to /docs for release of 0.26
b36f6e31e releaser: Bump versions for release of 0.26
0f51e4926 releaser: Add release notes draft for 0.26
62583db50 vendor: Update checksum for inflect
0d495d537 releaser: Update to new release notes location
22b213b1a Merge commit 'e81208265bb3cdb7606d051a23d83aeebcb7d34d'
e81208265 Squashed 'docs/' changes from ef02e34e..35abbc86
11e5d456e releaser: Include stats from hugoDocs
f768c27f0 helpers: Remove some unused funcs
81c13171a Add some missing doc comments
9891c0fb0 Remove sourceRelativeLinks
481924b34 helpers: Fix broken TaskList in Markdown
09907d36a Switch from fork bep/inflect to markbates/inflect
8fb594bfb Make the title case style guide configurable
9b4170ce7 Remove unused dependencies from vendor.json
6acbe41f0 media: Add missing JSON tags to Type
e321306c6 media: Add JSON tags to Type
9c1977872 output: Add JSON tags to Format
50ec65fbe Squashed 'docs/' changes from 73f355ce..ef02e34e
1c18f3fc4 Merge commit '50ec65fbe1a48475d3320775dab2c47389c02114'
cb9dfc261 helpers: Add support for French Guillemets
c4a0b6e8a vendor: Add support for French Guillemets
a8080c084 Remove CODEOWNERS
84710eb3e Add -u flag for go get govendor in CONTRIBUTING.md
555a9bc80 tpl: Accommodate gccgo in TestMethodToName
55d0b8941 tpl/collections: Fix intersect on []interface{} handling
aee2b0678 Add --debug option to be improved on over time
c1a5da977 vendor: Update dependencies for 0.26-DEV
9ed48c1c9 Dockerfile: Run go install with -ldflags '-s -w'
bfe0bfbbd Dockerfile: Reduce image size from 277MB to 27MB
606d6a8c9 Dockerfile: Optimize Docker image size
12e049520 docs: Add RSS template lookup example
6cd33f695 tpl: Use hash for cache key
dbe63970e hugolib: Support reflinks starting with a slash
0c90e6d71 Change "hugodocs" to "hugoDocs" to match GitHub's default URL
b60aa1a50 helpers: Add --trace to asciidoctor args
ff433f981 Add script to pull in docs changes
2c0d1ccdc Squashed 'docs/' changes from b0470688..73f355ce
f387cb1b3 doc: Merge commit '2c0d1ccdcd95de0bddeb39dca2e4d08f0d8056d7'
40566ec98 Remove ^M from file to make line-endings consistent
7759a98f7 Clarify the repo choice in the contribution guidelines
720786cd3 Add note about doc-related pull requests in contribution guide
214e16eca appveyor: Update submodules
a2fb8150c Add some README info about the docs repo
73273d4e8 Add the docs theme to .gitmodules
4c220c4ac Merge commit '6dbde8d731f221b027c0c60b772ba82dad759943'
6dbde8d73 Squashed 'docs/' changes from f3c88b08..b0470688
deccc5400 hubolib: Add HasShortcode
00b590d7a Improve the twitter card template
ea5e9e346 Add GOEXE to support building with different versions of `go`
61bb3ccab hugolib: Improve panic handling in layout rendering
794ea21e9 hugolib: Make template panics into nice error messages
91f410ea9 Bump versions to 0.26-DEV
0e25f1e96 Revert "Revert "vendor: Update dependencies for 0.26-DEV""
aded65b71 releaser: Prepare repository for 0.25-DEV
bbd33dbf5 releaser: Add release notes to /docs for release of 0.25.1
0e09be7b3 releaser: Bump versions for release of 0.25.1
195f94575 releaser: Ignore openbsd/arm
44b8f740e releaser: Add release notes draft for 0.25.1
a48e13234 Revert "vendor: Update dependencies for 0.26-DEV"
7f82b41a2 parser: Final (!) fix for issue with escaped JSON front matter
84db6c74a parser: Fix issue with escaped JSON front matter
e0cf2e05b tpl/collections: Add some empty slice tests to intersect
dbbc5c481 tpl/collections: Fix union when the first slice is empty
7bcc1ce65 commands: Navigate to changed on CREATE When working with content from IntelliJ IDE, like WebStorm, every file save is followed by two events: "RENAME" and then "CREATE".
fd41e70cf Add first draft of CODEOWNERS
4ec8ee7fb vendor: Update dependencies for 0.26-DEV
1e19a9845 releaser: Prepare repository for 0.26-DEV
6fb556367 releaser: Add release notes to /docs for release of 0.25
51bcd5083 releaser: Fix tag push
6e086e3d0 releaser: Bump versions for release of 0.25
5895e32b0 releaser: Add release notes draft for 0.25
b2dcd867f Revert "vendor: Update dependencies"
d2c24baaf vendor: Update dependencies
4989950d4 releaser: Use real theme count in template
a358b33f2 docs: Regenerate the docs helpers
a392fca96 docs: Regenerate commands doc
75f782f03 Revert "commands: Adjust docs path"
37c69054e Squashed 'docs/' changes from 5d9a6703..f3c88b08
e00f5c9c0 docs: Merge docs commit '37c69054e294bf554be03cf7e4c01e1f586e6943'
477684022 releaser: Adjustments
70d8ddcb6 releaser: Revise the docs handling to match new subtree
5f831a622 releaser: Replace the magic version handling
e7a54e7af releaser: Add --try flag to ease testing
aa6b1b9be output: Support templates per site/language
a1d260b41 hugolib: Extend the sections API
dd9b1baab hugolib: Make .Site.Sections return the top level sections
1039356ed commands: Support human-readable YAML boolean values in undraft
ccdd08d57 tpl/collections: Add Pages support to Intersect and Union
d12cf5a25 tpl/collections: Fix In function for JSON arrays
e10e51a00 parser: Fix handling of JSON front matter with escaped quotes
34c566773 tpl/math: Add log function
41805dca9 hugolib: Render 404.html for all languages
7ee1f25e9 hugo import jekyll support nested _posts directories
3aa0e16d0 cache: Add even more concurrency to test
b3c8056de cache: Add concurrent cache test
fe132e1c3 vendor: Add missing WebP dependencies
8431c8d39 tpl: Add WebP images support
da72805a4 tpl: Only show post's own keywords in schema.org
72fd87171 hugolib: Add more summary test
118f8f7cf Dockerfile: Update Dockerfile and add Docker optimizations
56d82aa02 hugofs: Fix typo in code comment
eccb06478 tpl: Simplify the Disqus template a little bit (#3655)
2e1e4934b tpl: Improve the built-in Disqus template (#3639)
a54404968 helpers: Add Blackfriday 'joinLines' extension support (#3574)
bfce30d85 helpers: add --initial-header-level=2 to rst2html (#3528)
30e14cc31 Make `--navigateToChanged` more robust on Windows
c825a7312 Support open "current content page" in browser
7198ea8a1 Revert "Remove docs building from CI builds"
dd78d5b23 Squashed 'docs/' content from commit 5d9a6703
a7765bb3c Merge commit 'dd78d5b23fe597f4461aa4199401b4e07c0612e2' as 'docs'

git-subtree-dir: docs
git-subtree-split: e65df10595
2017-10-19 07:58:46 +02:00
hugoreleaser bc53cd7b15 releaser: Prepare repository for 0.31-DEV
[ci skip]
2017-10-19 05:43:34 +00:00
hugoreleaser 4e07b4144f releaser: Add release notes to /docs for release of 0.30.1
[ci skip]
2017-10-19 05:41:50 +00:00
hugoreleaser 89a3f47a21 releaser: Bump versions for release of 0.30.1
[ci skip]
2017-10-19 05:41:50 +00:00
Bjørn Erik Pedersen 35be07f7c8 Release 0.30.1 2017-10-19 07:38:49 +02:00
hugoreleaser 6f84570d8f releaser: Add release notes draft for 0.30.1
Rename to *-ready.md to continue. [ci skip]
2017-10-19 05:30:23 +00:00
Bjørn Erik Pedersen 8964162573 circleci: Must go get mage
See https://github.com/magefile/mage/issues/79
2017-10-19 07:26:27 +02:00
Bjørn Erik Pedersen e939aaed8b releaser: Correctly set final version on patch releases 2017-10-19 07:12:23 +02:00
Bjørn Erik Pedersen d2b3f00df7 Bump Snap to go1.9.1 2017-10-19 07:06:38 +02:00
Bjørn Erik Pedersen fa53b13ca0 Fix hugo -w
Fixes #3980
2017-10-18 18:35:25 +02:00
Bjørn Erik Pedersen c3c10f2c7c Simplify Site benchmarks
Now running `./benchSite.sh` should give a good baseline.
2017-10-18 16:46:55 +02:00
Bjørn Erik Pedersen ad5ef43838 Fix mage vs make issues
And remove Makefile ... for good.

Fixes #3969
2017-10-18 07:56:10 +02:00
Bjørn Erik Pedersen 5109ed520f Revert "tplimpl: Output xmlns:xhtml only if there are translations available"
This reverts commit 0859d9dfe6.

Fixes #3978
2017-10-17 20:56:50 +02:00
hugoreleaser 45e0908b86 releaser: Prepare repository for 0.31-DEV
[ci skip]
2017-10-16 08:40:34 +00:00
hugoreleaser 41180c51e1 releaser: Add release notes to /docs for release of 0.30
[ci skip]
2017-10-16 08:39:00 +00:00
hugoreleaser 811f381e23 releaser: Bump versions for release of 0.30
[ci skip]
2017-10-16 08:39:00 +00:00
Bjørn Erik Pedersen 7d783a1c0e Release Hugo 0.30 2017-10-16 10:30:08 +02:00
Bjørn Erik Pedersen 49d5e7da42 Use Make for the release for now
[ci skip]
2017-10-16 10:22:39 +02:00
hugoreleaser 190508ae1e releaser: Add release notes draft for 0.30 2017-10-16 10:22:39 +02:00
Bjørn Erik Pedersen 04bdb596ad Fix CircleCI build issue 2017-10-15 13:41:26 +02:00
Bjørn Erik Pedersen fe71cb6f5f Replace make with mage in CircleCI build
Updates #3969
2017-10-15 11:08:25 +02:00
Bjørn Erik Pedersen 68ace43431 Update CircleCI build to use Mage
Fixes #3969
2017-10-15 10:59:16 +02:00
Bjørn Erik Pedersen ecf5e081b5 Squashed 'docs/' changes from 000ab7c42..4628b9ec2
4628b9ec2 commands: Regen CLI doc
2525f2ed0 data: Regenerate docs helper
6f5a0eb19 Add Hugo 0.30 poster image
72c3fac9e Merge branch 'chroma-next2' into next
364973d3f Fix typo in syntax highlighting.
ce10cc02e Update Chroma highlighting docs
9dcc4d4dd Update robots.md
1e64cb483 Rename title of cross references' page
d6dfbbc51 Add warning about MMark and TOCs
e8d259d32 Fix link to subsection in page
6adead19d Merge commit '040d8d2833c26c53cf9f0e035910821ed50e3863'
040d8d283 Squashed 'themes/gohugoioTheme/' changes from cdaa89c8..6b632895
bde95d890 Add Atlas starter kit
fc40d078d Remove page arg from examples of relref shortcode
c578620b5 Remove page arg from examples of ref shortcode
ee81931a4 Remove delimiters in YAML and TOML config examples
62d7b269f Clarify that .Lastmod automatically uses .GitInfo.AuthorDate (#226)

git-subtree-dir: docs
git-subtree-split: 4628b9ec2c
2017-10-15 10:20:55 +02:00
Bjørn Erik Pedersen 5c31e0c341 Merge commit 'ecf5e081b5540e69f4af330233f39a07baf53846' 2017-10-15 10:20:55 +02:00
Bjørn Erik Pedersen 7c30e2cbb0 Add table linenos support for Chroma highlighter
Fixes #3915
2017-10-14 16:00:27 +02:00
Bjørn Erik Pedersen 60bd332c1f Only re-render the view(s) you're working on
Hugo already, in its server mode,  support partial rebuilds. To put it simply: If you change `about.md`, only that content page is read and processed, then Hugo does some processing (taxonomies etc.) and the full site is rendered.
This commit covers the rendering part: We now only re-render the pages you work on, i.e. the last n pages you watched in the browser (which obviously also includes the  page in the example above).

To be more specific: When you are running the hugo server in watch (aka. livereload) mode, and change a template or a content file, then we do a partial re-rendering of the following:

* The current content page (if it is a content change)
* The home page
* Up to the last 10 pages you visited on the site.

This should in most cases be enough, but if you navigate to something completely different, you may see stale content. Doing an edit will then refresh that page.

Note that this feature is enabled by default. To turn it off, run `hugo server --disableFastRender`.

Fixes #3962
See  #1643
2017-10-14 13:40:43 +02:00
Bjørn Erik Pedersen 6a30874f19 Make sure Date and PublishDate is always set to a value if one is available
Fixes #3854
2017-10-13 13:18:23 +02:00
Michael Henderson 15ec031d98 Add correct config file name to verbose server log
Server logging uses the wrong variable when displaying
the configuration file name. This update changes the
log to use the `config` variable.
2017-10-10 07:47:35 +02:00
Bjørn Erik Pedersen 01e54609e7 metrics: Reset benchmark timer 2017-10-07 20:41:25 +02:00
Bjørn Erik Pedersen 5800a20a25 metrics: Detect partialCached candidates
This commit adds a "cache potential" column when running `hugo --templateMetrics --templateMetricsHints`.

This is only calculated when `--templateMetricsHints` is set, as these calculations has an negative effect on the other timings.

This gives a value for partials only, and is a number between 0-100 that indicates if `partial` can be replaced with `partialCached`.

100 means that all execution of the same partial resulted in the same output.

You should do  some manual research before going "all cache".
2017-10-07 18:00:07 +02:00
Bjørn Erik Pedersen e2e8bcbec3 tpl: Rework the partial test and benchmarks 2017-10-07 16:53:01 +02:00
Cameron Moore 66a169a249 Simplify HugoNoGitInfo in magefile 2017-10-07 14:42:54 +02:00
digitalcraftsman 2cc4765670 Add mage installation step to CONTRIBUTING.md 2017-10-05 20:09:21 +02:00
Bjørn Erik Pedersen 856fc445da Bump Go versions in Travis config 2017-10-05 18:50:36 +02:00
Hallgeir Holien a6ed645a34 Change last 'make' statements to 'mage' 2017-10-05 17:03:34 +02:00
Steve Divskinsy 23488f874c Minor README changes 2017-10-05 12:44:43 +02:00
Bjørn Erik Pedersen 8d2580f07c Replace make with mage
Fixes #3937
2017-10-05 10:53:02 +02:00
Bjørn Erik Pedersen 06e5633400 Merge commit 'dae5a7c61cceeb0de59f2d755f63e453f71dd9b2' 2017-10-04 09:27:30 +02:00
Bjørn Erik Pedersen dae5a7c61c Squashed 'docs/' changes from 36d7e22f5..000ab7c42
000ab7c42 Fix `ref` and `relref` shortcode usage patterns
4e7123d20 Add som code fence lang tags
21d4f97d1 Update homepage for ox-hugo tool
668969fc4 Remove superflous back ticks
f78cf6490 Fix code example
05aaee8ce Remove background color from code shortcode
dcb0998d0 Add a Build Performance page draft
50e04593a Document templateMetrics usage
67ad36691 Merge commit 'f66d59b8991c264c3366895b5e148ea810a184cd'
f66d59b89 Squashed 'themes/gohugoioTheme/' changes from ca53082d..cdaa89c8

git-subtree-dir: docs
git-subtree-split: 000ab7c423
2017-10-04 09:27:29 +02:00
Bjørn Erik Pedersen a58741a172 helpers: Fix broken test 2017-10-04 09:27:15 +02:00
Bjørn Erik Pedersen d32fd8e328 vendor: Update deps 2017-10-04 08:46:11 +02:00
Jamie Connolly 0859d9dfe6 tplimpl: Output xmlns:xhtml only if there are translations available 2017-10-03 23:46:18 +02:00
Nate Finch 384a6ac4bd Create magefile from Makefile
This commit makes a magefile.go that should be functionally equivalent to
the current Makefile.
2017-10-03 23:23:10 +02:00
Brendan Roy 4fc67fe44a tpl: Add errorf template function
Add template function that will build a string from the given format
string and arguments, then log it to ERROR. This has an intended
side-effect of causing the build to fail, when executed.

Resolves #3817
2017-10-03 07:59:51 +02:00
Cameron Moore 47fdfd5196 Clean up lint in various packages
Changes fall into one of the following:

- gofmt -s
- receiver name is inconsistent
- omit unused 2nd value from range
- godoc comment formed incorrectly
- err assigned and not used
- if block ends with a return statement followed by else
2017-09-29 16:23:16 +02:00
Bjørn Erik Pedersen d45e358a05 helpers: Fix broken Chroma test 2017-09-29 10:40:56 +02:00
Bjørn Erik Pedersen 24fab99841 hugolib: Fix broken hightlighter smoke test 2017-09-29 10:10:13 +02:00
Bjørn Erik Pedersen 6a986b7c07 vendor: Update dependencies 2017-09-29 09:54:03 +02:00
Bjørn Erik Pedersen 8cf55aff00 vendor: Update Chroma 2017-09-29 09:10:55 +02:00
Brendan Roy 8717a60cc0 Change SummaryLength to be configurable (#3924)
Move SummaryLength into the ContentSpec struct and refactor the
relevant summary functions to be methods of ContentSpec. The new
summaryLength struct member is configurable by the summaryLength config
value, and the default remains 70. Also updates hugolib/page to use the
refactored methods.

Resolves #3734
2017-09-29 09:04:55 +02:00
digitalcraftsman 2818878994 tpl: Add os.fileExists template function
Fixes #3839
2017-09-28 19:52:34 +02:00
Bjørn Erik Pedersen b6a30283f0 Merge commit '9d68f695e782c6a83c77aff13317c7a22c694c98' 2017-09-28 17:22:55 +02:00
Bjørn Erik Pedersen 9d68f695e7 Squashed 'docs/' changes from 20959c7b..36d7e22f
36d7e22f Document fmt.{print, println} template functions
79a72fce Fix link to page variables
00342ca9 Fix broken link on highlight page
15f44952 Fix link in v0.28 release notes
0100df73 Fix code examples for math.{Ceil, Floor, Round}
a354a69b Fix broken netlify.toml
4995e5df Merge branch 'master' of github.com:gohugoio/hugoDocs
9cdd990a Hugo 0.29
463558f9 Document math.Log template function
588499af Add nohup.out to .gitignore
db8ddcf7 Change name of post files in example to use post prefix
296ec01f Add ox-hugo Emacs package to the tools section
f060d6d1 Fix math.Ceil, Floor, and Round naming
a2262d24 Document strings.TrimPrefix and TrimSuffix template functions
80c1ce63 Document strings.TrimLeft and TrimRight template functions
2921088d Document urls.Parse template function
f0133079 Document math.{ceil, floor, round} template functions
82863808 Fix typo in migration tools section
d5215d61 Add link to syntax hl docs in release notes
541f0686 Update versions
275ce2b4 Update 0.28 release notes
886713a1 Add release notes for 0.28
bed02e5f Merge branch 'next'
8e3b1ac4 Add a note about branches
1662b9d0 Add missing Disqus links in templates/internal.md

git-subtree-dir: docs
git-subtree-split: 36d7e22f5c
2017-09-28 17:20:10 +02:00
Lucas Jenss 57adc539fc tpl: Add float template function
Add a template function that allows conversion to float. This is
useful, for example, when passing aspect ratios into templates,
which tend to not be integers.

Fixes #3307
2017-09-28 16:53:18 +02:00
Cameron Moore b277cb33e4 hugolib: Move metrics output to the end of the site build 2017-09-27 21:26:08 +02:00
Cameron Moore a354d130dc examples: Fix now usage in footer 2017-09-27 08:42:44 +02:00
hugoreleaser f806e951fd releaser: Prepare repository for 0.30-DEV
[ci skip]
2017-09-26 19:24:34 +00:00
hugoreleaser 524c67107a releaser: Add release notes to /docs for release of 0.29
[ci skip]
2017-09-26 19:23:15 +00:00
hugoreleaser 396759a09b releaser: Bump versions for release of 0.29
[ci skip]
2017-09-26 19:23:15 +00:00
hugoreleaser e6079a9c04 releaser: Add release notes for 0.29 2017-09-26 21:12:49 +02:00
Bjørn Erik Pedersen b5e1dc5892 tpl: Set Metrics at creation time 2017-09-26 20:42:40 +02:00
Bjørn Erik Pedersen d3681f51c0 metrics: Fix sort order
Highest first.
2017-09-26 20:31:40 +02:00
Bjørn Erik Pedersen 4f576e1c08 Revert "vendor: Update Chroma"
This reverts commit cb8eb47260.
2017-09-26 20:06:58 +02:00
Cameron Moore b4a14c25fe metrics: Add simple template metrics feature 2017-09-26 20:03:04 +02:00
Bjørn Erik Pedersen cb8eb47260 vendor: Update Chroma 2017-09-26 20:00:39 +02:00
Bjørn Erik Pedersen e94d4f0177 commands: Make noHTTPCache default false
The other way was a mistake.
2017-09-26 19:59:15 +02:00
Cameron Moore 8a69d23567 tpl: Add math.Ceil, Floor, and Round to method mappings 2017-09-26 08:16:24 +02:00
Thibault Jamet d9697e275e Split go build in Dockerfile
To maximize the usage of cache, split the govendor get in steps:
- govendor fetch to get the pinned versions of dependencies
- go install to actually build the binary

Doing so allows not to re-download the whole dependencies when changing
lines in hugo repository

The current Dockerfile generates an image of 16.6MB

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
2017-09-25 10:28:13 -06:00
Thibault Jamet 09d960f173 Update Dockerfile to benefit build cache
Docker has recently introduces buikld-stages (as of version 17.05)

Build stages allows to benefit the docker build cache as well as
reducing the size of the resulting image c.f.
https://docs.docker.com/engine/userguide/eng-image/multistage-build/

This change allows to have faster builds when running `docker build`
several times after changing some little code

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
2017-09-25 10:28:13 -06:00
Guy Halse a3a3f5b861 snap: Add git to snap package for GitInfo
Add git into the staged packages, so that the git binary is available
and hugo --enableGitInfo works for users of the snap package.

Fixes gohugoio/hugo#3896
2017-09-25 14:24:51 +02:00
hugoreleaser 404e2994e5 releaser: Prepare repository for 0.29-DEV
[ci skip]
2017-09-25 08:00:38 +00:00
hugoreleaser 2a7f6dda12 releaser: Add release notes to /docs for release of 0.28
[ci skip]
2017-09-25 07:59:12 +00:00
hugoreleaser 9e850c1f64 releaser: Bump versions for release of 0.28
[ci skip]
2017-09-25 07:59:12 +00:00
Bjørn Erik Pedersen ab86851a1e releaser: Add final 0.28 release notes 2017-09-25 09:56:20 +02:00
hugoreleaser 53b6235bb4 releaser: Add release notes draft for 0.28
Rename to *-ready.md to continue. [ci skip]
2017-09-25 09:53:56 +02:00
Bjørn Erik Pedersen 61c27b58b3 Squashed 'docs/' changes from 1662b9d0..20959c7b
20959c7b Rewrite the syntax highlighter docs etc.
92435459 Add a note about branches
REVERT: 1662b9d0 Add missing Disqus links in templates/internal.md

git-subtree-dir: docs
git-subtree-split: 20959c7b91
2017-09-25 09:02:42 +02:00
Bjørn Erik Pedersen 932ae52709 Merge commit '61c27b58b353c73772aae572c7d822fdfdf7791b' 2017-09-25 09:02:42 +02:00
Bjørn Erik Pedersen 30694a133a Squashed 'docs/' changes from 5be6fef0..1662b9d0
1662b9d0 Add missing Disqus links in templates/internal.md

git-subtree-dir: docs
git-subtree-split: 1662b9d0bc
2017-09-25 09:02:34 +02:00
Bjørn Erik Pedersen 23ba0edf71 Merge commit '30694a133a88d5f76a51d0372646e10cbeca7691' 2017-09-25 09:02:34 +02:00
Bjørn Erik Pedersen fb33d8286d Use Chroma as new default syntax highlighter
If you want to use Pygments, set `pygmentsUseClassic=true` in your site config.

Fixes #3888
2017-09-25 08:59:02 +02:00
Cameron Moore 81ed564793 tpl: Add urls.Parse function
Add a urls.Parse template function that front-ends url.Parse from the Go
stdlib.

Fixes #3849
2017-09-24 10:07:35 +02:00
Cameron Moore 19c5910485 tpl: Add math.Ceil, Floor, and Round
Ceil and Floor are frontends for the stdlib math functions. The Round
implementation is essentially the same thing except that the Go stdlib
doesn't include a Round implementation in a stable release yet.  I've
included the Round function slated for Go 1.10.

Fixes #3883
2017-09-24 10:06:14 +02:00
Bjørn Erik Pedersen 80c7ea60a0 Make noHTTPCache default on
This is a development server, so that makes the most sense.

See #3897
2017-09-23 21:17:51 +02:00
Bjørn Erik Pedersen 0d29a0f781 Trim newlines in the hightlight shortcode
Fixes #3898
2017-09-23 18:14:07 +02:00
Bjørn Erik Pedersen b8fabce217 vendor: Update goorgeous
Fixes #3899
2017-09-23 17:15:25 +02:00
Bjørn Erik Pedersen b180477631 Add liveReloadPort flag to server
This makes live reloading behind a HTTPS proxy working, as in the example below using the service from https://ngrok.com:

```
hugo server -b https://ba6sdfe72.ngrok.io --appendPort=false --liveReloadPort=443 --navigateToChanged
```

Fixes #3882
2017-09-23 17:08:48 +02:00
Bjørn Erik Pedersen c31e083ead Fix the docs helper tool 2017-09-23 10:20:11 +02:00
Bjørn Erik Pedersen 9436f0b0c3 Allow the pull-docs script to pull other than master 2017-09-23 10:13:40 +02:00
Bjørn Erik Pedersen 7a89dce53b Squashed 'docs/' changes from 32356e4e..5be6fef0
5be6fef0 Fix typo, {{Content} should be {{.Content}}

git-subtree-dir: docs
git-subtree-split: 5be6fef0b0
2017-09-23 10:08:55 +02:00
Bjørn Erik Pedersen f8fd5796bb Merge commit '7a89dce53bfbd67a17442a8f9be8fa895fc4f9b1' 2017-09-23 10:08:55 +02:00
Bjørn Erik Pedersen 173b544982 commands: Remove superflous space 2017-09-22 20:05:19 +02:00
Bjørn Erik Pedersen df411ec81a commands: Rename noHttpCache to noHTTPCache 2017-09-22 17:23:15 +02:00
Bjørn Erik Pedersen 0b34af2161 Add noHttpCache to hugo server
Fixes #3897
2017-09-22 17:13:21 +02:00
Bjørn Erik Pedersen c0370e0ee3 Merge commit 'ba45da9d03056447e4873de13d4e0f8d658a769b' 2017-09-21 19:05:40 +02:00
Bjørn Erik Pedersen ba45da9d03 Squashed 'docs/' changes from 44fe0285..32356e4e
32356e4e Fix typo in header of shortcode-templates.md
c8f1a2d2 Correct code example for index template function
bfa6a55d Escape code fencing
ff8b2f99 Fix typos in deployment with wercker tutorial
557c36e8 theme: Merge commit '7fbb4bed25001182bfeb91f79db0f0c1936582ee'
7fbb4bed Squashed 'themes/gohugoioTheme/' changes from 7dd8a302..ca53082d
ce31cee0 Add "See Also" config
158cee1b Make the tags into keywords
61600be6 Add a note to the related section
49edb5a2 Relase 0.27.1
c9bbc001 releaser: Add release notes to /docs for release of 0.27.1
213c6c3b Add bugs poster
8b4590cd Add KeyCDN integration tutorial
2b277859 Add tutorial videos to several docs pages
950fef1f Update roadmap to link to the correct milestones page
496f5bf6 Rename relnotes
d6f9378d Bump Netlify versions to 0.27
087fde7f Update 0.27 release notes
603f94ae docs: Document Related Content
3790f6a3 releaser: Bump versions for release of 0.27
0948868c releaser: Add release notes to /docs for release of 0.27

git-subtree-dir: docs
git-subtree-split: 32356e4eab
2017-09-21 19:03:00 +02:00
hugoreleaser 5c3b210368 releaser: Prepare repository for 0.28-DEV
[ci skip]
2017-09-13 13:13:28 +02:00
hugoreleaser 5a4002bc89 releaser: Add release notes to /docs for release of 0.27.1
[ci skip]
2017-09-13 11:03:59 +00:00
hugoreleaser 18126434f1 releaser: Bump versions for release of 0.27.1
[ci skip]
2017-09-13 11:03:59 +00:00
hugoreleaser dda269f175 releaser: Add release notes for 0.27.1 2017-09-13 13:01:03 +02:00
Bjørn Erik Pedersen 2d613dd905 tpl/tplimpl: Fix escaped HTML Go 1.9 multioutput issue (#3880)
Fixes #3876
2017-09-13 12:32:06 +02:00
Bjørn Erik Pedersen 642ba6cab2 snap: Bump to 1.9 2017-09-13 11:25:57 +02:00
Bjørn Erik Pedersen d1d6aa6340 Remove .goxc.json
Not in use
2017-09-11 13:18:36 +02:00
hugoreleaser 0375cbd025 releaser: Prepare repository for 0.28-DEV
[ci skip]
2017-09-11 05:33:02 +00:00
hugoreleaser 01fdf6d26c releaser: Add release notes to /docs for release of 0.27
[ci skip]
2017-09-11 05:32:02 +00:00
hugoreleaser 828eb70fa6 releaser: Bump versions for release of 0.27
[ci skip]
2017-09-11 05:32:02 +00:00
Bjørn Erik Pedersen f4ea433984 Release of 0.27 2017-09-11 07:27:02 +02:00
hugoreleaser 457048634f releaser: Add release notes draft for 0.27
Rename to *-ready.md to continue. [ci skip]
2017-09-11 07:26:21 +02:00
Bjørn Erik Pedersen 1b4319be62 Squashed 'docs/' changes from 1d052b16..44fe0285
44fe0285 Fix links to JSON spec

git-subtree-dir: docs
git-subtree-split: 44fe0285a0
2017-09-10 17:27:23 +02:00
Bjørn Erik Pedersen 58245a29df docs: Merge commit '1b4319be62ba071f79e90ef32dbe92eb893429f7' 2017-09-10 17:27:23 +02:00
Bjørn Erik Pedersen d2249c5099 Set up Hugo release flow on CircleCI
This rewrites the release logic to use CircleCI 2.0 and its approve workflow in combination with the state of the release notes to determine what to do next.

Fixes #3779
2017-09-10 17:14:02 +02:00
Bjørn Erik Pedersen f4bf214137 tpl/time: Add time.Duration and time.ParseDuration template funcs
And with time.Duration with the convenient alias `duration`:

```
{{ mul 60 60 | duration "second" }}
```

Fixes #3828
2017-09-09 09:43:00 +02:00
Bjørn Erik Pedersen 0462c96a5a tpl/compare: Add cond (ternary) template func
Fixes #3860
2017-09-08 16:59:43 +02:00
Bjørn Erik Pedersen 202510fdc9 hugolib: Fix "published" front matter handling
Also related:

* support "modified" as an optional way to signal "last modified"
* make sure all relevant page dates are also added to params

Fixes #3867
2017-09-08 12:28:15 +02:00
Fiisio 573deca089 hugolib: Fix typo in aquired
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-07 16:21:33 +02:00
Bjørn Erik Pedersen eeb057f222 docs: Document Related Content
See https://github.com/gohugoio/hugo/issues/98
2017-09-06 00:20:02 +02:00
Bjørn Erik Pedersen 3b4f17bbc9 hugolib: Implement "related content"
This closes #98, even if this commit does not do full content text search.

We may revisit that problem in the future, but that deserves its own issue.

Fixes #98
2017-09-06 00:20:02 +02:00
Bjørn Erik Pedersen 7d63a23b0c Squashed 'docs/' changes from f887bd7b..1d052b16
1d052b16 Update hosting-on-netlify.md
28b96bec Remove double brackets in Netlify hosting tutorial
373ed38b Update deployment instructions from hugo > 0.20 on Netlify
1bbb41ca Generate static assets on deploy in Nanobox tutorial
816d207f Add missing backtick in templates/views.md
bf88e772 Add nanobox as a deployment option
9c37b4cc Change config's syntax order matching description
d3cb05a7 Fix wrongly named default value of publishDir
4be85c54 Add link to showcase a theme setup via config file
46837195 Init and update of submodules in .gitlab-ci.yml
9e7c2827 Add CSS lang argument to code block
85aad56e Abstract the type in the lookup order
4e1e43e9 Fix broken Pygments url
65b4e79b Correct GitLab project pipelines URL
94af72b5 Fix .Data.Terms usage in taxonomy template example
eb371e52 functions: Fix lang.NumFmt docs
a745cd6c Fix layouts' folder name in template primer
e181e637 Correct typo on GitHub pages guide (#151)
28698500 Remove HTML special chars from Windows install example
96b1f5b5 Remove not needed escape slashes in urls.md
2e05043f Add upgrade instructions using homebrew
2a14624d Fix alias in countrunes.md
5e26bb97 Update docker image for build/publish
01424887 List the internal templates
a3ef5be9 Remove string concatenation from add (math) sample
43d12b44 Fix typo
89bafa49 Change to Asciidoc URI
4e14071e Removes an extra bracket (>) in single-page-templates.md
0938e423 Fix typo in http2 server push blog
fac55121 Fix typo in deployment with rsync tutorial

git-subtree-dir: docs
git-subtree-split: 1d052b16a1
2017-09-05 18:09:40 +02:00
Bjørn Erik Pedersen 16c9127663 docs: Merge commit '7d63a23b0c68d9cd7c7c09c2755619237bc03485' 2017-09-05 18:09:40 +02:00
Bjørn Erik Pedersen f88fe312cb output: Fix taxonomy term base template lookup
To make sure it uses the base templates in _default as a last resort.

Fixes #3856
2017-09-03 11:32:26 +02:00
Bjørn Erik Pedersen d33563b5d7 release: CGO_ENABLED=0 2017-08-28 11:46:03 +02:00
Bjørn Erik Pedersen fc4a0d1704 Update Travis build to Go 1.9!
Just released: https://blog.golang.org/go1.9
2017-08-25 08:08:17 +02:00
Yihui Xie 7231d5a829 livereload: Maintain the scroll position if possible
This fixes #3824: when the current pathname is the same as the one to be loaded, just call location.reload() so that the current scroll position can be preserved, instead of assigning to location.href, which will cause the scroll position to be lost.
2017-08-22 20:26:33 +02:00
oneleaftea 88e1bca92c Update template_embedded.go
Changed disqus urls from http to https. This fixes mixed content warnings on browsers when viewing Hugo websites over SSL (https).
2017-08-22 20:26:04 +02:00
Bjørn Erik Pedersen d000cf6050 tpl: Prepare for template metrics 2017-08-19 09:57:37 +02:00
Cameron Moore 29a2da0593 tpl: Cleanup strings.TrimPrefix and TrimSuffix
These funcs were added during the move to namespaces but were
undocumented.  This commit fixes the order of the arguments and adds the
funcs to the method mapping.
2017-08-18 14:21:58 +02:00
Cameron Moore 7674ad7382 tpl: Add strings.TrimLeft and TrimRight 2017-08-18 09:12:04 +02:00
Bjørn Erik Pedersen 08f48b91d6 compare, hugolib, tpl: Add Eqer interface
And use it in `eq` and `ne` so `Page` values can be compared directly in the templates without thinking about it being a `Page` or a `PageOutput` wrapper.

Fixes #3807
2017-08-18 07:36:32 +02:00
Bjørn Erik Pedersen 2fc121ce23 appveyor: Simplify 2017-08-17 10:37:42 +02:00
Bjørn Erik Pedersen 2a2e690707 hugolib: Simplify Page.Eq 2017-08-17 09:43:39 +02:00
Bjørn Erik Pedersen a7555c5431 hugolib: Do not return error in Eq on type mismatch 2017-08-17 08:32:47 +02:00
Bjørn Erik Pedersen c265c102ae hugolib: Rename Page.Equals to Page.Eq
To get the name in line with the template func `eq`.
2017-08-16 10:01:16 +02:00
Bjørn Erik Pedersen f0f49ed9b0 hugolib: Add Page.Equals 2017-08-16 09:59:42 +02:00
Bjørn Erik Pedersen 71ae9b4533 hugolib: Rewrite replaceDivider to reduce memory allocation
```bash
name              old time/op    new time/op    delta
ReplaceDivider-4   9.76µs ±105%    7.96µs ±24%     ~     (p=0.690 n=5+5)

name              old alloc/op   new alloc/op   delta
ReplaceDivider-4    3.46kB ± 0%    1.54kB ± 0%  -55.56%  (p=0.008 n=5+5)

name              old allocs/op  new allocs/op  delta
ReplaceDivider-4      6.00 ± 0%      1.00 ± 0%  -83.33%  (p=0.008 n=5+5)
```
2017-08-14 09:42:55 +02:00
Bjørn Erik Pedersen 199816fddd hugolib: Extract replaceDivider logic
To its own function and add a test and a benchmark for it.
2017-08-14 09:42:55 +02:00
Nic Raboy 919bc9210a Add an iFrame title to the YouTube shortcode
To accommodate modern web accessibility as outlined here https://dequeuniversity.com/tips/provide-iframe-titles
2017-08-12 00:36:40 +02:00
Bjørn Erik Pedersen 07f6e1499c travis: Pull docutils out into requirements.txt 2017-08-11 18:39:04 +02:00
Bjørn Erik Pedersen e8468a9852 travis: Fix docutils setup 2017-08-11 17:23:40 +02:00
Bjørn Erik Pedersen 359af563a1 travis: Try to fix docutils setup on Linux 2017-08-11 14:21:21 +02:00
Bjørn Erik Pedersen 0019ce0024 output: Improve the base template identification
See https://discourse.gohugo.io/t/main-block-not-rendered-in-custom-archetypes-layout/7917/3
2017-08-11 09:34:31 +02:00
Bjørn Erik Pedersen 33ae10b6ad tpl/transform: Only strip p tag in markdownify if only one paragraph
Fixes #3040
2017-08-10 19:52:41 +02:00
Bjørn Erik Pedersen 2d1bd876cd Update docs versiona and README
Closes #3791
2017-08-10 17:22:32 +02:00
Bjørn Erik Pedersen ec4e6f9df2 Squashed 'docs/' content from commit f887bd7b
git-subtree-dir: docs
git-subtree-split: f887bd7b4e
2017-08-10 17:18:22 +02:00
Bjørn Erik Pedersen a1900826b9 Merge commit 'ec4e6f9df2ab9ffdc62a3f59675369096e0d3f77' as 'docs' 2017-08-10 17:18:22 +02:00
Bjørn Erik Pedersen d384c661fe docs: Re-integrate 2017-08-10 17:17:07 +02:00
Bjørn Erik Pedersen 9a2eb0f1d3 Revert "Squashed 'docs/' changes from 35abbc86..f887bd7b"
That did not go well...

This reverts commit 0373e43102.
2017-08-10 15:00:30 +02:00
Bjørn Erik Pedersen 0373e43102 Squashed 'docs/' changes from 35abbc86..f887bd7b
f887bd7b Add script to pull theme changes
e89bbb2f Update README
78155dec Merge commit '9301947b25099dd402065104b340b1a480906a74' as 'themes/gohugoioTheme'
9301947b Squashed 'themes/gohugoioTheme/' content from commit 7dd8a302
e7557a34 Remove gohugoioTheme submodule
a78bbe22 Add link to Go issue
31d1ef40 Add example for taxonomy terms with metadata
da978cc7 Fix links in Blackfriday extension documentation
950ad115 Fix reference to Blackfriday Extensions section
12d1d026 Add documentation for Blackfriday Extensions
8c2b8fb5 Fix explaination for uglyURLs config option
378aded7 Use community repository for Arch Linux installation guide
56455e7e Improve 0.26 release notes
be7db03a netlify: Build with the new 0.26
d430b2d3 Bump version to 0.26
61adaca0 releaser: Prepare repository for 0.27-DEV
abef29a6 releaser: Add release notes to /docs for release of 0.26
5937fe41 releaser: Bump versions for release of 0.26
033752f1 Merge commit 'e81208265bb3cdb7606d051a23d83aeebcb7d34d'
bec2bd12 Make the title case style guide configurable
f1739a44 Merge commit '50ec65fbe1a48475d3320775dab2c47389c02114'
a1aac0e5 helpers: Add support for French Guillemets
b8dc1592 doc: Merge commit '2c0d1ccdcd95de0bddeb39dca2e4d08f0d8056d7'
7b3e31b8 Merge commit '6dbde8d731f221b027c0c60b772ba82dad759943'
a37e7201 Bump versions to 0.26-DEV

git-subtree-dir: docs
git-subtree-split: f887bd7b4e
2017-08-10 14:58:09 +02:00
Bjørn Erik Pedersen ea2cc26b39 Remove the theme submodule from /docs
See #3791
2017-08-10 14:54:19 +02:00
Johan Gielstra 0f9f73cce5 Add support for multiple config files via --config a.toml,b.toml,c.toml 2017-08-09 20:13:02 +02:00
Daniel Karlsson c8257f8b72 Render task list item inside label for correct accessibility
Fixes #3303
2017-08-09 20:09:43 +02:00
Matthieu Harlé 0abdeeef67 source: Normalize UniqueID between Windows & Linux 2017-08-09 19:35:40 +02:00
Bjørn Erik Pedersen e2f8664ef4 hugolib: More spelling 2017-08-08 10:54:35 +02:00
Bjørn Erik Pedersen 46ac745374 all: Fix spelling
And some other minor issues.
2017-08-07 20:19:24 +02:00
Bjørn Erik Pedersen 4b54fb0701 all: gofmt -s 2017-08-07 20:03:15 +02:00
Bjørn Erik Pedersen 40d7d3baa8 releaser: Prepare repository for 0.27-DEV
[ci skip]
2017-08-07 09:13:50 +02:00
Bjørn Erik Pedersen f090c2711c releaser: Add release notes to /docs for release of 0.26
[ci skip]
2017-08-07 09:09:19 +02:00
Bjørn Erik Pedersen b36f6e31e0 releaser: Bump versions for release of 0.26
[ci skip]
2017-08-07 09:05:07 +02:00
Bjørn Erik Pedersen 0f51e49269 releaser: Add release notes draft for 0.26 2017-08-07 09:02:04 +02:00
Bjørn Erik Pedersen 62583db503 vendor: Update checksum for inflect
Yes, I double checked.
2017-08-07 09:00:04 +02:00
Bjørn Erik Pedersen 0d495d5373 releaser: Update to new release notes location 2017-08-07 08:54:40 +02:00
Bjørn Erik Pedersen 22b213b1a4 Merge commit 'e81208265bb3cdb7606d051a23d83aeebcb7d34d' 2017-08-06 17:24:51 +02:00
Bjørn Erik Pedersen e81208265b Squashed 'docs/' changes from ef02e34e..35abbc86
35abbc86 Add example with taxonomy for title template func
85e28c10 Remove comment from variable in front matter example
eee8543b Remove comment from variable in front matter example
13a8e0b7 Add missing closing and opening comment tags
83531772 Replace http://example.{com,org}/ with https://example.{com,org}/
6727d820 Update gh repo for issues in config
3a58818e Add note to install Testify
19f13e61 Fix YAML examples in taxonomies.md
dc4b90db Replace old RSS template with new embedded version (#116)
00f39bd7 camelCase output format options
902a14a1 Add missing word to pretty URLs explanation

git-subtree-dir: docs
git-subtree-split: 35abbc8691
2017-08-06 17:24:51 +02:00
Bjørn Erik Pedersen 11e5d456e8 releaser: Include stats from hugoDocs
Fixes #3727
2017-08-06 11:18:19 +02:00
Bjørn Erik Pedersen f768c27f0d helpers: Remove some unused funcs 2017-08-03 15:59:10 +02:00
Jorin Vogel 81c13171a9 Add some missing doc comments
As pointed out by the linter, some exported functions and types are
missing doc comments.
The linter warnings have been reduced from 194 to 116.
Not all missing comments have been added in this commit though.
2017-08-03 15:57:51 +02:00
Bjørn Erik Pedersen 9891c0fb0e Remove sourceRelativeLinks
Fixes #3766
2017-08-02 22:04:38 +02:00
Abdullah Diab 481924b34d helpers: Fix broken TaskList in Markdown
As per the referenced issue, if the task list in Markdown has
nothing before it, it will be rendered wrongly:

```
---
title: "My First Post"
date: 2017-07-29T20:21:57+02:00
draft: true
---

* [ ] TaskList

```

is rendered as:

```
<ul> class="task-list"
<li><input type="checkbox" disabled class="task-list-item"> TaskList</li>
</ul>
```

The problem lies in the `List` function of `HugoHTMLRenderer`, it had
a hardocded index of `4` for the first `>` of the list, it is used to
insert the class into the text before the closing bracket, but that
hardcoded index is only right when there is a newline before the
opening bracket, which is the case when there is anything in the
document before the task list, but if there is nothing, then there is
no newline, and the correct index of the first `>` will be `3`.

To fix that we're changing the hardcoded index to be dynamic by using
`bytes.Index` to find it properly. We're also adding a test case to
make sure this is tested against.

Fixes #3710
2017-08-02 00:33:37 +02:00
Jorin Vogel 09907d36af Switch from fork bep/inflect to markbates/inflect
Original package has received updates the fork hasn't.
Without fork updates are easier to maintain.
2017-08-01 13:05:09 +02:00
Bjørn Erik Pedersen 8fb594bfb0 Make the title case style guide configurable
This works for the `title` func and the other places where Hugo makes title case.

* AP style (new default)
* Chicago style
* Go style (what we have today)

Fixes #989
2017-07-31 22:16:46 +02:00
Jorin Vogel 9b4170ce76 Remove unused dependencies from vendor.json 2017-07-31 21:04:37 +02:00
Bjørn Erik Pedersen 6acbe41f0a media: Add missing JSON tags to Type
See https://github.com/gohugoio/hugoDocs/issues/114
2017-07-31 16:53:13 +02:00
Bjørn Erik Pedersen e321306c68 media: Add JSON tags to Type
See https://github.com/gohugoio/hugoDocs/issues/114
2017-07-31 16:41:10 +02:00
Bjørn Erik Pedersen 9c1977872c output: Add JSON tags to Format
See https://github.com/gohugoio/hugoDocs/issues/114
2017-07-31 16:38:02 +02:00
Bjørn Erik Pedersen 50ec65fbe1 Squashed 'docs/' changes from 73f355ce..ef02e34e
ef02e34e Correct the mmark example frontmatter parameter
6e91e900 SectionPagesMenu > sectionPagesMenu
1a0db1a6 Adjust sectionPagesMenu
f9f87d9d Fix extension's missing period.
7062ae07 Remove Press and Articles page
771f2b38 Remove outdated and redudant content file for release notes
64cf47c3 Remove outdated note in docs contribution guide
bdb11b89 Fix typo
8324af70 Fixes broken link on Roadmap
d93f0992 functions: Add all missing binary comparison operators
fb7ae80a Fix typo in usage.md
fbdae08b Fix typo in content-management/taxonomies.md
66fab8d2 Make <title> less stuttery
b3cd4c22 Remove old temp release notes
5589ba96 Fix typos in templates/lists.md
af3a0807 http > HTTP
b2af90ae Remove formatting in description of blog article
6e2e60a9 Add blog article about Netlify files
0bb6f2f2 Use title in archetype file
7b2490ff Get the Archetypes up to new spec
f401d69b Load CSS and JS via HTTP/2 server push
4aef4944 Adjust titles
362acdb2 Fix typo in quickstart
c2440560 Remove inline icons from installation guide
d2edcbc3 Revert "Fix links to Disqus template documentation"
622f49cf Add a full commands section at the quick start end
752f065b Fix server command in README
93e08e19 Fix links to Disqus template documentation
5e0cfaa9 Adjust Linux install
d51397c2 Fix broken link in Quick Start
1fb39846 Add /quickstart alias to quickstart
7440616b Add new and simpler quickstart
b3ec6986 Let page title correspond to function name replaceRE
b44499c9 Add YouTube tutorial about taxonomies
88b9eb0e Add RSS templates example
6c0bde3f Update slice.md
6c212ea6 Reorder to match the following content order
d2122992 Complete "content" spelling under theme components
e4824eb3 Fix the output shortcode and its usage
0adfc945 Add archetypes YouTube video
638e9d9b Fix double "your" typo in taxonomies.md

git-subtree-dir: docs
git-subtree-split: ef02e34eaf
2017-07-31 09:21:24 +02:00
Bjørn Erik Pedersen 1c18f3fc49 Merge commit '50ec65fbe1a48475d3320775dab2c47389c02114' 2017-07-31 09:21:24 +02:00
Bjørn Erik Pedersen cb9dfc2613 helpers: Add support for French Guillemets
Fixes #3725
2017-07-29 10:10:40 +02:00
Bjørn Erik Pedersen c4a0b6e8ab vendor: Add support for French Guillemets
Fixes #3725
2017-07-28 19:59:58 +02:00
Bjørn Erik Pedersen a8080c084f Remove CODEOWNERS
To prevent GitHub starting premature code reviews.

See #3737
2017-07-28 19:34:51 +02:00
Anthony Fok 84710eb3ec Add -u flag for go get govendor in CONTRIBUTING.md
This to to ensure the reader is not stuck with a stale version
of govendor where `govendor get` may not actually build/install
the final hugo binary.

See kardianos/govendor#330
2017-07-28 09:18:20 -06:00
Anthony Fok 555a9bc806 tpl: Accommodate gccgo in TestMethodToName
Fixes #3744
2017-07-28 08:03:15 +02:00
Cameron Moore 55d0b89417 tpl/collections: Fix intersect on []interface{} handling
Fixes #3718
2017-07-28 07:21:21 +02:00
Max Rydahl Andersen aee2b06780 Add --debug option to be improved on over time
Why:

 * first time using hugo I got very little info from --verbose output
   but I noticed there is quite a lot of useful DEBUG logging
 * asked for in other issues like https://github.com/gohugoio/hugo/issues/3514

This change addreses the need by:

 * adding a simple --debug flag which simply turns on debug level in stdout
   and logoutput if enabled.
2017-07-27 22:36:22 +02:00
Anthony Fok c1a5da9777 vendor: Update dependencies for 0.26-DEV 2017-07-27 13:45:43 -06:00
Anthony Fok 9ed48c1c9a Dockerfile: Run go install with -ldflags '-s -w'
This reduce the Docker image size from 27 MB to 20.5 MB.
2017-07-26 03:22:39 -06:00
Maik Ellerbrock bfe0bfbbd1 Dockerfile: Reduce image size from 277MB to 27MB
"xtrem" awesome container size optimization
by using alpine:3.6 as base image
and by installing Go at build time.

See #3730 and #3738
2017-07-26 00:51:27 -06:00
Maik Ellerbrock 606d6a8c91 Dockerfile: Optimize Docker image size
Reduce Docker image size from 428 MB to 277 MB.

See #3674
2017-07-23 12:30:18 -06:00
Bjørn Erik Pedersen 12e0495203 docs: Add RSS template lookup example 2017-07-22 15:05:43 +02:00
Jake Howard 6cd33f6953 tpl: Use hash for cache key
Use a hash for the cache key, to fix 'file name too long' errors when retreiving from long urls

Fixes #3690
2017-07-21 13:10:11 +02:00
Bjørn Erik Pedersen dbe63970e0 hugolib: Support reflinks starting with a slash
Fixes #3703
2017-07-21 13:08:32 +02:00
Anthony Fok 0c90e6d710 Change "hugodocs" to "hugoDocs" to match GitHub's default URL 2017-07-21 03:36:44 -06:00
Vasyl Solovei b60aa1a504 helpers: Add --trace to asciidoctor args
This will help to understand and fix errors by
seeing stacktrace of an error.

See #3714
2017-07-21 03:07:56 -06:00
Bjørn Erik Pedersen ff433f9813 Add script to pull in docs changes 2017-07-21 11:01:13 +02:00
Bjørn Erik Pedersen 2c0d1ccdcd Squashed 'docs/' changes from b0470688..73f355ce
73f355ce Update theme
83ff50c2 Use example.com in examples
71292134 Add alias news > release-notes
2e15f642 Update theme
8eef09d2 Add Pygments configuration
572b9e75 Clean up the code shortcode use
a1b2fd3b Remove the code fence language codes
1473b1d9 Remove redundant text
b92c2042 Update theme
8f439c28 Edit contributing section in README
8bcf8a19 Add contributing section to README
4c44ee1c Fix broken content file
2bdc7710 Clarify .Data.Pages sorting in lists.md
092271c2 Use infinitive mood for main titles
b9b8abef Update theme to reflect change to home page content
b897b71b Change copy to use sentence case
fd675ee5 Enable RSS feed for sections
060a5e27 Correct movie title in taxonomies.md
6a5ca96a Update displayed site name for Hub
22f4b7a4 Add example of starting up the local server
d9612cb3 Update theme
a8c3988a Update theme
4198189d Update theme
12d6b016 Update theme
2b1c4197 Update theme
b6d90a1e Fix News release titles
cfe751db Add some build info to README

git-subtree-dir: docs
git-subtree-split: 73f355ce0d
2017-07-21 11:00:08 +02:00
Bjørn Erik Pedersen f387cb1b38 doc: Merge commit '2c0d1ccdcd95de0bddeb39dca2e4d08f0d8056d7' 2017-07-21 11:00:08 +02:00
Michael Henderson 40566ec98e Remove ^M from file to make line-endings consistent 2017-07-21 02:41:07 -06:00
digitalcraftsman 7759a98f71 Clarify the repo choice in the contribution guidelines 2017-07-19 20:53:27 +02:00
digitalcraftsman 720786cd3e Add note about doc-related pull requests in contribution guide 2017-07-18 21:49:16 +02:00
Bjørn Erik Pedersen 214e16eca3 appveyor: Update submodules
Needed for the new docs to build.
2017-07-18 13:08:48 +02:00
Bjørn Erik Pedersen a2fb8150c3 Add some README info about the docs repo 2017-07-18 10:50:59 +02:00
Bjørn Erik Pedersen 73273d4e81 Add the docs theme to .gitmodules
See #3713
2017-07-18 10:44:02 +02:00
Bjørn Erik Pedersen 4c220c4ac2 Merge commit '6dbde8d731f221b027c0c60b772ba82dad759943'
Fixes #3709
2017-07-18 10:33:58 +02:00
Bjørn Erik Pedersen 6dbde8d731 Squashed 'docs/' changes from f3c88b08..b0470688
b0470688 Use infinitive mood for titles
96066d1b Update theme to fix JS error
8d500e7d Fix dead key typo in v0.25 release notes
3f6bd838 Add site image for Twitter card
52adf3c9 Fix union description
b1238c98 Document Pages support in union and intersect
14beb0ec Add some more missing aliases
2baad4b3 Add missing functions alias
d3603ef9 Adjust GetPage doc
adeca9f0 Remove unused file
4b0d3393 Regenerate commands doc
436f2a36 Improve Netlify config
94bf0abf Remove tags from menu
2c257180 Add production config
b779fdc8 Remove unused files
fac13f4f Copy edits variables
92726cf0 Copy edits themes and tools
6a058168 Templates copy edits
8cdaa2b6 Update theme
61203de8 Some minor edits of the getting started section
43c935a8 Copy editing of the template func documentation
972f8ba2 Update theme
b9bdfd40 Prefix methods with a "."
4e0bca2b Remove the needsexamples construct
4ac6e828 Update content references to new gohugoio org
646112a2 More copy edits
c6bf314d Update theme
2d75e090 Content fix
ef0564e2 Update theme
6994ef2c Content fix
48c2b9f4 Fix broken links
94806d0c Update theme
29ba55bf Some more copy edits
2a657165 Set unix func to draft
90ba82b4 Update theme
183472a6 Do some copy editing
87db4be7 Remove the tags config for now
52deebf6 next: Cleanup after the big merge
6b07427f next: Final step of merge
45f33bf6 Merge branch 'reword' of hugo-docs-concept into next
f00e68e7 Add release notes for v0.20 - 0.25.1
86c3ac1b Add fREW Schmidt's articles to news
a518ccb9 Fix baseurl
cea93ebe Update archetypes documentation for v0.24
469e504c Explain use of disableKinds to remove default taxonomy
73d616c5 Remove category taxonomy from site config
813a0cb0 Add time to int example for time function
58da4d9e Clean up link formatting on lookup order page
52aedacd Add admonition note to getenv function
9305be17 Make minor tweaks to docs on generated dirs in Directory Structure
ed98ef4e Update dir structure and remove old YT video from Quick Start
240f675f Change baseurl to empty string to fix CSS in dev URL
a4400e8a Remove all temp landing page templating and content
af940ab5 Add temporary tax and terms templates for Announcement page
5c383297 Add temporary Hugodocs.info site migration page
5004ef61 Update output of "hugo help" on Basic Usage page
6df80224 Add CentOS to Install Hugo page
2cef2175 Tweak marketing "copy" for custom outputs on homepage features
ed40185e Clean up language a bit around Configuring RSS entries
0671aed5 Add regenerated docs.json
1b7044b2 Add LICENSE file
578d7978 Release of v0.25.1
e6c38585 Merge branch 'tmp'
e01df481 releaser: Prepare repository for 0.25-DEV
6f462739 releaser: Add release notes to /docs for release of 0.25.1
91a4d55f releaser: Bump versions for release of 0.25.1
d0ee1e45 Add jonbeebe.net to the showcase
a4b499fb Add Hugo/Unix/Vim integration post to press section
ec4cae94 Fix link for pull requests in press.md
c37ea39a releaser: Prepare repository for 0.26-DEV
d89da99d releaser: Add release notes to /docs for release of 0.25
2b11466e releaser: Bump versions for release of 0.25
a8096ce4 docs: Regenerate the docs helpers
d68eaeeb docs: Regenerate commands doc
1c8fff5d docs: Merge docs commit '37c69054e294bf554be03cf7e4c01e1f586e6943'
2afe0747 tpl/math: Add log function
ab4e5da8 Merge commit 'dd78d5b23fe597f4461aa4199401b4e07c0612e2' as 'docs'
31393f60 Remove the docs submodule
aff1ac32 commands: Use example.com as homepage for new theme
b463c5ad releaser: Remove trailing space in fixes list
1a041522 releaser: One more fix
3aade089 releaser: Improve docs submodule handling
0e1bda34 vendor: Fix +-timezones in TOML
2e4ccd3d create: Preserve shortcodes in archetype templates
fd924d18 commands: Create default archetype on new site
e908d955 create: Fix archetype regression when no archetype file
8b620f7a docs: Update
12611e0c Update docs
58ce9213 releaser: Fix typo, change "relase" to "release"
ae3039b6 Update docs
3554fd12 releaser: Prepare repository for 0.25-DEV
1ac4dbb9 releaser: Update /docs to 0.24 [ci skip]
8f69fe57 releaser: Bump versions for release of 0.24
f8c5716a releaser: Update /docs [ci skip]
2ba9a876 releaser: Add release notes draft for 0.24
b7f8d057 Add numfmt to functions list
976c398f Add numfmt to functions list
c43b512b output: Identify extension-less text types as text
19f2e729 Support non-md files as archetype files
0f40e1fa media, hugolib: Support extension-less media types
516e6c6d hugolib: Add disableAliases
175eb008 Take the first crack at some copy for custom output types
176c35d4 Update theme to include theme PR gohugoio/gohugoioTheme#37
3ac3539f Fix typo on output formats
3183b9a2 parser: Fix handling of quoted brackets in JSON front matter
1a282ee4 vendor: Update Viper
fb53987a hugolib: Fix error handling for JSON front matter
6e3bd702 Update theme to reflect NAV changes
662e12f3 commands, create: Add .Site to the archetype templates
422057f6 create: Use archetype template as-is as a Go template
acd7ffdf config.toml: Update links for GH org and forum
4aa12390 Update links to new discuss URL
d78c5b4d Replace all instances of discuss.gohugo.io with new discourse.gohugo.io URL
e731a7aa Fix heading typo for Windows 10 users in install instructions
4231fd69 Update all relevant instances of spf13 to gohugoio in install instructions
411ac930 vendor: Update deps
4345026b releaser: Add TODO
deffb4c3 releaser: Prepare repository for 0.24-DEV
12b844da releaser: Update /docs to 0.23 [ci skip]
b502b9d8 releaser: Bump versions for release of 0.23
781a1539 releaser: Update /docs [ci skip]
af85eb62 releaser: Adjust
882b2b61 releaser: Add release notes draft for 0.23
00e2fe07 releaser: Adapt release logic to docs submodule
d4e8ea3e Move the theme to the new org
481850c9 Add STOQE's tweet
186eacbe Update tweets through mid-June
ccb8300d Update logo link in README
214dbdfb Remove docs building from CI builds
729be807 commands: Adjust docs path
6cee0dfe Add docs as submodule
8be3934b docs: Remove
fbb25014 Update Gitter link in README
bf5e5995 vendor: Update to new org name
86543d6a Change Windows build badge link, take #3
3b47805f Change Windows build badge link, take #2
e6ae32a0 Update Windows build link
5103935a hugolib: Disable shaky leaktest on CI
95386544 Update links in CONTRIBUTING.md due to the org transition
7b99fb9f Update source path in Dockerfile due to the org transition
d531d17b Update clone folder in appveyor.yml due to the org transition
9266bf9d Update import path in snapcraft.yaml due to the org transition
873a6f18 Run gofmt to get imports in line vs gohugoio/hugo
f503d76a Update Makefile vs gohugoio/hugo
93643860 Update README to point to gohugoio/hugo
db46bcf8 examples: Update examples to point to gohugoio/hugo
66d4850b  docs: Update layout references to gohugoio/hugo
715ff1f8 docs: Update content references to gohugoio/hugo
c17ad675 all: Update textual references in Go source to point to gohugoio/hugo
d8717cd4 all: Update import paths to gohugoio/hugo
2d08a296 vendor: Improve GitInfo
a9e551a1 Fix handling of duplicate footnotes
2aafb247 Revert "releaser: Bump versions for release of 0.22.1"
4bd5ce7e releaser: Prepare repository for 0.23-DEV
0f78dd06 releaser: Prepare repository for 0.22.1-DEV
714594a8 releaser: Add relase notes to /docs for release of 0.22.1
dce70fb7 releaser: Bump versions for release of 0.22.1
c84079ba releaser: Add release notes draft for 0.22.1
a30023f5 hugolib: Fix section logic for root folders with subfolders
1f26420d hugolib: Support sub-sections in permalink settings
ff54b6bd commands: Adjust rlimit to 64000
629e1439 commands: Make error on setting rlimit a warning only
26aa06a3 Revert "commands: Remove the rlimit tweaking on macOS"
52a0cea6 docs: Add note on updates for rpm-based distros
8ca586a6 releaser: Prepare repository for 0.23-DEV
e797a94d releaser: Add relase notes to /docs for release of 0.22
21cf464c releaser: Bump versions for release of 0.22
fb5cac70 releaser: Spelling
63311a14 releaser: Add release notes draft for release of 0.22
0f8f5141 docs: Rewrite “Archetypes” article
8744e6d0 Add noindex to alias explanation
39408925 docs: change .Site to $.Site where the global context is masked by the term's context
208d1646 Add additional reference to layout front matter
e47b74d8 Add information about layout front matter variable
00d63215 docs: Use single link element for RSS in example
f1da5a15 hugolib: Make the RSS feed use the date for the node it represents
d5ab7f08 Add noindex tag to HTML generated by Hugo Aliases
55dd533b hugolib: Unexport some internal methods
b82cd82f tpl/collections: Add uint support to In
204c3a9e tpl/collections: Support interfaces in union
fe901b81 hugolib, commands: Improve live-reload on directory structure changes
b3968939 hugolib: Enable nested sections
bef50485 Revert "hugolib: Fix live-reload regression for add/removal of dirs"
49a10430 hugolib: Fix live-reload regression for add/removal of dirs
5be04486 hugolib: Fix disablePathToLower regression
1f55cb76 hugolib: Simplify some test loops
8aaec644 hugolib: Add test for no 404 in sitemap
55c53ae9 docs: Add thislittleduck.com to the showcase
44e6279d Move archetypes from Bud's theme to project dir
d05edb0f Move all shortcodes out of theme and into project dir
5ba50897 Add more tweets
9ccb82fa Add functions file for uniq
e28d9aa4 tpl: Add uniq function
92bb618c Add new tweets through June 3
9412e0b0 Remove Duoshuo from list of commenting services
46b46078 hugolib: Remove some superflous TODO comments
2c2ce33a parser: Add horizontal YAML tags to benchmark
adc0572d docs: Add Nutspubcrawl.com to the showcase
0907a5c1 all: Temporarily revert to BurntSushi for TOML front matter handling
3d9c4f51 parser: Add BenchmarkFrontmatterTags
250ebc1d hugolib: Add some more tags to benchmark
b37d9594 hugolib: Bump leaktest timeout to 30 seconds
4e00bb7f Write CPU and mem profiles from site benchmark script
fdcfcced hugolib: Fix tag calculation in benchmark test
4d0b6653 Fix typo on Hawksworth's tweet for homepage
bdacc320 Move tweet data file to project dir from theme
c940f08f Remove duplicate custom output pages
59c1bdc5 Move custom outputs from CM to templates section
0e363fe7 Remove theme-showcase.md => removing from global nav as well
213ea749 hugolib: Add number of tags as a benchmark know
08a10e5d hubolib: Make the site benchmark output more compact
d83c53a8 Replace "Github" with "GitHub"
9fa71c94 hubolib: Add 10k pages as a benchmark variant
d25d89e6 hugolib: Increase leaktest timeout
89697019 hugolib: Break early from sitemap disabled check
69d92dc4 hugolib: Respect disableKinds=["sitemap"]
d74452cf Add benchSite.sh
978951cf vendor: Update go-toml
00ea027e Clean up shortcode description on homepage and remove extra "to"
f96df8f2 Remove outdated developer tools
f2ede42a Make minor tweaks to home page and news layout
4aff2b6e source: Cache language config
2342df4d hugolib: Add TOML/YAML switch to benchmark
828427ef hugolib: Adjust timeout for leaktest
ce624cc7 hugolib: Add slightly more realistic tag distribution to benchmark
8930e259 hugolib: Add site building benchmarks
8c53afdb Move assets used in content files into images/ subfolder
0d9ce481 Add _headers file for cross-origin issues with SVGs
fede945d Add home page to hugoDocs
f4c1efc6 Make assets used in content files theme independent
710300cb docs: Update overview/usage
93cab620 Update snapcraft.yaml
b68758a9 Update _index.md to show more intuitive link titles
7fd64f19 Merge bp/theme-design branch containing Bud Parr's new design
19de4476 hubolib: Remove the regular page restriction from .Site.GetPage
37e37877 docs: Fix parameter name in YouTube shortcode section
b5b41c44 hugolib: Refine allKindsInPages
bde807bd travis: Update Go versions
612f6e3a hugolib: Fix ref/relref issue with duplicate base filenames
50d11138 hugolib: Add a cache to GetPage
e0c2e798 hugolib: Support regular pages in .Site.GetPage
87203139 cache: Add a simple partitioned lazy cache
ccf1fcb0 Remove single.html references from homepage template
a91c2705 docs: Add furqansoftware.com to the showcase
99412bfe docs: Delete `brew update` from docs
f4d9612e Update console message in sample code for brew installation
2e693d1e Remove "brew update" from install page
801ab9f5 Remove "brew update" from install page
421a4694 cmd: Replace flagChanged with pflag.FlagSet.Changed
0a40cb43 docs: Add tutswiki.com to the showcase
d460159a docs: Regenerate commands docs
8b49c3a1 hugolib: Enable leaktest
bcd32f10 commands: Remove the rlimit tweaking on macOS
62fe640d vendor: Update libs
fbb78b89 hugolib: Speed up GetPage
6c560288 hugolib: Add BenchmarkGetPage
89b85aed releaser: Disable flaky test
4113693a tpl/cast: Handle template.HTML and friends in ToInt
f41f7282 Remove Unmaintaned Frontends from Tools.
8ddc7a5c releaser: Prepare repository for 0.22-DEV
f63ee656 releaser: Add relase notes to /docs for release of 0.21
1a965e5d releaser: Bump versions for release of 0.21
baa414ae releaser: Add a new step
cdf32f08 releaser: Update ldflags
98e333b3 vendor: Update golang.org/x/sys/unix
a0096213 releaser: Add release notes draft for 0.21
a119ef69 tpl/time: Re-add the time example
1f9e8dcc tpl: Make the Namespace func signature explicit
ebd636e4 releaser: Delay the version bumping
4d1989d5 releaser: Fix tag detection for changelog when doing a main release
a59525b0 tpl/time: Remove asTime template func mapping
3954160a tpl/time: Support overlapping namespace and template func
93c5774d tpl/collections: Make IsSet WARNING less chatty
77d2fe78 docs: Add ttsreader.com to the showcase
405c2f68 tpl/images: Fix error handling in Config
00945628 Remove showcase
58d4c25e tpl/collections: Use Feedback log instead of Error in IsSet
38661c17 tpl/collections: Log an error on unsupported types in IsSet
42fbded1 docs: Regenerate docs helper
10287263 output: Fix output format mixup in example
27e88154 docs: Fix incorrect path in templates/list
f1c29b01 tpl/collections: Add support for interfaces to intersect
93b3b138 tpl/lang: Add NumFmt function
e92ce83d docs: Update references to JSON
4c427f6a docs: Fix minor grammar issue in shortcodes.md
e682fcc6 hugolib: Fix RSSLink vs RSS Output Format
b6ea492b tmplimpl: Add support for ellipsed paginator
6e2f2dd8 hugolib: Fix output formats override when no outputs definition given
ac57a388 Add more 2017 tweets for homepage
765fd441 Remove GH buttons to test performance change
ef8ed989 Add back CRP for speed tests
94b5be67 commands: Skip .git directories
c7646551 Dockerfile: Remove ENTRYPOINT
af72db80 hugolib: Handle shortcode per output format
e951d657 hugolib: Handle any errors in processShortcodes
2bcbf104 hugolib: Prepare render per output format
1e4d082c hubolib: Refactor site rendering with an "output format context"
1d70aa98 docs: Add carnivorousplants.co.uk to the showcase
6fc7337a docs: Add worldtowriters.com to the showcase
ddaf6941 docs: Add ocul.on.ca/topomaps to the showcase
a28fbca6 docs: Fixed incorrect specification of directory structure
544f0a63 hugolib: The deprecated Extension, Now and TargetPath will now ERROR
5794a265 commands, hugolib: Deprecate disable404, disableRSS, disableSitemap, disableRobotsTXT
5d6d5221 Add anchor titles to all links on partial templates page
c022b4bb Add more links to partial templates page
ebf677a5 hubolib: Embed Page in WeightedPage
58d9cbd3 hugolib: Improve shortcode error message
7d399904 helpers: Don't clean the path before Join
9b202862 commands: Use paths from PathSpec for walker
c9976155 docs: Fix bash command in tutorials/github-pages-blog
9b5fac0b Fix menu for "What is Hugo" page
9b080dc6 helpers: Don't clean path twice
231c0a7e docs: Fix typo in templates/functions.md
5575ed44 docs: Update datafiles.md
42f4ce15 hugolib: Add default config for ignoreFiles
14555f13 Fix broken link on templates/introduction page
cff2f313 tpl: Add some GoDoc info to template func docs
f9e41f64 releaser: Push the tag before goreleaser is run
8f2ab5f4 i18n: Simplify code for detecting of untranslated id
cce49997 i18n: Add tests
3dd949d9 tpl/urls: Make urlize return a string
a40d1f6e i18n: Improve the detection of untranslated string
9c17fcb4 Update slug translation in multilingual.md
635b3bb4 docs: Add documentation on slug translation
08c0de5c tpl/data: Clean up data namespace
1cf2f3dc tpl/data: Move cache logic to separate file
5f095c27 tpl/data: Shorten some internal func names
f604076d tpl/images: Fix embedded sync.Mutex
f69df916 tpl: Add basic tests for all namespace init funcs
690b0f8f tpl: Add docshelper for template funcs
e2b067f0 tpl/partials: Remouve unused method
0e226042 tpl: Fix the remaining template funcs namespace issues
4714085a  tpl/urls: Make it a package that stands on its own
55f90a3a tpl/transform: Make it a package that stands on its own
ee5aa84f tpl/time: Make it a package that stands on its own
4a346346 tpl/safe: Make it a package that stands on its own
b958c0c1 tpl/os: Make it a package that stands on its own
fc77b630 tpl/inflect: Make it a package that stands on its own
a432c90a tpl/images: Make it a package that stands on its own
9aee8ace tpl/encoding: Make it a package that stands on its own
744dccbe tpl/crypto: Make it a package that stands on its own
8a49c0b3 tpl/collections: Make it a package that stands on its own
a3bf118e tpl/compare: Make it a package that stands on its own
65615573 tpl/data: Make it a package that stands on its own
0ab23eb5 tpl/strings: Make it a package that stands on its own
eefa0703 tpl/math: Make it a package that stands on its own
c5373efc tpl: Add TemplateFuncsNamespaceRegistry
8f95172c releaser: Disable shaky test
f4857661 Add txtpen to the Commenting Alternatives section
906ad232 Change temporarily ghdocsrepo field in site config
c616ade9 Add logic and operators tags to where.md for better discoverability
044b2389 Add regex101.com reference to both RE functions
c2a5952f Add regex101.com reference to both RE functions
8b94418e Add link to regex101.com for replace/find RE
71471f13 Remove opinionated code blocks (Third round)
bc9a6491 Clean up code block for ids and classes (Second round)
e4336f06 Fix minor typos in "where" function page
8e151a93 Clean up all list templating samples
abe797c9 Clean up code block (First round)
4b637ac0 docs: Replace cdn.mathjax.org with cdnjs.cloudflare.com
b6dc570c Update MathJax official CDN and respective code block
de7c32a1 tpl: Add template function namespaces
154e18dd Render 404 in default language only
565a78b1 netlify: Add some security headers
355736ec livereload: Fix data race in close
86f36c38 Comment out path frontM override in cm-organization page temporarily
93a447c5 docs: Fix typos
eaf75a18 vendor: Update cobra and pflag
8d0917af hubolib: Narrow a test assertion
718c0e14 releaser: Fix broken test build
d6957c19 releaser: Skip Git test on Travis
a695202f release: Add relase notes for 0.20.6
fea4fd86 hugolib: Avoid index.md in /index/index.html
656f8188 docs: Regenerate commands docs
f0f69d03 commands: Make first letter of flags' usage lowercase
8fbec599 vendor: Update cobra and pflag
d163576c Add blank content file for new numFormat function
e55399f5 releaser: Fix some of the fpm fields for deb
5ad2f176 hugolib: Make missing GitInfo a WARNING
202fa954 Update custom output formats description to mention extensiblity
0c435aaa Update description for output formats
162d3a58 docs: Add notes about some output format behaviour
fd5109b6 releaser: Fix ldflags setting
88d81110 docs: Remove temp release notes
4ac60e4c docs: Add relase notes for 0.20.5
b332d93e docs: Add a time to 0.20.4 release docs
b096a10f releaser: Add relase notes for release of 0.20.4
24be139c Add -linkmode external
3e0f1ad7 Set extldflags to static when building
0bd0593a releaser: Add relase notes to /docs for release of 0.20.3
c6e4aff1 release: Adjust release notes for 0.20.3
c0f491ab releaser: Add relase notes draft for release of 0.20.3
67746f36 releaser: Fix a Go vet complaint
7f6430d8 Automate the Hugo release process
0e87b18b hugolib: Fix handling of zero-length files
e98f885b hugolib: Prevent decoding pageParam in common cases
6498d73c helpers: Delete RenderingContext.getConfig
b5b6e81c hugolib: Ignore non-source files on partial rebuild
90d3fbf1 tplimpl: Add translation links to the default sitemap template
5f3ad1c3 commands: Import Octopress image tag in Jekyll importer
8cd3ea56 Fix check-vendor logic in Makefile
9c72fa36 Move lookup order section within lookup order page
8fb94fa4 Add note on Golang regexp library to findRE and replaceRE funcs
6aaf47be Remove the pesky .DS_store from the site and improve .gitignore
1b867649 Correct typo in cm-types page
e63c2fb1 Remove extra parentheses in GetPage function example
21ebf481 Remove extra parentheses in GetPage function example
d3041306 Clean up links in RSS templates
79355410 Remove check-vendor from make check
d6818f23 vendor: Fix go-toml
592e055f Add check-vendor target to Makefile
e97837f6 Fix typo in Format function
4a2148e2 Clean up list ordering and grouping; add ref to Format func
c67f09b2 Update signature for len function
999ba8d4 Add len to functions list with examples
246bb068 Fix heading structure for newest releases
6cba8ff7 Fix minor typos in Release Notes
2d1854f7 Add 20+ Release Notes
b1ce0d98 Fix .Date.Pages typos across the board
f7fae4b1 Fix .Date.Pages typos across the board
ab692e73 hugolib: Log WARNING only on unknown /data files
7cdc244a docs: Add txtpen as alternative commenting service
ed0c3ec4 Fix .Data.Pages range in sample
b5e32eb6 docs: Fix .Data.Pages range in sample
66ec6305 docs: Add 0.20.2 release notes
1cf29200 tplimpl: Allow text partials in HTML templates
fcca2cad Clean up single page and list template explanations further
318a75ec Update homepage terminal to govendor install instructions
74da85ed Fix small typographical errors in shortcode templating page
d557ca80 Explain use of .Params in shortcode templating
807f4519 Make small typographical tweaks to homepage template
8f70189a Fix typographical errors in lists.md
e8457556 Beef up explanation of _index.md in homepage content
452bd58a Add admonition note to GitHub hosting
9ed90b70 Add more in-page references to date-related page vars
0fff8177 Propose archetype usage for summary divider in content-management/summaries.md
8aaa5e17 Fix typo in content-management/types.md
26f87754 Fix broken link in toc.md to page variables
c5e2fa22 Fix link in cm-cross references
83fba815 Fix links in content-management/front-matter.md
8ccee671 vendor: Update dependencies
86a97dbd docs: Add Netlify badge if on Netlify
5e2e62d9 Get versions back to 0.20-DEV
8ac1fcd0 Prepare release 0.20.1
0ed3beec docs: Add 0.20.1 release notes
077005e5 output: Fix base theme vs project base template logic
efc0e05c docs: Add sanjay-saxena.github.io to the showcase
ab7f43e1 Update math function page to include "add" usage with strings
6d2ea0f7 hugolib, output: Do not lower case template names
45c74526 hugolib: Must recreate Paginator on live-reload
e765b43e hugolib: Avoid recreating the Paginator on copy
3b677594 hugolib: Avoid processing the same notify event twice
da022418 Remove unnecessary keys from config file
81fa0a45 Adjust all metadata partials to use absURL and relURL
7ee73ffd Update scripts to use absURL func
5fad8a9d snapcraft: Go 1.8.1
9a1c3f42 Add CLI Overview
aa0c2bd6 Add Emacs Easy Hugo to "other tools" page
26777720 Fix env var description in configuration.md
24ae7df1 Add mention of output format configuration to configuration.md
0b51849d Remove wip badge from output formats page
08ff6f61 Do a small language cleanup for output formats page
33db4143 Update custom outputs title and aliases
6652cb8b Move custom outputs to templating section
9ec00725 hugolib: Final fix of rssURI deprecation
cfd3af8e hugolib: Only show rssUri deprecation WARNING if it is actually set
4c6fec56 all Bump to 0.21-DEV
dac0d4a6 all: Prepare Hugo 0.20 release version
03ec2b33 docs: AddHugo 0.20 Release Notes
2ea0e17b Update incorrect titles in example front matter
18f5f3c1 docs: Add Emacs plugin easy-hugo
308678aa docs: Add siba.ai to the showcase
b50796e3 Add siba.ai to showcase
e73a35de hugolib: Remove unused line
c9731b2c hugolib: Delay deletion of Page.Now()
9ebbf1b0 docs: Add docs about output format linking
2874fc75 hugolib, output: Add NotAlternative to OutputFormat
9e69a92e hugolib: Deprecate rssURI
31014f0a Fix typos in yt shortcode description
f80b90b9 Add back CRP
9f1c72ee Fix typo for code block on templates introduction
0902a1c0 Make toc font size less obnoxiously large
8f60e9ac Update single page template example
bd40c73f Add datatable shortcodes and custom outputs draft
f9df1ed6 Change datatable shortcode to articlelistshortcode
9a8b65d8 travis: Go 1.8.1
7b2e1b0b hubolib: Do not add missing trailing slash to command line baseURL
3ce3917e Remove mention of v0.20 in Getting Started
aa5fddd5 Change width and height of search icon in SVG dimensions
1b638005 Fix links in content-management/front-matter.md
c05526d6 Remove "Using Hugo's Server in Production" section
0b4c1af0 Add some improvements to getting-started/usage.md
63034b10 Keep names of content formats more consistent
39f1401b Keep the name of content formats more consistent
2e639d95 Make a small casing fix on installing page
e975a07f Update press.md
2329545a Favor HTTPS and use ref.-style links more consistently
7ad721fd hugolib: Add .Site.Params.mainSections
5714531f hugolib: Only do link transforms etc. on HTML type of pages
3c405f51 all: Document the Output Formats feature
95808724 hugolib: Update deprecation vs Hugo 0.20
af99a590 output: Add some sane defaults for output format
83dcf5f3 Add SiteGetPage example to taxonomy templates
45bf976b Add Li-Wen Yip press additions to articles data file
7ad5d51e Update lastmod for single page templates
c7816c5b Update single page examples to use more recent Hugo features
7d60b1a5 Update mixed param type error for shortcodes
abe58bf5 Remove more wordiness from shortcode parameter type intro text
7ad76bfa Make yet another typo fix in shortcode templates
2e981048 Clean up shortcode templates
74d331ba Change to Template Lookup Order for temp-lookup linktitle
78164269 Fix heading typo in cm shortcodes
56d459d6 Fix heading in cm-shortcodes
3375fc2b Fix heading in cm-shortcodes
260b55ea tpl: Set RenderingContext.Config in markdownify
8f09e5f6 helpers: Add new properties to ContentSpec
c4a11655 all: Handle all errors
35fffad1 Update content-management/multilingual to reflect new TOML support
bf2d2bbe Fix typo: "KaTex" → "KaTeX"
e77bb13c media, output: Fix spelling
e6e1aca3 docs: Disable GitInfo by default
f3b4a0e9 docs: Add info about Pygments installation in installing.md
0dd6890e docs: Add article by Li-Wen Yip to press section
119182aa Add sections_weight to all content files
ce428a9c Update trim description with note on whitespace
fe78595c Add emphasis to trim function explanation
6650fae7 tpl: Fix nil pointer in Tree()
f4b12935 Fix typos in syntax highlighting docs
6b7c8497 Update trim explanation per gohugoio/hugo#3279
b31da911 docs: Properly capitalize GitHub
4b1dfc1d Update govendor instructions in source install
14255871 hugolib: Add optional outputFormat to Ref/RelRef
a883948c Register all media types when in server mode
bc36d468 tplimpl: Reintroduce the double template lookup in Partial
7da1b659 all: Use the configured output types to resolve template type
868f89d5 hugolib: Improve render error handling
04d80e6e commands, helpers: Add correct verbose log level to the global loggers
0802f79e output: Make template name lower cased
10ff2f31 hugolib: Read media types and output formats from site config
f8d555cc media: Add DecodeTypes
c9aee467 output: Add output formats decoder
d6e8b86f output: Add CSV to the global output formats list
2cf2b483 Add language-hugo Atom plugin to dev-tools editors
dba7e38a Add embedded SVGs example to dict function
af3230aa Fix typos and add explanation on configuration.md
77647be7 Expand static dir explanation in dir structure
a098081c vendor: Update go-i18n
5d7eeead docs: Remove localhost part from link
8b5b558b tpl: Rework to handle both text and HTML templates
53eee8a4 Update Mmark info to show ease of use with MathJax and KaTeX
b3819aa0 Add esaezgil.com to showcase
27610ddd hugolib: Don't ignore errors from applyDepsIfNeeded
6b29bccf hugolib, i18n: Update tests with flat format and TOML files
28fdd71c vendor: Update go-i18n
fe8462b2 docs, examples: Use TOML for i18n config files
d122260d vendor: update goorgeous
a037b855 docs: Add blog of Enrique Saez Gil to the site showcase
7eb71ee0 Revert "tpl: Rework to handle both text and HTML templates"
c97dae40 hugolib: Use Page Kind in template errors to prevent log spam
0aeadfd0 tplimpl: Add test with failing partial
5c5efa03 tpl: Rework to handle both text and HTML templates
631833e9 Add missing comma in Supported Content Formats page
561edc0c Add fm-specific Mmark syntax per bep suggestion
8d65b360 Add fm-specific Mmark syntax per bep suggestion
484bbd1e Add fm-specific Mmark syntax per bep suggestion
3d7960e1 Fix typos in Mmark section in content formats
969178b6 Fix typos in Mmark section in content formats
5a59b0fd Add Mmark section to content formats
e491b309 Add Mmark section to content formats
73c1c7b6 vendor: Update cobra
67076e58 Add example to "now" function
f911b107 media, output: Add CSV type and format
ab07457e Update with temp GA code
d1709df3 Fix broken link at the bottom of shortcodes.md
904eaa8d Fix incorrect syntax decl in cm-shortcodes
7e3805b5 Fix odd formatting in cross-references
45aad24e Add note on Mmark with MathJax to formats doc
d98cfe10 Update nginx config in 404 templates
fb94d4c9 Fix terms template lookup order
4d27a27b Update broken links in customizing themes
bf4015d6 Fix typos in vimeo sc description
001cd27c Clarify custom class to yt and vimeo shortcodes
0c770e40 Add warning to isset function for lowercase site config keys
a649a7ae Add firstname.club to showcase
763dd22c Remove how-to-use docs-page
d2829694 Fix inconsistencies in FM categories
530002e6 Update GitHub deploy
d7d5771a Update gh deploy
68969470 Update content to use Hugo's built-in menu
05949c90 docs: Fix typo/source link in firstname.club showcase addition
d5036c3a docs: Update link to Disqus alternative Livefyre.com
af1f9ecf docs: Add firstname.club to the showcase
42a4f6f9 tplimpl: Fix map data race in URLLock
79b34c2f tplimpl: Fix deadlock in getJSON
de558c3e Remove Livefyre from commenting options
a05fbce1 Remove unnecessary pre 2.4 git docs from GH hosting instructions
5758a6d6 Update GitHub pages hosting
b286c7d9 Remove intelligent posts - stale issue - from roadmap
e1645544 Update taxonomy templates
3c6b16d5 vendor: Update fsnotify with several Linux-fixes
87b3cd46 hugolib, helpers: Reduce log level to WARN on .Render for non-regular pages
8b06205a Add "tip" shortcode and documentation
5989c4d4 helpers, output: Fix spelling
af55ec76 hugolib, output: Gofmt
70080e3d Merge pull request rdwatters/hugo-docs-concept#57 from moorereason/iss31
f2fbf0b2 media: Add some more relevant MIME types
da717759 Add function signatures
3d6d55d6 Remove concept documentation for time being
c698a77d Fix breaking yaml in delimit function
d688bd98 Add alias for old MathJax tutorial
7a1f9a6a Update signature fields
dbbbd498 Add MathJax to supported formats
1989c17e Add old MathJax content to content formats page
0819a044 Add intro text to hosting and deployment
8366049a Add intro text to hosting and deployment
f514681d Remove all tutorial-related content from install guide
db09419d Update readme todos and clarifying readFile w themes
0a6bc386 Fix broken link in list page templates
9c652071 Fix broken link in list page templates
109a6a59 Move list and homepage content to list templates page
e6511dff Remove findRE TOC example
49232736 tplimpl: Fix lookup with non-standard layout folder
930a3df1 hugolib, output: Restrict Render to regular Pages
e49a2b83 hugolib: Fix Render layouts for list pages
9a0aa5fd hugolib: Wrap pageOutput create in sync.Once
0aaf3c56 hugolib: Fix panic for Permalink in 404 etc. templates
ee4a33b1 commands: Fix broken commandeer
09c88e84 output: Rename HTMLType etc. to HTMLFormat
24c17702 hugolib: Revise paginator alias path handling
b7ed67d4 hugolib: More TODO fixes
3cd97951 hugolib, layout: Consolidate RSS template handling
ee75e299 Remove the now superflous defaultExtension
15b64d51 all: Propagate baseURL error to the callers
148fedd2 hugolib, tplimpl: Use OutputFormats to create atom links
ec01c3a7 hugolib: Add 404 test
5761b93c hugolib, output: Fix RSSLink vs output formats
87188496 hugolib, output: Handle aliases for all HTML formats
0c4701f0 hugolib: Update site stats to take output formats into account
d851d6b9 Add custom protocol support in Permalink
8bcc08e3 media, output: Add Calendar type
dbb83f92 hugolib: Read default output formats from site config
4aaed87d hugolib, media: Make the MediaType available to the templates
c7dbee23 hugolib, output: Add Rel to the output format
29d3778b docs: Move the rough custom output formats spec to docs
1b2be5e8 hugolib: Add OutputFormats with permalinks to Page
baa29f65 output: Rework the base template logic
c7c6b47b hubolib: Pick layout per output format
08fa2b11 hugolib: Fix layout lookup order for Render func
6178238a output: Speed up layout calculations
df953839 hugolib: Speed up URL handling
a49bf870 hugolib: Remove siteWriter
d76e5f36 hugolib: Pull all alias handling into one file
ad8cea87 Refactor layout resolve to a descriptor/adapter pattern
4c2abe00 Rename OutputType to OutputFormat
6bf010fe hugolib: Refactor/-work the permalink/target path logic
c8fff950 Implement the first generic JSON output testcase
3ec5fc35 hugolib, output: Incorporate suffix and type in layout resolve
f091fc23 hugolib: Add basic setup for output def per Kind
03122e51 hugolib: Revert to using Page as the render chan type
e5200dda hugolib: Remove the copying in the renderRSS
a8244658 hugolib: Put back taxonomy term paginator logic lost in rebase
50c64415 hugolib, output: Add theme logic to LayoutHandler
348834d0 hugolib: Add a PageOutput wrapper for rendering
254cd89c hugolob: A first incorporation of output types in rendering
10de0771 hugolib: Use the new layout logic in Page
3bb52bf7 output: Move layout logic to the output package
d3d2c63d output: Add output type
c4989c39 Add MediaType and a crude implementation
047e039b Make docsearch config async and defer
0d5146a8 Tweak content
9262c5b3 Exit -1 on ERROR in non-global logger
e0cfe258 Add first round of custom output content
2bea9d0c Revert "tplimpl: return an error on unsupported type in isSet"
850a08a4 Move all files to theme
0796957d Fix paths to indicate theme path and leave a note about it
1b92c8b7 Change RSS description from full .Content to .Summary
50c24e07 Move to theme folder
2ac2fa93 Remove extraneous config key-values in config.toml (continued)
b14b6596 Add Hugo SFTP Upload tool to dev tools
1517384b Remove more extraneous config.toml values
a479cb13 Update all uses of readfile SC to use root path
17b21e0a hugolib: Correctly identify "my_index_page.md"
02501129 Update GH pages tutorial
55407e34 Merge pull request rdwatters/hugo-docs-concept#52 from digitalcraftsman/ga
a3f46c9d Resolve config conflict for taxonomies
8cfea6b1 Update config GA
847d3d4f Remove extraneous values from config.toml per convo with BP
043b4e49 Fix Hosting on GitHub tutorial
22351f4a Switch to Hugo's internal GA variable
7f68e319 snapcraft: Bump version to 0.20-DEV
2ed75f34 snapcraft: Add vendoring support
767ea0a0 Update to muli font across the board
32fc7534 Mix font faces
56c61466 Test out serif font on body copy
0381c06d Remove outdated warning about imageConfig not working
9d9ec1dd docs: Add Hugo SFTP Upload to the tools section
9f0b02b8 commands: Fix case of createpath in new.go
a159feff create: Delete redundant viper calls
30b43476 Add GitHub stars
b5c13109 Make more color changes per Bud's suggestions
0c0ec81d Make more color changes per Bud's suggestions
8b5e4d73 Update footer color to match news site
01a296dd Add navigation design changes per Bud's suggestions
2dab2351 Test adding events to codeblocks
bc055d0a Fix typos on after function page
fc826d5f Update after function with combo example
683011a6 Fix typos on summaries page
09aed316 Add admonition note for CJKLanguages and Hugo summaries
8bfc8828 Fix odd font sizing for code
d07ff9d2 docs: Remove dead links, consistent formatting...
c830861e Add example usage to seq function
f1b1df50 docs: Fix typo in templates/functions.md (#3214)
36bbadec Add final copy for directory structure
b8cfe226 Improve Netlify copy to reflect Netlify design blog
77b26b71 Improve Netlify copy to reflect Netlify design blog
ce78b00f Fix search colors on homepage replacing with SVG
73ede162 Fix breadcrumb to take full section name
fdd20af5 Fix typos
559b4007 commands: Keep "." directories on cleanDestinationDir
5e191ccf docs: Add bharathpalavalli.com to the showcase
6411cbf9 Fix site nav toggle on mobile
ddaebc4e Fix homepage search colors
e5e175c7 Remove test page for yt shortcode
4d8532ab Try out dark header per bp mockup
4df25162 Fix capitalization consistency for markdown term
20bf194f Fix homepage SVG logo
1cbccec3 Add back embedded crp in site header, perf test
b56a888e Align tags to the left in article header
ff9d4635 Switch header logo to img - too big for CRP
f43481f2 Fix heart icon on homepage
d359d63a Add back CRP and switching header logo to embedded svg
08738d38 Add back CRP and switching header logo to embedded svg
d1ab36a4 Merge pull request rdwatters/hugo-docs-concept#48 from sethmacleod/patch-1
15317f21 Fix typo
d3cd68e6 parser: Improve TOML frontmatter parser performance
f816f2bd Add updated Netlify tutorial
68f4cd82 Removing .Site.Recent
e3f79885 Update site.recent closes #46
ff2931c6 Remove all bloat from video sass partial
594a9691 Add yt shortcode
3fa7bc9c Revert "Add support for a flatter and simpler language file structure"
3518de10 Revert "vendor: Fix broken i18m definition"
7c48ad57 vendor: Fix broken i18m definition
0e75f6e7 Add support for a flatter and simpler language file structure
68368bb0 Tweak env var config content
6eddb3e5 Revert "helpers: Add a Debug method to DistinctLogger"
d134b397 Remove editor from config docs
9e2b548b Fix URL for emoji cheat sheet
95597b8a Fix URL for emoji cheat sheet
50d95b94 Add emoji instructions to supported formats in cm
917e26a8 Add tibobeijen-nl to showcase
f74d9c81 Add tibobeijen-nl to showcase
5e6bbd69 Fix typos
6e03c96a docs: Add tibobeijen.nl to site showcase
190dcb59 Improve admonition semantics
1ca6a276 Add ns field to all func files
8c611c13 Remove unnecessary comments from header and baseof
4382a8a6 helpers: Add a Debug method to DistinctLogger
9dfb9c14 Case insensitive translation of the 'more' tag when importing from Jekyll
c2ffdfab docs: Fix documentation of non-existent 'editor' config
2390c000 Add back CRP
fa1c7d1f Update shortcode templating
09d0120d Update to use muli as font
51e42a3a Add parent to shortcode docs
fbc35a84 Add parent to shortcode docs
a9966103 docs: Change OS X to macOS in README and CONTRIBUTING
491d4068 docs: Fix CONTRIBUTING.md
e4c59bf0 Merge pull request #35 from rac2030/firebase
10b05a8f Merge branch 'master' into firebase
ab5cf356 Make small tweaks to language used in "Hosting on Firebase"
d8923eb6 Update to new go-toml API
09384837 Get rid of extraneous icons on homepage
2f02dfa7 Add some 🔥 ❤️5ee2949b Remove gratuitous notes markdown
c94abaff Fix SVG on homepage
d6093aba docs: Update contributing guides
770b9ac7 Fix JSON front matter expl per gohugoio/hugo@ede452d
b64f808e Update license page to include download
1849c7e9 Add Red Hat and Fedora to installing.md
0fe6d98b Update OSX to macOS across the board closes #33
7071026d Add IE=Edge to meta to fix broken SVGs on IE11
b87eed3e Fix overflow issues with HP in IE11
110f3086 Fix more IE11 homepage layout issues
78cc9e20 Fix more flexbug issues for IE11
1b6431e1 Remove extra scroll bar in toc
b0c3f566 Make more typographical fixes to the front matter page
aeda2337 Add generator tag and fix typos in front matter page
638cc806 docs: Optimize 11 showcase thumbnail images
ec3dc325 docs: Add Linux distro-specific installation instructions
b156ef27 docs: Note Hugo as Snap package can write only inside $HOME
042f8fca docs: Replace Mac OS X with macOS in three places
c126c941 Remove commented-out front matter vars
6af744c2 Add missing page vars and predefined FM vars
2f1140cb Move articles to toml file in site data (continued)
902d336b Move articles to data file called in datatable shortcode
2704a4ce Update installation instruction on Linux distros
431d5974 docs: Add lucumt.info to showcase
b8666826 Update toc documentation with more advanced example - inspired by forum discussion
a4eb1e0f Update content source tree for spf review
903e43f1 Update content source tree for spf review
a9bfec6d Update concept docs for spf13 review
ede452d3 parser: Accept JSON frontmatter without leading "{\n"
bae5d8a7 Fix typos
a1c8d046 Add GH milestones to roadmap, and update Snap/Ubuntu in installing.md
62efcdfe commands: Improve jekyll import date format
4b9493cb docs: Improve command reference page
48eaf43c Fix typos
b1b4c07a Remove wip badge from multiple template files
b414d7d2 Combine ordering grouping lists with lists introduction page
8187b315 Change all heading links to copy-links
44c97f91 Change to locally hosted blazy.js
3c50e8dd Make final changes to complete final schema.org partial
4dbb2301 Fix odd ordering in functions section
032982a6 Fix date formatting in JSON-LD for schema.org
20bfa632 Commit first draft of schema.org structured data
bec843de Fix broken links (final round)
fbee443c Fix many more broken links, and fix TOC scroll on L-
d97c7778 Fix broken links (first round)
0e0abb17 Fix weights for ordering of hosting and deployment section
201c999a Update other vars to individual pages
c315f532 Fix broken URLs for tags pages
a4f76cfc Remove Tutorials section
a5a7e873 Add js icon to code blocks and fix prev/next icons in content footer
5d0748ce tpl: Add union template func
fb25d255 Update content filenames for all vars section; updated authors draft in cont mgm
559e73b9 Add Netlify hosting and deploy tutorial
4d187661 Add chocolatey install
83fd79c4 Add first draft of content-management authors page
b0eddb63 Add build issues empty page
5c69a21d Add TOC to format function
63e2a46f docs: Add Android to README
2f2ea42c hugolib: Fix reloading corner cases for shortcodes
5f443bd4 commands: t.Error => t.Errorf
e472140d Update for crp before forums release
f039e3be parser: Refactor frontmatter parser and add tests
6f3a6efd Shorten text on homepage; update ordering lists page
9c03693d Update types content
bca33c38 Remove unnecessary content in type
2779a288 Add host-specific icons to source links in showcase
14ddd029 Add host-specific icons to source links in showcase
4c51ebf8 Merge lazy-loading from digitalcraftsman
0f7ce22c Merge pull request rdwatters/hugo-docs-concept#12 from digitalcraftsman/lazy
ddc8cc00 hugolib: Clean up redundant frontmatter error logging
2a011b7c Add admonition note for Snap users in install docs
0e44f75e docs: Explain themes dir in quickstart guide
690961ba docs: Add myearworms.com to the showcase
eb41128a Add lazy loading to showcase
fe41bd61 hugolib: Default rssLimit to unlimited
b841193d Change sorting of tutorials to weight
0f24f217 Fix typos on lookup order page
149abc4e Fix typos on lookup order page
f69dba20 Fix search on M+ screens for HP; make typing faster in HP terminal
6914e9aa Fix search HP icon on mobile
fc7fe4db Fix flex footer on overview pages
cc0d8203 Update docs contrib guide
df5eb4e7 Update docs contrib guide
5ef857a0 Update docs contribute content
e12f8def Fix flexbox wrapping issues on homepage; tighten up gopher animation
fe1a7557 Move to kebab for secondary/toc menu
7032ee8e Add enjoyable recipes with new optimized img and FM
b5ce1d1d Fix external links icon placement
b31ad2ee Merge pull request rdwatters/hugo-docs-concept#6 from sethmacleod/master
68d58c29 Merge branch 'master' into master
8381df3b Fix small typo and make content updates
8e27de10 Fix external link icon in contents list
aba53d24 Fix fontello for blockquotes icon
1739a966 Add README for gulp asset pipeline
c1437ea4 Add finalized views.md and usage.md
60c2babf Attempt to fix scroll on focus issues in iOS
9e999539 Remove extraneous showcase images
ad6367bf Update doc contrib, baseof temps
48120ccf all: Fix some govet complaints
560ed6e6 Update appveyor config
0c45e638 Optimize all showcase images
7e3ef07a Add missing markdown icon for code blocks
1995b5d4 Update permalink values to dl
0467c189 Add back CRP for last build of the day
434edddc Fix homepage layout
766089dd Finalize more CM pages
01545899 Fix bash icon in examples
8d0c9ac6 Fix bash icon in examples
74d7da54 Remove GH buttons and GA temporarily for dev
248fdef3 Concatenate all js
5c638b69 Update to use crp and fontello
45b9d722 tplimpl: Add built-in print funcs to FuncMap
df5be925 Update to use locally hosted Monserrat font
3839a0f9 Make nav accord to 1 item only, per @digitalcraftsman
4e1ad212 Fix forum link in site footer
a2a8a651 hugolib: Don't report taxonomy count if disabled
4bfa1890 hugolib: Remove unnecessary params
7bedd4e2 Update content and CSS
681712a9 Update freebsd icon placement
a2ec372a docs: Add enjoyable.recipes to the showcase
fbe1b65c Fix install row on homepage to not break lines in terminal on iOS
f7ff4eef Update doc contrib guideline
3a3828d7 Update doc contribute guidelines
da06842e Fix icon font family for code blocks
87099898 Revise "Front Matter" section (second round)
da5b2435 Revise "Front Matter" section (first draft)
b67ee3a5 Increase font weight on features row of homepage
5f8d840f Fix typo on homepage
958cb423 Update with homepage description & smaller default social image
e45a9713 Add default social image for sharing
49a83a41 Set font-weight of function headings to 300
3dfb2961 Update AddDate functions and make navigation more narrow
2f3fd84e Fix toc scrollspy and desc for internal.md
ee114747 Fix toc scrollspy and desc for internal.md
b134f2c2 Change title of additional templating languages
26225d8b Add first draft of internal templates page
118704aa Begin first wave of taxonomy templates edits
f9b19fab Add GoHugo AMP to Starter Kits and increase font-weight on hp tagline
07985120 Add Poppins as a self-hosted font
fb9012d5 Concatenate all scripts
67c60f48 Correct delimiters for YAML front matter example
1a147b9b Shorten descriptions for getting started pages
a3dd283d Fix typo with @digitalcraftsman in Arch Linux install docs
c5c7d5a5 Merge pull request rdwatters/hugo-docs-concept#4 from digitalcraftsman/install-via-arch
d1672cac Update funcQR _index content
e90f0b5f Fix open source footer text on homepage
2c776de6 Fix more typos on installing page
b6c7d01e Finish edits to go templates content
c4aa9a34 Remove unnecessary partialCached for footer
eb99500b Clean up first draft of templates/partials
bfddd8ab Clean up first draft of templates/partials
c9506999 hugolib: Populate the taxonomy term Pages list
6c5ef713 hugolib: Add a temporary workaround for page.copy() data race
8e2e9fc8 Add installation instructions for Arch Linux
c7b8c45d docs: Correct toml syntax in Github deploy tutorial
14915639 Fix typos
72685a74 Remove all references to baseurl in templates
e0c3e906 Make small iterative improvements to copy in templating
85707e92 Add descriptions to all remaining pages
be89f1e5 Remove relpermalink file; fix sorting on functions QR
ec001f08 Update with new homepage
3f1de445 Update master with homepage
96544d23 Clean up relURLs and extraneous templating
90d7bfed Make further improvements to content organization page
4b2d20fc Finalize types page under content organization
e52e2a70 hugolib, target: Rework/move the target package
ea165bf9 vendor: Update cast
1a0f38ad Update homepage partials structure for easier management
2e669359 Add descriptions to features section
22c89dcb hugolib: Fix HugoSites.createMissingPages
6db2087e Add fadeindown for homepage menu
4c446c6a Remove call to homepage stylesheet in site-style.html
b45c4b3a Update homepage features data file
eb0e7580 Add download button back to code block shortcode
8d4584c9 Fix bottom margin in global nav
5cb9f686 Add twitter row and dummy text for homepage features
1b7b1f4f Fix eye blinking animation on homepage
4677cbec Add animations to homepage gopher badget and cape
29c1c9aa Fix typo on homepage
e7a9b447 Add first version of adddate to functions
144cc8ee Add format and full date format explanation to functions
78d55aec Copy tweaks to homepage
fe211e9d Fix phrasing on home page to make it more relevant to visuals
7fb86c29 Fix phrasing on home page
fd062680 Add new article to news
d0e2a1fa docs: Add blog post from After Dark creator
6b31541b Add AddDate to functions list
c9dc4276 Add quotes to homepage
e21aa250 Add more content to home row
7ff7a63a Fix breaking error on missing bfconfig shortcode for BF Rendering
33ed1b4c Add webkit no scrollbars to navs
395b2086 Update toc for testing fade at bottom on PC
28cc820f Make first content fixes to bfconfig readme
d5b49fe3 Fix toc
befd5d73 Remove unnecessary sass files
8074ff09 Add Twitter references to data folder
aa3ce7ab Update content and URLs of About section
0b1c31fe Add section lookup order change for v0.20
5a94e4cf hugolib: Add section template baseof test case
f4779b25 docs: Add new section list lookup alternative
8203fc59 hugolib: Add /layouts/SECTION/list.html to template lookup
1dd2b163 Fix more styling inconsistencies
fdcc05e7 Add more icons to code blocks with or without shortcode
9dc11d3b Add SVGs and slide animations to homepage
fb461856 Add removal of icons
abe77bc1 Update fonts per type kit
8b09dfba Update fonts per type kit
7acec3c6 helpers: Return partially cleaned URL in case of error in URLPrep anyway
74ea81b8 tplimpl: return an error on unsupported type in isSet
577522bd helpers: Remove unused arg
8a8a0fc3 Make first content commit with beginnings of new homepage (testing Netlify subdomain)
23f5b9ac hugolib: Fix broken test
1279ca20 docs: Add some more quotes
b1eab2be Update README with new URL
38a9ffaa Make first commit to homepage branch
d5f2560d Add link to GitHub Pull Request Tutorial
9671162a hugolib: Make sure that empty terms lists are still created
50b301cb Fix config to include noindex tag
3669015f Handle Hugo version strings with patch level
a0e3ff16 helpers: Fix version string for Hugo 0.20 and similar
cc158647 hugolib: Only return RSSLink when RSS is available
2c07f133 Add styles for different languages in code blocks
b19db039 Add styles for different languages in code blocks
d0c7f01d Tweak code blocks
c21fea82 Move pipeline to root
0366c01b Switch to new Typekit "Museo Sans" fonts
f0ebb43d Remove headings from note and warning entirely
0ef29d31 Change code block styles, and start first round of fixes for bf config
b7a672fd vendor: Update Cobra
972649c6 docs: Correct date in automated deployment tutorial
afb3334e docs: Correct link of 'now' tpl func in release notes
c266cd2d vendor: Bump versions
5ed3660b Remove heading from admonitions replacing icon with SVG
0b91053c hugolib: Only consider regular pages in Prev/Next
2af9243e Update required fields icon in lists, esp contrib to docs
63b78b38 Remove old aliases afor abs and rel langurl functions
4c048ac4 Fix wrapping issue with prerendered text for code in lis
9c6096db Fix odd behavior of content footer with flexbox
be081676 Switch to Roboto Mono for code
cc6aef27 Add first round of themes submission guide
781574be Finish local file templates page
fcb147cb Add content to contribute themes page from them GH readme
d5146d68 Add contribute themes page
396276aa docs: Revise automated deployment tutorial
d3ea7920 Remove temporarily JSON-LD schema.org metadata that is breaking build on Netlify
66b7e324 Update to ideal workflow in concept document
58eb36f3 Remove functions dropdown and adding content strategy section to concept page
072cd003 Bump version to 0.20-DEV
0a991682 docs: Some minor release notes fixes
28198ce9 docs: Fix shortcode param in release notes
a1741f19 Update versions to 0.19 release
f22a8edd Remove more unnecessary needsreview in front matter
c9c889c1 docs: Add release notes for Hugo 0.19
f2706329 Remove needsreview from all hosting and deployment pages
d219bd04 Update descriptions for all of hosting and deployment section
29edd7fe Add markdownify for function quick reference
e6dc8c46 Add GH stars button to site header for dev review
770d3e96 Make first round of updates for lists explanations and content views
c41585f8 Delete unnecessary sass files, shortcodes, and partials
cd4613d8 Make first round of cleanup for content organization page
f70b94bd Fix ordering of pages in dev tools section in nav
4bd4374d Add updated command mds from bep's 2-25 commit to master
515426a1 Make final commit before submitting to Gitter channel
72e1b602 Update content changes in concept document
6cf78346 Update multilingual page
eb572c8a docs: Add documentation for disableKinds
8d513222 docs: Update RSS docs with rssLimit changes
495d88ef Update filenames and sections for shorter URL structure
75935138 Remove and consolidating countwords and countrunes
1faf3d3c Fix spacing issue caused by command line template
b8a606f6 Update rss vars page
c0a626b6 Add first round of functions
a9604235 Fix spacing on section list pages
0eb76b08 Revert "hugolib: Add terms' pages to .Data.Pages"
a8a8249f Revert "hugolib: Render paginator pages for taxonomy terms"
3631fd2f docs: Regenerate commands doc
e37e3dcc tpl: Add title meta tag to twitter card template
b108e5ee Make first round of edits to ordering and grouping lists page
82dcefe5 Add last of shortcode display examples
ef3edffe Update all built-in shortcodes with output and display examples
6dd57f7a docs: Remove waffle.io graph from CONTRIBUTING.md
eaabecf5 docs: Adds 'Using _index.md' page
e21fdbae docs: Fix ambiguous typo in quickstart
564bce71 Fix missing link in articles page
0c48be63 Fix max size issue with toc on xl=
d93008b4 Fix footer for additional twitter list for bep spf13 and gohugoio
718ed72a Try main element as full width
aeaaa42c Fix broken link in site variables
bfd6a131 Update with download button and new see-source icons in code blocks
ee008f4b Update function front matter across all files
d8c64b2d Make more copy edits to customizing themes tutorial
e9921ae4 docs: Mention Hugo's official twitter account
950d1aa1 docs: Add article to press.md + cleanup
4c101c5e Add external link icon to contents-list.html
582045d6 Add external link icon to contents-list.html
91ff6ac3 Add external link icon to contents-list.html
0fa26bc5 Fix non-markdownified titles in showcase
0004cdd9 Update few functions
ba6104bd Fix delimit description
81596493 Make small mods to heading structures in several WIPs
c1425a16 hugolib: Fix preserveTaxonomyNames regression
8b180ffd Update homepage tile descriptions
1dda1b25 Add first few functions and site hierarchy SVG
74277187 Add first drafts of lists, sections, taxonomy templates
831bfd36 Update Docker file to Go 1.8
4d679627 hugolib: Render paginator pages for taxonomy terms
e117b1b2 hugolib: Add terms' pages to .Data.Pages
48fecc42 Add tree.md to root
27f206de Update local file templates page
7e64e217 Enable TOC breaking layout with content footer
acd850f0 Fix headings in dev tools - comments.md
2e899e41 Fix typos on single page template page
cca1ef53 Revise description of Archetypes
b7c91e4f Update other templates pages with toc true
d15d7dc9 Add missing toc to certain content files
691544f4 Finalize single page template content
9e6b5eb9 hugolib: Temporarily disable leaktest
ed22a83f Finalize syntax highlighting
2eb2431c Finalize syntax highlighting page
c8d5a2ba Update syntax highlighting page
7b72d6ba Finalize migration tools page
1b7ee6e5 Update migration page
2414df12 Add all weights to template section and updated go template primer
0f109fae hugolib: Fix broken shortcode tests
62783935 hugolib: Include full filepath on shortcode errors
a1512e50 Update files for reviewers
5d0694a4 Change annotated content doc to just content changes
06370ca6 Remove redundant roadmap
13c75f44 Add first draft of strategy statement and content revisions
87acf292 docs: Add promotive.es to the showcase
13972d6c hugolib: Cleanup the Goroutine count calculation
91968f3b vendor: Update cast
7934db91 commands: Cache logFile in createLogger
9e52477d hugolib: Add relativeURLs and canonifyURLs to Site
c7535b9c commands: Remove flagChanged from commandeer
eb27c47f tpl: Use og:updated_time OpenGraph tag on nodes
df1ff57d Use Page.Params more consistently when adding metadata
2cbdd653 tpl, hugolib: Fix live-reload of non-renderable content pages
4e77c871 tpl: Remove twitter:domain tag from internal shortcode
d3fb1960 docs: Improve documentation for menu rendering
f8115778 Add comments and analytics to partials page
9bdc96fa Add content for syntax highlighting
f8267ffe Add Scratch function page
122e3c4f Add toc to most template pages
1aafe65f Update content sections page
cbb0461c Fix typos and revise text on install and tutorial pages
2320c568 commands: Make sure build error is logged in watch mode
41857d03 utils: Use local logger
d04a2457 Add tree.txt
03d0a338 Update functions content footer and added new funcs for menus
75d855c0 hugolib: Add check for p.Markup == "org"
86e8dd62 all: Add org-mode support
d2f2d9a3 Update temp command section and reverted to old favicon
e34a358e Add first part of command section
1645c501 Add review badge on incomplete pages
a3af4fe4 hugolib: Finish menu vs section content pages
2a6b26a7 hugolib: Improve menu generation for section pages with content
782004ba Update with aerobatic article on password protected sites
807b2a9c Remove redundant press and articles page
f3e48405 Change all overviews back to section titles on section list pages
170e9616 Finish though in create-your-own-theme admonishment
49f468e6 Update more content management files
370d6686 Add list-icon to overview/section list pages
5860bf1b Revise order of variables pages in site navigation
c184c685 Add more content to getting started pages
fe9fd0ac hugolib: Cache the value of Page's RelPermalink
840c71be Add all variables and params pages
7e0fa13f Get rid of some viper.Get* calls
b4cd9e63 Finish up last of hosting-and-deployment transfer from old site
0a76c785 Add finished Quick Start
9acdc1bb Remove breaking relrefs in quickstart
fb1911e0 Consolidate all install pages into single page
d40ebc68 Add mac install guide
3483642a Remove wercker yml validation ref - 404
16513c9a Add wercker tutorial as example for reviewers
3d4e99ed config: Remove unused var
02b120d1 hugolib: Discard current language based on .Lang()
6809ea1e hugolib: Fix .Site.LastChange
a0b3d9db hugolib: Add temporary date parse test
2ea242d5 hugolib: Minor Go vet fix
99fbc75e hugolib: Fix regression of .Truncated evaluation in manual summaries
ec3c1997 Fix broken links in features page
2b06eb88 Fix odd syntax highlighting in cross references doc
ce58bede Fix local files shortcode
1890155a Add shortcode from live site for readfile example in local files template
b8fba275 Add shortcode from live site for readfile example in local files template
9416fdd3 hugolib: Add missing page kind to allKinds
ed70c14a Add shortcode from live site for readfile example in local files template
4e159ed5 Fix featherlight to avoid icon images
3bedf1e2 Add featherlight for body copy images
b2e3748a hugolib: Enhance `.Param` to permit arbitrarily nested parameter references
44e00b62 Fix broken images originally used in how to contribute tutorial
e028978d Update broken links
55aae645 Fix shortcode language in local file templates that was breaking Netlify build
2cb5ad8e Update shortcode and shortcode templates, both of which need much more work
56ecb233 Add just a shit ton of content
949bbd03 Update functions front matter
6d2281c8 hugolib: Add disableKinds option
e096917f appveyor: Add go version
13ca0b4c appveyor: Fix build, take 2
3dade5de appveyor: Fix build
b360f9b3 appveyor: Print Go environment
be1bb5fc Make further improvements to Go Template Primer
bdc02edf tplimpl: Fix issue with recursive templates
e24c1af2 Make further improvements to Go Template Primer
4493e8ed hugolib: Fix issue with taxonomies when only some have content page
960707a4 Update amber and ace sections
07ab7ae3 hugolib: More test helper cleanup
fa1e4780 Update archetypes content
82c02b84 Update content sections admonition
bec195d1 Fix page title issues with functions section
a1ca69b9 Fix broken tox on markdown and support pages page
bd3b1b53 Make further fixes to shortcodes
e9c7e054 Fix order of built in shortcodes
605508d4 Fix content footer next and prev links
ce3eb287 Fix toc sidebar, add icons to site nav, and add prev/next links
ed847ed9 hugolib: Test helper cleanup
bf7399fe Add first exFile shortcode
10c13f5d hugolib: Make RSS item limit configurable
ade20763 hugolib: Fix Windows build failure, final take
09466307  hugolib: Fix Windows build failure, take 2
94216902 hugolib: Fix Windows build failure
d3abb93c tplimpl: Fix instagram shortcode panic on invalid ID
b7aa2304 travis: Bump to Go 1.7.5 and 1.8 (Yay!)
edfb9d55 vendor: Update Viper
53d07fb4 hugolib: Add test case for empty Pages in regular pages
9d68eb72 Update homepage
04a4a193 hugolib: Remove deprecated marked for removal
4b3ca38b tplimpl: Fix data race in resGetResource
77cbe4d6 tplimpl: Refactor imageConfig into a struct
c507e271 tpl: Refactor package
93ca7c9e all: Refactor to nonglobal Viper, i18n etc.
7483b8ce Fix typo and update shortcodes body copy
0a16b93d Update homepage cards description for getting started
fca2d1e2 Update getting started guide homepage card description
dc5900ba Fix to homepage card descriptions for developer tools
34063e94 Add release notes
9e3dfb66 Fix tags missing quotes for v0.18 on Netlify
2e55c924 Fix front matter in getting started section files
5629f7e2 Fix terms table layout
5091be1c Update terms layout to table
88cad8e7 Update contents list style and markup
cbd08323 Update shortcodes, needs works, and toc styles
6f0eec31 Fix bg color for code shortcode
78213277 Update toc with home baked scrollspy
e34af6ee docs: Add hugofy for atom to the tools section
711fd889 Fix minor typos in content mgmt section files
aeafa4a0 Update issues via shortcode in roadmap
f6a55a16 Add section to toc header
9aa2df68 Add section to toc header
19d7a56e Remove unnecessary math functions and created table for all
0d0973d1 Update breadcrumb colors
1f50dca4 Add contents list for section pages
875a0642 Add contents list for section pages
658b7fc0 Revise style of content footer and blockquote
5851f4b6 Start new callout styles
691156c5 Use OS fs by default
16b16216 Attempt to fix input rounding on ios
51fc29a1 Update archetypes content
5dedeb69 Remove unnecessary content from benefits of static page
3db5aff4 Remove unnecessary content from benefits of static page
c8963435 Update next and prev buttons
ed50c7db Fix js for toc
7768124f Add terms layout and section icon to taxonomy.html
66bd832d Add terms template
63c79249 Add taxonomy list page
3fd4d241 Fix overflow on file name for code block shortcode
01f5105e Update toc style
7982cfa3 Add updated toc esp for mobile
19fcf0dd Update taxonomy aliases
f9c5c3f9 Tighten up archetypes content
f05a9f2d Fix all links and creating new aliases for Hugo features page
7ae01dbb Fix toclayout
9764af5b Update toc styles
513a7852 Add table of contents first attempt
a988d3cf docs: Remove the source relative links docs
360161f6 Emphasize GitHub Stars rating of StaticGen in Why-Use-SSG md file
493b7e11 Update content
0a87ef7f Update content
e067e89d Update content management page order
2ded3bf3 docs: Update www.bullion-investor.com/report/ in the showcase
212241b8 Fix footer on mobile when menu is open
6384a53f Fix overflow issues on mobile safari
1d52df22 Fix overflow issues on mobile safari
4b133ece Fix overflow issues on mobile safari
4a281e2e Improve to archetype copy
c18d21d8 Update archetypes section
f9db26c5 Update inline code styles
234273a5 Deprecate sourceRelativeLinks
03dc2766 Update search input styles
5cc8b589 tpl: Accept limit as interface in findRE func
298ebc37 hugolib: Add ability to sort by frontmatter parameters
2618cfbe hugolib: Fix error for non-renderable HTML content with shortcodes
7234c140 Update homepage icons
dfd84dac Update homepage icons
28e5fb90 Fix descriptions for homepage in data file
91130d1b Fix descriptions for homepage in data file
c7874aa0 Fix last icon for homepage
99e53a95 Fix scroll up by adding preventDefault for site menu toggle on mobile
c4b40a8f Improve layout of homepage cards
11df9370 Add first batch of icons for homepage
25bfa7e1 hugolib: Use the site's Tmpl for non-renderable pages
eb7f8aed Update algolia search styles
c20a89b3 Commit first addition of Algolia search
7d4b94b4 Add a few icons for homepage
87d4ad94 Update directory structure to include dev and design resources
7a5cc3cf docs: Add instructions for customized domain
962443ad hugolib: Correct repeated spelling errors in documentation
f26344ae Fix typos
26443287 Update smooth scroll header links and config page
68476fdf Add smooth scroll to header links andpdf icons to anchors
872a67a8 Update code block
2e677d5a Update styles for code blocks
f9016d40 Remove public folder
20b57f87 Attempt further fixes with Netlify build
0093be60 Fix build error in single and section default layouts
092b3e3c Fix flexbox safari issues
085ccbf4 Fix section default layout
167b7001 Fix content header in single.html
b8de89b4 Fix flexbox issues with Safari
99ee283b Update with more Getting Started and improve code block styles
9d209ada Add tags
060fe019 Replace Font Awesome with Fontello
a89fb86c tpl: Must do a extra lookup of cloned base templates
f4046033 Revert "hugolib: Add some baseof test variants"
d11f37d9 hugolib: Add some baseof test variants
b0de2c1e Add note, caution, and warn shortcodes
b9a13344 Add more to Roadmap and to Getting Started section
24fd81ab Update anchor styles
3e5ad4ae docs: Update Bitbucket Hosting Tutorial
9c979495 docs: Add article to press section
73ccb153 Update font family for functions
a71f7e0c Change font and stylesheet
5dfb3097 Update more section descriptions
36156cfc Revise site main menu and stylesheet, etc.
e459a55f Revise site main menu and stylesheet, etc.
d02359cd Add edit button
7fd88fb1 docs: Update link to blog post in community/press.md
faba90ab helpers: Fix misspells
2af2ff3c docs: Add tuorial "How to use Google Firebase to host a Hugo site"
dae6a453 docs: Fix typo in templates/functions.md
19aff029 hugolib: Skip rendering for the page tests
c71e1b10 all: Refactor to nonglobal file systems
0ada4059 vendor: Revert to previous cast
c2f69226 vendor: Update cast
f9fd6978 Revise link to stylesheet
e0897d3c Update site scripts
a01a0533 Add more content and styling
fdce08fc Update for base templates and blocks page
b676277a Make further changes to nav
c5f367f7 Make first update with actual layout (4/4)
0a5944c9 Make first update with actual layout (3/4)
304e6eae Make first update with actual layout (2/4)
868dccef Make first update with actual layout (1/4)
8e879422 Update with first round of nav scaffolding
48677581 Update README to include link to Discuss forum and proposed source org
9b152d88 Update theme.toml for first Netlify build
3e04d066 Update theme.toml for first Netlify build
24512fa8 docs: Add engineering.invisionapp.com to the showcase
7241253c docs: Multilingual documentation for frontmatter params
1e799008 docs: Add netlify to the list of static hosting solutions
72cffed8 docs: Add picturingjordan.com to the showcase
feeb93d4 Add pygmentize to the hugo snap
95ad3ad2 tpl: Improve generation of OpenGraph date tags
91c569c7 docs: Add petanikode.com to the showcase
99fd7c68 cmd: Remove empty tags/features strings in theme.toml template
d949c34a docs: Add Dokuwiki to hugo conversion tool
7dc94581 make: Fix typo
940c5d8b docs: Add tumblr-to-hugo to tools section
3ac1b9fe tpl: Fix deadlock in cached partials
dc61d3b6 docs: Update author credits in GH pages tutorial
3818d696 docs: Update tutorial on GitHub Pages deployment
85c75783 tpl: Fix broken benchmarks
0d0e0699 Add first round of single files for functions
92ba7219 commands: Fix newly broken server flag handling
1d7b9606 Clean up Makefile (#2924)
db33a33e Show full template error
d6000a20  all: Refactor to nonglobal template handling
4ea4359a hugolib: Avoid double-encoding of paginator URLs
bc06135c helpers: Allow tilde in URLs
45e3ed51 all: Refactor to non-global logger
24a28679 Add the instructions to install the snap
56c5eadc hugolib: Remove summary.go
3d058a93 hugolib: Allow arrays of arrays in frontmatter Params
3286b24f commands: Show OS and ARCH in version output
2989c382 tpl: Add truncate template function
9c19ef0f target: Add COM0 and LPT0 as reservedNames on Windows
9f20e648 hugolib: Sync page collections with Site.Info on rebuild in watch mode
c60c41e0 commans: Remove unneeded build constraint
01ee525f hugolib: Correct usage of "shortcode" in error messages
1b46d2cf commands, vendor: Remove log level setting in Jekyll command
fff6617c vendor: Update jww logger
0dad6932 docs: Vanity-update of site meta description
001dd01e helpers: Remove unusded WordCount
b8544389 Create first commit of new concept hugoDocs (continued)
e856f241 docs: Update references to _index.md
49a840be docs: Add new article about Netlify's PR site preview
e3e5600b helpers: Fix minor typo in error message for Seq()
19b6fdf2 tpl: Fix Unix time test case in TestDateFormat()
b8057b49 vendor: Fix broken build
2127203a Update documentation and test for sitemap template
cb63e87f hugolib: Clean up a benchmark
c344b190 commands, helpers, vendor: Update to the latest jww logger
2ac9817e helpers: Add doc to Language.SetParam
4352156a commands, helpers: Fix docs
52976da0 commands: Fix case in default config variable
6fb4f048 commands: Fix case in names of some methods
be39ae5e docs: Fix typo in overview/source-directory.md
2ece1b32 docs: Add heimatverein-niederjosbach.de to the showcase
433c0361 docs: Add dbzman-online.eu to the showcase
0d330b0d docs: Fix typo in v0.18 release notes
6a51216c docs: Don't use binary version in docs site
5834efd5 hugolib: Add a taxonomy test case
f79877cb Remove waffle.io graph from README
a60ec063 docs: Replace .Now with now
09a0af94 Fix  Appveyor Windows build and GitInfo path issue on Windows
6e0f326b hugolib: Deprecate Page.Now
695be00c hugolib: Bump the current warning deprecations
cabc6b31 tpl: Add now function
707d3cf1 docs, tpl: Fix documentation of  UniqueID
7d072fbb source: Make UniqueID ... unique
02d6f532 tpl: Use HTTPS in Google Analytics template
73c1e271 docs: Add HugoPhotoSwipe to the tools section
6374d82b travis: Add GOARCH 386 test
e9e4fd90 docs: Add release notes for Hugo 0.18.1
a18b9e72 vendor: Update Cobra
95a473e7 Fix Dockerfile
211d20a3 docs: Update GitLab depleyment in /themes/installing.md
164d0fb6 docs: Hide next arrow in theme
8a63e092 docs: Remove right padding in theme
83b4c405 docs: Fix h1 size on small breakpoint in theme
c22b7ff8 docs: Remove unuseful breakpoint in theme
84896080 docs: Fix menu arrows position on mobile devices
bcb3ef74 hugolib: Fix preserveTaxonomyNames regressions
862f09ba docs: Add hugofy for VS Code to the tools section
6affd31b livereload: Simplify RefreshPath
88b5bbd5 hugolib: Fix IsTranslated for "old" node types
d1b89f5c hugolib: Use reflect.DeepEqual in tests
17f85178 hugolib: Fix redundant URL file extension on taxonomy terms pages
e78dd3cd docs: Enable ToC for extras/shortcodes
7d991ed8 hugolib: Make template error messages more verbose
3e4fbbaa helpers: Add patch version
99e5fc63 vendor: Update Afero
63d3c4ce vendor: Temp roll back to an older Afero
bc060ee1 tpl: Update dateFormat test expectations for epoch values
b0e86dcd vendor: Update dependencies
d055862a tpl: Fix crash when using imageConfig
8b0c3b9b helpers: Remove "no theme set" warning
34c87421 tpl: Update getenv to accept interface{} params
29caaddc tpl: Update title to accept interface{} params
661d64c4 tpl: Update upper to accept interface{} params
4e5b4ac5 tpl: Update lower to accept interface{} params
6b8422bb tpl: Update hasPrefix to accept interface{} params
f25f8373 Update Travis go versions
441476b6 docs: Convert code in multilingual.md to TOML
ec34ed05 docs: Add neavey.net to the showcase.
a4fc20a1 docs: Fix typo in templates/blocks
e7ff094d docs: Add details about binary names for setup on Windows
b2687ab1 command: Add `themesDir` command argument to specify themes directory
4845a13c docs: Update christianmendoza.me in the showcase
1881f60a hugolib: Add a test assertion for IsTranslated
1eb07954 docs: Regenerate commands doc
1e313ced Bump to 0.19-DEV
8b410347 Add GoBuilds to .gitignore
09cc7915 docs: Add new alias feature to release docs
3d6fdb8e Bump to 0.18 release version
4de808ae docs: Add 0.18 release notes
018813ca vendor: Update go-toml
71aa797b docs: Fix broken link to Content Types
6fd4bfca docs: Update layouts path name
79b2725a docs: Improve documentation for block templates
a3a67163 hugolib: Enable override of theme base template only
596bbea8 docs: Clarify single page template search path
26084ad1 docs: Fix pipe examples
fa09e20d docs: Fix Ref and RelRef syntax
2f0e8198 docs: Document partialCached func
9c2ea369 docs: Add .Site.RegularPages docs
d332aa16 docs: Update GitInfo usage docs
f8190777 docs: Cleanup Extras menu ordering
aecabfcd docs: Add Extras > GitInfo
ef03c6f9 create: Allow empty dates in archetype in new
e4ebe0d5 docs: Fix querify example
7862de91 tpl: Add a querify test case that is actually and URL
83c68065 Fix menu URL for node type pages
c7f67dd6 docs: Clarify usage of archetypes provided by themes
b4404a95 docs: Update File variables
a1c25bea Create first commit of new concept hugoDocs
b4cbccaa docs: Fix prev/next links in content section
e90cb153 next: Move content files to prepare for new layout
e3d48760 hugolib: Fix comment
d4b9fa96 hugolib: Respect disableRSS
5b1eee44 tpl: Avoid repeating the same test case in TestMD5 and TesSHA*
22360566 docs: Fix linebreaks in templates/variables.md
0f6c73cf tpl: Add sha256 template function
01b8bc1b docs: Update description of querify
0ba9fb96 docs: Document querify template func
ba8a00a6 hugolib: Add regular content page count in publish summary
15622c80 hugolib: Remove superfluous assignment
2f026ab3 hugolib: Make RawContent raw again
971d1baf commands: Add noChmod option to disable perm sync
a4b9abf0 vendor: Update fsync
529574e6 create: Run all the test variants in TestNewContent
c87331ae hugolib: Fix rendered empty msg
b2eadd93 create: Simplify archetype logic
96018ab9 create: Fix archetype title and date handling
65d4d96e vendor: Update go-toml
b7e80045 makefile: Add test-cover-html
20d82a7a hugolib: Create the permalink once only
046320d3 tpl: Fix params case issue with nested template funcs
c38bfda4 hugolib: Fix regressions with uglyURLs
1f6e0de3 hugolib: Avoid repeated Viper loads of sectionPagesMenu
dbb0c1cf hugolib: Add shortcode for Instagram
001e2bbe docs: Set correct default archetype directory in overview
2c7cbca8 examples: Update blog example
68ebf616 examples: Update multilingual example
4c72eb12 commands: Simplify
65e5959b helpers: Simplify
139585f8 tpl: Simplify
a721fbed target: Simplify
3739871f transform: Simplify
43604520 hugolib: Simplify
f1ed89fe Revise the deprecation strategy
0a0db9cd hubolib: Simplify map range
ff2498ee Remove ShowPlan
a6d584bf vendor: Update go-toml
1156be3b vendor: remove afero/sftp deps
e0b27820 Fix alignment of go gets in Dockerfile
c06c3234 helpers: Fix typo in language.Get documentation
c8d41141 hugolib: Add missing paginator test case
c33eb935 tpl: Add some missing test cases
174f97a9 tpl: Fix spelling in test
7665dd23 tpl: Drop an else block in checkCondition
581291dc hugolib: Omit type from declaration of var lang
32336e9e hugolib: Camelcase ALL_CAPS vars and const in tests
75e55cd0 hugolib, source, tpl: Fix docs
e81c06c3 helpers: Rename WalkRootTooShortError to ErrWalkRootTooShort
647540d0 helpers: Add documentation to some Language methods
700d531a helpers: Use iterate operator by int in Emojify
713f577a commands, hugolib: Unify case of config variable names
dec1706a commands, hugolib, parser, tpl: Use errors.New instead of fmt.Errorf
1f130fd6 commands, hugolib, source, target, tpl: Get rid of some fmt statements
120f6b0c all: Use jww instead of fmt for printing
e1da7cb3 Fix case issues with Params
a5b3b076 docs: Add Pages to variables section
382582fc node to page: Re-add translations sort of regular pages
6c0ecc2d docs: Add release notes about node to page
e29f6fe5 docs: Add sections on node now being a page
0eb5f54d node to page: Fix site pages sort
976f8f84 node to page: Fixe index page translation issues
aafbd3b4 docs: Revise docs to reflect that Node is gone
ae1de7ab docs: Make the tools content page a section page
7e81971b node to page: Don't repeat the RSS title if it is the same
f776af6c node to page: Temporary set RSS date to zero
0bbdcf24 node to page: Render aliases before pages
32fb1e6f node to page: Need to append theme templates
28031b08 node to page: Only return regular pages in home.Data.Pages
a843d5d3 node to page: Final TODO-fixes
99d11386 node to page: Fix the Page copy()
62e9e7e6 node to page: Misc. TODO-fixes
524eb166 node to page: Handle URLs
c8d3124d node to page: Remove Node
9347084d node to page: Make Kind a string
9fba2a30 node to page: Rename PageType to Kind
96f71141 node to page: Export GetPage to the templates
487b210f node to page: Handle Date and Lastmod
c80308e6 node to page: Add Pages to Page
063b78d2 node to page: Make Nodes into Pages
88972b0d node to page: Refactor the build process
640b8bed node to page: Handle sections with only _index.md
2d91b17c node to page: Handle aliases on home page etc.
7cb0e34d node to page: Handle menus on home page etc.
ecedc85c node to page: Handle taxonomies on home page etc.
d3d3863c node to page: Add all nodes to sitemap
7cc637e9 node to page: Do not create section node for root
503fb299 node to page: Get Rebuild up to speed
80e453f1 node to page: Fix home target path on Windows
94ea12eb node to page: Remove unused code
bde1bfd3 node to page: Handle aliases, 404, robots.txt, sitemap
ec2d502b node to page: Handle translations
698b994f node to page: Fix the page collections
c175407f node to page: Use _index as identificator for the list nodes
3ff25b37 node to page: Handle RSS
75c38071 node to page: Create pages for nodes without content
f8bda16e node to page: Handle taxonomy terms
3737c9bc node to page: Handle taxonomy lists
c2f3cb2d node to page: Handle sections
734b6508 node to page: Handle home
e371ac0b node to page: Basic outline
e7d0bc8a Revert "Fix case issues with Params"
239c75c7 Fix case issues with Params
1eb3c4a8 docs: Fix list template link
30317934 docs: Add a simple list template
3b42640e hugolib: Don't write zero-bytes files to disk
65f803e1 docs: Rename RSSlink to RSSLink
29fda0e6 commands: Make benchmark command more useful
7b8a09d5 docs: Add balaramadurai.net to the showcase
ce5f41ff vendor: Update deps
a49f838c tpl: Add imageConfig function
950034db source, tpl: Fix staticcheck complaints
bb36d57b docs: Fix typos in extras/scratch.md
4d4c7791 hugolib: Must update PathSpec on SiteInfo per language
85a2d81e commands, tpl: Get rid of repeating viper accesses
4b4ab475 hugolib: Fix page sorting when weight is zero
52e2fd27 docs: Add article by Zetao Yang
b619eb5a docs: Compress Hugo logo (hugo.png)
07eb3a50 tpl: Golint fixes
d4830fc4 helpers: Golint fixes
72156e40 hugolib: Simplify range
8dace9ad docs: Update roadmap
f4afd133 Enhance commit message guidelines
ec44ad5c docs: Link latest change as commit in the footer
774f13bd doc: Add a "Deployment with rsync" tutorial page
0cd0adda transform: Return any read or write error from Apply
3a86aba5 commands: Move initialization of flags in separate function
c9be931e docs: Remove non-showcase Hugo sites
e8380e61 Add GitInfo
186db7cd Fix page names that contain dot
cda3b36f Revert "docs: Add www.bullion-investor.com to the showcase gallery"
b5bc74ca docs: Add www.bullion-investor.com to the showcase gallery
01cfcce6 docs: Add two articles written by Hash Borgir
6a3d1037 Fix RSS Title regression
342b6fe8 Make it clear that Path is relative to content root
4ad39445 Refactor Page tests
f5b26455 Remove Wercker config
301e4c7e Make Amber read from the Afero source file system
0406be3d Add missing template error logging
89e31256 Get rid of the rawContentCopy field of the Page struct
c936b6c8 docs: Fix punctuation in content.md
c859810b docs: Add clearhaus.com to the showcase
a2cc2e75 docs: Fix typos in content section
333bb055 Remove now superfluous lowercasing
5859c691 vendor: Update Viper
f21e2f25 all: Unify case of config variable names
d9f54a13 Handle ToC before handling shortcodes
165edc7f tpl: Fix comment
a10b2cd3 Avoid reading from Viper for path and URL funcs
dffd7da0 docs: Clarify installation of themes
6427fba9 docs: Improve instructions in quickstart.md
db86f480 docs: Add dmitriid.com to the showcase
1992b356 Bump Travis to Go 1.7.3
d0d24b43 commands: Do not print error on missing unknown dirs
f0af8075 commands: Only watch relevant themes dir
ddf2a340 Add page context to error logging in rendering
67df33d8 Fix a more summary corner case
58f31d27 Consolidate the Param methods
faa64abd docs: Add singular/plural i18n example
e6f2426e docs: Add christianmendoza.me to the showcase
3a5b7027 docs: Add fixatom.com to the showcase
6a7f989d docs: Add hugojoomla to the tools section
7f4d9025 docs: Remove merge artifact
df943595 helpers: Slight improvement of ToLowerMap
40b1b8f7 Fix case issue Viper vs Blackfriday config
4d6cd3cb docs: Update link for Ace template site
2ea22a42 docs: Add docs.eurie.io to the showcase
0456f950 docs: Add GitLab to Forestry.io integrations
35dda2d9 Fix pygments check in test
9ee2538e vendor: Add external
2e0e77be Make the pygments shortcode test matching less specific
10a773cd Implement support for alias templates
88675473 Updated link for Ace template site
8b43d39e Use govendor sync instead of get
3ce90466 Rewrite TestRSSOutput to use Afero
58825677 Add workaround for block template crash
794589fb Use example.org for replace-this-with-your-hugo-site.com
4e0c71a6 Added GitLab to Forestry.io integrations
8fa871a0 all: Remove dead code
766c82a6 Add context to asciidoc/-tor error logging
9f9b93af Add logging of asciidoc/-tor errors
998034fa Log on error in translation file
eb00c621 tpl: Remove the spamming template errors
8ddd95e3 tpl: Factor out double Lookup in executeTemplate
474eb454 tpl: Add partialCached template function
d2bc64be Add draft test
5355ddf6 docs: Remove deleted article "Hugo on Netlify — Insanely Fast Deploys"
bfe9b870 docs: Add "Hugo on Netlify" article to press.md
8a63ebcb docs: Add shapeshed.com to the showcase
9d0b1320 docs: Add thecodeking.co.uk to the showcase
71422a7d docs: Add Firebase Hosting to usage.md
df7b8b5c docs: Add Firebase Hosting to hosting providers
b3bcd78f docs: Add webhook to tools for deployments
8d509258 docs: Mention GitLab hosting support
8b8a1e0a Fix broken build
0206be02 hugolib: Prevent TestShortcodeTweet from accessing network
7b0f92db vendor: Update Viper
1f087794 snap: Add "network-bind" plug for "hugo server" to work
a7e2a04d docs: Add Forestry.io to the tools section
c2bf748e docs: Refactor /docs to use the block keyword
56512e81 Allow to set cache dir in config file
3616fb62 command: Fix hugo new for multiple architectures
cf5d2e27 vendor: Revert latest Viper
1c214fcb Add quiet mode
7cdd230e vendor: Update dependencies
a22294aa docs: Stylize "Mac OS" as "macOS" in v0.17 release notes
6195d8f7 docs: Fix grammar in v0.17 release notes
1adfaf49 snapcraft.yaml: Bump version to 0.18-DEV
d54d6633 release: version bump to v0.18-DEV
e1e677f6 snapcraft.yaml: Bump version to 0.17 for release
fe2d246c commands: Bump min_version to 0.17 for "new theme" subcommand
5b9f4883 release: version bump to 0.17
8bc390d8 vendor: update viper to latest version
f9c70c0f add release notes for v0.17
57d7dd5b docs: Add rahulrai.in to the showcase
fbce8445 Whitelist startinline pygments option
27d7aa5f travis: Reintroduce asciidoctor to build
f8e968b2 snapcraft.yaml: Change grade from "devel" to "stable"
00b3667f travis: Remove asciidoctor from build
217d6ea6 travis: Fix asciidoctor build
f37f57a8 travis: Lock asciidoctor to 1.5.4
b3a113b7 docs: Regenerate commands doc
2a4ed1c4 Add hugo env command
80367ea2 docs: Us vs you
88ec7d88 docs: Improve home page
ffbf3dd3 doc: Improving language in archetypes doc
0721a9c7 Update Dockerfile to pull in missing test dependency
d9c1f1ee docs: Add Lipi to tools section
bf0dfa3e Fix URL in multilanguage sitemap index
d30c6a26 docs: Fix typo in tutorials/how-to-contribute-to-hugo.md
50c43c36 Contributing: Link the "How to contribute" tutorial
0043b486 docs: Add notes about multilingual menus
78e5263c Readme: Clarify usage of Gitter
e36b0305 docs: Add tryo labs article to press.md
614dd2aa Deprecate PageMeta.WordCount etc.
59df7db7 Fix half-broken self-closing shortcodes
8b0d16b8 docs: Fix typo on hosting-on-gitlab
6b4d3263 commands: Revise instructions after "hugo new site"
0c223d9c vendor: Update Viper
a61b1497 vendor: Update cast
a0167d83 Fix leaky goroutine
63a6da06 Make multilingual respect DisableSitemap
73894cca Add TestChangeDefaultLanguage
2071d470 tpl: Polish i18n tests
e7e2a1ca tpl: Improve tests and docs for i18n
e7ff5c2d vendor: Update go-toml
608b90da vendor: Update dependencies
894b69db Remove some unused vars
9c017e51 commands: Add some band-aid to convert
2105e42a tpl: Set i18n bundle once per test run
6e692f2d Add vendoring with govendor
b3a72155 Fix i18n with missing translations and add tests
bacc1706 helpers: Skip TestGetRealPath on Windows when not in CI
98c12b7b Fail early in TestGetRealPath
4a79fa0c Revert the "standardize author data"
83533a88 docs: Improve Overview Configuration manual
a7af6303 Make suure SectionPagesMenu setting is always loaded per language
b6673e53 docs: Add documentation for author profiles
56afd943 docs: Add  multilingual alias example
51c9bfbc Remove Authors.Sort
cf978c06 Add First Class Author Support
44bf76d0 Add snapcraft.yaml file
74291114 docs: Clarify difference between slug and url
e80453a9 tpl: Add EnableMissingTranslationPlaceholders option
0dd57b90 docs: List i18n folder in source organization
bca567fa docs: Clarify usecase of data files
0c49370c docs: Fix example of displaying taxonomies
3410007d docs: List multilingual tpl vars and show menu creation
9dab62c5 docs: List config options for multilingual feature
4e16a6d4 docs: Fix markdown in content/extras/scratch.md
cdf1edd5 docs: Fix French translation in multilingual.md
0d1e9670 docs: Improve Traversing Local Files
b86a605b Make paginate settings configurable per language
bbb11a4a Do not add lang prefix in URL when set in frontmatter
dd45e6d7 Lazy calculate  WordCount, ReadingTime and FuzzyWordCount
4abaec5c Improve TotalWords counter func
bcd43479 Avoid splitting words for summary
74ffb45f helpers: Improve the language prefix logic
f53145b2 helpers: Avoid adding language prefix if already present
8d040c96 commands: Improve error messages in convert
a04abf0d tpl: Make the *langURL funcs tace interface{}
7615ef0c commands: Report errors in convert
be09781a Fix broken convert command
69a97823 Add Language.LanguageName
a7dc3c08 Support site menu per language
f0ac26c9 commands: Fix typos
3908489c tpl: Extend where to iterate over maps
64012142 tpl: Fix typos in tests
46342ad5 hugolib: Fix typos in tests
c700cdc3 Replace some leftover os.Stat with hugofs.Source
ef3c4a56 Fix reload dir matching in theme
364e69ab Handle symlink change event
e70cf1ac docs: Remove JPEG as format for showcase thumbnails
d5379fd1 docs: Add davidyat.es to the showcase
4d1cb500 parser: Use strings.Contains instead of strings.Index
798bf60c parser: Simplify err conditions
60baec80 commands: Delete useless conversion
2294b022 commands: Simplify err condition
1e180873 commands: Delete unused newUserErrorF
5867cb5a Fixe target path location check in jekyll import command
7d3dfba8 Prevent panic on empty authorlist
33921331 Remove redundant field in sort helper struct
9c5f2bef tpl: Make it more clear on  missing language string
43bf9ed3 Redirect to root when DefaultContentLanguageInSubdir = false
4df86a70 Fix paginator counter on x86-32
eaf2f9bc Add TODO list support for Blackfriday
76bf2dcd Fix shortcode vs pygments
ccb3040a Fix pagination page counter on 32 bit
fe0c2705 Reset the i18n func map on reload
5ef45bec docs: Fix typos in multilingual section
97c57fe3 Add missing read lock in getNodes
a8fad866 Bump Travis to Go 1.7.1
34fe5cd3 tpl: Fix echoParam
a00edff5 Make it the DEV version
35d2eac4 Fix go vet 1.7 issues
09ed41be Add a global Reset func
dc3618ab Make sure the 404 node has .Data.Pages
30d65fd4 Fix site reset for benchmarks etc.
b3563b40 Fix multilingual reload when shortcode changes
a823b157 Set lang template globals for each site when render shortcodes
28696b5d Small adjustment to SiteInfo init
2f7e8df5 docs: Fix spelling: HasTranslations > IsTranslated
1bce8a85 Create a copy of the section node for RSS
bbfebdea Fix Data in multisites
93717aac docs: Get the variable and funcs re multilingual up-to-date
4fbce787 Add JSON config to the multilanguage testing
d8a256c1 Fix YAML loading of multilingual config
446e606a Add data tests
5b331a18 Add temp MULTILINGUAL version suffix to this branch
a07293cf Create a Node map to get proper node translations
d1212307 doc: Fix TOML vs YAML in multilang section
45c69dd1 Handle error in config loading
76108440 Add IsTranslated to Node and Page
8b55bfc8 Remove unused Multilingual Viper default
f1e1cdab Improve i18n string handling
8da04034 Render main content language in root by default
d953e39e Add parent as owner to Site
9798a956 Make the check command work in multilingual mode
6b552db7 Make sure drafts etc. are not processed
e56ecab1 Multilingual TODO-fixes, take 1
0a7d1d0d Fix some corner cases in revised summary handling
d18a8cbe Fix livereload in multilingual mode
506e131f Fix the shortcode ref tests
54141f71 Improve language handling in URLs
2079a23d Make it possible to configure Blackfroday per language
596e0e98 Make it possible to add a language in server mode
7cac19b1 cmd: Load config from the common config loader in hugolib
8b657a11 Get the list commands up to multi-site level
90de5110 Make taxonomies configurable per language
36f2a1f6 Make the config loading testable
b6fcb3d0 Add sitemap index for multilingual sites
d5720717 Redirect to main language from root
f0b91852 Rework the multilingual docs
ed098540 Render the shortcodes as late as possible
708bc787 Optimize the multilanguage build process
f023dfd7 Move the Build* methods to HugoSites
5b9c2a40 Move HugoSites to hugolib
3a028079 Add Translations and AllTranslations to Node
52bf8f90 Rework the i18n template func handling
75dd596e Introduce HugoSites type
618948e4 Reset translation slice on rebuild
c447b7dd Rename MainSites to Sites
c4e7c370 Add Translations and AllTranslations methods to Page
06d12ab8 Add proper Language and Languages types
ec33732f Add multilingual support in Hugo
faa3472f docs: Fix typo in Quickstart guide
ccc51fe7 docs: Add open.cinegy.com to the showcase
723d4656 docs: Add Vim/Emacs plugin to tools section
a48ac6e9 docs: Clarify first level URL generation
0614a59b docs: Improve Quickstart guide
696c67b0 docs: Clarify Creating a New Theme
bb1812b6 docs: Mention theme config option on Usage page
8e1bcea8 docs: Update documentation for URLs
b6635e1b helpers: Fix bug in emoji renderer
7cb81077 docs: Correct spelling for "parameters" in partials.md
38d034df docs: Document shuffle template func
6eff9e50 docs: Update highlight.js example to latest version
2fc05dad docs: Add location of block template
fee9ee72 tpl: Add missing arg to Fatalf
20c4311d Switch to a more up to date TOML library
81f04ef4 docs: Clarify Usage
2530087a docs: Add Spanish video tutorial by Verónica López to press.md
715d4425 hugolib: Use named keys in composite literals
c5d07299 docs: Just a small grammar fix in quickstart.md
3ce9de76 docs: Follow through on watch default
68c8e0e2 docs: Correct name of release archives for OS X
be429d22 docs: Correct all erroneous swaps of "it's" and "its"
8474b9de docs: Improve section 'Why did you write Hugo?'
de1ca477 docs: Fix URLs in examples sites with path prefix
f914774f Remove broken Bitdeli badge from README.md
5498a1bd tpl: Return all errors from casting
d3627b17 Simplify Travis build
d72c454f Fix command for getting hugo in CONTRIBUTING.md
97c37732 Add a global Reset func
2175ea5b Bump Travis to Go 1.7
661c9787 commands: Suppress 'missing static' error
f6d4801b Skipt Twitter test in short mode
09612f7a tpl: Fix faulty ordering of relURL test cases
88dcbc6e tpl: Make absURL and relURL accept anything
26725515 docs: Convert toml to yaml in config overview
39df7724 source: Normalize file name to NFC
b33bfd40 docs: Add doc for time template func
f2faae08 Remove maximeguitare.com from showcase
0d9c0677 docs: Add rdegges.com to the showcase
914e4d85 tpl: Fix typo in FindRE test
93f3a85b Fix the time template func test
70544f9e tpl: Add time template func
d7f364c2 Fix for meminterval not using specified interval
5824e809 docs: Add romansilin.com to the showcase
b426c20e Return specific error on walk path too short
15b66935 Adjust the sanity check to path length 4
94d99898 Add sanity check to the file walker
802d43cb Disable Go 1.5.4 in Travis
285807ba Take 2: Load templates from the Afero source fs
ec23aa99 Load templates from the Afero source fs
5f5fccbc Do not return empty theme dirs
4ddd5361 Use the Afero source fs where relevant
a0859dc6 Make LazyFileReader use the Afero source fs
94892726 Handle errors during filesystem walk
0087beef docs: Add tumblr2hugomarkdown to tools section
0d0a7596 docs: Add tumblr-importr to tools section
5b40eeed examples: Add example for translation files
04889a5e docs: Document .File variables for pages
333646c5 docs: Drop .isDraft to new line
e3e1f7a2 docs: Add a link to hugo-openapispec-shortcode
ddd5a922 docs: Removed comma from json example.
df0a4534 docs: Add missing configuration option disableHugoGeneratorInject
9c458657 docs: Add weilinshi.org to the showcase
17f53526 docs: Add CTL Compiled edtech blog to showcase
76f332bf docs: Add www.leowkahman.com to the showcase
3e1b579c Be less aggressive with CHMOD filesystem events
91b61b97 Simplify the configuration of HugoHTMLRenderer
4d4da001 Fix broken shortcode test
39a452a4 Add "missing slice" to the Params test
593a546f Check for nil Params in shortcode's Get
0bdc0d62 Add shortcode null param variant
198efc89 docs: Add Algolia as commercial search service
e9924e96 Add shortcode test for mmark
c0eedfe9 docs: Update last-mod date of installing-on-windows.md
10ad648e docs: Fix PATH issue in the instruction for Windows 10
20555b16 Add `htmlEscape` and `htmlUnescape` template functions
7dd5cd67 Bump Travis to Go 1.6.3
3564f09e tpl: Add humanize examples to smoke tests
55a4f6e4 Do not double-escape in querify
ef9b9156 Revert "Throw a noisy error when a post has no layout"
318558f2 docs: Add 404 template
b1593400 Throw a noisy error when a post has no layout Fixes #1313
af34613f Update frontmatter.go
0a812beb tpl: Modify tpl.humanize to ordinalize integer input
330639d2 Fix panic when using URLize
32d82a44 Ignore emacs temp files
d44bb4ec Revert "Use bufferpool in Asciidoc handler"
7c125ebb Revert "Use bufferpool in Rst handler"
adf40549 Fix humanize when string is empty
d9bc233f Use bufferpool in Rst handler
00d70e55 Remove []byte to string to []byte conversion in Rst
068a7715 Use bufferpool in Asciidoc handler
ed5ad12a Remove []byte to string to []byte conversion in Asciidoc
1d7f4413 Consolidate the Render funcs
4a48b5f3 Replace replace-this-with-your-hugo-site.com with example.org
b8af06f2 Make auto-date disabled by default
b581bbd8 Make config flag global
223073c6 transform: Add missing GoDoc
39fe42cf Simplify querify
fbf48824 tpl: Add a querify function to generate query strings inside templates
770df77b Add Docutils to Travis
05a33e31 Add Asciidoctor to Travis
e6d97c4f Add Rst shortcode test
5388211c Add Asciidoc shortcode test
6c0f7052 Fix Emoji benchmark
aa66478c Add Emoji test case
7e08d23e transform: Explicitly bind LiveReload to server port
0ce64382 docs: Update install instructions to reflect hugo.exe filename change
e140070c docs: Add tutorial for GitLab Pages
ca6b26fe commands: Allow schema-less baseURL on command line
5572e349 Update Travis config to Go 1.6.2
195a2b38 docs: Suggests the use of delimiter for taxonomy listing
364686ec docs: Add additional example for taxonomies listing
eda36787 Add automatic page date fallback
c21e2b3b tpl: Enable safeHTMLAttr
cdd6a124 Add test for shortcode in fenced code block
e3b162cc transform: Don't use helpers.StringToReader
e2aea651 helpers: Remove ToReader funcs
29ca323a docs: Regen commands doc
1accd3ba Fix example for autocomplete
a4b84962 docs: Fix typo is 0.16 release notes
ca5ae50c Revert "docs: Refactor /docs to use the block keyword"
3a2748e0 docs: Refactor /docs to use the block keyword
357c9db2 docs: Add mtbhomer.com to the showcase
714d4a9a Fix failing Windows test
44edd938 Add tests for embedded shortcodes
8b54843a hugo: Revert git commit message guidelines
373ca662 hugo: Update contribution guidelines
c52bb4ef commands: Specify os port generic errors
aa690c8e commands: Fix charsets in mimetypes
34f40044 Fix shortcode in markdown headers
6ba07456 docs: Add upbeat.it to the showcase
c01f9825 docs: Add mayan-edms to the showcase
85881033 Unexport ShouldBuild and AssertShouldBuild
eeaafb4b hugolib: futureStats plural
fb0c1350 hugolib: Handle unpecified date for IsFuture and IsExpired
673e41bf hugolib: Add expiredStats to build feedback
32c0e3fd hugolib: Bug fix futureStats
4724a579 hugolib: Refactor page.ShouldBuild and table driven test
f7b2e532 docs: Add ExpiryDate to the list of variables
448f0306 docs: Example of how to use Order by ExpiryDate
02d2f05e docs: Add instructions on buildExpired in build configurations
6e9fbf8a docs: Add expirydate to front-matter doc
5461a5e0 commands: Add listExpiredCmd for expired pages
51f7cd9b commands: Add buildExpired flag
c1c8ecc9 hugolib: Add GroupByExpireDate function
091915c7 hugolib: Add sort ByExpiryDate function
6472f158 hugelib: Add expiredCount as a Site variable
d4156e61 hugolib: Support an expiration date
2564f46a Fix Emojfy for certain text patterns
683888eb Change hugo to Hugo in help text
5d3aabcb Update the alias generated HTML files to conform to the W3C HTML spec
75deb923 Remove unneeded casts in page.getParam
acbedf62 Fix urlesc import url in Dockerfile
48ebd598 docs: Add jamescampbell.us to the showcase
f9cadee8 Bump version to 0.17-DEV
7212e513 Update release-notes.md
b7513ea6 Get Dockerfile up-to-date
a7f51703 Add Hugo generator tag to home page if not present
80ebe057 Update release-notes.md
60184823 docs. Add the guranteed exit -1 on eror to Hugo 0.16 rel notes
cf10d4ce Some polish and addends to 0.16 release notes
d4e5fa6f Pull the shootouts about 0.16 into the intro section
26c18005 Remove HugoVersionSuffix "-DEV" prior to 0.16 release
834d4177 update release notes for 0.16 release
f94cd281 Handle errors during rereading properly
d1cf262b Ignore __jb_tmp___ files created by IntelliJ
f8e4a060 Annotate temp files that Hugo ignores
ce05dfa5 docs: Grammar fix in overview/quickstart.md
4ab5ed6c docs: Add Digital Ocean articles to press section
d486396f docs: Add c't magazine article to press section
20358f46 docs: Document UniqueID page variable
56116315 docs: Add an example of how to use .PrevInSection
c21b1558 docs: Add note about live reload script injection
dcee05b2 docs: Fix minor typo in overview/quickstart.md
efae41c1 docs: Add novelist.xyz to the showcase
90362933 docs: Fix typo / readability in extras/menu.md
6dec7b3e docs: Add stefano.chodino.uk to the showcase gallery.
dec74431 docs: Add klingt.net to the showcase gallery
9305deca docs: Clarify that watch is enabled by default
9aa70af1 docs: Fix git clone for hugo_theme_robust in quickstart guide
ac938d9d docs: Improve description for .Hugo.Generator
64817cc0 Fix broken template test
26906d85 Don't add any space around Emojis
608cfe62 Remove kr/pretty dependency
fd40fe39 docs: Document relativeURLs
b5030782 Ignore Byword temp files
273a6840 Add non-string support in markdownify
7cbafa4e docs: Fix typo in overview/configuration.md
a07889d4 docs: Fix typo in templates/content.md
bf4206a0 docs: Fix links in the documentation
5caea6f2 docs: Add 2626.info to the showcase
09038865 tpl: Add intersect operator to where function
ffbd2b6c docs: Add appernetic blog to showcase
2b02a402 commands: Sett mime type for CSS in Hugo server
e4ee1b89 helpers: Use net/url for URL parsing in AbsURL
16b71bbb Export "detectFrontMatter" to fix caddy-hugo
c5723a89 docs: Add aydos.com to the showcase
4152ce88 Update release-notes.md
7da9163d docs: More on release notes
efa9bdcc docs: Order by Lastmod in release notes
eb627ca1 docs: Order by Lastmod
10af9063 Add ByLastmod page sort
fbca53ac docs: Add notion of exiting the themes folder in quickstart
fe2b22fe docs: Grammar fixes in overview/quickstart.md
19afa5ee docs: Update showcase screenshot of yulinling.net
81a2466b docs: Add some more fixes to release notes
ebefa476 docs: Move image-width fix to style.css
48fce611 docs: Move Algolia styling into style.css
22683a3b Make alias redirect output URL's relative
76738347 docs: Fix findRE typo
a8e05b11 docs: Fix some typos in release notes
56cd3081 doc: Get feature list of 0.16 release notes up to date
01c33898 📚 Add ENV support to release notes
9ddf5202 Update import path of fsnotify
5e9b147c docs: Add some doc about ENV config
b7fd4102 commands: Support config from ENV
0743c767 docs: Fix typo in tutorials/how-to-contribute-to-hugo.md
77159b4b Add some schemaless BaseURL tests
215b8939 docs: Fix grammar in templates/partials.md
fed5f20f docs: Add tutorialonfly.com to the showcase
4b4bfa6a docs: Fix lastmod date for chipsncookies in showcase
6fdb0ca6 docs: Add barricade.io to the showcase
ba0a6614 docs: sa.muel.be has moved to chipsncookies.com in showcase
c40bc274 Improve build labels in README
24cb0d1f tpl: Do not write to cache when ignoring cache
5d50c464 Chomp Unicode BOM if present
d48b986c Revert "tpl: Extend where to iterate over maps"
dc8659c5 Update Travis config to Go 1.5.4 and 1.6.1
0141a021 tpl: Extend where to iterate over maps
206440ee Fix broken tests
88759eec docs: Add plainIDAnchors change to release notes
0d9a5f80 docs: Update default for plainIDAnchors
06772eef Default to plainIDAnchors
c3d28d28 Revert "Add Node.ID"
39c9ae31 Revert "Use Node.ID for anchor ID"
2468b10e docs: Fix example for Param method
cd558958 Use Node.ID for anchor ID
5ef52294 Add Node.ID
37fb2d43 helpers: Ignore cache for Pygments when flag set
c0cf1a7e Fix section menus for lazy blogger
dde967d8c hugofs: Add package doc
16ee8566 create: Add package doc
257dee53 bufpool: Add package doc
4d34a98a Add GoDocs badge
ff7eec2f docs: Regenerate the commands docs
b7efbdc1 hugolib: Add option to disable rendering of 404 page
72bda5ad Move section initialization to Site.assembleSections
8fe48a65 Fix potential data race in test
39c74b70 docs: Add commercial services to the "Tools" section
51ee3fc7 docs: Document how to install dependencies for tests
88a07b75 docs: Fix missing step in Windows version check instructions
65f94270 docs: Document Go 1.6's new ability to trim whitespace
e4d328d8 docs: Fix Go version in install guide
ac1ec5c7 docs: Remove remaining Mercurial references
9f6b5ad3 Save auto-detected markup type in Page.Markup
e6e98bf5 docs: Remove Mercurial from contribution tutorial
6c900380 tpl: Add replaceRE to the "smoke tests"
f2ff77f3 Make Hugo build without Mercurial
ebf3cef1 docs: Add "How to contribute to Hugo" tutorial
970f15cf docs: Use HTTPS links in README where appropriate
d3e82950 commands: Add helpful instuctions after "hugo new site"
1c3c148b hugolib: Un-export internal Site-methods
16ad6281 docs: Fix references to section list templates
6d2898b3 docs: Correct date for proper sorting in showcase
18738266 docs: Add one more quote
ef933e4a docs: Limit the quotes on front page to the last two years
40f62a86 docs: Use data folder for website carousel
1648e327 Document and clean SourceRelativeLinksEval code
819271cb Re-export the methods used in page group tests
3950b137 hugolib: Camelcase ALL_CAPS vars and const in tests
05b88887 huglib: Add even more missing GoDoc
85bcac53 source: Add missing GoDoc in File
ddd02b2f hugolib: Camel-case ALL_CAPS const in test
98ee8c3f hugolib: Add GoDoc to pageGroup.go
57c347e4 hugofs: Fix GoDoc
969f9311 Build Hugo in Travis with race detection enabled
fd5d5735 Add go test -race to make check
27f9e62b Remove Wercker badge
5bfe16ef tpl: Add findRE template func
54750b07 Do not create robots.txt by default
43b5dfab Disable syntax guessing for PygmentsCodeFences by default
0698f294 docs: Add yushuangqi.com to the showcase
dea06f86 docs: embed YouTube video in Windows installation tutorial
23046146 docs: Update set PATH instructions for Windows
21e0515f docs: Fix menu in firefox
1adf4035 docs: Add alternative for Wordpress import
f0dbf2c8 tpl: Add the other test case for hasPrefix
aaee0385 tpl: Sort the smoke tests
80d02a14 tpl: Add hasPrefix to the template funcs' "smoke test"
4502c4e3 docs: Add documentation for hasPrefix template func
fe929114 tpl: Fix panic in sort of nil sequence
d15fda50 tpl: Fix panic in pairList.Less
7d5c9fbf Make ByCount sort consistently
c6c2c689 hugofs: Add missing not nil checks to tests
b678e90d Use to most specific interface in WriteDestPage
c2277fcb docs: Add doc and a test for readDir
cb89ae63 tpl: Make readDir use the WorkingDir fs
4f66f790 Add readFile template func
a89035bd docs: Mention CLA in the showcase contribution guidelines
6a3a6f68 docs: Remove incorrent reference to list.html
93e41a1f docs: Fix typo in templates/functions.md
d65fbfe1 docs: Add surge.sh to main page of static site hosters
effaf6c2 docs: Document GitHub flavoured code fences Fixes #1259
e35a6921 docs: Document lastmod variable Fixes #1351
50506ebe docs: Document the split function Fixes #1997
4c95b700 docs: Add silvergeko.it to the showcase
79af7143 docs: Add robertbasic.com to the showcase
dbfc7ea0 Fix error handling in SymbolicWalk
bfe80094 helpers: Fix SymbolicWalk for the root folder
977b0e34 docs: Adapt commit message for showcase additions
8890885a docs: Add search form powered by Algolia
8aec5ee2 hugolib: Some more unexports
7c81c86b commands: Apply Golint rules
5d3705df helpers: Apply GoLint rules
7fa2cec9 tpl: Small Golint fixes
b71f391c parser: Remove unused vars
6dbae7b6 Be explicit about the type in Scratch test
d7701305 hugolib: Remove unused Tmpl on Page
c846b051 Do not use defer for unlocking in Scratch
fa1a9653 hugolib: Taxonomy GoDoc cleanup
b5bced1d Add a simple benchmark for Scratch
7c84e6b3 hugolib: Even more Golint fixes
3e77886a helpers: Fix GoDoc in Hugo version constants
a7953e25 commands: Apply Golint rules to hugo.go
3bbfd991 hugolib: Apply Golint rules to rss_test.go
b8bf01cd hugolib: Add missing GoDoc in pagination.go
c2c73c2b hugolib: Some more GoLint fixes
218fceac livereload: Add missing GoDoc
e467d233 hugoblib: Clean up the time tests
94409072 transform: Group vars and consts in chain_test
c7869fd7 transform: Clean up the var naming mess in chain_test
a6de8dfb hugolib: Some more Golint fixes
dac34f9b hugolib: Fix spelling mistake
c31fa378 hugolib: Add Godoc to pageSort
c20dee9d parser: Make the constant vars ... constants
bf76e744 parser: Fix ALL_CAPS var names in test
1cb7ed6a parser: Spring code cleaning
937592cb hugolib: Fix some more Golint warnings
8a60571f helpers: Fix and add Godoc in path*
6ff2e1db helpers: Remove the else in MakePathSanitized
faf2e506 Do some minor code cleaning of Site
626874b9 transform: Golint fixes
67289033 target: Fix some Golint warnings
dc7d8a9e Spring cleaning of the menu code
4f00f1c9 heloers: Add a linefeed to make Golint happy
9cf93e11 commands: Fix remaining Golint warning
da4d4164 utils: Add godoc
df92fc31 hugolib: Fix Java-styled all-caps consts
b0e21f96 helpers: Silence some Golint warnings
283b8663 commands: Do not use named return vals in Jekyll import
35b79824 Check returned error in Scratch-test
691c2ea9 Do make check in Travis
b319c189 source: Consolidate if conditions
c54df37f source: Remove unnecessary else condition
b1b7ac7e hugolib: Use field keys in composite literals
b9127ecc helpers: Apply gofmt
e8cf8b40 hugo: Add check tasks to Makefile
048e0742 Add Scratch to shortcode
de8fc876 Re-render shortcode on template or data file change
e5e1bcc2 Add plainify template function
e5aa4774 Add support for symbolic links for content, layout, static, theme
6258d48b Utils methods refactored for readability
c42982f7 Add '+' as one of the valid characters in urls specified in the front matter Fixes #1290
02effd9d Protect against concurrent Scratch read and write
f52b040e docs: Draft of 0.16 release notes
d45b55bd helpers: Rename getMmarkHtmlRenderer to getMmarkHTMLRenderer
bec1ac7b livereload: Run go fmt on connection.go
9323707b create: Refactor NewContent to be testable
bafb7717 livereload: Simplify conditional
2c5e4f76 helpers: Support EXTENSION_BACKSLASH_LINE_BREAK for Blackfriday
4c4ce552 helpers: Fix minor typo in content_test.go
0a768ec9 Simplify GetDottedRelativePath
8d86f1ec Return early from parseOptions
02e50c01 Remove duplicate doArithmetic
42b302fc Revert "Add Codebeat badge"
3529152e Return early from appendThemeTemplates
c50c6687 Add Codebeat badge
0ec8fc54 Add Go Report Card badge to README
21054f73 source: Consolidate filepath.Split calls
df44b193 tpl: Send actual values to in from intersect
60055827 tpl: Add missing printf param in t.Errorf call
b0326a1c tpl: Treat booleans as set in default function
b5c718a4 docs: Fix typos in functions.md and contributing.md
575ae1b3 Remove CircleCI badge for now
58802de3 No block support in shortcodes
3a2a4c3b tpl: Make the safeHTML and cousins accept more than strings
70739c97 Remove unnecessary type conversions
3a82ae71 parser: Unexport some internals
5d915e7e helpers: Unexport some internals
aedb13b2 tpl: Fix race condition in regexp cache
f6c3ca8b transform: Remove unused code
263daaea target: Remove unused code
4ada1cab source: Remove unused code
df3f2af0 parser: Remove unused code
dea185aa hugolib: Remove unused code
c21dc16d commands: Remove unused code
91ffc76b helpers: Remove unused code
0fb31e4a Create an alias from shortcode.Page.Site to shortcode.Site
734dd1c4 Bump Pygment version to 2.1.3
542e220c Make tests green on both Pygments 2.0.2 and 2.1.3
988962e8 Add Pygments 2.0.2 to CircleCI build
989c7487 Add emojify to the template func smoke tests
612c6114 Docs: move tutorial screenshots in their own subfolder
a103d581 Docs: update Windows install instructions
6fb4e071 Docs: add Aerobatic as a deployment option in the Introduction
d9049752 Docs: add tutorial for Hosting on Bitbucket
153dccc0 Add debugging steps for no variables defined
0ab41624 Ability to config layout and content dir via cli
cafb7847 Add emoji support
5926c6c8 Update showcase entry and article link to softinio.com
b8d36512 tpl: Add replaceRE function
e9008b91 Allow picking a specific file out of a gist
7cd69aaa Exit with error code on any error
077b0fa7 Add package prefix to the commit message guidelines
0667d8a0 Add engineering.mongodb.com to the showcase
941b4caf tpl: Add Copyright reference to the Go authors
6cb032b6 Docs: use Shekhar Gulati's Hugo tutorial as quickstart guide
2d0650db tpl: Add custom index function
f3f9763a tpl: Add time note to default func description
09c8c17b tpl: fix default function
0743646f docs: add better default example
ce9ee3cf tpl: Add default function
09624708 Make absURL properly handle baseURL with path component
94c3825e Add md5 and sha1 template funcs
be3519fa Use default sitemap configuration for homepage
0945673f Update Dockerfile to use golang:1.6 base image
a2abad96 Add support for Go 1.6 block keyword in templates
924028a9 Fix for page in multiple menus
973393c9 Create template clone for late template execution
9896cd00 Add reference to parent shortcode
866176be Docs: fix missing words, tense in datadrivencontent.md
7705e32e Resize showcase thumbnail of h10n.me
0f486313 Add viglug website to showcase
64ed64d9 Add h10n.me to the showcase
2a75e970 Add fale.io website to showcase
429b669a doc: Correct Scratch slice example
c7d22604 doc: Add some Scratch slice samples
c7acc318 Add some missing resets on rebuild
eaba04e8 Add list support in Scratch
435e996c Add jsonify template func
c8c6f5d0 Add json mime extension type
d774b142 Make where accept slice
4e32dc80 Simplify the IsHome test cases
023992ab Unexport the target handlers
27f8d8f9 Allow URL with extension in frontmatter
3c100cc3 tpl: Unexport the rest of the internal template funcs
f6591eca tpl: Add some dateFormat testcases with both time and date
8aa90f2b Try both prepped and unprepped taxonomy keys
ccd2f4c3 Prevent capitalized taxonomy labels
e85b821d tpl: Fix broken chomp test
f223f17c tpl: Make chomp return template.HTML
daaf4eb3 tpl: Add integration tests for most of the template funcs examples in doc
80e1fd29 Log fsync errors
5b065a27 Some missing shortcode replacements
7f682d78 Fix shortcode handling in RST
cc38a40f Docs: fix typo in tools section
e2965a35 Remove superfluous FontAwesome files
6b922750 Revert "Create template clone for late template execution"
93b04e67 Create template clone for late template execution
80460315 Check for the presence of pages before setting dates
75cf3243 Set Date and Lastmod for main home page
1f61f403 Use flagChanged in all places
c1f8b188 Add template function slice
9349a889 Do not try to find available port if set by user
ff4ca992 Press: add "Comparison site built with Hugo"
455df107 Optimize replaceShortcodeTokens
83759953 Enlarge data in BenchmarkReplaceShortcodeTokens
ac2eaca0 Press: add tutorial written by Shekhar Gulati
c59bdc20 Press: add article from sitelabs.es
d1bf2f54 Docs: fix typo in introduction.md
086d6540 Add cdnoverview.com to the showcase
060f0206 Docs: remove .Taxonomies from Page variables
d607f4c7 Docs: fix small typos in functions.md
3749dc76 Docs: add "Minify Hugo Generated HTML" to press
e9853642 Listen channel before sending values to it
253a6188 Go 1.6 is out!
284e959f Close file handle when finished reading file
df17fae5 Docs: add hugo-lunr to the tools section
50182cd0 Remove superfluous Errorf
c1e43095 Clean up the trim template func test
8c840480 Force full rebuild when site config changes
ad176055 Export MainSite var
ce7c2671 Docs: clarify that Amazon WS is, actually, AWS
4ecf019e Add gntech.se to the showcase
2b1ad546 Docs: fix typo in YouTube shortcode description
bac1ba46 Fix spelling and go vet errors
0d415e45 Link Gitter as Dev Chat in README
21b0aa86 Restore the wercker status badge to original small size
06e90b12 Add documentation for Google Analytics internal template
a0eec02b Set the wercker badge to track the aaster branch only
207a574f Docs: fix Disqus shortname reference
cfbae7ce docs: Add guideline for showcase additions
4a15051e Crop, resize and optimize shelan-tn.png
2d11551c Ignore temporary file "4913" created by Vim
42f43ad4 Add jorgennilsson.com to showcases
28e6e19d Fix git commit blog article link
8fe10708 Prevent confusing template errors when seq is nil
2b3b90a6 Add test for Hugo hanging up with empty content
d1b0290f Add shelan.org to showcase page
2b0fad79 tpl: Add two more doArithmetic test cases
f90b45f7 tpl: Test with nil value in first, last, after and shuffle
3cc468a8 tpl: Add missing test variants for slicestr
05c8bccf hugolib: Add test for parseSitemap
b3c2d90b tpl: Add missing substr test variants
4dcb63c2 tpl: Add highlight test
0a8583a4 tpl: Add missing base64 tests
0888ddd0 tpl: Add tests for word and rune counting
ec49dbb8 tpl: Consolidate and complete the Inflect tests
1e8b4d9c Add some missing doArithmetic test cases
0f6c8439 Add missing menu tests
c462440d Add Page tests for simple methods
66570d2f Add Node tests for simple methods
75044c19 Add menu sort tests
5995eaaa tpl: Unexport all template funcs
d1d7702c Add a benefit and a simple example to return current year
49c2761b docs: Fix typo: Janapese → Japanese
0586bf0d Use filepath.Join in locale resource getting
8d8e9dde Minor cleanup of some of the resource getting code
b3a70abe tpl: Complete coverage for Humanize
7c3dceea Fix buggy Menu.Limit()
a95426d4 Remove Printf in test
88a320fb Fix buggy Pages.Limit
b21d280c transform: Complete test statement coverage
08b582e1 Only do one livereload replacement
dd1db334 transform: Add missing test case in livereloadinject
96e99045 transform: Add missing test case for NewEmptyTransforms
21cb5264 bufferpool: Add test
1f326ad9 Fix bash-completion for Hugo builder flags such as --theme
45df4596 tpl: Add humanize func and cleanup lint
e95f3af9 helpers: Test coverage increase
318a9845 Apply gofmt -s
eebf00f7 Re-export HugoCmd
08670e6a Fix README.md to list the correct -ldflags for Go 1.5+
ed23711e Optimize seven recently added Showcase thumbnails
61197f9f Order the hugo comand flag vars
74539dea Unexport the remaining vars in hugo command
a89b2f41 commands: Get BaseURL from viper in server mode
792b2438 Add --renderToMemory as an additional Travis build step
3b596b85 Add renderToMemory flag
87ca0d0c Clean flags
bd0176a5 Add CONTRIBUTING.md
447228a7 Revise README.md emphasizing "good commit message"
8f368114 Update Travis CI status in README.md to track master branch only
5a7837cd Added showcase for datapipelinearachitect.com
868d0745 Added showcase for davidrallen.com
68e2e63d Fix Hugo hang up with empty content directory
ec02b990 Fixed example and cross-reference in content/variables.md
243fbbf0 Update lastmod date and screenshot for Rick Cogley site
9b8d2ce5 Remove destination from config file docs
9015aa5b Docs: fix some typos in templates/variables.md
57eebbf2 Use FEEDBACK instead of ERROR for empty home page warning
ca0c67dc Fix a minor typo discovered by Lintian (Debian)
817d6948 Expanded the Page Params section in variables.md
d158f7e3 Provide more detail on static sync when running with verbose
cd36d752 Add autostart option to YouTube shortcode
e8eb6181 Do not call watchConfig() when not in watch mode
c438f456 Add flag --cleanDestinationDir=false to retain prior behavior
5def6d9a Make the watch logger less chatty
3054a461 Make the DistinctErrorLogger more generic
3b3e771d Check for exported fields in embedded structs
12876ec9 Fix hugo benchmark
d08e4c87 Rewrite commentary on static event handling
b0b4b821 Permit directory removal during static sync
db18fd15 Ignore .DS_Store changes (thumbnail cache file on mac)
9413cf84 Handle self rename operations gracefully
74c90553 Static file incremental sync improvements in tandem with Afero improvements
7e196a82 Handle remove & rename source operations incrementally
e01c3409 A single file can be replaced in site.Files
45e50914 Process only the source content that has changed
9f3796a3 Read/reread individual source content files next is incremental conversion
ca6ca4f4 Separate handling content, data and template changes
bcc42c05 Separate reading source and processing source operations
f3aa93fa Ignore temp files created by IntelliJ when saving
0525fbdd Add leepenney.com to showcase page
eae46bdc Add Web Study List to showcase page
8537cecb Docs: add Hugopit to tools section
e27beadf Add Rakuten Tech Blog in showcase page
ca8d187b add javaunion in showcase
3526afc7 Fix some Go vet errors
58a183c3 Docs: Add doc for string and int
75ba84ac Add int and string cast template funcs
f89eb349 Docs: Enable plain id anchors
78f9bf24 Add one more menu test
ab70e6f5 Add menu test for external URL
dd85c290 Docs: Add missing "-b master" parameter to "git submodule add" command
e69e276a Update Travis config to Go 1.5.3
e8ca52e9 Add one more temporary template test for linux/arm
bca2d38e Add temporary template test for linux/arm
ed3015c3 update server to match latest afero
dd1d6556 Docs: Change the pseudo-absolute path to a relative one
082476e7 Docs: add emilyhorsman.com (buttercup theme) to showcase
1ce184b7 Add some p-wrap shortcode tests
48870fef Group vars in paginator
b47652fb Docs: add panel showing the last revision of a page
2c661674 Docs: Copyedit extras/robots-txt.md
01f71bab docs: Add lastmod to content files
9d70e780 Update press.md
9a6dc6c7 Add embeded template for robots.txt
7c5a1fd1 Replace *bytes.Buffer with io.Writer in rendering
4c596483 Update and refactor to ack Go Authors
6a23cd65 Docs: Update copyright year on gohugo.io front page
851c16ef Docs: Run "brew update" before "brew install hugo"
9ff36c5a Add some trailing newline shortcode tests
7bc5d366 Use a Docker container to build hugo
bc48b460 Added documentation about variable scoping in "partials".
8f8120ba Added "Caddy server"'s handling of 404 errors.
dcad0660 Small refactor: don't call `p.Permalink()` for all aliases, call it only once and only if necessary.
0bb3b49c Update doc to reflect default value of watch variable
6cdb8109 Allow renaming of sitemap.xml
26d23f7f added remaining relevant options
e904ccff added more pygments opts
9008ac0b Rename random to shuffle. Remove count parameteter to simplify its role. Add tests for randomising.
302a6ac7 Add Random function to template functions
b1f2b433 Fix /.xml RSSLink when uglyurls are enabled
ff28120e Added async version of Google Analytics internal template
8f6f1310 Copy static files changed
f310492c Add to press.md two articles about Hugo on AWS Lambda
ce0304a1 Change Gitter badge to "gitter | dev chat" in README.md
b309fe85 Update press.md
dfa34afd Add template funcs countwords and countrunes
2e92f368 Add hasPrefix template function.
0f6b334b Source file based relative linking
b78f13b0 Write a simplistic test for site.refLink
47587321 Add themesDir option to configuration
40fccf22 Fixes #1292
b56362de Docs: add hugodeploy to tools section
3b2a78ba Add to press.md Beginners Tutorial for Hugo (German)
fc627d55 Docs: remove unnecessary --watch flag
796ef3a3 Docs: add cross-references to installation guides
f807953a Update Hugo examples
cd54042c Add Coding Journal (blog.kulman.sk) to the Showcase
1d6286b0 update to use cobra's sub package doc
a291f3c5 Copy only the static files changed
277425ba Ignore temp files created by IntelliJ when saving
cb8f4591 Docs: Add nohighlight shortcode and improve formatting
22bd4850 Docs: Add lang attribute to Chinese and Japanese Press entries
ea75985c Update embedded livereload.js to 2.2.1 in livereload.go
5b1261c4 Upgrade Bootswatch, Font Awesome and jQuery in examples/blog
7cf7f85a Docs: Upgrade highlight.js to 9.0.0
df92a6b9 Docs: Upgrade InstantClick from 3.0.1 to 3.1.0
aee92f2a Docs: Upgrade livereload.js from post-2.0.8 to 2.2.1
23abad7b Docs: Upgrade Owl Carousel to 2.0.0-beta.3 (2015-06-19)
4b521b4f Docs: Upgrade jquery.scrollTo from 1.4.6 to 2.1.2
cca49ad0 Docs: Correct file permissions from 0755 to 0644
f6f0111d Docs: Rebase bootstrap-gohugo.css on Bootstrap v3.3.6
88343144 Docs: Rename bootstrap-theme.css to bootstrap-gohugo.css
ad6717bd Docs: Upgrade Bootstrap from v3.2.0 to v3.3.6
f8f128a0 Docs: Remove octicons fonts
7c84ad56 Docs: Remove unused GitHub:buttons files
217d25f5 Docs: Upgrade Font Awesome from 4.1.0 to 4.5.0
a84d8212 Upgrade jQuery 2.1.1 to 2.1.4 in doc
7a5a52f4 Clean up the loop counter variables confusion in TestPageCache
f24ffc9c Docs: Allow HTML in Showcase titles
e1af7cb9 Use MkdirAll instead of Mkdir in `hugo gen doc`
de82404d Fix hugo server "Watching for changes" path display
a1d232f4 Docs: Make <hr> slightly darker on gohugo.io
00fc038d Document 32-bit `hugo server` crash in v0.15 Release Note
5af8cc29 Add gadgetplayboy.com to Showcase and an article to Press
fe7ca7d7 Fix build
13d14ab9 Remove "Host:" prefix from Host header
dd2ab282 Correct the strings.Contains syntax in failing test
31035f8a Fix remote test on Go 1.4
89f8fa58 Set the request Host on http test server
9edc58a0 Fix failing template related tests in Go 1.6
8cea4288 Fix data race in non-renderable pages
0c01fef3 Fix 2 data races in TestPageCache
32da9b20 Docs: add hugo-lambda to tools section
3574304c Improve some random feedback messages
9c39593d Move cobra.MousetrapHelpText to hugo_windows.go
70510433 Docs: Enhance contrast and increase font-weight
868e4798 Fix formatting of "Installing on Windows" tutorial
67b4c524 Regenerate the commands section of doc
c1e134f1 Add `--source` flag back to `hugo new` command
41a3af1a Use absolute path when editing with editor
78576019 Docs: reference Jekyll import command in tools section
ebc187b4 Docs: add Contentful converter to tools section
d1bec542 Do not fail on unknown Jekyll file
d5ebf648 Remove/update outdated links in Press and Showcase
9569d116 Duplicate p.Description in Params map
38c5db98 Added a missing closing tag
f22d59bb Revise docs/content/tools/index.md (minor fixes)
1469ce0e Remove Duplicate "Editor Plugins" Section
280b2f29 Document PreserveTaxonomyNames
4a2623c8 Regenerate the commands section of doc
768370a5 Docs: remove references to dynamic CMS products
9ae07c4f Docs: document Node.IsHome
8509727f Add copyright header to that source files that don’t have one.
e29ede70 Fix some of the "new site" tests
b81fc1be add more architectures to .goxc
6042fc2b move some of the path helper utilities to afero and provide wrappers in Hugo.
de14ceec Update "Join Chat" to "Dev Chat"
56d6c0be Turn off failing new site test
f3c74c9d Add boolean value comparison to where tpl function
e445c35d Fix copyright headers in source files
f13db932 Sort and remove "" from "Available templates" list
d35d8206 Remove transformation of menu URLs
f6fdfcd4 Added 'themes' as a default new site directory
6a519e69 Update Travis config to Go 1.5.2
cd062623 Fix crash with "config", "check" and "benchmark"
69c28985 Fix broken Highlight test
c1b5a48f Add sanity checks for `hugo import jekyll`
00d04774 Change most global flags into local ones
c9526f6e Revise format for "Unable to locate Config file" error
df85e5a0 Switch to container-based Travis
be28d9d9 Fix some errors with format patterns
f363faad Add a number sign "#" before a GitHub issue number
6812229b Add gh shortcode to docs site
d48781ba One more error fix in the server command
c5287e78 Some more error fixes in commands
3f0f7eed Improve error handling in commands
6959b7fa Update external tutorial links in usage.md
75c61236 Move `import jekyll` functions to import_jekyll.go
666ddd23 Enable dirname and filename completion for more flags
0d1d33d7 Print error when /index.html is zero-length
f8302768 Run `go fmt hugolib/site.go`
afbc18c0 Bump min_version to 0.15 for `hugo new theme`
e9894683 Make noTimes command flag work
6c810314 Copy static dir files without theme's static dir
c5e68ba1 Fix typo in "Creating a New Theme"
91771ee3 Add Draft page variable to docs
b0b6a8c7 Use .Site.Pages in the documentation examples instead of .Site.Recent
d7ef272a Add Camunda blog and docs showcases
b557f624 Change plainIdAnchors to plainIDAnchors in docs
249cd625 Copyedit the shortcodes documentation some more
2e3d5c2d Docs: improve shortcodes page
cf732940 Remove an erroneous "$" prompt in quickstart guide
c83e10a4 Added the command in the documentation.
50b5d0af Support setting target directory in `hugo gen man`
09379e89 Update for version 0.16
2519b707 Docs: remove note about config changes and manual livereload
ffb1a96e Docs: improve usage.md
37676a25 Docs: improve quickstart guide
72a66972 Update press.md
26af48a5 Add note in doc about Jekyll import
f77a899d Regenerate the commands section of doc
d356720f Version bump to 0.16-DEV
6faf1d01 version bump to v0.15
9c1319cd Update license file in the docs/website to apache
9410d25e Update release notes with additional new features
171fb883 Update and reorganize 0.15 release notes
0f11eb4f Make the release note about renderToDisk more consise
234fac4a Update release notes
311307c9 Add IsNamedParams property in shortcodes
86dcac61 Add documentation for built-in shortcodes
7d31d5f5 Add shortcode for tweets
e03f27cc Add shortcode for github gists
3027b151 Add shortcode for vimeo
4424288d Add shortcode for youtube
cc3f52b9 Add shortcode for speakerdeck
fe2a9fa2 Update shortcode docs with .IsNamedParams
f045d7a6 Change the license to Apache 2.0
b00771ca Simplify ExtractRootPaths
c3931ef7 Add PygmentsOptions option
99acbb2e Permalink on Node and Page should be of string
5838420a Move blackfriday site-wide config loading to NewBlackFriday()
fde47c5e Add shortcode IsNamedParams property
3d09de89 Restructure the gen commands
831e9368 Improve "watching for ..." logging
098a0c81 Add commands/genman.go to autogenerate man pages
87274755 Fix missing word in code comment (my own fault)
6fa7f2ac Avoid multiple locks for shortcode template
c5f40e8b Improve RW-locking of template in shortcode handling
58c446f5 Fix recently introduced new data race in the shortcode handling
5c723401 Copyedit long help message in commands/server.go
3abb2675 Add RSSLink to SiteInfo
afbd52f7 Apply absURL on social tag urls
05c29ad5 Return error if shortcode template.Tree is nil
e59aabcf docs: Change "Github" to "GitHub"
a871c87f docs: Optimize a few large showcase thumbnail PNGs
2e1d2ba0 Add Go in 5 minutes to the showcases
a5bd101d Docs: fix typo in template function section
c5a4c07b Add SafeJS template function
7c9a2dfe Add increased time.Time support to the 0.15 release notes
f6ba48f2 Update Travis 1.4.2 > 1.4.3
f99730e8 fix broken image in showcase
83f19d8d fixed documentation link
923e4557 Add Arrested DevOps site to Showcase
97d06895 Hugo server watch by default
35abd179 Add time.Time support in ge, gt, le, lt
8d8fa722 Remove some superficial tests
3f5ddd52 Revert "Disable render-to-memory on Windows"
91e0c2b1 Disable render-to-memory on Windows
4679fbee Do not rebuild on extra Spotlight filesystem events
b08d9f26 Make replaceShortcodeTokens rewrite the input slice
4ecf56b8 Add latest review from Smashing Magazine to Press page
df824fa3 Hugo server renders and serves from memory by default (30%+ improvement)
e1618e9d permit the notimes flag on hugo server
cb48425f No double slash when destination set to '/'
ef0b9b51 Handle sync (file copy) errors better)
18a29964 Fix trivial typos in code
452ffab4 Copyedit docs/content/tools/index.md
2fec32a2 Add @wicast’s "Hugo is cool" post to Press page
acd720df Add docs/data/titles.toml to set title "Site Showcase"
5c6d8c57 Add ReadText project to Site Showcase
39933111 Adding LosslessLife blog to showcase.
28436059 Emphasize that commit message titles should start with a capital letter
619c16fd re-simplify SafeHTML function
1a26e351 Docs: add hugofy to tools
5c1204c2 simplify rssuri logic
062f6c33 rewrite safeHTML function
dcf1f96c Revert "Update Go release version to 1.5.2 in Travis config"
53a5932f Get rid of allocation in the BenchmarkReplaceShortcodeTokens itself
d7588fac Docs: fix typo in tools section
b8effd8a Docs: add hugofy to tools
b4ebd0eb Update release notes
8e68a648 Adding article about moving to hugo
a50133ff Improve the server usage output
3bbd02a1 Print parse errors from Viper
469d268c doc: Add new article by Fabiano Frizzo to Press
30ebf6b8 Update Go release version to 1.5.2 in Travis config
139be09f Fix GroupByParam to return original param string
bccf957e Add support for dynamic reloading of config file when watching
488966dc Add hugo theme site to the sidebar
570713a4 Use Identifier as last sort resort for default menu sort
01c87d2d Small Doc Changes
1758db29 Cosmetic change in README to trigger new build
341dcc47 Docs: fix broken links
9dbb6dc5 Add internal Google Analytics template
ca55ea50 Improvements to Automated Deployments tutorial
5bda0398 Export Page.Layout
e1729935 doc: Add new article by Thomas Peham to Press
08b3004f Update link to S3 deploy instructions
217ffa87 Fix doc render on Firefox
c8f2a574 Fixed link to Google Prettify
42453357 add bugtrackers.io to hugo docs showcases
277d0ae4 Fix spell mistake in variables.md
1ce3bb22 add ninjaducks.in to showcase
83e46555 Disable directory listing for Hugo file server
50c819ce Remove dots from snippets.
3d96dfc9 Docs: fix typo under tools section
6c6905d5 Fix missing "]" in README.md in commit 2242712
2242712b Add CircleCI status badge to README.md
e95db67b Add smartDashes flag for Blackfriday
6b34a4e4 Remove anchor from fork link in README
f77279bb Turn all README headlines into imperative mode
4974a62c Trim down 'Adding Compile Information to Hugo' in README
5cf1475e Improve README
36adb5fb Preserve Unicode marks in MakePath
9d603ce8 Show usage when new site creation fails
ab7223df Improve error message on new site command
5e97cf30 Add force flag
3a412543 The missing static directory shouldn't fail the build
4e9a5d8b Fix some typos in docs
0c66ad87 Add CLA assist to the contribution workflow in README
fb0e17a3 Update README.md
698019a5 Disable LiveReload when Hugo is not running as a server
ef4dfcec Load livereload.js from "/"
0f438d18 Create minimal default.md in archetype file
bea7b2e2 Fix typo in shortcode tests
ec9c6912 Insert code tag for server-side syntax highlighting
6a3aced1 Rename prettiyPath to prettifyPath
5619fe52 Unexport internal path helper
4c04d710 Fix In func given an []interface{}
ddd8c779 Use https
17fb7522 Correct number of args to Errorf
72f14a82 Apply project wide go fmt
c274e213 Add Param to release notes
65beca13 Add Param to the docs
078fad49 Add Param(key) to Node and Page
3586d77b Docs: Add pointers to the new themes.gohugo.io site
63d9859c Expose canonifyURLs as a command flag
002227e0 Add `dict` func to release notes
3a27cefe Add dictionary function to be passed into a template
ccd83c30 Docs: Added `hasCJKLanguage` global config flag and `isCJKLanguage` FrontMatter
7b4e4769 Fix comment for NormalizeHugoFlags
c1a60732 Remove Go 1.3 from README
82333487 WordCount and Summary support CJK Language
2c045ac4 Remove RuneCount from doc
5ec6a61d Add Mmark GitHub-flavoured markdown to release notes
c2c694f1 Add GitHub style code fence support to mmark
7ecf2a55 Docs: Added RIDING BYTES to Showcase Page
622d8724 Adding maximeguitare.com to showcase
b25ba8b0 Let Cobra do the usage error logging
b9aaa007 Improve command text for import command
ac1e3c3c Capital J in Jekyll
0387deee Add Jekyll import to release notes
9a2f6c62 Hugo import from jekyll
08d41c3a Fix strange carousel width on http://gohugo.io/
218554e3 Rename NormalizeHugoFlagsFunc to NormalizeHugoFlags
ead339ab is it .md instead of .ad?
7fd42af3 Used leading slash more consistently
d06ebc98 Marked the whole path as code
dcd9c69a Use filepath as the last default sort key for pages
7708d455 Add the base64 template funcs to release notes
79f8bb62 Add base64Decode and base64Encode template functions
a1e32439 Allow for any (short) line begining or ending with html comment
a43b0376 Change port number from 1414 to 1313 (default)
82f770a6 Remove superfluous `g` in docs
493147a7 Tools: Add more to tools to the list
06caa025 Fix typo in docs
8d695ec5 Add singularize template func
751d4906 Add pluralize template func
74924dd5 correct spelling for 'including' and 'counterpart'
ab0d29aa Press: Update URL to Spencer Lyon’s “Hugo and GitHub Pages”
740dc2ca Press: New URL to Kenny Woo’s blog about Hugo
c397c0b2 dead link
0bdb9b7d Link no longer works - Dead link
b29ca44c Show both baseURL and bind address in `hugo server` output
d984dde2 Update .travis.yml for Go 1.5.1
b5b8cc9b Test builds on OS X
c2a7c456 Fix typo in terms.md
e67bee93 Revert "docs: Fix URL to yulinling.net (https → http) in Showcase"
1abc12a9 docs: Fix typo in url extras
ca74dd23 docs: Fix URL to yulinling.net (https → http) in Showcase
68b8dd73 Add yulinling.net to Showcase
cd4f36ba docs: Optimize recent thumbnail images in Showcase
0a80ead5 docs: Fix formatting in overview/usage.md
397080ea docs: Add a few more blog articles to Press
3679fe67 Add "control code" and "trailing space" to alias validation
f5308da3 Move isThemeVsHugoVersionMismatch to /commands
e71bef79 Validate aliases to prevent directory traversal etc.
db85299c Complete the Url-to-URL transition in docs
29aa9bae Complete the Url-to-URL transition in tests
d05b297e Add helpers.NormalizeHugoFlagsFunc() to handle flag name changes
833a396f Docs: extend the migration tool list and add a cross-reference in the start guide
60f7394b Docs: Add a section about tools around Hugo
0e1fd78f WordCount Summary support UTF-8 string
c7521b3d docs: Change redirect documentation to aliases
cf7318a0 Convert example/blog to use new syntax for Hugo v0.14+
cec9054b docs: Remove empty sourceLink from two sites in Showcase
93b38986 Add FxSiteCompat.com to Showcase
9e526b65 fix showcase to render properly
daf5f32c Adding RichardSumilang.com to the showcases.
aec0e17a Docs: Add Humboldtux.net to Showcase page
c7b701ea Docs: Add new french mag article by @humboldtux to Press page
9f75a518 Added details about generated files and development flows
fd7b3155 Add a 404.html file if a new theme is created
d6f69455 Update organization.md
bfa06fff showcase layout improved when thumbnails are different proportions
138ffefd Add NoDesk to Showcase
ea852b8d Add NoDesk to Showcase
d584ca59 Describe the use of custom archetypes in the docs
16cbda97 Add GreenITGlobe website for showcases page
570d4e4c Add Chinese Grammar to showcase
1b8440af Docs: Add new blog post by @CoderZh to Press page
52d94fa6 Add config option "disablePathToLower"
49fe04c0 Correct check of published boolean
311593bf Add undocumented published setting to front matter
5b90b388 Unexport FileAndExt
fd2fc1d3 Polish 0.15 release notes
1e06dfd1 Add first draft of Hugo 0.15 Release Notes
0c98d8e9 Use LazyFileReader for reading file contents
97eb55da Add LazyFileReader type to source library
3982854e Update Travis for Go 1.5
c2869aea Fix -ldflags for Go 1.5
e791835e Fix typo, "delemiters" -> "delimiters"
35ff685c Update press.md
4047ca5c Search current directory for config file by default
dac9c0da Use cast.ToIntE for int conversions in substr and slicestr
5b51b3b9 Slicestr fix for other int type param
d313bc78 Documentation update on Template Where Function for nil
29c9a40a Implement `hugo --theme=[Tab][Tab]` bash completion
7555e364 Print feedback for `hugo genautocomplete`
c69835da Print feedback for `hugo gendoc`
fee55191 Use spf13/pflag's new SetAnnotation helper
209166a2 Added sitemap configuration documentation.
caaf6370 Added mention of .Data.Pages, removed duplicate .Site.Pages mention.
cafcd190 docs: Remove minodisk's http://dsk.mn/ from Showcase
68b424c2 docs: Clean up and align Showcase thumbnail images
36b374f8 docs: Add site title; set pluralizeListTitles = false
b14b9043 Add Arqueart to Showcase
8c3b6f8b Create arqueart.md
ee7dd292 docs: More detailed explanation of .Site.LastChange
6511e2c4 Removed extra .Site.LastChange listing
7a681035 Doc for other supported formats (external helpers)
04b4c996 Reset Scratch for 404
b05a292c Revert "Fix some Go code doc issues"
0f1fb8c7 Avoid panic in shortcode param handling
35bb72c8 Do not panic on index out of range in shortcode.Get
2805a6f8 Also rename readDir in docs shortcode
cea82842 Rename ReadDir to readDir
15333270 Make sort tpl func accept field/key chaining arg
56534bea Fix sort tpl func to return explicit type value
c7aa881d Fix Unicode issue in Slicestr and Substr
de7dd70b Fix some Go code doc issues
1583d8d0 Add missing formatting directive in Printf call
5b19a265 docs: Extend documentation on Blackfriday options
0b7229f7 Add some float tests to TestArethmic
4a2eda49 Add option to disable Blackfriday Smartypants
eb519afe docs: Fix typos
ab8e189a docs: Bolden the blackfriday flags to make them stand out
5505ac0d doc: Strip trailing whitespace; other revisions
b0416e9b Strip trailing whitespace in code
f2ab0b26 Improve formatting of Hugo command descriptions
e64e571b Bump `hugo new theme` template min_version to 0.14
98659bf3 Fix searching YAML/TOML delimiters in frontmatter
4bed6962 Add map support to scratch
8d28686e Trim trailing spaces from YAML and TOML delimiters
211b757f [Docs] Add <br> to an extra-long title in the Press page
738f9561 docs: add netlify article to press section
252ea96d Remove deprecated fields and methods for v0.15
b23b546a Asciidoc[tor]: use --no-header-footer option
43891e39 Always use the template provided in page.Render
3037d200 Fix inconsistent front matter handling
81e69c41 Add ReadDir function to list local files.
72ecd0cd Ignore non-presence of "layouts" directory in watch logic Fixes #691
18d69d7f Fix periods in taxonomies create bad paths Fixes #1188
c1a2b7a1 Replace strings.Compare
40efc867 Fix sort test and title sort
36e0d005 Fall back to link title for default page sort
6674189b The guide is updated to fit the current Wercker interface and configurations. Wercker changed its interface and default infrastructure (Docker).
da0715a0 Remove point 7 in contributors guide
d25cd039 Make small fixes to README file - Add a step to Contributor instructions for those modifying commands - Change forum link to http (https does not work) - Add "Sign the forum release thread" to contributor instructions
027abcfb docs: fix prev in highlightling
9c8ce0d9 Added szymonkatra.github.io site to showcase
cdefb5a0 Fix links to Ace and Amber pages
de38524c Add scottcwilson.github.io to showcase site
28020f86 Move apply before cache put
47e65c4a docs: Rename dynamic content to data-driven content
a9c5133a Fix data races in sorting and Reverse
ea6ae769 Fix broken test
5cf0aa2f Add benchmark for sort and reverse
aca0f604 source/File: Fix data races
dec9749b Document Amber templates Fixes #1064
8a48412c On error, return error message, not nil
c00a1fcb Add a check for the setting of watch flag in config file
03a70161 Let Amber template call Hugo's custom functions
e3ea4b48 Fix name logic for Amber templates
7f1bcd89 Fix link to front matter
85f4935d Fix unclear RSS template docs
bfcf95b9 Add mention about .Hugo.Generator in 'Creating a theme' section
c8477c4f Fix typo: "taxononomy" -> "taxonomy"
1a94148d Add paginator support for page groups
2c22a8b7 fix TestHomeNodeMenu test
24757497 Allow page.HasMenuCurrent() and node.HasMenuCurrent() to proceed with multi-level nested menus Currently HasMenuCurrent only process the first 2 levels.
354192d2 Log missing theme as FATAL
029cdb68 Checks to ensure theme directory, if specified, exists
a2fa3895 Fix log message in test
3663828f Optimize RuneCount
77c60a34 Add RuneCount to Page
90af334c Omit protocol from embedded font resources
c4f81840 Change arianv sourceLink to master branch
88fe0e7c Add learnoverpass
5f69d3d6 Add arianv
6807151a add a showcase of sa.muel.be
c6d46ff2 [Docs] Press page. Fix URL
c139c6e1 Add support for GitHub-flavoured markdown code fences for highlighting
fdab1180 If no language is provided to Pygments, then try and guess it
450dc7a4 Add a showcase of Kangkona
a9454124 Add how-to for foreign language month names
617fa2fe Add Rick and eSolia's sites to the Hugo docs showcase
9b3d0cf5 Added missing "Social" section to SiteInfo
24c8226c Document Page.RawContent in templates/variables/
c9fc0e78 Add Page.RawContent() to access raw Markdown as a string.
dd732e84 Add nil comparison to where tpl function
033a13e1 Fix watcher detecting changes as static when no theme
a509a232 Add doc for new Blackfriday options
483fc8fa Add config option for Blackfriday HTML_HREF_TARGET_BLANK
05c07c56 Add option to disable Blackfriday LaTeX style dashes
664a9781 404 is homeless
50df3140 added thumbnail
d118d037 Create mariosanchez.md
1b50ccd1 add vamp.io site as showcase
c4ad8f64 Use helpers.GetThemeDir() to find base templates.
1058cb17 Refactor theme path helper functions.
0987e98d Add support for baseof.ace templates in themes.
29e786aa Proper parsing structured array from yaml based FrontMatter
e764a6e6 Use pooled buffer in replaceShortcodes
67209dbf docs: make the named value Data File example simpler
e96624cc Update datafiles.md
d4b6f9ac Fix map-order dependent menu tests
c5072291 Print URL when failing menu test
dbd93f51 Remove unused var
004fcddc Remove superfluous p-tags around shortcodes
ae4f72b0 Comment out mystery test
6bcb7e83 Revert "add preliminary support for content/index.md file to be homepage content"
3eb301b5 Revert "refactor and clean up site tests"
f25ce7fe Revert "Move matchRender to test helpers file"
d770fa59 Revert "Add tests for homepage content support"
59c6ba4e Revert "Make .IsHome work when homepage as page"
7e765cc1 Make .IsHome work when homepage as page
24351c58 Add tests for homepage content support
32d91d61 Move matchRender to test helpers file
99e25091 refactor and clean up site tests
5f84bc02 add preliminary support for content/index.md file to be homepage content
50269f25 Remove superfluous return
4b7c1342 Make removal of accents in taxonomy and section paths optional
847ad36e Add new tutorial for multilingual sites
cc9536ec Update docs for `last` template function
0a2e5424 Add `last` template function
627d016c Refactor var name limit to index
40a92a06 Add `after` to template function documentation
c335efdd Add `after` template function
82cc1ac0 Add Blackfriday definition lists extension support
be6cf6a9 Revert "Add some debug to failing menu test"
becc627e Add some debug to failing menu test
bed8197d Move Viper reset to correct level in menu tests
beda46d2 Reset Viper for every duplicate menu test iteration
53c9e890 Make sure target destination has the right path separator.
3ab00e6e Let travis test against go-tip
bee46915 Temp remove tip from Travis
51cabe6f Fix substr tpl func's int type variant issue
be443452 Silence chatty JSON test
beeae6ab Add some tests for IgnoreFiles
beaa1b3a Add some docs for IgnoreFiles
bec3f403 Rename WatchIgnoreFiles to IgnoreFiles
bed22788 Add configurable list to ignore files in server watch
cc5d63c3 GetJSON/GetCSV: Add retry on invalid content
be38acdc Add PreserveTaxonomyNames flag
3ea4df35 Remove accents in URLs
be0903c7 Fix FullFilePath
3cee9b77 Allow custom RSS Uri for section and taxonomy feeds
2690a8c1 Update introduction.md
be0314b1 Fix Windows Ace path issue
e4ed9d6b Add some Ace test cases
be45399c Extract Ace handling to a method
be7404e3 Support `Fish and Chips` section
be535832 Add IsHome
be6dfcc4 Add some missing page permalink test cases
be964e95 Never remove trailing slash in RelPermalink
beffe756 docs: getting usage up to spec
2a404752 Add two articles about Hugo to the Press page
beaa008c Make deprecated warning for this release more alert
be381683 Hyphenate DEV version
601a2ce1 Add `time.Time` type support to `where` tpl func
beaa09a7 docs: add bepsays.com to showcase
102a3b95 Document techniques for debugging templates.
cd06e89b adding goxc config file
d4de2615 bumping master version to v0.15-DEV
6af9d678 Bump version to Hugo v0.14.0
fa58ef53 Add GopherCon to the showcase
6f0b80c9 Add GoGB to the showcase
45efc5e4 Add DavidePetilli to showcase
fe38dc2f update release notes
20cb4c93 Add new directions for maintaining press page
f49b63a4 Move press page to top level menu
4a177396 add dozens of articles to the press page
beee679d Unexport filepath/path bridge types
be79c35b Pass RenderingContext by reference in Mmark
befb54da Apply gofmt -s
bef34597 Add Go 1.4.2 to Travis config
4c850b69 Update release notes in prep for v0.14.0
bec697b0 Remove unused Completed chan on Site
be7c3bbb Prevent cyclic ref crash in JSON encode
be778c31 docs: some more on absURL, relURL
be136607 docs: add doc for substr
be4376a0 docs: add doc for slicestr
be2e08c4 docs: add doc for seq
be4a404f docs: add ToC to some more pages
be71fda5 docs: avoid navbar hiding when jumping to in-page anchor
0d65ca27 Docs: Add taxonomy term variables to the list of vars.
7125103b Add ".Render" to the list of functions.
321bac2f Clarifying Edits for templates/rss.md
be0784bb Grammar fix in error message
be7f5a42 Do not consider single.html for the home page
be2842da Fix formatting in hugo command description
be831d74 Fix CLI command description for the top level
fc946ded Adding default handler & tests Fixes #147
fd5cf9ac Better organization of loading defaults
bdb187e4 Merge branch 'master' of GitHub.com:spf13/hugo
a584ff20 Stop Viper from leaking across many of the tests (now tests pass regardless of order tested)
be026278 Add benchmark test for replaceShortcodeTokens
599d1b97 Add gendoc command
be920fdb Add a line in doc about the RelativeURL setting
be5f865c Add bugfix to releasenotes
2890b6db Fix UTF8 permalink
8a96234b Add Page tests with UTF8 paths
befa26b1 Remove trailing spaces in completionfile flag
be1bac9f Add some bullet points to 0.14 rel notes
be9224d7 Add Bash completion
84f4c21d Fix datePublished to publishdate
bee9718a Do not shout about missing baseURL if relativeURLs is set
6b5ed88c Edits on aliases, comments, theme customizing
6453bb58 Edit docs extras syntax highlighting.md
beaa8b1b Add support for URLs relative to context root
e522e5f4 Edits to templates/404.md
d0a4645a Set s.Info.LastChange to Lastmod
3882e7ce Add Lastmod field
be534a86 Remove old baseline.txt with no current relevance
bef92baa Add convenience script to run benchmarks
be1a5662 Only uglify 404.html on server root
be1287fb Add data-no-instant to livereload script tag
be5fa2f3 docs: reverse taxonomy entries
d5c77bdf Allow to reverse taxonomy entries.
be3a3506 Allow forward slashes in Hugo new on Windows
be72f234 docs: Use ToC length to pick the compact version
be823555 Add doc for absURL and relURL
be4f4865 Add ToC to long pages
be16e5ff Add absURL and relURL to release notes
bec839e6 Add relURL template func
be0cbeee Add absURL template func
bec90e08 Make page 1 alias ugly
be0c1bfe Add docs for Section Menu for “the Lazy Blogger”
be7e746f Add list of deprecated names to release notes
beb1735d Add issue to release notes
0e00ca6a Fix paginator with uglyurls
bef496b9 Fix .Truncated in manual summaries
be52eff6 Some notes on 0.14 rel notes
be325a30 Fix IsMenuCurrent for SectionPagesMenu
bef0f281 Make sure that complete server URL is logged on startup
feba35cd Added in set PATH and new site output.
a52e508d Update test logs for uniformity and consistency
2b91b480 IsMenuCurrent now resolving correctly when baseUrl is not at the root path
b4871787 add undraft command
563a6302 Very experimental support for mmark
d4acacd4 Section menu for the lazy blogger
beb4ab16 Make RSS output test more realistic
fd08e16e Add RSSUri to specify the name of the RSS file
beccdc04 Add bind to release notes
2bfa9fb7 Make server bind interface configurable.
24d8ac1f Fix multilingual styling with small screen.
9cd8673f Added missing files, make the site look better.
9123ac55 Fix multilingual site layouts/templates.
3596b1b8 Add blackfriday/ExtensionsMask option.
ee5a1bbf Allow 'classprefix' pygments options.
bec2c1e3 Add shortcode support for HTML files
bea9280f Do not add trailing slash to baseURL
bef3df74 Polish absurlreplacer
be918d71 Rename field i to the more descriptive idx
be57b1fe absurlreplacer: remove superfluous code, take 2
be4ca217 absurlreplacer: remove superfluous code
be96aacb Add benchmark tests for srcset handling
beb601c7 Fix testdata: srcset items should be comma separated, according to spec
bee6a698 canonifyurls in srcset
be648260 Disable faulty range validation in apply
bee521c6 Try to make it more visible that you have to set baseUrl
be159278 tpl: check that types in args match the target func's type
be049ff9 absurl: export a base url var for testing
be9df847 shortcodeparser: fix panic on slash following opening shortcode comment
be7b830f tpl: add sanity check to prevent panic in seq on big nums
be190fdb tpl: check for too many arguments in apply
be017f18 tpl: check slice bounds in slicestr
be3b8a13 tpl: avoid panic on too few args to apply
beacfcf8 doc: move the index func reference to where it's used
da08fad5 Add index reference to go template primer doc page
be15b077 Fix typo in test
bee1358e Return error from HandleShortcodes
be29c0bf Print ERROR on theme vs Hugo version mismatch
a8f91ace Clarify partials folder subfolders
9e13ac9a Single rather than double backticks in types.md
6b69f951 Clarify hugo new command in types.md
be2c67ad Fix broken Travis tests
beb32af7 Do not fail on unknown files in /data
be366bfe pagination: export pager to make Golint happy
be8e6d4f Use fmt.Errorf to make Golint happy
be01f843 Add shortcut to Scratch from shortcode
bef25432 doc: clarify Scratch usage in shortcodes
be62c948 Check spelling and some minor additions to Ace doc
be7c1e5d Add doc for Ace templates
beff6805 Expand the ACE base template lookup pattern
be46a4b9 Polish func naming in shortcode handling
bed05307 Remove unused types Shortcode and ShortcodeFunc
be0d9770 Only write highlight to cache when CacheDir is set
bee52f85 Fix broken Highlight test
be6a92c8 Temporarily disable Highlight test
be24457a Add more options to highlight
be540f5b Fix potential Windows path issue with Pygments cache
0fcb78e4 Added isso as a Disqus alternative to the docs
1b5b0b3a Add "Google Cloud Storage" article to docs Press page
1f4a3c1f Typo in mathjax.md
3b1db70a Add Google Cloud Storage to doc
bebb1b9d Fix spelling mistake in comment
be31b9e2 Add custom Windows mousestrap message
be4a9dd5 Remove section about the buildDate being configurable
be25acae Fix README part about missing Windows tests
be1b7f67 Add git commit message guideline
be2097e1 tpl: split template.go
42dcaabf Document getenv template function
9a499b56 Add a section comparing the 'build' and 'server'
6b50c8fb Sort function names in templates documentation
9de78aab docs: how to compile on mac, fix minor errors
beb66c19 helpers: add some missing documentation
be57ec53 Fix the last Go Vet error
be01d048 hugolib: make Page implement the ReaderFrom interface
bea42218 helpers: fix some go vet errors
bea5feb3 Return early from DistinctErrorLogger's Printf
99a18b21 List directories being watched when server is run
72aa516c documentation: mention data files under liverload
be627fa7 Remove paragraph tags produced by markdownify
bec9b92d Make contentTransformer names consistent
bec4bdae Return error on wrong use of the Paginator
bec22f89 Add pager size argument to paginator methods
06d704f2 Updates documentation with instructions for a Windows computer
3b2e1006 Capitalize singular
0ab34523 Updates documentation with instructions for a Mac
6a539db5 Update embedded rss.xml code in the docs
be21e2cb Add some more corner tests for ReaderContains
be1429fa Fix shortcode handling in ToC
be6696c3 Handle views in combo with Ace base templates
e8ca8602 Hash all pygments parameters.
beaf5db3 Use helpers.FilePathSeparator const
61a02c4d Fix section name guessing on Windows
15463d3d Cache pygments rendering between runs
be8c0675 Add support for Ace base and inner templates
0921761e Add missing ".adoc" extension in handler_page.go
be84f937 Change to variadic int args in Slicestr
5b0245ca Implement substr template function
beb423a2 Rename Slice to Slicestr
be82b5a9 Polish Slice doc
be19f4eb Rename Substr to Slice
be4fe8f8 Polish Substr and Split tests
04817c7b Add Substr and Split template functions
9cc3d67c Pull Data Files tests into its own file
1e8e5d4e Format docs
66cf3bdc Rename interface contentRewriter to contentTransformer
efb56477 Change safeHTtml to safeHTML in sitemap template
a8bfaba0 template: add some missing test cases for First
b15d0a16 transform: remove some superfluous int conversions
658cfb28 Remove URL param from exported AbsURL methods
e7099cfa Un-export ContentReWriter
98ee69bc Write to rotating ContentReWriter in transformer chain
9688ed25 Comment out shaky Seq test
f4244be0 Calculate the next Hugo version in Deprecated
3273fce0 Refactor Hugo version
49f20bbc Add UrlPath to the deprecated list
e39a258e Improve type handling in Seq
b3bd71fe Update Hugo docs with the initialisms suggested by golint
8b8fb417 More initialism corrections (golint)
ca69cad8 Press: Add "Migrating to Hugo From Octopress" by Nathan LeClaire
a220a3ba [Docs] Copyedit http://gohugo.io/extras/dynamiccontent/
bcdad02c Use ReaderToString in site tests
e1340c06 Fix crossrefs on Windows
a0447345 Add "getenv" as an wrapper for os.Getenv
32bf8b76 removed duplicate word in readme
27ed49e5 Revert "Added image support to the sitemap.xml template"
3c147bd4 Added image support to the sitemap.xml template
0be2aade Add Seq template func
358dcce7 Experimental AsciiDoc support with external helpers
fbcda030 Do not ERROR-log missing /data dir
b190ad0f source: add some test cases for File
f8a840a1 Add double checking in Deprecated
6e30c10d Add deprecated logger
f848dc92 [Docs] Update and expand http://gohugo.io/overview/usage/
d3c0fde5 Update press coverage: Fix URL; new tutorial in Chinese
232398f1 Remove trailing space from site build statistics
67df33f5 Correct initialisms as suggested by golint
00f07c53 doArithmetic: add test for division by zero
43742e02 Add some basic tests for doArithmetic
b9b70fb6 Skip directories like node_modules from the watchlist
f85d1a7d parser: add some frontmatter test cases
c641ffea absurlreplacer: write replacements directly to the byte buffer
3ba279c2 Do not parse backup files with trailing '~' as templates
81695717 Switch from fsnotify.v0 to fsnotify.v1 API (watcher)
634548b9 Add new min_version field to theme.toml template
4784b63e Add test cases for Ne and Eq type normalisation
44cdb37b Fix eq and ne tpl function issue
91d16fbb Fix UglyUrls on Windows
602ceec0 Handle 404 thread safely
851badcb There is only one s.PageTarget() - so we cannot change it, even tempoararily. We have to find another solution to this. ...
63ffb916 parser: apply some Golint rules
81c41d6f livereload: apply some Golint rules
a91bcd85 source: apply some Golint rules
e007c9b2 hugolib: apply some more Golint rules
57590078 menu: make receiver name on Page methods consistent
e24a7759 page: make receiver name on Page methods consistent
8539f781 hugolib: apply some Hugolint rules
b9f8c0c1 author: fix doc
bd2b679e helpers: apply some Golint rules
e685dfc0 Apply some more Golint suggestions
224a2ddf Fix some Go Lint errors
103ea842 Fix errors reported by Go Vet
c4c19ad3 Prevent 404.html from prettifying into 404/index.html
3343cacc Avoid panic when pagination on 0 pages
6e1b0e0c Apply gofmt -s
8557e2cb Add benchmark for the shortcode lexer
ecb2aca6 Update github-pages-blog.md
fb0facef Tidying the Readme a bit more
6c9bdc28 Using a smaller Header Image
8aa646ce Fixing image in readme
1e210a43 Restructure top of Readme.md
fa5cbb2a Merge pull request #944 from gitter-badger/gitter-badge
45d962c6 Added Gitter badge
d5cb3695 Update Readme.md with additional contribution guides
ab5862cd Allow the same shortcode to  be used with or without inline content
241f9f9e Improve error message on missing shortcode inner content
9d80ecb4 Keep trailing slash when baseUrl contains a sub path
176ce5de Allow hyphens in shortcode name
967d001e Use osext on GitHub
bb13d826 [Docs] NetBSD and ARM pre-built binaries are already provided
729a6739 Bumping to version "v0.14-DEV"
e43eabac Updating the final release notes for v0.13
88e7c031 [Docs] Clarify the switch to `canonifyurls = false` as default
ac189fd5 Update README.md and overview/installing.md
dc7b7ef8 Avoid race condition in target list init
c33a8528 Avoid race condition in isInnerShortcode
a3892685 Add trailing file separator to temp dir
f0c8585b Use $.Paginator in template
62752cfe Return unmodified content if panic in LiveReloadInject
4d708f09 Add revocer in LiveReloadInject
d2e022f2 Suppress errors for symbolic links witch point to a file.
aeddaee9 add note that running with watch doesn't produce a site suitable for deployment
e31536dd Add information to highlighting with Payments
c4393257 Adapt to relative path bug fix in purell
41c0e82f Moved futured getSQL topic to another branch
b209f443 getJson and getCsv documentation proof reading by @msjulias
4342dd84 Update Dynamic Content docs
48a6d447 Update doc
47b7cfeb Add getSQL idea
fdf8db9c Initial doc file: Dynamic Content
32d645d9 Fix bug where running hugo without options causes to create $TMPDIR/hugo_cache/ directory.
076b618f GetJson and GetCsv have now variadic URL parts so that you can submit pre or post parts of an URL. The parts will be joined to the final URL.
10c2b41b Add --ignoreCache CLI flag with description "Ignores the cache directory for reading but still writes to it" as @spf13 suggested.
c168666b Adding getJson and getCsv to funcMap
41a51681 Fix bug on windows where the backslash got removed in func MakePath()
5e2d3d2e Merge to stay up to date with current dev Feature: GetJson and GetJson in short codes or other layout files. For more details please see: http://cyrillschumacher.com/2014/12/21/dynamic-pages-with-gohugo.io/
9bf223e5 Quote strings in `hugo config` output
82a08889 Revert "Expansion of unit tests for utils/utils.go"
c2e29138 Fix canonifyurl vs schemaless links
6b28e38c Expansion of unit tests for utils/utils.go
cb9fa627 [Docs] Minor copyediting of highlighting.md
bd0de85d Add information to highlighting with Pygments
1827680b List of variables
09ed3c4b Fixed a typo
54e41768 Make "Indexes" the alias and "Taxonomies" the canonical name
d33a42f1 Merge branch 'master' of github.com:spf13/hugo
159836ed README.me: Add linefeed that got lost in the last commit
63e7b970 [Docs] Add pointers to roadmap; new tweet and article
f1fec88c Improve abs url replacement speed
27c03a6d Add benchmark for AbsUrlInXml
366f9916 Another link in the same page
b389a923 Fixed invalid link to partials
462e666f Update docs so that `figure` includes the `class` parameter.
c14e7b10 Add 'config' command to list site configuration
d6f81c73 Put back static theme conditional
d10e05f2 [commands/new.go] Update theme.toml etc.
87975e04 Remove nohup.out committed by accident
48206833 Doc Data Files: Add section about themes and expanded the example a bit
12176323 Remove now superfluous conditional
8ed67169 Fix broken data dir test
8df59c81 Temporarily disable broken test
ebcc1e66 Add data files support in themes
664fd991 Change "ctrl+c" to "Ctrl+C"
dbb86679 Fix typo: GetJson -> GetCsv
7e28db18 Add showcase entry for consequently.org
fa71f6c1 Make # survice Url cleaning
e3daa359 Update release notes for v0.13
22d85c2a Avoid converting summary to []byte and back to string
371c148c Fix alias for data files doc
03fff880 Add docs for Data Files
6afe70d5 Better error message for data-file parsing errors
1c50f775 DataDir: Minor polish and add missing tests
773812de Reads data files inside data/ and makes data available in .Site.Data
4c7e119c [Docs] Say which directory to clone the hugoThemes
088d46a8 parser.FormatSanitize() MetaDataFormat for date too
08219161 Use buffer pool in StripHTML
5e34ae61 Log ERROR on missing baseurl
43e48a89 Add benchmark test for StripHTML
48b6777e Fix Truncate
2bee4a15 Replace 4 strings.Replace with 1 strings.Replacer
5df85770 Add memprofile to pprof benchmark
f8704c1b Avoid calling strings.Fields multiple times with same content
11a19e07 Build PageMenus only once
df734bc1 Tighten README for the sloppy reader
8b95cab9 Avoid panic on unknown markup
dd934481 Scratch doc: Use the special $ variable to prevent confusion
13d90094 Use .Site.Params.description as fallback for social partials
b984ec96 Optimize for the common case in Blackfriday config
c5078093 Print template parsing errors to aid troubleshooting
d1364ffb Fix defaults for Blackfriday
f264076f Add doc for Scratch
420c9e4d Add writable context to Node
47c8f329 Prevent site config being overwritten
659f71e6 [Docs] Fix more missing `.` in example `partial` calls
20bed49f Fixed syntax error in 404.html template code
f4737689 Updating shortcode imports & site test to work with new buffer pool functions
e1e6aaed Merge branch 'master' of github.com:spf13/hugo
4a9436c1 Some more .Date.IsZero checks in internal templates
230e7c02 Remove _default prefix from SEO templates
8db3c0b0 page rendering and writing using BBP
3d60955e Use .Date.IsZero to skip unset date in embedded templates
35684e8f Use strings instead of byte arrays for replaceShortcodeTokens tests
366c5572 Use a regular expression in replaceShortcodeTokens
b4c50728 site's XML generation using BBP
77074127 page source creation using BBP
4828fee1 transform chain using BBP
5441fc5d template render with BBP
2f2297bd shortcodes using BBP
66ed5c5e Adding BufferPool. Implementing BP in ReaderTo{Bytes,String}().
ba53799f url_path => urlPath
523f38a9 Fix for issue 839 and 490 on Windows
d397bc4f [Docs] Complete the transition from "indexes" to "taxonomies" (almost)
ba44e860 [Docs] Copyediting
82d4b8ab [Docs] Use OptiPNG to shrink PNG images losslessly
8e6cbe82 Some housekeeping of the Showcase and Press pages
831fbd5e Add .mailmap to get a more correct author log
ee1045ad ignore root path, no need strip traling slash
2d8e15a5 Version uses binary name instead of hugo
06b1a883 Added three videos to documentation.
e52a76f5 Use runtime.GOOS to identify Windows specific path tests
0b5f8c8c [doc] Improve paginator doc
7c74a77d Replace assert.Equal(true/false) with assert.True/False
251f5e9d Do not panic on permission denied
8ad4fd05 Split Windows and Unix specific path tests
b155e8b4 Temporarily comment out breaking Windows test case
bedc2d84 Introduce FilepathPathBridge
5f9596e6 Add more tests to helper
de76d4a8 Improve pagination testing
0c229707 Linkify release notes
fb594fc6 Set detault for Paginate to 10
a6d22bcf Add documentation for pagination
c0fbe614 Add Bootstrap-compatible pagination.html
3628d0bb Add pagination to release notes
37445bc6 Add pagination support for home page, sections and taxonomies
407e80a9 Add site-wide/per-page [blackfriday] `extensions` option
39b2cdec Wrong URL for Github Pages
e72ce89a Move s.prepUrl() before prepending BaseUrl.
ea72f15f Correct wercker URL
57b4f331 Fix inverse notation
f6c0b472 Make Blackfriday smart fractions to really default to `true`
eb686352 Add site-wide/per-page [blackfriday] `fractions` option
803865f8 Fix for page.GetParam() for JSON and TOML maps
a0c6dba3 Upgrade from gopkg.in/yaml.v1 to gopkg.in/yaml.v2
bd1b019f Handle empty front matter in archetype.
b345ca26 [Docs]: Add new press/blog coverage about Hugo
1b42dc57 Fix RelPermalink() and Urls in menus vs canonifyUrls
74399830 [Docs] Document the new (temp?) default of `canonifyurls = false`
60c6faa3 Revert "Try to fix mysterious test failures on Travis"
71fe85df Try to fix mysterious test failures on Travis
01ec44a6 Add menu tests for pages with both Yaml and Toml front matter
020c0b86 Revert "Quick-and-dirty way to print details of template errors"
6db6d33b Add dateFormat to release notes
37490ee2 Add dateFormat template function
878754c2 Protect the innerShortCodeCache by a RW lock
c8f8f48e Cache the page's rendering context flags
19c52ab0 Register rstHandler to restore experimental reST support
1cc63869 Make ref and relref respect plainIdAnchors
e5be592e fix outdated MathJax CDN URL
173aa53b [Docs] Use of `$.` to access global context from anywhere
f015e9b8 [Docs] Recommend the use of backticks for IE conditionals
02da4959 Fix string comparison for .Truncated page variable
a17c290a [Docs] Correct description of "Read More" links in Summaries
edcdb6f4 Fix two errors in two internal templates
d897b1e8 Add missing assertion to trim-test
932214d7 fix --uglyUrls params
2ec046af Minor polish in path/url
9e688507 Add more tests to general helper
1b91fec0 Add tests for IsSet
ee34a840 Add test binaries to .gitignore
f77f2a9b Refactor TestGt to also include Lt, Ge, Le, Eq and Ne
1348caa6 [Docs] Add a note about the plan to switch to Apache License
f470cf95 Add tests for Apply
3f0f186b Add inline doc for Apply
eabe8e1a Rename ignoreDotFile to isDotFile (which is what it is)
077d726b Replace regexp based Chomp with builtin TrimRight
99aee304 Add tests for Replace
26856c3b Add tests for Trim
4b1780bf Add test coverage files to .gitignore
a6bf6f52 Add tests for Chomp
42b33102 Quick-and-dirty way to print details of template errors
2342655f [Docs] Incorporate some great ideas by @mohae into the `safeUrl` docs
724cc0dd Add `safeUrl`; disable `safeHtmlAttr`; rename `safeCSS` to `safeCss`
f5946ea3 Add SafeHtmlAttr, SafeCSS template function
53b4ab4c Revert "[Docs] Use <dl> for definition lists of variables"
4609f77a [Docs] New testimonials and press coverage
0e60c513 [Docs] Limit `.fa { display: inline }` within #main-content
b56c9db6 [Docs] Add FreeBSD logo beside the FreeBSD name
3c4bc653 Merge branch 'master' of github.com:spf13/hugo
783c76b8 Make RSS dates valid
5d6dfe81 [Docs] Use <dl> for definition lists of variables
9712d06b Fix the Hugo.Generator tag so it can be used
56eead2a Fix broken doc section
c23dfd99 Use an init() method to create the HugoInfo instance
7257ab68 Update release notes with the new Hugo var
724357a2 Make sure there are only one HugoInfo instance
109e6f95 Merge branch 'master' of github.com:spf13/hugo
73d923e9 Fix HugoInfo init
ac6b86af Added top level .Hugo variable with version, commit and generator information + docs Added Version, CommitHash and BuildDate to hugolib/hugo.go and used it in build Removed commitHash and buildDate from commands/version.go and used hugolib vars Removed getDateFormat function from commands/version.go
1dfd0225 [Docs] Minor revisions to future v0.13 Release Note
a2c88715 [Docs] New "Troubleshooting Overview" page
90afe41e Add trim and replace to release notes
4f4015d7 Make all the params to Replace an interface{}
e08cabad Rewrite first argument to interface{}
871e8113 Add trim and replace template functions
32d15d91 Change CR+LF to LF on gohugo.io front page, saving 286 bytes
af956c41 Update gohugo.io front page for 2015; add @popthestack's testimony :-)
b59dd163 [Docs] More copyediting
769ab9e2 [Docs] Adjust sidebar menu width and capitalization
a4da5262 Missing . on footer partials
508788e6 Update TestFixUrl() to expect BaseUrl to have trailing `/`
3a9300dd Merge pull request #798 from bjornerik/fix/nestedshortcodes
1cbdd3e5 Ensure that BaseUrl used in `hugo server` ends with `/`
714abd5c Fix issue with nested shortcodes
9150a98f Replace `if` with `with` in embedded rss.xml
208086eb Add ".swx" suffix to file watcher's ignore list
f0b3979a Disable shortcode processing for html files
4f66acdc First take on release notes for 0.13
fc39019f Add an alias to the old URL of github-pages-blog.md
433ce3b7 Rename github_pages_blog.md to github-pages-blog.md
4107fd50 [Docs] More random revision and copyediting
6fda9012 Fixed error in tutorial, added site variable docs
6c5a7b7b Tutorial: Automated deployments
700c2b8f Trivial fixes to get RSS 2.0 feeds to validate.
5bfc812d [Docs] Remove references to "ATOM" feeds
6ee35f65 Correct typo in hugolib/path_separators_windows_test.go
a4eef4eb Correct spelling of two test files: seperators → separators
78e9229c Fix "hugo new" EOF error with an archetype file without the final EOL
b6ab6618 note in archetype.md to alert that ending carriage return may be nessary to avoid EOF errors.
b0181e27 Some more random copyediting of Hugo docs
49f5eb5c Moved a test regarding a content.go function to a new test file content_test.go. Added some tests for general helpers, especially as a way to document the expected behavior, and as a warm-up welcome contribution.
2b46f3e5 Do not exit server watch on error
190964c5 [Docs] New Troubleshooting section
cb909cde Google Custom Search: Open link in _parent
eba33459 Add basic Google Custom Search to Hugo docs
d12f6cd7 Fix `echoParam` template function to accept string key name
c0f54aef Rename to plainIdAnchors
a0e44bb7 Add Blackfriday: documentIDAnchor documentation
4adf58cc Group both options under Blackfriday: documentIDAnchor
b7716948 Add config options: disable footnote anchor prefix and header ID suffix New config options:
dca6eaba Add config file example to variables.md
0b7392b3 Update configuration.md
e6c27f76 Add example code to Summaries
d3763147 use fsnotify 0.9.3
a5f51061 Add in-section Next/Prev content pointers
837922d3 Add ERROR logging on invalid date and publishdate
0d17ee7e Add operator argument to `where` template function
ae9c25af Implement `apply`.
6033abe1 Add a chomp function.
14e93de8 Initialize funcMap in an init function.
6a98d269 Hygiene: Reduce copy-pasted code.
c6f4b09f always use http scheme for localhost
dd1001ce Merge pull request #762 from bjornerik/fix/revert-revert-menutest
076a475d Revert "Temporarily disable failing menu test"
fb1b795d Bumping Travis to test go 1.3 & 1.4
d3c36761 Fix EOF
ec2566fa Add www.thehome.dk to showcase
975f4cf1 Refactor tpl codes
fa8ac87d Make 'where' template function accepts dot chaining key argument
dd5bc034 [Docs] Mention support for the Ace HTML Template Engine
ddf41901 Docs copyediting: Add more external URLs; add backticks, etc.
5792cc3a [Docs] Go 1.4+ required for building on Windows
afe5add8 Add anchor ref to Blackfriday doc
5e0a16ea Fix a crash for ref page#anchor.
029a3ae7 Merge pull request #742 from bjornerik/doc/blackfriday
7dacc999 Add ability to canonify URLs in rendered XML output.
f5a3fb14 Wrap comments helpers package to fit 80-column width
a0fe1170 Add doc for Blackfriday configuration
fbf8bcac Add configurable support for angled quotes
bb376982 Fix unicode menu URLs
e4a22255 Temporarily disable failing menu test
0cfdb2e5 Revise README.md: buildDate expects timezone; copyediting
8042e774 Typo fix: "simple" → "simply" in templates/views.md
68cea070 Minor copyediting, no new content added.
e3433e6a Fix long descriptions of `benchmark` and `serve` commands
331043b9 Remove noisy Println in test
717f702e Added delimit & sort template functions, tests and docs
8f6f871f Added AuthorList, Author, AuthorSocial, SiteSocial, Image and Video structs Added Page.Author(s) functions Added schema, opengraph, twitter_cards, google_news metadata templates Added "" template
fd33e5d2 Documentation for `ref` and `relref`.
112c3c5c Provide (relative) reference funcs & shortcodes.
14bce119 Commented helpers package
7436829b Use current working dir as WorkingDir instead of hugo executable's dir
ec4b6c03 Trigger an editor after `hugo new`.
2c8e9a79 Commenting helpers package
b11838da Commented commands package
9b04c279 Revert "Make Urls in menus respect CanonifyUrls"
3ccb3979 Make Urls in menus respect CanonifyUrls
e6541c45 ERROR-log on symbolic links
9f77f930 Fix various Windows-issues
3a8c1241 Add timezone to buildDate
be3d563a Add an `install` target to Makefile.
9f0f73f4 Fix front matter for 'Creating a New Theme'
a6d3862b Docs: Minor copyediting/proofreading
736dd4b5 Docs: Quote <!--more--> in <code> instead of italicizing it
010f6057 Correct URL of the favicon in the documentation
11cdb815 Remove Println that panics in test
27840932 Always use RFC3339 for version date format.
a0d956c2 Add Ace template engine support
390c158f Github page strategy for username.github.io repos
1b36bda6 Fixed typo in summaries description in the documentation
c00788d8 showcase: update ucsb entry
742a064b Correct alias
df8e9366 Fix missing shortcode in doc
b719ba7e Adding Prev/Next functionality to all lists of pages (sections, taxonomies, etc)
78316903 adding appvoyer support for Windows CI integration
d6166172 Doc for markdownify
53c707bb Add markdownify template filter
f0400697 update summary.md with info on handling of html tags
8f9cea7f Enable descriptive header IDs.
0282c922 fixing race condition in CreatePages
c5ae2a2d Added makefile that builds with git information
9b850c4a Correct path in theme search order
9e152989 Added link to my blogpost about travelling with Hugo in asia
a1954c4f Added stou.dk to showcases
0eeaa4c8 fix version command so that it will work with all supported config formats and added tests
6c25cd52 typo: practical
cdbc741c fixed #656. Templates work properly when watching.
4a2f16f9 refactor handlers to use types instead of structs.
73f203ad Move template library into it's own package (tpl). No longer dependent on hugolib. Can be used externally.
92a3372a Added a new command `hugo list drafts` and `hugo list future`
728d0fa3 Update shortcode doc for 0.13-DEV
cb3576b6 Fix broken convert
bcaf3341 Update shortcodes.md
a6a9df39 Fix failing shortcode tests on Travis
596d6793 Various fixes in RSS feed generation
a07dd565 fixing typo
b716dbec Fix template checking order in site.go
55fcd2f3 Shortcode rewrite, take 2
c8904756 Removing dependency on go-html-transform (fixing the build).
7e692544 Fix `GroupBy` function issues
91e03b9f Reinsert deleted test
6bf6a810 Update creating-a-new-theme.md
88881de2 Update creating-a-new-theme.md
e9917bfe Update creating-a-new-theme.md
ca4e4ce2 converted helpers usage of path 2 filepath
99463f6a converted path 2 filepath
2c51bba0 converted path 2 filepath
7fd348cf convert path 2 filepath
4f2dfe70 converted path 2 filepath
7badd2eb change path usage to filepath
05300fde add support for fsync's noTime flag
f037ae7b update README.md with info on adding compile information to version
fc20d0b4 Fixed launchcode5.md description
52ae1c75 Added launchcode-tn.jpg to docs/static/img
15dae3cc Create launchcode5.md
8ad9c0a7 Make Where template-method accept methodname as key
fdae0907 Params map has string as key
e127a5cb Added better error message for poorly formed frontmatters in archtypes
3cec04e0 Add Git directory deployment flow to tutorial
d467ec0a Fix a bug with taxonomy rendering.
d7e6e490 Allow partial without .html
266511b6 Fix missing space before 'width'
cafd39eb Fixing some tests
55fb0242 Updating tests to use hugofs
a40bd3ca rewriting guessSection to accurately reflect intent and usage. Update tests.
e2634752 First stab at correcting GuessSection tests
f81f9ceb Fix: rewrite FileAndExt
5906c865 Fix: remove the unnecessary dot in an extension
3521e8b1 Updated TestReplaceExtensioni, TestFilename and TestFileAndExt
980d0f14 WriteToDisk and SafeWriteToDisk test cleaned up
bf07dc92 WriteToDisk and SafeWriteToDisk tests now pass
a54ad2bf Fix: Test TestSafeWriteToDisk now works
e8bbc44a Added the path modules test files
6b619d2c Added the url modules test files.
57cd9539 Added the general modules test files
b87402e8 Remove the helpers_test.go file
8a5dd06a Use page.Markup to determine which PageHandler to use if it's set.
ade2ca60 Adding an html file handler
7fba2500 Adding a proper css file handler (with automatic minification)
4dcf734a Updating tests to use new Targets & Writers and switch to using Afero.MemMapFs for more accurate tests.
7b960ac1 New targets & new renderers and write methods [WIP]
e02dc674 Cleanup file conversion handling
3616d167 Better error messages for show_plan_test
07f2ef9c Page Group functions now work even when an uppercase field / method is provided.
4b9ea105 Setting to filesystems to the afero.fs interface so can be easily swapped out.
ad69374f Source files can provide content as String or Bytes or Reader
dcea0fa5 Adding ReaderTo and ToReader helper functions
2cb89a52 Update menu test to work with revised source struct
8cc7684a Change the type of .Site.Author from…
f3e9cbc7 Fix #593 problem with `hugo -w`
c1942e91 Change permalink validation and substitution.
c07b10bb Output a timestamp with hugo server --watch
2060031c Fix sourceLink for Hugo
d036ddf2 Create creating-a-new-theme.md
11ddc308 Fix for issue 583
6c238e14 Fix broken link
649a7d2b Minor doc corrections
af47e5a2 Extend template's mod and modBool functions to accept any int types
d4ed5919 added note about pygment example code and markdown processing, updated example
8e368e25 540: add support for build information output to version command
8cb435f1 Fix redirect-loop for Hugo server
5e28606b Add sort and grouping functions for publish date and param of Page `GroupBy` is modified to allow it to receive a method name argument for example `Type` as its first argument. It is only allowed to call with a method which takes no arguments and returns a result or a pair of a result and an error.
d013edb7 Implement HasMenuCurrent and IsMenuCurrent for Nodes
2b412d4a fixed server reporting Web Server is available at https://localhost:1313 when server always serve http
73ec0925 update summary doc
9e029fe4 #463 add summary.md page
c5f1031e Handler WIP
141f3e19 Migrating Hugo to Afero for filesystem calls.
dfb84825 Handlers WIP - Convert now working
30d4a26b Handlers WIP (builds)
93f3d604 Handlers WIP
8bd0ffba Initial Handler Architecture WIP
20467e36 Improved error message when config file not found.
5dfc1ded Big refactor of how source files are used. Also added default destination extension option.
24bbfe7d Set Content-Type for livereload.js
0167fb48 Copy content from archetype
da5d98e9 Make First accept any int
d064139c Fix spf13/hugo#467. RSSLink now point to index.xml
16330cea Add nil-check to Intersect
1d4dde7a added docs for 'intersect' and 'in' template functions
ca7007bf Minor proofreading corrections to Hugo docs
953cad6c Document manual breakpoint of .Summary
3da97656 add 'width' parameter to 'figure' shortcode
fb82f00f handle https prefixes in baseUrl
b98c2088 Minor fix to error message when copying static files
4b9e4c90 #462 fix, remove leading and trailing dashes from urlized slug. includes test changes
f52e6628 Feed the titleized taxonomy key through string replace to replace '-' with ' ' for proper display of the taxonmy title
938733f4 added In and Intersect template functions
9cdd2e54 Use md5 against the file path for uniqueness.
603b24a1 Make each generated page’s footnotes unique.
e68e7ef9 Configure footnote rendering.
eeaf343a Mention .Params and .Page variables in shortcode docs. Also `highlight` variables.
1614b824 Correct desc for hugo new command
c739ec22 Removed text from code block.
879e90dc Switch to new hompage
e3d4d40d better error messages for template errors
3f59abe8 add some information to rendering errors so it's easier to tell what's failing.
def79376 Make taxonomy documentation match the example.
30603070 Make highlight.js example clearer
b81ebf2a Making the install on the homepage a bit more clear
4e4ea958 instructions for Homebrew installation
26e44506 adding memstat option to server
5d565c34 Extend template's basic math functions to accept float, uint and string values
d5308e6f Adding a community link to the homepage
bf980bc1 switching website to gohugo.io & adding links to discuss
1a0dc0b9 Update urls.md
b590de69 limit the number of goroutines used in taxonomy rendering to gomaxprocs*4
49045b1c limit the number of goroutines we use for page rendering to gomaxprocs*4
cf3e748b remove unused field
a72ca38c make the value of the BuildDrafts flag available to templates.This can be useful for if you only want to show some specific information on your local machine and/or when showing drafts.
71423743 Sort by title if dates are the same
275e1c0d more examples and explanation of go templating
becd4fe3 refactor handling of amber to AddTemplateFile as the TODO note stated. Used switch statement to make it easier to add other template support
4e9b0408 fix tags not being in lowercase, #491
012a473e added "eq" function to docs.
df489b47 Enable soft livereload of CSS and images
0099b5a3 Change all uses of sort.Sort to sort.Stable.Using sort.Stable ensures that even if the sort keys are the same, the order of the sort will not randomly change.  Using the old sort.Sort, if you had pages with no date, the lists of those pages would randomly reorder every time you regenerate the list, causing spurious changes to the output.  Now they'll always get ordered in the same way.
d9964451 More error messages at syncing static contents
acf9561a fix zero date
b336abcf Fix typo in Archetypes documentation.
2ca615c5 Add Node.Site.Pages to all nodes and ensure all pages from the site exist in the list before processing shortcodes.
b97c6c70 add Name to File, which is the filename minus the extension
16845791 Go back to lowercase slugs. Also, use MakePathToLower in TestMakeToLower.
5dd3eaab More proofreading and minor revisions to Hugo docs
ac78d252 A small fix and update to the multilingual example
4bb5e326 Taxonomies can now be provided as a single string value if there is only one in frontmatter (tag = "val" vs tag = ["val"])
1b7f18e3 Making partials context optional for compatibility with template.
7b3df238 Bumping Version to 0.13-DEV
efc98a3b Update example blog to Hugo v0.12 conventions
05102f1b Fixing typo in ordering.md fixed #401
13631289 Bumping Version
b4d3195f Adding V0.12 release notes
f36ed446 Adding a bunch of new quotes to the front page and switching to Owl Carousel
d2020506 Fix loading of Lato font in style.css for docs
a6022293 Minor proofreading corrections to Hugo docs
f142458c Use typographic quote chars in the carousel quotes section
13a317b9 Enable header id blackfriday extension
c1b9e8d5 quickstart.md: Put long options inside backticks
242d6b4e Adjusting the number of go routines to build the pages in to 4*GOMAXPROCS (from 2) for faster rendering.
47c91a4c Fix CreatePages
93addfcb Adding documentation about 'where' and cleaning up docs around first.
0ce4ec1e Added more examples and cleaned up the GroupBy functionality documentation
7e19fa40 Making direction optional (and setting defaults) for GroupBy Pages functionality.
b15eb889 Adding .Reverse() to PagesGroup
41b28462 Switch .Data to .Pages in the PageGroup functionality for increased consistency.
70dc370c Making the term "Term" more consistent with Taxonomy usage.
01caaeba Making the Pages Sorting methods available within a taxonomy term.
bb02a14b Adding a page listing the different methods available to Taxonomies.
ba8f652a More taxonomy examples in templates.
6f9f93f3 Fixing the taxonomy example. Fixed #318.
d3646aaa Be more specific about .Params content
7de32092 Shortcodes are content files specific.
6f9db4a7 Add document about page grouping functions
53b7d5b8 Inner Shortcodes now treated as markdown. fixed #185
828401cb More press additions
4b71eb16 Compressed showcase thumbnails further
95449880 Added ucsb to showcase
dcda66df More Press
4a91b8c7 fixed #389 . Added alias for missing page.
987a82d0 small tweaks to the hover effect
8a44deac Creating a showcase archetype to make for easier showcase additions
1c1615d7 Adding a bunch of new sites to the showcase
c9a6b2b9 Adding a bunch of new press to the Press page.
733bff90 Prettier link hover state
1143a8fa Bumping Travis to test Go 1.2 & tip (1.3)
294222ac Fixing a broken link in the docs
4281cbfa LiveReloadDisabled works with Watching properly. Fixed #335.
1b5f59b0 go fmt site.go
30af267b Fix #302. Links now have trailing slashes.
a31edb33 Support subdir in baseurl.
4b979b17 added functionality to check the error message returned from Cobra, if any. for uage message text. If its present, the usage message gets truncated and the resulting message is returned to be used for the rest of the error message. If the resulting error is blank, no error message is printed
4c735a78 preserve alias case while lowercasing taxonomy
348e123c Update 404 to be compiled to .html instead of directory
50a8c507 Add page grouping functions
867683e4 Add link for learning more about static directory
c750a95e support for futre/draft summary info output
946ad9c2 Making the links stand out more
f5157566 Cleaning up a ton of CSS.. Removing unused selectors. Eliminated over 80% of CSS. Upgrading jQuery & FA
34a93fa1 Fixing the docs sidebar interactions
04d412ed Fixed showcase image paths
cece27fa fix issue 411, /path/to/site/archetypes : is a directory error
e31d4609 Bringing back the showcase
b047e2f8 Removing redundant bootstrap
864f91d9 Changing the docs template partials to be able to be used to render a section
aae1ff3c Adding IsNode & IsPage functions to Page & Node
b10dea29 added evaluation for toml for metadataformat date handling
27c0ec31 Added a note after the script adding potential issues per @franklinwise's feedback
5ae28327 errors not propagating
634d7b26 switch to new location of goyaml
002a5b67 Add 'where' template function
6e15f652 Added yaml menu example
5d8ac54f Config changes and Live Reload
09115a96 Fix #394 - Docs: add a missing link to the livereload page in the intro
e9b47da0 hugo builds no site if there are only drafts
3e9fc47a Adding more press
cbb29795 Docs-removed bullet and broken link for catagetories.  Included category text in bullet for taxonomies
b3130b52 Fix #363 - Docs: make the fixed menu on the left scrollable
1778f28c remove extraneous "Because"
f556cb44 update docs for permalinks with all fields
29c45dd6 make type-or-section more obvious
756be987 Merge pull request #388 from GraemeCaldwell/patch-2
d8b78c3d Update press.md
2850692a Merge pull request #370 from kevinburke/its
657e4a46 it's/its
bf9595aa Fixed #328. Config file set appropriately.
8d3fa7ef Getting rid of bad scrollbar
aa42f430 allow site to be built with empty content
73dd4f38 report errors
78962a14 Allows 404 templates from themes/THEME directories.
ac99cecc Add shortcode template loading from themes directory.
35d04671 Add PluralizeListTitles option (default true) to allow disabling use of the inflect package
3eb480a6 fix link to template primer
b7671974 taxonomies -> Taxonomies
836b1800 Fix minor typo in file docs/content/templates/overview.md
0e57e32f do not use angle brackets in hyperlink labels
5969315c switch back to master blackfriday; enable footnotes
406233f0 Included instructions for omitting disqus comments on localhost.
86c3de4b Fix #263, document HTML comments & IE conditionals
b2b7ba42 fixing typo in docs
4483a665 Centralizing the template execution logic in one place
c297d745 Adding 'partial' template function to add theme / local awareness to the partials directory.
4e99d6b5 Adding proper error message when view is not found.. fixing #303
640ab3c7 fixed #303. Adding theme support to views
e0ea6b99 Support embedding <script> tags in markdown pages
7b7ce117 Add empty line to correctly render a list
ca18cfef Setting new version
05875153 Converting front matter to YAML
2b90779f Actually bumping the version
a3d6e7c4 Fix docs script and css references to refer to the correct location
012823a3 Update menu documentation to be accurate
b9bba2b9 Updating Convert to handle dates properly for yaml and json
0c254460 Add future details to documentation
c502f078 Add handling for publishDates (which will be ignored if in the future). Fixed #260
4ebaec89 Include Section Taxonomy into SiteInfo
35a60597 SiteInfo is now a pointer on the Node
7a8b754c Fixed #301. LiveReload works on any port now.
4076d770 Simplifying the siteInfo handling
280df4e3 Fix Viperized .Site.Params
e98f0014 Allow to use filename in permalinks
d65061df Adding TechMadePlain to showcase
79767f56 Fix links to GitHub repo for spencerlyon2/hugo_gh_blog
1ba63f15 Make the header not jump around
2a44ca54 More doc site improvements. Added documentation's new layout
79dd1d02 Fixing bug with Live Reload where it broadcast instead of sending the handshake
57ad3abe Pre and Post in Menu are type HTML
a87f171b Updating / Rewriting / Adding all of the documentation in preparation for the next release
aeb06c7b Rename chrome to partials (in builder)
9173022e Set verbose to Info level
e7991003 Fix bug so watch works on theme directories as well
6b8244ba new site works in an empty directory now
df4bbcef Adding instant click library to docs so even more responsive navigation
be1ee220 Proper integration of live reload with automatic injection
60ed5bda Live reloading is working! Still need to incorporate cleanly.
296d218e Better handling of when the specified port is already in use
b520f885 Switching docs highlighting to highlight.js .. Docs build super fast again!
b198cb26 Renaming indexes to taxonomies in docs
a4a1e39a Fixing issue when two menu items have the same name.
4f75ec98 Homepage renders with _default/list.html or then _default/single.html when index.html is not present.
025a37df Fix permalink functionality, which was broken in 62dd1d4.
05b76dcb Add a blank line after the front matter when writing back a page.
73cbefdb Make template comparison functions handle floats
667a047c Fix date issue with home page in Sitemap
0053be97 Correctly print server URL when base-url is specified in the command line
2194cc77 Add pygmentsstyle and pygmentsuseclasses options
5df0cf7e Add Sitemap documentation content
35926dcf Add Sitemap testing
6049c3a1 Update Sitemap default value syntax
2a902bbc Add Sitemaps config values handling
f8e675d0 Add base Sitemap support
17922544 Add template comparison functions (Go 1.1 compat)
4e0208d4 Doc fix: replace "hugolibs" with "hugo" in "contributing" page, fixes #271.
c38d694f  Change some typography in the docs.
ec4b1526 Fixing broken link. Fixed #278.
9b192e67 Adding more information about client side highlighting
bc9f69e7 Add client-side syntax highlighting example
6b9d4a93 Adding new commands (new site [path], new theme [name])
be3e5592 Adding an archetype file for the docs site
28ffb92b Adding the new command and the create package
08c30b6e Using new helpers in page.go
bff1f1e6 Adding some new methods to helpers (GuessSection, MakeTitle & Filename)
ef2ad4d9 More feedback where errors happen during metadata conversion
6d9a2d24 adding a front matter format to lead rune method
fb7d45e6 permitting empty files again. Fixing some tests to now pass.
3395e1cb Adding a command that enables converting site to a different metadata format. Doing this revealed some bugs in the encoding functionality in some of the underlying libraries. Please backup before using.
859a78e1 Providing the ability to save (write) a content's source file.
1302ef9f Making site page initialization a bit more granular and accessible
cbd9506c moving front matter parsing (and creation) to parse package
58f8b43f moving writeToDisk to helpers to make it more accessible
f271faea Don't process dotfiles
5581e33a Update broken localhost link
96b6ae81 Adding example blog
b52e9463 Little syntax mistake
2e954d85 Fix permalinks to subdomains
bdf7cd9f Creating site menu configuration and have the docs site use it
ac82fe32 Making active parent in nav reflect when child is active page in docs
ef87dffb Fix accidentally removed line from menu template.
4f813c09 Fixing some bugs introduced in prior few commits. Tests now pass.
11fe227b Implementing new menu system in the docs site
9ecf58e2 new menus system including active link & nesting
69c1944f Add handling of deeply nested front matter
4a8de8ea Add Disqus support out of the box. Move template/bundle into hugolib.
41adafbc Updated to work with the latest viper
8afff8c7 Preliminary Theme Support
c0a046cb Added internal rss.xml template and config option to turn off rss creation
bb9bcdcf Add more information to the siteInfo (and configuration options) for better RSS generation.
93bcddeb Renamed Indexes to Taxonomies. Old template and config parameters still work.
aae6fa0b Fix test to not fail when order is different, but slice contents are the same.
be37c0b3 Adding more articles to press page.
bd022534 Adding Params to node for easy template access of page.params without throwing errors.
c8269d6d Making node.Keywords the correct length
4161d542 Misc doc fixes
d1c500c1 Adding Press page to hugo docs
af1acfbc writing indexes under more configuration conditions
ad34be9d strip trailing baseurl slash. Added a new template function "sanitizeurl" which ensures no double slashes. Fixed #221
a6170154 add: yslow-rules showcase
9a83f7a0 Fixing all tests to pass with new Viper Config
62dd1d45 Hugo config abstracted into a general purpose config library called  "Viper". Hugo casting now in own library called "cast"
a01056b9 typos in mathjax.md
a7ca39cc ENH: added tutorial for hosting a blog on github pages
2e4158b0 added appliance.cloudshark.org to showcase also cleaned up thumbnail view to not show source link if unavailable
e50b9d8a Adding support for logging & verbose logging. Consolidation of error handling. Integration of jWalterWeatherman library. Fixed #137
2fa3761e DOC: added tutorial for using MathJax with Hugo
c02a0207 change golang to go
5ee0a3b9 Typo: s/executible/executable/
895fe536 Adding a few more logos and powered by/made by images.
f733e70e Adding apple touch & favicon meta links
51b078a7 Homepage update. New Logo. Minor site updates.
6205a16b Fixes #227 by properly scoping the variables within the go routine.
85c04ca2 Add Tutorial With Steps to Migrate from Jekyll.
7135d897 Optimizing thumbnail & preview images
17fdf7d6 Add www.heyitsalex.net to Community Showcase.
1b3525d6 fix typo of readme
38131837 clearer pseudo command in quickstart doc
d5c58b45 Order ByTitle and ByLinkTitle added
eec0e512 Add sort pages by Title and by LinkTitle
3dfb4751 Parallelizing the largest build processes (templates, pages, indexes). Seeing 300%+ improvement of total build time.
d84f707d Also ignore Emacs lock & recovery files.
3a0ab5a3 Bumping version to v0.11-dev
0447c759 Adding the right date for the release of 0.10
0a775650 bumping version for 0.10
2540d884 Fixing issues go vet reports.
2c0ded7f Add test for ignoring ~$ files
e53bc948 Ignore content files ending in ~
0becad72 Make error message when encountering unrecognized file extensions more helpful
ea8d0981 Make per-page url overrides take precedence over section permalink settings
732b5d42 Add Kieran Healy's website.
ae954d51 updating the intro page
14227351 Reorganization of helpers. Centralized Url/Path logic. Fixed #175.
64572d2d Shortcode cleanup. Added a ton of tests. Much more flexible with input. Doesn't crash with bad input. Fixed #193
dc068ccb Fix imports so hugo builds on darwin
8fe78f6f A bunch of small documentation changes
de05a0d9 Adding documentation on Pretty Urls
e74d1b86 Adding documentation on Table of Contents functionality
30e804ee Adding an introduction to Hugo
82fdfa2c Warn about bad shortcode parameters (and don't crash)
5cff3e62 Adding Else If example
ed0fe9dd Make 'read a string' code understand float64 (json) and int (yaml) as well as actual strings
b41622bc Allow 1/0 for true/false in Yaml front-matter
e4af4f65 Support ISO8601 date/time format without timezones
0bfe9276 Make the invalid date/time format error message more helpful
1dbed5ee Call the json delimiter 'json_lead' instead of 'java_lead'
8ebb85f1 Fix build
1bead0ed Adding Documentation on using Syntax Highlighting
56dfdfe8 Adding Documentation on Hugo Template Functions
bf640775 Minor Docs Tweaks
80086759 Adding Go Template Tutorial
dca7a901 Updating Release Notes and Roadmap
75c260fa Only change rLimit on OSX (where it is needed). Fixed #194
11ca84f8 Add unicode support for aliases, indexes, urlize template filter. Now aliases and indexes are not restricted ASCII letters and can include any unicode letters.
24ffe043 Add Ant Zucaro's showcase.
5cfb690e Fix docs error with json comma
72ba6d63 Fix permalink bug in uglyurls mode (refs #187).
3e87d7a8 Automatically increase the process ulimit to maximum available.  fixes #168.
ae9cc09b Adding the ability to check the system limit on open files (important for watching large sites)
c1b9380d Add back blackfriday extensions during Markdown conversion
6dd2e9a4 gofmt all go code
ff9f6e1b Fix panic with HTTP serve initialization problems.
0ce6f05f Add text transformation template functions.
18b9948f Using table of contents within the documentation.
1882ffab Adding support for boolean params
1da3fd03 Continue with TOC integration and page refactor. Updated a few tests to match new generated output.
f45c6bc3 Moved TOC test into page_test. Some general page_test cleanup.
9666f33e Don’t render short codes on summary twice
f82c645b fixing 178.
d0825a21 Big refactor of pages code. Changed TOC code to only parse when actually used
f62e3e99 Add new TableOfContents Page variable (Markdown only)
4f1807c7 Replacing hall of fame with showcase. (new type, content driven, thumbnails, etc)
9564e6e9 Adding support for some primitive template math functions
0e013b52 add andrewcodispoti.com to hall-of-fame
3851117c renaming MinRead to ReadingTime and adding to documentation.
50a7f97a Updating page variable documentation (for templates).
f0634ec0 fixed #171. RSSlink is now RSSLink (and matches existing docs).
ae15ff09 Fixing test which erroneously checked values and order, rather than just values.
44186c6a Extending rss item limit to 50… can reduce further in template with ‘first N’ functionality.
fa2e58fd Have travis build with latest go.
cb040533 RSS improvements, now limit to 15 items and provide accurate date. fixed #172
303be735 Adding github button to docs homepage
c51d040e Adding Werker status to readme
845d0976 Create wercker.yml
f8243624 feat(docs/hall-of-fame): add ifup
438c2198 Add `canonifyurls` config option.
2ff108fc Add highlighting of code in documentation and clean up a bunch of the docs.
13b5c10d Rewriting some homepage text
74d7ae1f A bunch of style updates. Switching to bootstrap carousel.
01da9a40 Report error, but don’t fatally stop if pygments has error. Return original string. (+1 squashed commit) Squashed commits: [849a7af] if highlighting doesn’t work, just return original string
3fd6c1a2 Adding some embedded short codes (including code highlighting)
13b067b5 Adding support for embedded templates
f78e2cb8 Removing Twitter js
a70acd11 New Icon Font for Hugo
247db151 Adding some analytics
b82baa28 Adding chimeraarts.org to hall-of-fame
5550c414 Added append-port flag
e5aa08ff If baseurl is set then print that on the command line, else leave as default of localhost
8b84156f Example of a multilingual site.
8055838c Allowing empty files (ignored) so you can touch a new file while watching
1c60d5bf Don't shutdown hugo on an empty file.
8d80f9b3 Added batching behavior for page building.
1979f7d9 Avoid locking the files for an extended amount of time. Sublime Text doesn't like this and shows an error when modifying a file in rapid succession.
e46148f9 Fix static file change detection on Windows. Fixed windows uses different filepath separator. The filepath.ToSlash shouldn't be used, because it can cause errors in filepath suffix and prefix testing since "c:\a" isn't a prefix of "c:/a/b/c".
065928fc Adding page sorting by weight function (the default)
34ac562c Added documentation on ordering indexes, content and content within indexes
70745e8c Complete refactor of indexes, move (and rewrite) page sorting to page.go, add tests
6aa3e512 Added PageSorter and PagesByDate
c7083a5d Section in example was wrong for happiness.md
950d9f55 Testcases for multilevel structure were wrong
de670ced Fixes #141: Wrong section in multi level structure
6da23f74 Gofmt
1abc2f0b properly use non-localhost BaseUrl in server command
a1051964 Adding better contribution guidelines from the read me to the contribution page.
dd574628 Adding community section to the documentation
ceb70805 Adding selected tweets to the homepage
f09505a6 Adding example short codes to the documentation
6410965b Add go fmt to contribution guidelines
357ab956 Add Contribution Guidelines
0e04b9a0 Moving processing short codes to the page
d0ef3d43 better handling of detecting markup format
f432b187 render shortcodes prior to converting to html
a45de56d adding support for shortcodes with opening and closing tags
db29f57c Adding (source code) Highlight template helper
fa29e94e Adding Pygments helper
44d57fdc Reorganize helpers
10c7cf29 Create directories in publishdir with mode 0777.
ba5dadff Typo fix in docs.
32d9345b Fix a minor typo in types.md
b351731f quickstart docs - fix flag needs arg error
860f982c fixed trailing dir slash when using slug
e425226a Documentation updates, mostly for my bits
07978e4a configurable permalinks support
4f335f0c Updated release notes.
445b7d23 Updating docs to include ‘first’ functionality for the homepage
aedfa6a2 Version bump 0.9
ad2c0b56 Homepage now has all content available, use sorting and first to control rendering
13fa7cb7 lowercase template function first to be consistent with all other template functions
50d9046b remove initialization loop error from compile
40d05f12 Truncated; .Site.Params; First function
6017599a restored behavior of respecting config values unless set by command flags. fixed #116
ef595aed Handle schema-less urls when apply absurl
90a902c8 fixing double slash during absurlify
b69694a3 Merge branch 'master' of github.com:spf13/hugo
532e2e7b Some mobile and other fixes for docs
0b6a11c9 Merge pull request #113 from oyvindsk/master
adc559b0 minor documentation fix
ad04f6c8 Adding baseline
86233c00 Remove the hugo-nav function
1cebce12 Adding RSS test case.
b2236457 Fix Test Name
1fbcaf92 Buffers instead of pipes
226bc8f5 Updated release notes
23a5711d Fix benchmark panic
23a711a2 Hugo updated to work with latest cobra
9af47f07 Improve rendering time
f4cb8e16 Adding benchmark for transformation module.
789aa6ad Removing check for directory: static, layouts
861472be Small tweaks to Homepage and CSS
1d0d280e Addition of an indexes section to the docs. Updated most of the existing index content.
a7dae30a More work on indexes
bc7c9221 Better mobile support on docs site
90355eec Big visual overhaul of the docs. Docs now using indexes for all menu generation.
df0523ff Flipping around weight order. higher weight at the bottom. use negative to pin to top.
5003f7f7 Docs menu now powered by indexes.. converting some of the content to use this.
d20b41a2 Big index overhaul. Now supporting ordering tokens by count or alphabetically. Also made full indexes available to the Site variable.
9388f236 Adding support for linkTitles
b580a25d Better error handling when rendering error found when in watch mode In watch mode it should continue to watch for changes, in any other mode it should exit with a -1 error code so can check for success when scripting
764abd20 Update homepage
dde965a5 Migrate docs to Bootstrap 3.0
cd71eb73 Watching doesn't built site 2x on write (ignores rename events). Also ignores temporary files written by editors.
a5606b06 Adding support for ordering content in indexes by other than date (weighted indexes)
471fb1ff Adding support for date field in front matter as date (as TOML provides)
f3c816ea Adding support for more front matter types (int, float & date)
3558e3d6 Add support for weighted pages Now pages can be sorted by other than date
90090175 Adding preliminary support for weighted indexes (for ordering by other than date)
678ddef4 Adding a quick start guide to hugo docs
4d333e81 New Homepage for Hugo
4263094d Adding support for MinRead. Closed #106
be5ace15 Wordcount restored. fixed #92
e58d8fe7 fixed #95, fixed #93
f5fda804 simplified buildSite & better error handling around it
0318f7c1 Clean up server & build site logic. Fixed #94
e6ace71f server command now builds prior to serving
4993152d Permalink to include multiple directories levels
6e1268f4 Test case for permalink functionality
89563843 Adding back the hugo homepage.
9500ec1b Refactor layout selection code
197aacb6 Add support for Relative Permalinks
06da6091 Refactor Permalink to private function
6fa6f69a Change transformer order
d712d6f3 Moving transformation on a per-page level
9032a228 Better handle missing layouts
54a2790f Use io.Pipe for chaning render tasks.
689cda17 Code cleanup
19cb6c78 Move writing next to rendering
2176d2c1 Reducing scope of RenderThing*
ff8b5275 Move in memory target into target module.
80009b42 Change the order of Apply to be more Unixy
94a3184a Fixing up source code formatting.
5a66fa39 Chain transformers and test cases
eb117eb9 Move AbsURL into seperate file
f0211b84 Rename Transform to AbsURL
03d1a57f Set the name of the Nav attribute to select
5e14af95 Proper handling of 404 page return value
7468292c Fixing bug where RSS for site was rendered in wrong location
d829e050 Fixing bug where only the first index list was created.
2aaf92b5 Summary can now contain short codes when using <!--more--> to define end of summary.
be7ba0e9 server defaults to localhost unless overridden by command line flags
266f583a Restoring former snippet behavior & adding test to ensure future behavior
dcfcbac5 Enabling Nitro ('--stepAnalysis') again. Fix #58
18f2b826 Switching to the rjson library which is more friendly to human generated json.
48e1068e fixed #85
8efb90eb Updating usage documentation to new interface
3ae8dda2 Restoring build and watch functionality
aa9b9d59 minor documentation cleanup. - changed it's -> its where appropriate. - added post/ parent directory above happy/ to the organization examples
8ce4bc7a Update filesystem.go
94d7fe52 Change the interface to use commands and flags instead of just flags. Better organization of main (controller style) code.
92cff055 go fmt so code
ff2b98c9 Better error message when no source content is found.
f34ea610 Add the ability to set navbar li class to active
db50154e Support index.html indexes in content directory
4250bf8e Fixes #80 - Homepage now renders correctly
c9223cfd source: Fix failing build on windows
8df88496 Fix breaking test cases on unix platform
bffe4baf Create a TargetPath() method that provides OutFile
52e8c7a0 Section is determined by the source, not the url
784077da Fix fragments being AbsUrlified in final html
311e1022 Allow non-markdown content in content directory
5374242f More expressive --check output
c510140c Add renderer information to --check
67b2abaf Add IsRenderable to Page
d8e18349 Fix parsing edge case of frontmatter
a82efe5b Merge remote-tracking branch 'origin/parser' into mrg_praser
6b0752e8 Move AbUrlify to post content transformation
c6fe87b1 Add a transform step
c75da346 Fix alias documentation.
172ff5ea Initialize HTMLRedirectAlias before ShowPlan()
d45fb72f Add /index.html to unadorned alias paths
803a0fce Remove RenderedContent from page.
2ebfb33f Move alias logic to target module
2f10da15 Move alias rendering to target
74b55fc7 Normalize paths within hugo
998b2f73 Added safeHtml template function
6274aa0a Homepage "/" respects PublishDir
610c06e6 Introduce source.Filesystem
d4d9da9f Remove page module dependence on opening files
cb00917a Expand the ShowPlan functionality
4004687f Move to target.Filesystem
7919603f Add Translate to target
c6ad532b Add file reporting to planner
13d2c552 Adding Planner
79d9f82e Code reorg, helpers.go has been decomposed.
207d8fb7 Date rendering unit tests in pages
3ecc698f Remove hugolib.HTML and hugolib.URL types
a591a106 Include building hugo docs as part of test.
d841d522 Include building hugo docs as part of test.
ba82a203 Add support for amber files
ee5865f2 Abstract html/template dependency
0a9dc705 Use s everywhere for consistency
b268e639 Return an error (other than 0) when ./hugo fails
6c8e7edb The <!--more--> (summary divider) now works even if it is on the same line as content
4349216d Small code cleanup
0fdea0c2 Return an error with WritePublic
097b782a Removing site.Directories.
b14b61af Externalize the writing of content to a target
bc3c2290 Ensure Section is set before returning Page object.
c32f401b Revert "Return errors when rendering"
a792ec09 Cleanup formatting - go fmt ./...
4ed43e80 Fixed bug where Url specified in front matter as pretty url wouldnt render
71678a71 Adding .Summary to page variables
3ab52450 clean up logic
1bb00b8c Refactored added RenderThingOrDefault and tests
554375b2 Using new parser.
1de19926 Return any error reported by RenderHomePage
9930011e Wordpress summaries
7b1f0960 Add 404.html for gh-pages
f28a8fa0 RenderThing test cases
9d15262e Test cases for ignoreDotFile
0fabd51a Update .gitignore to ignore *.swo files
7461ed63 Fix benchmark so the buffer is read each time.
599e6672 Removing GetSection
ae711297 Skip "dot" files in layout
eb4288e3 Merge pull request #53 from hugoduncan/feature/print-error-on-invalid-index
00839567 Merge pull request #52 from rozza/StaticSync
35b35a70 Merge pull request #51 from cabello/patch-3
6f424175 Merge pull request #50 from cabello/patch-2
3d0dc1ac Merge pull request #49 from cabello/patch-1
301d2baf Print error if index value in a page is wrong type
5aa47a7b Static changes shouldn't be destructive to existing files
8415c5e6 Remove extra quotes from meta data
acd5ea0e Check .Prev and .Next pointers before using it
8058abd7 Fix broken link to Index page
eff8457a Merge pull request #46 from rawfalafel/sync_static
2dcdd673 Watch StaticDir and sync to PublishDir on change New behavior adds a special case for file changes inside the static directory to fsync PublishDir
c4bcdebc Merge pull request #44 from cactus/avoid-redirect-with-slugs
e2744d40 Merge pull request #43 from hugoduncan/feature/allow-xhtml-aliases
2542836b Merge pull request #41 from rozza/skipStatic
8f330626 Merge branch 'noahcampbell-index_reporting'
c713beba Formatting cleanup
ec821739 Removing the use of slash
8eca8f8a Detect missed index from front matter
e66ba5d2 Return errors when rendering
0a79edd4 Removing extra links on homepage
3ae8078d Adding "fork me on github" banner
8c0ab4de Complete overhaul of the docs
b76b80c5 Merge pull request #40 from VonC/clarify_uglyurls_flag
b9e835b1 avoid handling a redirect from slug to slug/
23a98ad0 Enable aliases from .xhtml paths
0f143dcf Skip Static directory if its in your content directory
9308cd6a Clarify uglyurls flag.
3c3fc45d Merge branch 'master' of github.com:spf13/hugo
480e01eb Further work on path/section stuff. Tests passing now.
7a51a8a5 Merge pull request #38 from noahcampbell/workflow_dotfile
b4bcc591 Now support for nested paths. Better section detection.
6e272394 Merge branch 'master' of github.com:spf13/hugo
ca5a94a9 Merge pull request #37 from noahcampbell/master
c661d980 Merge pull request #31 from cactus/issue-31
ec02fa4b Adding support for a default content type template default template found at layouts/_default/single.html
89685249 Adding support for recent content.
97eb9225 Ignore dotfiles in content directory
5664780c gofmt pass
2d11d1bd Test GetParam and the various incarnations of frontmatter.
31a1ade1 move "dot" in regex to avoid it being part of a range
c689d46a Merge pull request #32 from cactus/issue-32
b13afc41 fix sanitizeRegex to not strip "dots"
023567b0 fix bad tab/space due to paste
2f9b582d fix wrong renderlist feed permalink
cb39f052 Merge pull request #36 from noahcampbell/master
8c031413 Use / for template names regardless of platform.
ec1a3a8d Merge pull request #35 from noahcampbell/master
3fdcd0ba Support for non-standard formats.
0305c825 Move timezone tests to integration test.
f610d45c Add additional details to date test cases.
dd19d0cc Provide better support for various date formats.
17aafb39 Avoid error if no content.
5b3b0f95 Merge pull request #26 from noahcampbell/master
02337089 Started new release notes, added nitro step for aliases
ac26de20 Adding correct canonical link to alias pages
d5518c09 Adding support for aliases (redirects)
45ce6e2b Merge branch 'redirect' of https://github.com/rozza/hugo into rozza-redirect
bb273df4 Add support for continuous testing.
733c0207 Merge branch 'master' of github.com:spf13/hugo
2bf24877 Merge pull request #25 from noahcampbell/master
2bbecc7b Better reporting when the template is missing.
309db474 Nitro timer is encapsulated.
e26b43f6 Adding more test cases
e67db666 Adding benchmark for parsing pages using unicode.
085ce15f Adding ability to read from io.Reader
274d324c Introduce unit testing for page.go
fa55cd98 Remove unreachable code path.
0595f27e Using a composite literal to create a page.
19538a1b Support pages without folders
fc5e92cc Provide better error handling
e2a28114 Add redirect to page parameters and redirects example
4f17ad69 Merge pull request #22 from nsabine/master
7a13434d Merge pull request #21 from duncanbeevers/master
a8b3e153 Added examples to indexes.md
04a0dbbf Added .Content variable to docs
6a5e4b36 Merge pull request #20 from VonC/version
49b8ac5f Make sure hugo --version prints the version and does *nothing* else.
a870f4d9 Fixing missing trailing slash in baseUrl
d89c7ec7 Merge pull request #19 from nsabine/master
780e2f31 Populated page Site metadata.  Enables accessing Indexes from Page template.
42de9bd8 Merge pull request #15 from hhatto/update-doc
0e57fcc9 Merge branch 'master' of github.com:spf13/hugo
783f0d61 fixing badlink on homepage
6789b6c5 removing erroneous debugging output
78afe8d3 update document for content directory
c5715e98 Merge pull request #12 from imrehg/docfix
f31ec3c2 Fix example in docs that wouldn't work in practice
de9f9ae1 Fixing getting started link.
57b206ca Merge pull request #11 from noahcampbell/master
f6e590e5 Fixing link to contributor page on github
6a1a038c Shrinking the readme to just the basics to avoid dupe with doc site
6efbd93a Updating a bunch of the docs
def5f101 Including documentation on indexes
dff86cb2 Renaming indexes template to indexes.html
21a7b725 Moved static content to /static
52c089ff Added support for indexes of indexes & ordered indexes
ddad1e04 adding previous next capabilities
66610a65 Removing OSX files from repo.  Updating .gitignore to not track these files.
d36d7fba Merge pull request #8 from SebastianM/doc-json-fix
47783c1f Merge pull request #10 from noahcampbell/master
3e539c71 Adding error message when no content pages exists.
03e804ff Updating the .gitignore for windows and vim users.
c9a09418 Fixed section labels causing panic on windows. The filename path was being split using a unix specific path seperator.  This fix uses the os.PathSeperator to ensure proper evaluation regardless of platform.
4efdb909 Fix JSON syntax error in example configuration
61258858 copying static content to destination
736677a2 Using MkdirAll instead of my own logic
7ab28c56 Adding support for destination dir, split out static
92c31bbe permalink now respects pretty urls
d5f55430 create content at any level of nesting
e08d14ad fixing issue with some urls missing '/'
b7bbc28c fixing bug with server not finding right path
c560a753 adding more verbose output to server functionality
b2385f06 create missing directories recurisvely
dd9a7e64 Fixing headers in readme
16b1f284 Improving installation instructions
f2e4c9d7 Merge branch 'master' of github.com:spf13/hugo
3ad3f2f0 Merge branch 'doc-fix' of https://github.com/brandonblack/hugo into brandonblack-doc-fix
580bb9bb minor: adding some more instructions for building from source
2dde27f0 Update README.md
627cf265 Adding proper command line option parsing
8fae5f0d Default is now pretty urls (without .html) Adding --uglyurls option to retain previous behavior
dcd8ff71 Adding better source build instructions
f1990049 GO -> Go
8d50dd91 fixing typo in config readme
c24112ce Render shortcodes before index and section rss feeds
649560fc proper BaseUrl handling (if has trailing slash or not)
7a521ad1 Fixing some RSS issues
b7b6f054 Accidentally left in debugging code
75a2e6d4 Now support for config files as yaml, json or toml
d9b5f9cd fixing incorrect import path
f857f4ca adding helper to create absolute url
d4caa8ee Adding total time to generated stats.
51e30985 Writing relative links to absolute so they work in feeds
e76c3feb Fix bug with JSON front matter parsing.
a6914e9c Better error handling for parsing front matter
8403dba3 Merge pull request #3 from tychoish/rst-fix
4951ff99 rst: fixing rst output processing
aee48725 Adding version number to command line options
d2a6267a Adding support for TOML, updating documentation
3c80cd32 YAML support similar to jekyll (start and end with '---')
94e57774 Merge pull request #2 from tychoish/yaml-rst-support
d0ff3126 minor: correcting example
f851c416 fix: changing terminal yaml line, generalizing forematter splitting
b024454e fixes: returning json parsing, error messages, yaml header offsets
67f4da30 revert: adding json support
6c42d3d4 fix: parsing of yaml forematter
431fa0e2 changing to suport yaml rather than json and adding optional restructuredtext support
a7f5f97b sanity: move from json to yaml
4d2fbfc7 Merge pull request #1 from tychoish/add-gitignore
8aff6cc3 gitignore: sanity
f8755771 rendering shortcodes earlier for better performance
77d142ba fixing typos
1aa125cf fixing two typos
0d63bf00 better install instructions and fixing usage typo
3ec920ac adding better install directions
d1162555 updating readme
6e16449e adding hugo
50a1d6f3 Initial commit

git-subtree-dir: docs
git-subtree-split: b0470688f1
2017-07-18 10:24:26 +02:00
Bjørn Erik Pedersen deccc54004 hubolib: Add HasShortcode
Fixes #3707
2017-07-17 23:20:13 +02:00
Bjørn Erik Pedersen 00b590d7ab Improve the twitter card template
Now fall back to `images` set in site config for twitter card.

Fixes #3711
2017-07-17 23:09:52 +02:00
Michael Henderson ea5e9e346c Add GOEXE to support building with different versions of go
Add a variable to the makefile and benchmark scripts to let users change the command used to build. Doesn't impact tools like govendor.
2017-07-16 00:35:15 +02:00
Bjørn Erik Pedersen 61bb3ccab3 hugolib: Improve panic handling in layout rendering 2017-07-14 10:26:51 +02:00
Bjørn Erik Pedersen 794ea21e94 hugolib: Make template panics into nice error messages 2017-07-14 10:08:04 +02:00
Bjørn Erik Pedersen 91f410ea90 Bump versions to 0.26-DEV 2017-07-10 09:16:02 +02:00
Bjørn Erik Pedersen 0e25f1e969 Revert "Revert "vendor: Update dependencies for 0.26-DEV""
This reverts commit a48e132345.
2017-07-10 09:04:46 +02:00
Bjørn Erik Pedersen aded65b71d releaser: Prepare repository for 0.25-DEV
[ci skip]
2017-07-10 09:02:20 +02:00
Bjørn Erik Pedersen bbd33dbf5d releaser: Add release notes to /docs for release of 0.25.1
[ci skip]
2017-07-10 08:57:34 +02:00
Bjørn Erik Pedersen 0e09be7b3c releaser: Bump versions for release of 0.25.1
[ci skip]
2017-07-10 08:57:34 +02:00
Bjørn Erik Pedersen 195f945758 releaser: Ignore openbsd/arm
It is failing with "undefined: Flock_t".
2017-07-10 08:56:57 +02:00
Bjørn Erik Pedersen 44b8f740e9 releaser: Add release notes draft for 0.25.1
[ci skip]
2017-07-10 08:12:28 +02:00
Bjørn Erik Pedersen a48e132345 Revert "vendor: Update dependencies for 0.26-DEV"
This reverts commit 4ec8ee7fb1.
2017-07-10 07:46:08 +02:00
Bjørn Erik Pedersen 7f82b41a24 parser: Final (!) fix for issue with escaped JSON front matter
Fixes #3682
2017-07-08 18:43:36 +02:00
Bjørn Erik Pedersen 84db6c74a0 parser: Fix issue with escaped JSON front matter
Fixes #3682
2017-07-08 10:56:56 +02:00
Bjørn Erik Pedersen e0cf2e05bb tpl/collections: Add some empty slice tests to intersect
See #3686
2017-07-08 10:34:42 +02:00
Bjørn Erik Pedersen dbbc5c4810 tpl/collections: Fix union when the first slice is empty
Fixes #3686
2017-07-08 10:31:09 +02:00
Vasiliy Solovey 7bcc1ce659 commands: Navigate to changed on CREATE
When working with content from IntelliJ IDE,
like WebStorm, every file save is followed by
two events: "RENAME" and then "CREATE".
2017-07-08 09:37:24 +02:00
Bjørn Erik Pedersen fd41e70cff Add first draft of CODEOWNERS
See https://github.com/blog/2392-introducing-code-owners
2017-07-07 21:32:14 +02:00
Anthony Fok 4ec8ee7fb1 vendor: Update dependencies for 0.26-DEV 2017-07-07 01:52:38 -06:00
Bjørn Erik Pedersen 1e19a98451 releaser: Prepare repository for 0.26-DEV
[ci skip]
2017-07-07 09:34:13 +02:00
Bjørn Erik Pedersen 6fb556367b releaser: Add release notes to /docs for release of 0.25
[ci skip]
2017-07-07 09:29:08 +02:00
Bjørn Erik Pedersen 51bcd5083c releaser: Fix tag push 2017-07-07 09:28:35 +02:00
Bjørn Erik Pedersen 6e086e3d03 releaser: Bump versions for release of 0.25
[ci skip]
2017-07-07 09:23:54 +02:00
Bjørn Erik Pedersen 5895e32b0a releaser: Add release notes draft for 0.25 2017-07-07 09:14:17 +02:00
Bjørn Erik Pedersen b2dcd867fd Revert "vendor: Update dependencies"
We are going to release Hugo 0.25 today, and pulling in lots of unknown and untested changes is a bad idea.

This reverts commit d2c24baafe.
2017-07-07 09:08:44 +02:00
Anthony Fok d2c24baafe vendor: Update dependencies 2017-07-06 14:11:02 -06:00
Bjørn Erik Pedersen 4989950d49 releaser: Use real theme count in template 2017-07-06 17:31:04 +02:00
Bjørn Erik Pedersen a358b33f26 docs: Regenerate the docs helpers 2017-07-06 10:36:13 +02:00
Bjørn Erik Pedersen a392fca962 docs: Regenerate commands doc 2017-07-06 10:34:53 +02:00
Bjørn Erik Pedersen 75f782f035 Revert "commands: Adjust docs path"
This reverts commit 729be8074b.
2017-07-06 10:34:04 +02:00
Bjørn Erik Pedersen 37c69054e2 Squashed 'docs/' changes from 5d9a6703..f3c88b08
f3c88b08 Add warning on GitInfo and Shallow Clones
fa5be591 Make the two common Taxonomy templates explicit
4a81c507 Update pull request link in showcase.html
f751e57a Update christianmendoza.me in the showcase
d582419b Remove commit message prefix from showcase addition guide
d12791cf Fix path for screenshot in showcase addition guide
e487b916 Add invincible.site to the showcase
c85cfccf Update guide for showcase additions
c44b31c1 Fix spelling
dc10d7f6 Add slightly better GitHub install description
2611980f Revert "Add workaround to Fetch from GitHub documentation"
b2e56907 Fix Git commit link in footer
b025a638 Regenerate commands docs for v0.24.1
0741ad08 Update README.md
942d130a Add branch info to README
e8c36390 Set hugoDocs/master to 0.24.1
c4e21471 Add workaround to Fetch from GitHub documentation
db0a3c08 Fix typo in release note

git-subtree-dir: docs
git-subtree-split: f3c88b0810
2017-07-06 10:25:46 +02:00
Bjørn Erik Pedersen e00f5c9c07 docs: Merge docs commit '37c69054e294bf554be03cf7e4c01e1f586e6943' 2017-07-06 10:25:46 +02:00
Bjørn Erik Pedersen 477684022f releaser: Adjustments 2017-07-06 01:32:55 +02:00
Bjørn Erik Pedersen 70d8ddcb60 releaser: Revise the docs handling to match new subtree
Fixes #3649
2017-07-05 14:27:43 +02:00
Bjørn Erik Pedersen 5f831a6223 releaser: Replace the magic version handling
Take the new version as a string value.
2017-07-05 14:27:43 +02:00
Bjørn Erik Pedersen e7a54e7afc releaser: Add --try flag to ease testing 2017-07-05 14:27:43 +02:00
Bjørn Erik Pedersen aa6b1b9be7 output: Support templates per site/language
This applies to both regular templates and shortcodes. So, if the site language is French and the output format is AMP, this is the (start) of the lookup order for the home page:

1. index.fr.amp.html
2. index.amp.html
3. index.fr.html
4. index.html
5. ...

Fixes #3360
2017-07-04 09:12:44 +02:00
Bjørn Erik Pedersen a1d260b41a hugolib: Extend the sections API
This commit adds some section related methods that have been asked for:

* .CurrentSection
* .IsDescendant
* .IsAncestor

Fixes #3591
2017-07-04 09:11:49 +02:00
Bjørn Erik Pedersen dd9b1baab0 hugolib: Make .Site.Sections return the top level sections
See #3591
2017-07-04 09:11:49 +02:00
Victor Kropp 1039356edf commands: Support human-readable YAML boolean values in undraft 2017-07-03 23:26:01 +02:00
Bjørn Erik Pedersen ccdd08d57a tpl/collections: Add Pages support to Intersect and Union
This enables `AND` (`intersect`)  and `OR` (`union`)  filters when combined with `where`.

Example:

```go
{{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }}
{{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }}
{{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }}
```

The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page params.

Fixes #3174
2017-07-03 21:48:03 +02:00
Bjørn Erik Pedersen d12cf5a25d tpl/collections: Fix In function for JSON arrays
Fixes #1468
2017-07-03 10:23:03 +02:00
Bjørn Erik Pedersen e10e51a008 parser: Fix handling of JSON front matter with escaped quotes
Fixes #3661
2017-07-03 09:01:54 +02:00
Artem Sidorenko 34c566773a tpl/math: Add log function
It might be very useful for building tag clouds.
2017-07-03 00:20:48 +02:00
Mitchell Cohen 41805dca9e hugolib: Render 404.html for all languages
Fixes #3598
2017-07-01 22:58:52 +02:00
coderzh 7ee1f25e9e hugo import jekyll support nested _posts directories
Fixes #1890
Closes #1911
2017-07-01 10:15:22 +02:00
Bjørn Erik Pedersen 3aa0e16d0c cache: Add even more concurrency to test 2017-06-28 22:47:28 +02:00
Bjørn Erik Pedersen b3c8056de2 cache: Add concurrent cache test 2017-06-28 22:44:37 +02:00
Bjørn Erik Pedersen fe132e1c3e vendor: Add missing WebP dependencies
See #3529
2017-06-28 22:16:45 +02:00
Bjørn Erik Pedersen 8431c8d39d tpl: Add WebP images support
Fixes #3529
2017-06-28 21:45:48 +02:00
Bruno Amaral da72805a43 tpl: Only show post's own keywords in schema.org
Fixes #2635
Closes #2646
2017-06-28 21:26:18 +02:00
Bjørn Erik Pedersen 72fd871710 hugolib: Add more summary test
Closes #2973
2017-06-28 20:30:26 +02:00
Maik Ellerbrock 118f8f7cf2 Dockerfile: Update Dockerfile and add Docker optimizations 2017-06-28 03:35:26 -06:00
Damir Vandic 56d82aa025 hugofs: Fix typo in code comment 2017-06-27 13:21:55 -06:00
Yihui Xie eccb064782 tpl: Simplify the Disqus template a little bit (#3655)
In accordance to the official guide: https://disqus.com/admin/universal/
2017-06-27 09:45:48 -06:00
Yihui Xie 2e1e4934b6 tpl: Improve the built-in Disqus template (#3639)
* Improve the built-in Disqus template

  Set `disqus_identifier`, `disqus_title`, and `disqus_url`
  only if the user has explicitly provided them.

  Do not load Disqus when the website is previewed locally,
  otherwise it is very confusing.

* Use disqus_config instead of three global variables

  https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables
2017-06-27 05:40:01 -06:00
Haishan Zhou a54404968a helpers: Add Blackfriday 'joinLines' extension support (#3574)
See https://github.com/russross/blackfriday/pull/334
"add an extension to handle Chinese (or CJK) newlines"
for more information.
2017-06-27 04:56:50 -06:00
Frank Braun bfce30d859 helpers: add --initial-header-level=2 to rst2html (#3528)
reStructuredText doesn't have explicit section levels but sets them in
the order of appearance. Since level 1 is already set from the title in
the front matter it makes more sense to start with level 2 when
converting with rst2html.
2017-06-27 04:26:33 -06:00
Anthony Fok 30e14cc316 Make --navigateToChanged more robust on Windows
This ensures the new "open 'current content page' in browser" works
on Windows, especially with Emacs and Vim.

Special thanks to @bep for coming up with the idea of the fix.

See #3645
2017-06-27 11:45:54 +02:00
Bjørn Erik Pedersen c825a73121 Support open "current content page" in browser
This commit adds a new `--navigateToChanged` and config setting with the same name, that, when running the Hugo server with live reload enabled, will navigate to the current content file's URL on save. 

This is really useful for site-wide content changes (copyedits etc.).
Fixes #3643
2017-06-26 21:34:16 +02:00
Bjørn Erik Pedersen 7198ea8a1e Revert "Remove docs building from CI builds"
Now /docs is a Git subtree, so now this should just work.

This reverts commit 214dbdfb6f.
2017-06-26 21:05:21 +02:00
Bjørn Erik Pedersen dd78d5b23f Squashed 'docs/' content from commit 5d9a6703
git-subtree-dir: docs
git-subtree-split: 5d9a670359
2017-06-26 20:46:06 +02:00
Bjørn Erik Pedersen a7765bb3c1 Merge commit 'dd78d5b23fe597f4461aa4199401b4e07c0612e2' as 'docs' 2017-06-26 20:46:06 +02:00
Bjørn Erik Pedersen 31393f6024 Remove the docs submodule
Will be replaced by a Git subtree.

See #3647
2017-06-26 20:45:04 +02:00
Anthony Fok aff1ac3235 commands: Use example.com as homepage for new theme
The fictional siteforthistheme.com domain has been
squatted by Afternic of GoDaddy since November 2016...
2017-06-26 12:38:45 -06:00
Anthony Fok b463c5ad86 releaser: Remove trailing space in fixes list 2017-06-25 08:29:58 -06:00
Bjørn Erik Pedersen 1a041522df releaser: One more fix 2017-06-24 09:49:57 +02:00
Bjørn Erik Pedersen 3aade08977 releaser: Improve docs submodule handling
Still not optimal.
2017-06-24 09:18:57 +02:00
Bjørn Erik Pedersen 0e1bda34c3 vendor: Fix +-timezones in TOML
Fixes #29
2017-06-23 18:57:06 +02:00
Bjørn Erik Pedersen 2e4ccd3d34 create: Preserve shortcodes in archetype templates
Fixes #3623
2017-06-23 09:59:06 +02:00
Bjørn Erik Pedersen fd924d1802 commands: Create default archetype on new site
See #3626
2017-06-22 22:00:42 +02:00
Bjørn Erik Pedersen e908d955d2 create: Fix archetype regression when no archetype file
Fixes #3626
2017-06-22 22:00:42 +02:00
Bjørn Erik Pedersen 8b620f7a8a docs: Update 2017-06-21 21:41:40 +02:00
Bjørn Erik Pedersen 12611e0c64 Update docs 2017-06-21 21:39:33 +02:00
Anthony Fok 58ce9213c0 releaser: Fix typo, change "relase" to "release" 2017-06-21 21:37:53 +02:00
Bjørn Erik Pedersen ae3039b6e8 Update docs 2017-06-21 14:07:35 +02:00
Bjørn Erik Pedersen 3554fd1218 releaser: Prepare repository for 0.25-DEV
[ci skip]
2017-06-21 13:58:01 +02:00
Bjørn Erik Pedersen 1ac4dbb900 releaser: Update /docs to 0.24 [ci skip] 2017-06-21 13:53:23 +02:00
Bjørn Erik Pedersen 8f69fe57a4 releaser: Bump versions for release of 0.24
[ci skip]
2017-06-21 13:52:27 +02:00
Bjørn Erik Pedersen f8c5716adf releaser: Update /docs [ci skip] 2017-06-21 13:52:27 +02:00
Bjørn Erik Pedersen 2ba9a8769f releaser: Add release notes draft for 0.24 2017-06-21 13:51:05 +02:00
Bjørn Erik Pedersen c43b512b47 output: Identify extension-less text types as text
See #3614
2017-06-20 17:21:31 +02:00
Bjørn Erik Pedersen 19f2e72913 Support non-md files as archetype files
It now properly uses the extension of the target file to determine archetype file.

Fixes #3597
Fixes #3618
2017-06-20 13:41:48 +02:00
Bjørn Erik Pedersen 0f40e1fadf media, hugolib: Support extension-less media types
This change is motivated by Netlify's `_redirects` files, which is currently not possible to generate with Hugo.

This commit adds a `Delimiter` field to media type, which defaults to ".", but can be blanked out.

Fixes #3614
2017-06-20 11:04:14 +02:00
Bjørn Erik Pedersen 516e6c6dc5 hugolib: Add disableAliases
Note that even with this setting enabled, the aliases themselves are preserved on the pages.

The big motivation for this change is to be able to use the alias definitions to generate `.htaccess` or Netlify's `_redirect` files with server-side redirects.

Fixes #3613
2017-06-20 11:03:34 +02:00
Bjørn Erik Pedersen 3183b9a29d parser: Fix handling of quoted brackets in JSON front matter
Also remove a broken JSON test.

Fixes #3511
2017-06-19 16:45:52 +02:00
Bjørn Erik Pedersen 1a282ee432 vendor: Update Viper 2017-06-19 14:48:16 +02:00
Bjørn Erik Pedersen fb53987a4f hugolib: Fix error handling for JSON front matter
Fixes #3610
2017-06-19 14:41:03 +02:00
Bjørn Erik Pedersen 662e12f348 commands, create: Add .Site to the archetype templates
This commit completes the "The Revival of the Archetypes!"

If `.Site` is used in the arcetype template, the site is built and added to the template context.

Note that this may be potentially time consuming for big sites.

A more complete example would then be for the section `newsletter` and the archetype file `archetypes/newsletter.md`:

```
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
tags:
- x
categories:
- x
draft: true
---

<!--more-->

{{ range first 10 ( where .Site.RegularPages "Type" "cool" ) }}
* {{ .Title }}
{{ end }}
```

And then create a new post with:

```bash
hugo new newsletter/the-latest-cool.stuff.md
```

**Hot Tip:** If you set the `newContentEditor` configuration variable to an editor on your `PATH`, the newly created article will be opened.

The above _newsletter type archetype_ illustrates the possibilities: The full Hugo `.Site` and all of Hugo's template funcs can be used in the archetype file.

Fixes #1629
2017-06-19 10:47:00 +02:00
Bjørn Erik Pedersen 422057f607 create: Use archetype template as-is as a Go template
This commit removes the fragile front matter decoding, and takes the provided archetype file as-is and processes it as a template.

This also means that we no longer will attempt to fill in default values for `title` and `date`.

The upside is that it is now easy to create these values in a dynamic way:

```toml
+++
title = {{ .BaseFileName | title }}
date = {{ .Date }}
draft = true
+++
```

You can currently use all of Hugo's template funcs, but the data context is currently very shallow:

* `.Type` gives the archetype kind provided
* `.Name` gives the target file name without extension.
* `.Path` gives the target file name
* `.Date` gives the current time as RFC3339 formatted string

The above  will probably be extended in #1629.

Fixes #452
Updates #1629
2017-06-18 19:06:28 +02:00
Bjørn Erik Pedersen 4aa1239070 Update links to new discuss URL 2017-06-17 10:06:49 +02:00
Bjørn Erik Pedersen 411ac93086 vendor: Update deps 2017-06-16 14:24:40 +02:00
Bjørn Erik Pedersen 4345026bd6 releaser: Add TODO 2017-06-16 10:11:02 +02:00
Bjørn Erik Pedersen deffb4c3d9 releaser: Prepare repository for 0.24-DEV
[ci skip]
2017-06-16 09:52:02 +02:00
Bjørn Erik Pedersen 12b844daf0 releaser: Update /docs to 0.23 [ci skip] 2017-06-16 09:47:25 +02:00
Bjørn Erik Pedersen b502b9d8cc releaser: Bump versions for release of 0.23
[ci skip]
2017-06-16 09:41:39 +02:00
Bjørn Erik Pedersen 781a1539cc releaser: Update /docs [ci skip] 2017-06-16 09:41:39 +02:00
Bjørn Erik Pedersen af85eb62b4 releaser: Adjust 2017-06-16 09:40:47 +02:00
Bjørn Erik Pedersen 882b2b61fc releaser: Add release notes draft for 0.23
[ci skip]
2017-06-16 09:08:13 +02:00
Bjørn Erik Pedersen 00e2fe077a releaser: Adapt release logic to docs submodule 2017-06-16 08:51:43 +02:00
Bjørn Erik Pedersen ccb8300d38 Update logo link in README 2017-06-14 11:24:09 +02:00
Bjørn Erik Pedersen 214dbdfb6f Remove docs building from CI builds
We could probably get it working, but we have plenty of site tests now.
2017-06-14 11:16:06 +02:00
Bjørn Erik Pedersen 729be8074b commands: Adjust docs path 2017-06-14 10:37:58 +02:00
Bjørn Erik Pedersen 6cee0dfe53 Add docs as submodule 2017-06-14 10:35:24 +02:00
Bjørn Erik Pedersen 8be3934b59 docs: Remove
Docs site is moved to https://github.com/gohugoio/hugoDocs

Will be re-added here as a Git submodule.
2017-06-14 10:32:16 +02:00
Bjørn Erik Pedersen fbb25014e1 Update Gitter link in README
That is still running under spf13.
2017-06-13 23:39:55 +02:00
Bjørn Erik Pedersen bf5e59958d vendor: Update to new org name 2017-06-13 22:11:05 +02:00
Bjørn Erik Pedersen 86543d6a50 Change Windows build badge link, take #3 2017-06-13 22:05:39 +02:00
Bjørn Erik Pedersen 3b47805fdd Change Windows build badge link, take #2 2017-06-13 22:04:36 +02:00
Bjørn Erik Pedersen e6ae32a0ba Update Windows build link 2017-06-13 22:03:05 +02:00
Bjørn Erik Pedersen 5103935ae8 hugolib: Disable shaky leaktest on CI 2017-06-13 21:22:47 +02:00
digitalcraftsman 95386544e8 Update links in CONTRIBUTING.md due to the org transition 2017-06-13 19:37:30 +02:00
digitalcraftsman 7b99fb9f1c Update source path in Dockerfile due to the org transition 2017-06-13 19:34:20 +02:00
digitalcraftsman d531d17b3b Update clone folder in appveyor.yml due to the org transition 2017-06-13 19:32:14 +02:00
digitalcraftsman 9266bf9d4c Update import path in snapcraft.yaml due to the org transition 2017-06-13 19:28:34 +02:00
Bjørn Erik Pedersen 873a6f1885 Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
Bjørn Erik Pedersen f503d76a3b Update Makefile vs gohugoio/hugo 2017-06-13 19:06:34 +02:00
Bjørn Erik Pedersen 93643860c9 Update README to point to gohugoio/hugo 2017-06-13 19:00:10 +02:00
Bjørn Erik Pedersen db46bcf82d examples: Update examples to point to gohugoio/hugo 2017-06-13 18:59:38 +02:00
Bjørn Erik Pedersen 66d4850b89 docs: Update layout references to gohugoio/hugo 2017-06-13 18:56:22 +02:00
Bjørn Erik Pedersen 715ff1f874 docs: Update content references to gohugoio/hugo 2017-06-13 18:54:42 +02:00
Bjørn Erik Pedersen c17ad675e8 all: Update textual references in Go source to point to gohugoio/hugo 2017-06-13 18:47:17 +02:00
Bjørn Erik Pedersen d8717cd4c7 all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
Bjørn Erik Pedersen 2d08a296a2 vendor: Improve GitInfo
Closes #3533
Closes #3552
2017-06-13 17:47:54 +02:00
Bjørn Erik Pedersen a9e551a100 Fix handling of duplicate footnotes
Closes #1912
2017-06-13 15:03:08 +02:00
Bjørn Erik Pedersen 2aafb24766 Revert "releaser: Bump versions for release of 0.22.1"
This reverts commit dce70fb7c5.
2017-06-13 14:26:56 +02:00
Bjørn Erik Pedersen 4bd5ce7ef3 releaser: Prepare repository for 0.23-DEV 2017-06-13 14:25:19 +02:00
Bjørn Erik Pedersen 0f78dd06a4 releaser: Prepare repository for 0.22.1-DEV
[ci skip]
2017-06-13 14:22:14 +02:00
Bjørn Erik Pedersen 714594a8b7 releaser: Add relase notes to /docs for release of 0.22.1
[ci skip]
2017-06-13 14:17:45 +02:00
Bjørn Erik Pedersen dce70fb7c5 releaser: Bump versions for release of 0.22.1
[ci skip]
2017-06-13 14:17:15 +02:00
Bjørn Erik Pedersen c84079baa9 releaser: Add release notes draft for 0.22.1
[ci skip]
2017-06-13 14:16:56 +02:00
Bjørn Erik Pedersen a30023f5cb hugolib: Fix section logic for root folders with subfolders
This commit fixes an issue introduced in the recently released Hugo 0.22.

This logic did not handle the case with root sections with non-section subfolders very well.

Fixes #3586
2017-06-13 12:41:50 +02:00
Bjørn Erik Pedersen 1f26420d39 hugolib: Support sub-sections in permalink settings
This enables both the variants below:

Current (first level only):

```
"blog": ":section/:title",
```

Nested (all levels):

```
"blog": ":sections/:title",
```

Should ideally been part of Hugo 0.22, but better late than never ...

Fixes #3580
2017-06-13 11:42:32 +02:00
Bjørn Erik Pedersen ff54b6bddc commands: Adjust rlimit to 64000
See #3582
2017-06-12 20:43:19 +02:00
Bjørn Erik Pedersen 629e1439e8 commands: Make error on setting rlimit a warning only
And reduce it to 10000.

Closes #3582
2017-06-12 20:35:19 +02:00
Bjørn Erik Pedersen 26aa06a3db Revert "commands: Remove the rlimit tweaking on macOS"
This reverts commit bcd32f1086.

See #3582
2017-06-12 20:35:19 +02:00
daftaupe 52a0cea65d docs: Add note on updates for rpm-based distros 2017-06-12 19:44:16 +02:00
Bjørn Erik Pedersen 8ca586a6e5 releaser: Prepare repository for 0.23-DEV
[ci skip]
2017-06-12 09:07:46 +02:00
Bjørn Erik Pedersen e797a94d97 releaser: Add relase notes to /docs for release of 0.22
[ci skip]
2017-06-12 09:02:57 +02:00
Bjørn Erik Pedersen 21cf464c1f releaser: Bump versions for release of 0.22
[ci skip]
2017-06-12 09:01:59 +02:00
Bjørn Erik Pedersen fb5cac704e releaser: Spelling 2017-06-12 08:39:54 +02:00
Bjørn Erik Pedersen 63311a14d2 releaser: Add release notes draft for release of 0.22 2017-06-12 08:39:30 +02:00
David Turnbull 0f8f51414d docs: Rewrite “Archetypes” article 2017-06-12 08:03:08 +02:00
Matthieu Bresson 39408925fd docs: change .Site to $.Site where the global context is masked by the term's context 2017-06-11 18:52:26 +02:00
Torbjörn Lönnemark 00d632153a docs: Use single link element for RSS in example
The rel attribute supports specifying a set of values, not only a single
one.

Using two link elements can also cause browsers to show the feed twice
in menus.
2017-06-09 13:12:09 +02:00
Bjørn Erik Pedersen f1da5a15a3 hugolib: Make the RSS feed use the date for the node it represents
Closes #2708
2017-06-09 01:10:16 +02:00
Alexandros d5ab7f087d Add noindex tag to HTML generated by Hugo Aliases
So that Googlebot can stop keeping the old URLs in the SERPs.
2017-06-08 23:12:39 +02:00
Bjørn Erik Pedersen 55dd533bf7 hugolib: Unexport some internal methods 2017-06-08 22:33:18 +02:00
Cameron Moore b82cd82f11 tpl/collections: Add uint support to In 2017-06-08 21:01:15 +02:00
Cameron Moore 204c3a9e32 tpl/collections: Support interfaces in union
Fixes #3411
2017-06-08 21:01:15 +02:00
Bjørn Erik Pedersen fe901b8119 hugolib, commands: Improve live-reload on directory structure changes
This issue is more visible now that we support nested sections.

This commit makes operations like pasting new content folders or deleting content folders during server watch just work.

Fixes #3570
2017-06-08 20:14:28 +02:00
Bjørn Erik Pedersen b39689393c hugolib: Enable nested sections
Fixes #465
2017-06-08 11:21:34 +02:00
Bjørn Erik Pedersen bef5048580 Revert "hugolib: Fix live-reload regression for add/removal of dirs"
Never mind. The "adding dir" scenario didn't work anyway, so that will need another fix.

This reverts commit 49a104309d.

Closes ##3325
2017-06-07 22:31:57 +02:00
Bjørn Erik Pedersen 49a104309d hugolib: Fix live-reload regression for add/removal of dirs
This reverts commit b5b6e81c02.

That change breaks watching of new directories (new dirs, deleted dirs).

Reopens #3325
Fixes #3569
2017-06-07 22:11:15 +02:00
Bjørn Erik Pedersen 5be0448635 hugolib: Fix disablePathToLower regression
Fixes #3374
2017-06-06 09:15:42 +02:00
Bjørn Erik Pedersen 1f55cb767d hugolib: Simplify some test loops 2017-06-06 08:43:33 +02:00
Bjørn Erik Pedersen 8aaec644a9 hugolib: Add test for no 404 in sitemap
Closes #3563
2017-06-06 08:09:25 +02:00
Peter Cossey 55c53ae9be docs: Add thislittleduck.com to the showcase 2017-06-05 13:53:08 +02:00
Nathan Sharfi e28d9aa42c tpl: Add uniq function 2017-06-03 19:13:58 +02:00
Bjørn Erik Pedersen 46b4607828 hugolib: Remove some superflous TODO comments 2017-06-03 17:32:47 +02:00
Bjørn Erik Pedersen 2c2ce33a39 parser: Add horizontal YAML tags to benchmark 2017-06-03 12:35:28 +02:00
jeremielondon adc0572d29 docs: Add Nutspubcrawl.com to the showcase 2017-06-03 12:16:11 +02:00
Bjørn Erik Pedersen 0907a5c1c2 all: Temporarily revert to BurntSushi for TOML front matter handling
We still have go-toml as a transitive dependency, and it is the way to go eventually, but we care about speed, so let us wait that one out.

Note that the issue this fixes is about taxonomies, but I guess this is a general issue for sites with many pages that uses TOML as front matter.

```
benchmark                              old ns/op     new ns/op     delta
BenchmarkFrontmatterTags/TOML:1-4      23206         8543          -63.19%
BenchmarkFrontmatterTags/TOML:11-4     80117         18495         -76.92%
BenchmarkFrontmatterTags/TOML:21-4     140676        28727         -79.58%

benchmark                              old allocs     new allocs     delta
BenchmarkFrontmatterTags/TOML:1-4      173            60             -65.32%
BenchmarkFrontmatterTags/TOML:11-4     625            138            -77.92%
BenchmarkFrontmatterTags/TOML:21-4     1106           210            -81.01%

benchmark                              old bytes     new bytes     delta
BenchmarkFrontmatterTags/TOML:1-4      9231          2912          -68.45%
BenchmarkFrontmatterTags/TOML:11-4     19808         5184          -73.83%
BenchmarkFrontmatterTags/TOML:21-4     31200         7536          -75.85%
```

See #3541
Updates #3464
2017-06-03 09:22:57 +02:00
Bjørn Erik Pedersen 3d9c4f513b parser: Add BenchmarkFrontmatterTags
The list handling is surprisingly expensive:

```
▶ go test -run="NONE" -bench="BenchmarkFrontmatterTags" -test.benchmem=true ./parser | prettybench
PASS
benchmark                               iter         time/iter   bytes alloc           allocs
---------                               ----         ---------   -----------           ------
BenchmarkFrontmatterTags/JSON:1-4    1000000     2039.00 ns/op      912 B/op     20 allocs/op
BenchmarkFrontmatterTags/JSON:11-4    300000     5202.00 ns/op     1640 B/op     44 allocs/op
BenchmarkFrontmatterTags/JSON:21-4    200000     7993.00 ns/op     2392 B/op     65 allocs/op
BenchmarkFrontmatterTags/YAML:1-4     200000     9359.00 ns/op     5928 B/op     66 allocs/op
BenchmarkFrontmatterTags/YAML:11-4    100000    21218.00 ns/op     8408 B/op    140 allocs/op
BenchmarkFrontmatterTags/YAML:21-4     50000    32852.00 ns/op    10920 B/op    211 allocs/op
BenchmarkFrontmatterTags/TOML:1-4     100000    21505.00 ns/op     9231 B/op    173 allocs/op
BenchmarkFrontmatterTags/TOML:11-4     20000    82919.00 ns/op    19808 B/op    625 allocs/op
BenchmarkFrontmatterTags/TOML:21-4     10000   141847.00 ns/op    31200 B/op   1106 allocs/op
ok      github.com/spf13/hugo/parser    17.890s
```

See #3464
2017-06-03 08:53:56 +02:00
Bjørn Erik Pedersen 250ebc1db5 hugolib: Add some more tags to benchmark 2017-06-02 18:40:10 +02:00
Bjørn Erik Pedersen b37d959408 hugolib: Bump leaktest timeout to 30 seconds
To try to make it less flaky.
2017-06-02 16:50:44 +02:00
Bjørn Erik Pedersen 4e00bb7fdd Write CPU and mem profiles from site benchmark script 2017-06-02 09:38:09 +02:00
Bjørn Erik Pedersen fdcfccedcb hugolib: Fix tag calculation in benchmark test 2017-06-02 09:13:45 +02:00
Bjørn Erik Pedersen 213ea74929 hugolib: Add number of tags as a benchmark know 2017-06-01 18:51:51 +02:00
Bjørn Erik Pedersen 08a10e5d14 hubolib: Make the site benchmark output more compact
So you can do and get:

```
▶ ./benchSite.sh "YAML,num_pages=10"
Running with BenchmarkSiteBuilding/YAML,num_pages=10
BenchmarkSiteBuilding/YAML,num_pages=10-4                 1000       1611261 ns/op      730749 B/op        6458 allocs/op
PASS
ok      github.com/spf13/hugo/hugolib    8.168s
```
2017-06-01 12:00:47 +02:00
Bjørn Erik Pedersen 9fa71c945e hubolib: Add 10k pages as a benchmark variant 2017-05-31 14:48:49 +03:00
Bjørn Erik Pedersen d25d89e653 hugolib: Increase leaktest timeout
To try to less flaky test.
2017-05-31 13:23:22 +03:00
Bjørn Erik Pedersen 8969701967 hugolib: Break early from sitemap disabled check
See #3544
2017-05-31 12:55:51 +03:00
Bjørn Erik Pedersen 69d92dc49c hugolib: Respect disableKinds=["sitemap"]
Fixes #3544
2017-05-31 10:57:19 +03:00
Bjørn Erik Pedersen d74452cfe8 Add benchSite.sh
And change site benchmark separator to comma to make it Bash and regexp friendly, example:

./benchSite.sh "frontmatter=YAML,num_root_sections=1,num_pages=.*,tags_per_page=20,shortcodes=false,render=false"
2017-05-31 10:35:02 +03:00
Bjørn Erik Pedersen 978951cf52 vendor: Update go-toml
Slightly better:

```
benchmark                                                                                                                      old ns/op     new ns/op     delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4     204522447     200702508     -1.87%

benchmark                                                                                                                      old allocs     new allocs     delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4     1943677        1784437        -8.19%

benchmark                                                                                                                      old bytes     new bytes     delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4     102665182     100925773     -1.69%
```
2017-05-30 21:39:57 +03:00
Bjørn Erik Pedersen 4aff2b6e74 source: Cache language config
```
benchmark                                                                                                                     old ns/op     new ns/op     delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4     552742744     501838152     -9.21%

benchmark                                                                                                                     old allocs     new allocs     delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4     3047393        2957378        -2.95%

benchmark                                                                                                                     old bytes     new bytes     delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4     356533864     354291924     -0.63%
```
2017-05-30 19:29:55 +03:00
Bjørn Erik Pedersen 2342df4d2d hugolib: Add TOML/YAML switch to benchmark 2017-05-30 18:10:48 +03:00
Bjørn Erik Pedersen 828427ef52 hugolib: Adjust timeout for leaktest 2017-05-30 16:38:10 +03:00
Bjørn Erik Pedersen ce624cc7d3 hugolib: Add slightly more realistic tag distribution to benchmark 2017-05-30 15:33:37 +03:00
Bjørn Erik Pedersen 8930e259d7 hugolib: Add site building benchmarks
To run a subset of these benchmark, one can do something like this:

```
go test -run="NONE" -bench="BenchmarkSiteBuilding/tags_per_page=0.*shortcodes=true.*render=false"  -test.benchmem=true ./hugolib
```

Which will run without any tags, with shortcodes, but will skip rendering.

Fixes #3535
2017-05-30 14:30:30 +03:00
Albert Nigmatzianov 710300cb76 docs: Update overview/usage 2017-05-28 12:10:16 +02:00
Bjørn Erik Pedersen 93cab620d7 Update snapcraft.yaml
Bump to latest Go version.
2017-05-28 00:38:14 +03:00
Bjørn Erik Pedersen 19de4476d8 hubolib: Remove the regular page restriction from .Site.GetPage
See #2844
2017-05-26 21:31:45 +03:00
Bryan Klein 37e378773f docs: Fix parameter name in YouTube shortcode section
Since 'autostart' is not the correct name of the parameter, I changed the words to make this section more clear.
2017-05-26 15:05:19 +03:00
Bjørn Erik Pedersen b5b41c4468 hugolib: Refine allKindsInPages 2017-05-26 10:51:17 +03:00
Bjørn Erik Pedersen bde807bd1e travis: Update Go versions 2017-05-26 10:49:40 +03:00
Bjørn Erik Pedersen 612f6e3afe hugolib: Fix ref/relref issue with duplicate base filenames
This commit also makes that function 80x faster.

Fixes #2507
2017-05-26 10:42:45 +03:00
Bjørn Erik Pedersen 50d11138f3 hugolib: Add a cache to GetPage
Looks to be slightly slower with the low number of section pages, but the 1000 regular pages seem to add value.

```
benchmark                     old ns/op     new ns/op     delta
BenchmarkGetPage-4            97.7          145           +48.41%
BenchmarkGetPageRegular-4     7933          161           -97.97%

benchmark                     old allocs     new allocs     delta
BenchmarkGetPage-4            0              0              +0.00%
BenchmarkGetPageRegular-4     0              0              +0.00%

benchmark                     old bytes     new bytes     delta
BenchmarkGetPage-4            0             0             +0.00%
BenchmarkGetPageRegular-4     0             0             +0.00%
```
2017-05-26 10:42:45 +03:00
Bjørn Erik Pedersen e0c2e79820 hugolib: Support regular pages in .Site.GetPage
Fixes #2844
2017-05-26 10:42:45 +03:00
Bjørn Erik Pedersen 87203139c3 cache: Add a simple partitioned lazy cache 2017-05-26 10:42:45 +03:00
Mahmud Ridwan a91c2705c7 docs: Add furqansoftware.com to the showcase 2017-05-25 14:32:47 +02:00
Albert Nigmatzianov 99412bfe45 docs: Delete brew update from docs
Fix #3518
2017-05-25 13:31:38 +02:00
Albert Nigmatzianov 421a46947a cmd: Replace flagChanged with pflag.FlagSet.Changed 2017-05-24 10:51:51 +02:00
Chankey Pathak 0a40cb43ea docs: Add tutswiki.com to the showcase 2017-05-23 20:39:10 +02:00
Bjørn Erik Pedersen d460159a5f docs: Regenerate commands docs
Closes #3400
2017-05-23 21:01:51 +03:00
Bjørn Erik Pedersen 8b49c3a175 hugolib: Enable leaktest
See #3082
2017-05-23 20:40:20 +03:00
Bjørn Erik Pedersen bcd32f1086 commands: Remove the rlimit tweaking on macOS
Fixes #3512
2017-05-23 18:52:00 +03:00
Bjørn Erik Pedersen 62fe640d09 vendor: Update libs 2017-05-23 18:02:36 +03:00
Bjørn Erik Pedersen fbb78b89df hugolib: Speed up GetPage
When we know to look into the index pages collection, do that:

```
benchmark              old ns/op     new ns/op     delta
BenchmarkGetPage-4     51483         7072          -86.26%

benchmark              old allocs     new allocs     delta
BenchmarkGetPage-4     71             71             +0.00%

benchmark              old bytes     new bytes     delta
BenchmarkGetPage-4     2648          2648          +0.00%
```

This commit also returns an error if .Site.GetPage is called with the regular Page Kind, as that is currently not supported.

Fixes #3503
2017-05-23 15:18:26 +03:00
Bjørn Erik Pedersen 6c560288a6 hugolib: Add BenchmarkGetPage 2017-05-23 12:10:15 +03:00
Bjørn Erik Pedersen 89b85aede1 releaser: Disable flaky test 2017-05-22 23:23:52 +03:00
Cameron Moore 4113693ac1 tpl/cast: Handle template.HTML and friends in ToInt
Also add tests for ToInt and ToString.

Resolves #3308
2017-05-22 23:20:53 +03:00
Alexandros f41f728222 Remove Unmaintaned Frontends from Tools.
The unmaintained Rango frontend and the Hugopit "experiment" should be removed from the Hugo Tools/Frontends section of the documentation as they are unusable.

Rango can mess up with other dependencies installed in the Go Path as reported here: 
https://github.com/stayradiated/rango/issues/4

Hugopit's developer himself stated that this is an unmaintained experiment and he seemed a bit surprised that it is included in Hugo's documentation over here: https://github.com/sjardim/Hugopit/issues/3
2017-05-22 20:46:18 +02:00
Bjørn Erik Pedersen 8ddc7a5cde releaser: Prepare repository for 0.22-DEV
[ci skip]
2017-05-22 16:18:26 +03:00
Bjørn Erik Pedersen f63ee6567d releaser: Add relase notes to /docs for release of 0.21
[ci skip]
2017-05-22 16:11:22 +03:00
Bjørn Erik Pedersen 1a965e5d2f releaser: Bump versions for release of 0.21
[ci skip]
2017-05-22 16:09:42 +03:00
Bjørn Erik Pedersen baa414ae41 releaser: Add a new step
When doing it step-by-step, we need to update the version numbers in its own step.
2017-05-22 16:04:40 +03:00
Bjørn Erik Pedersen cdf32f08c7 releaser: Update ldflags 2017-05-22 12:27:23 +03:00
Bjørn Erik Pedersen 98e333b35c vendor: Update golang.org/x/sys/unix
To hopefully fix a broken Dragonfly build.
2017-05-22 12:27:23 +03:00
Bjørn Erik Pedersen a00962134a releaser: Add release notes draft for 0.21
* releaser: Add relase notes draft for release of 0.21

[ci skip]
2017-05-22 10:51:11 +03:00
Bjørn Erik Pedersen a119ef693f tpl/time: Re-add the time example 2017-05-20 11:41:43 +03:00
Bjørn Erik Pedersen 1f9e8dcc60 tpl: Make the Namespace func signature explicit
This makes it cleaner and avoids breaking client code, such as the docs helper JSON generator.
2017-05-20 11:34:38 +03:00
Bjørn Erik Pedersen ebd636e4d5 releaser: Delay the version bumping
So we can do the release notes in its own branch if needed.
2017-05-20 11:11:23 +03:00
Bjørn Erik Pedersen 4d1989d59c releaser: Fix tag detection for changelog when doing a main release
Also improve the changelog slightly.

Fixes #3482
2017-05-20 10:58:08 +03:00
Cameron Moore a59525b05b tpl/time: Remove asTime template func mapping 2017-05-20 00:00:20 +03:00
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
Bjørn Erik Pedersen e2b067f050 tpl/partials: Remouve unused method 2017-05-01 15:57:52 +02:00
Bjørn Erik Pedersen 0e2260421e tpl: Fix the remaining template funcs namespace issues
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen 4714085a10 tpl/urls: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen 55f90a3a0d tpl/transform: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen ee5aa84f2a tpl/time: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen 4a3463463f tpl/safe: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen b958c0c109 tpl/os: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen fc77b6303c tpl/inflect: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen a432c90aee tpl/images: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen 9aee8ace4e tpl/encoding: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen 744dccbea4 tpl/crypto: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen 8a49c0b3b8 tpl/collections: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen a3bf118eaa tpl/compare: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen 6561557367 tpl/data: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen 0ab23eb5a8 tpl/strings: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen eefa0703cb tpl/math: Make it a package that stands on its own
See #3042
2017-05-01 15:13:41 +02:00
Bjørn Erik Pedersen 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
Bjørn Erik Pedersen 8f95172c7a releaser: Disable shaky test 2017-05-01 13:38:29 +02:00
Takuya Kitazawa 4b637ac041 docs: Replace cdn.mathjax.org with cdnjs.cloudflare.com 2017-04-30 21:43:38 +02:00
Cameron Moore 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
Mitchell Cohen 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
Bjørn Erik Pedersen 565a78b110 netlify: Add some security headers 2017-04-30 10:37:46 +02:00
Bjørn Erik Pedersen 355736ec35 livereload: Fix data race in close
Fixes #2625
2017-04-30 01:10:57 +02:00
Tom Harvey 93a447c5dd docs: Fix typos 2017-04-28 07:36:38 +02:00
Albert Nigmatzianov eaf75a18ec vendor: Update cobra and pflag
See https://github.com/spf13/cobra/issues/426
2017-04-27 15:37:55 +02:00
Bjørn Erik Pedersen 8d0917af0a hubolib: Narrow a test assertion 2017-04-27 13:00:24 +02:00
Bjørn Erik Pedersen 718c0e1414 releaser: Fix broken test build 2017-04-27 11:15:24 +02:00
Bjørn Erik Pedersen d6957c192d releaser: Skip Git test on Travis 2017-04-27 10:59:00 +02:00
Bjørn Erik Pedersen a695202ff5 release: Add relase notes for 0.20.6
[ci skip]
2017-04-27 10:27:55 +02:00
Bjørn Erik Pedersen fea4fd86a3 hugolib: Avoid index.md in /index/index.html
Hugo 0.20 broke some sites that grouped their blog post and images together in subfolders.

This commit re-introduces that behaviour:

* If the file base name resolves to the same as the base name for the output type (i.e. "index" for HTML), the user probably meant it, so we treat that as an `uglyURL`, i.e. `my-blog-post-1.md`=> `/my-blog-post-1/index.html`
* The main use case for this is to group blog post and images together.
* Note that for the top level folder there will be a potential name conflict with a `section` `index.html` (if enabled)
* This issue will not be relevant for subfolders in sections
* Hugo will soon add support for nested sections, but we will have to find a way to separate them from the rest (`/content/_mysubsection` maybe).

Fixes #3396
2017-04-27 09:50:13 +02:00
Bjørn Erik Pedersen 656f818867 docs: Regenerate commands docs 2017-04-26 22:40:21 +02:00
Albert Nigmatzianov f0f69d03c5 commands: Make first letter of flags' usage lowercase 2017-04-26 22:23:20 +02:00
Albert Nigmatzianov 8fbec59930 vendor: Update cobra and pflag
* Faster help message
* Faster docs
* Adds help flag in usage
2017-04-26 22:23:20 +02:00
Anthony Fok e55399f50b releaser: Fix some of the fpm fields for deb 2017-04-26 10:51:05 -06:00
Bjørn Erik Pedersen 5ad2f17693 hugolib: Make missing GitInfo a WARNING
And not an ERROR.

Fixes #3376
2017-04-26 11:03:12 +02:00
Jordan 162d3a586d docs: Add notes about some output format behaviour 2017-04-25 19:37:35 +02:00
Bjørn Erik Pedersen fd5109b6d8 releaser: Fix ldflags setting
Closes #3382
2017-04-25 14:30:48 +02:00
Bjørn Erik Pedersen 88d8111093 docs: Remove temp release notes 2017-04-25 09:48:23 +02:00
Bjørn Erik Pedersen 4ac60e4ca2 docs: Add relase notes for 0.20.5
[ci skip]
2017-04-25 09:33:58 +02:00
Bjørn Erik Pedersen b332d93e39 docs: Add a time to 0.20.4 release docs
To make it newer than the one earlier today :-)
2017-04-24 21:47:08 +02:00
Bjørn Erik Pedersen b096a10fe9 releaser: Add relase notes for release of 0.20.4
[ci skip]
2017-04-24 21:07:19 +02:00
James Munnelly 24be139cb7 Add -linkmode external 2017-04-24 20:09:32 +02:00
James Munnelly 3e0f1ad7f5 Set extldflags to static when building 2017-04-24 20:09:32 +02:00
Ubuntu 0bd0593a77 releaser: Add relase notes to /docs for release of 0.20.3
[ci skip]
2017-04-24 13:36:39 +02:00
Bjørn Erik Pedersen c6e4aff1ce release: Adjust release notes for 0.20.3 2017-04-24 13:36:39 +02:00
Bjørn Erik Pedersen c0f491ab6c releaser: Add relase notes draft for release of 0.20.3
[ci skip]
2017-04-24 13:36:39 +02:00
Bjørn Erik Pedersen 67746f36dd releaser: Fix a Go vet complaint
See #3358
2017-04-24 12:41:47 +02:00
Bjørn Erik Pedersen 7f6430d84d Automate the Hugo release process
This commit adds a work flow aroung GoReleaser to get the Hugo release process automated and more uniform:

* It can be run fully automated or in two steps to allow for manual edits of the relase notes.
* It supports both patch and full releases.
* It fetches author, issue, repo info. etc. for the release notes from GitHub.
* The file names produced are mainly the same as before, but we no use tar.gz as archive for all Unix versions.
* There isn't a fully automated CI setup in place yet, but the release tag is marked in the commit message with "[ci deploy]"

Fixes #3358
2017-04-24 11:08:56 +02:00
Bjørn Erik Pedersen 0e87b18b66 hugolib: Fix handling of zero-length files
This was a regression in Hugo 0.20. This commit makes sure that zeron-length files are not rendered to file.

Fixes #3355
2017-04-23 22:46:01 +02:00
Albert Nigmatzianov e98f885b8a hugolib: Prevent decoding pageParam in common cases 2017-04-22 22:40:20 +02:00
Albert Nigmatzianov 6498d73c08 helpers: Delete RenderingContext.getConfig 2017-04-22 22:40:20 +02:00
xofyarg b5b6e81c02 hugolib: Ignore non-source files on partial rebuild
Partial rebuild does not have the same logic as normal rebuild on
selecting which file to build. This change makes it possible to
share the file select logic between two kinds of build.

Fix #3325.
2017-04-22 22:38:54 +02:00
Jack Taylor 90d3fbf1da tplimpl: Add translation links to the default sitemap template
For pages with translations, add links with hreflang attributes to the
default sitemap template. This helps Google to show the correct
language page in its search results. The syntax used is based on
Google's example at [1].

Also update the sitemap template docs to reflect the changes in the
default template.

[1]
https://support.google.com/webmasters/answer/2620865?hl=en&topic=2370587&ctx=topic

Fixes #2569
2017-04-22 22:37:14 +02:00
Stefan Buynov 5f3ad1c319 commands: Import Octopress image tag in Jekyll importer 2017-04-22 22:35:52 +02:00
Cameron Moore 8cd3ea565a Fix check-vendor logic in Makefile 2017-04-22 22:34:12 +02:00
Bjørn Erik Pedersen 7935541087 Remove check-vendor from make check
I suspect there are some false negatives in this one.
2017-04-19 18:12:01 +02:00
Bjørn Erik Pedersen d6818f2381 vendor: Fix go-toml 2017-04-19 18:09:51 +02:00
Cameron Moore 592e055f12 Add check-vendor target to Makefile
The check-vendor target will exit with an error if any files in vendor/
differ from what's checked into git.

govendor checksums can get out of sync if extraneous files are in the
local, third-party repo (see kardianos/govendor#129).  govendor also
updates the vendor.json upon "sync."  We can use that quirk to detect
out of sync checksums in CI, so I've added check-vendor to the check
target dependencies.
2017-04-19 18:04:53 +02:00
Bjørn Erik Pedersen ab692e73de hugolib: Log WARNING only on unknown /data files
Fixes #3361
2017-04-18 18:47:37 +02:00
Ricky Han 7cdc244a72 docs: Add txtpen as alternative commenting service 2017-04-18 18:05:52 +02:00
Rachel Simone Weil b5e32eb609 docs: Fix .Data.Pages range in sample 2017-04-16 13:22:24 +02:00
Bjørn Erik Pedersen 66ec6305f6 docs: Add 0.20.2 release notes 2017-04-16 10:56:50 +02:00
Bjørn Erik Pedersen 1cf29200b4 tplimpl: Allow text partials in HTML templates
Most obvius benefit of this is to include CSS partials with css file suffix into HTML templates.

A valid workaround would be to rename the file `mystyles.html`, but that doesn't work too good for external editors etc.

The css partial is  a method used in some themes before Hugo 0.20, but then it stopped working.

This commit reintroduces that behaviour.

Note that the regular layout lookups for text templates, i.e. "single.json" will be
prefixed with "_text/" on lookup and will only match in the text collection.

Fixes #3273
2017-04-16 09:17:47 +02:00
Bjørn Erik Pedersen 8ccee6717c vendor: Update dependencies 2017-04-14 10:24:30 +02:00
Bjørn Erik Pedersen 86a97dbd18 docs: Add Netlify badge if on Netlify 2017-04-14 10:22:51 +02:00
Bjørn Erik Pedersen 5e2e62d97f Get versions back to 0.20-DEV
This reverts commit 8ac1fcd0ce.
2017-04-13 16:19:50 +02:00
Bjørn Erik Pedersen 8ac1fcd0ce Prepare release 0.20.1 2017-04-13 16:00:30 +02:00
Bjørn Erik Pedersen 0ed3beec80 docs: Add 0.20.1 release notes 2017-04-13 14:05:33 +02:00
Bjørn Erik Pedersen 077005e514 output: Fix base theme vs project base template logic
Fixes #3323
2017-04-13 11:19:54 +02:00
Sanjay Saxena efc0e05c4e docs: Add sanjay-saxena.github.io to the showcase 2017-04-13 00:40:45 +02:00
Bjørn Erik Pedersen 6d2ea0f7d7 hugolib, output: Do not lower case template names
This regression was introduced in Hugo 0.20.

Fixes #3333
2017-04-12 21:40:55 +02:00
Bjørn Erik Pedersen 45c7452668 hugolib: Must recreate Paginator on live-reload
The structure may potentially have changed, and then it fails.

Fixes #3315
2017-04-12 21:15:51 +02:00
Bjørn Erik Pedersen e765b43e2b hugolib: Avoid recreating the Paginator on copy
See #3315
2017-04-12 21:15:51 +02:00
Bjørn Erik Pedersen 3b67759495 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.
2017-04-12 21:15:51 +02:00
Anthony Fok 5fad8a9d06 snapcraft: Go 1.8.1 2017-04-12 03:05:01 -06:00
Bjørn Erik Pedersen 9ec00725b7 hugolib: Final fix of rssURI deprecation
Fixes #3319
2017-04-10 21:26:55 +02:00
Bjørn Erik Pedersen cfd3af8e69 hugolib: Only show rssUri deprecation WARNING if it is actually set
Fixes #3319
2017-04-10 17:54:55 +02:00
Bjørn Erik Pedersen 4c6fec56f1 all Bump to 0.21-DEV 2017-04-10 09:33:21 +02:00
Bjørn Erik Pedersen dac0d4a69d all: Prepare Hugo 0.20 release version 2017-04-10 09:10:53 +02:00
Bjørn Erik Pedersen 03ec2b3397 docs: AddHugo 0.20 Release Notes 2017-04-10 09:07:01 +02:00
Masashi Miyaura 18f5f3c14c docs: Add Emacs plugin easy-hugo 2017-04-09 12:05:50 +02:00
ssc2015 308678aa7f docs: Add siba.ai to the showcase 2017-04-08 18:59:17 +02:00
Bjørn Erik Pedersen e73a35dea5 hugolib: Remove unused line 2017-04-08 18:04:12 +02:00
Bjørn Erik Pedersen c9731b2c2a hugolib: Delay deletion of Page.Now()
Looking at the state of the themes, it will be too painful to log ERROR now.
2017-04-08 18:02:36 +02:00
Bjørn Erik Pedersen 9ebbf1b054 docs: Add docs about output format linking
Fixes #3301
Fixes #3302
2017-04-08 16:33:20 +02:00
Bjørn Erik Pedersen 2874fc75ce hugolib, output: Add NotAlternative to OutputFormat
To make sure CSS and similar does not appear in the AlternativeOutputFormats list.
2017-04-08 11:21:12 +02:00
Bjørn Erik Pedersen 9e69a92e85 hugolib: Deprecate rssURI 2017-04-08 10:46:13 +02:00
Bjørn Erik Pedersen 9a8b65d8d7 travis: Go 1.8.1 2017-04-07 20:30:45 +02:00
Bjørn Erik Pedersen 7b2e1b0be9 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
2017-04-07 20:18:31 +02:00
Li-Wen Yip e975a07fb0 Update press.md
Add "Getting started with Hugo and the plain-blog theme, on NearlyFreeSpeech.Net"
2017-04-07 19:05:15 +02:00
Bjørn Erik Pedersen 7ad721fd78 hugolib: Add .Site.Params.mainSections
Fixes #3206
2017-04-07 13:03:34 +02:00
Bjørn Erik Pedersen 5714531f34 hugolib: Only do link transforms etc. on HTML type of pages
See #2828
2017-04-07 11:02:23 +02:00
Bjørn Erik Pedersen 3c405f5172 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
2017-04-07 10:52:16 +02:00
Bjørn Erik Pedersen 9580872459 hugolib: Update deprecation vs Hugo 0.20
Fixes #3271
2017-04-07 10:48:09 +02:00
Bjørn Erik Pedersen af99a59021 output: Add some sane defaults for output format
Fixes #3290
2017-04-07 10:43:48 +02:00
Albert Nigmatzianov 260b55ea56 tpl: Set RenderingContext.Config in markdownify 2017-04-06 21:02:37 +02:00
Albert Nigmatzianov 8f09e5f6bc helpers: Add new properties to ContentSpec 2017-04-06 21:02:37 +02:00
Bjørn Erik Pedersen c4a1165587 all: Handle all errors
As reported by `errcheck`.
2017-04-06 20:35:26 +02:00
Bjørn Erik Pedersen e77bb13c20 media, output: Fix spelling 2017-04-06 15:28:56 +02:00
Bjørn Erik Pedersen e6e1aca3f4 docs: Disable GitInfo by default
Use `--enableGitInfo` when publishing.

This gives a much better out-of-the-box editing experience.
2017-04-06 13:50:10 +02:00
Chris Hager f3b4a0e99e docs: Add info about Pygments installation in installing.md
Additional information about the Pygments dependency in the "installing from source" chapter.
2017-04-06 13:48:22 +02:00
Li-Wen Yip 0dd6890ed5 docs: Add article by Li-Wen Yip to press section 2017-04-06 13:38:32 +02:00
Bjørn Erik Pedersen 6650fae7ad tpl: Fix nil pointer in Tree()
Fixes #3285
2017-04-05 22:12:03 +02:00
Ricardo N Feliciano b31da911b5 docs: Properly capitalize GitHub 2017-04-05 18:41:23 +02:00
Bjørn Erik Pedersen 1425587193 hugolib: Add optional outputFormat to Ref/RelRef
Fixes #3224
2017-04-04 23:09:01 +02:00
Bjørn Erik Pedersen a883948c4f Register all media types when in server mode
Fixes #3274
2017-04-04 18:05:19 +02:00
Bjørn Erik Pedersen bc36d468ab tplimpl: Reintroduce the double template lookup in Partial
So it works as before without the html suffix.

Fixes #3272
2017-04-04 17:21:04 +02:00
Bjørn Erik Pedersen 7da1b65968 all: Use the configured output types to resolve template type
Closes #320
2017-04-04 15:12:30 +02:00
Bjørn Erik Pedersen 868f89d5c6 hugolib: Improve render error handling
Catch and return the "template not found" error earlier.
2017-04-04 15:12:30 +02:00
Bjørn Erik Pedersen 04d80e6e87 commands, helpers: Add correct verbose log level to the global loggers
We still use those in some cases.
2017-04-04 15:12:30 +02:00
Bjørn Erik Pedersen 0802f79e66 output: Make template name lower cased 2017-04-04 15:12:30 +02:00
Bjørn Erik Pedersen 10ff2f31a6 hugolib: Read media types and output formats from site config
Closes #3222
Closes #3223
2017-04-04 15:12:30 +02:00
Bjørn Erik Pedersen f8d555cca5 media: Add DecodeTypes
And clean up the media package.
2017-04-04 15:12:30 +02:00
Bjørn Erik Pedersen c9aee467d3 output: Add output formats decoder
And clean up the output package.
2017-04-04 15:12:30 +02:00
Bjørn Erik Pedersen d6e8b86f66 output: Add CSV to the global output formats list 2017-04-04 15:12:30 +02:00
Albert Nigmatzianov a098081c4a vendor: Update go-i18n 2017-04-03 08:34:12 +02:00
Kamil Samigullin 5d7eeeadf0 docs: Remove localhost part from link
Fixes #3264
2017-04-03 01:29:53 +02:00
Bjørn Erik Pedersen 8b5b558bb5 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
2017-04-02 23:13:10 +02:00
Albert Nigmatzianov 27610ddd01 hugolib: Don't ignore errors from applyDepsIfNeeded 2017-04-02 18:43:32 +02:00
Albert Nigmatzianov 6b29bccfee hugolib, i18n: Update tests with flat format and TOML files 2017-04-02 18:43:32 +02:00
Albert Nigmatzianov 28fdd71c29 vendor: Update go-i18n
Fix #2577
2017-04-02 18:43:32 +02:00
Albert Nigmatzianov fe8462b205 docs, examples: Use TOML for i18n config files
Fix #3200
2017-04-02 18:43:32 +02:00
Chase Adams d122260de7 vendor: update goorgeous 2017-04-02 18:34:17 +02:00
Enrique Saez a037b855dd docs: Add blog of Enrique Saez Gil to the site showcase 2017-04-02 18:29:24 +02:00
Bjørn Erik Pedersen 7eb71ee064 Revert "tpl: Rework to handle both text and HTML templates"
Will have to take another stab at this ...

This reverts commit 5c5efa03d2.

Closes #3260
2017-04-02 14:20:34 +02:00
Bjørn Erik Pedersen c97dae40d9 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.
2017-04-02 12:22:54 +02:00
Bjørn Erik Pedersen 0aeadfd02d tplimpl: Add test with failing partial
Main motivation to see that the containing template name is included in the error message name.

It is.
2017-04-02 12:06:21 +02:00
Bjørn Erik Pedersen 5c5efa03d2 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
2017-04-02 11:37:30 +02:00
Albert Nigmatzianov 73c1c7b69d vendor: Update cobra
Really fix #2349
b7a672f didn't actually the issue.
2017-04-01 20:28:18 +02:00
Bjørn Erik Pedersen f911b107ef media, output: Add CSV type and format
And make CSS correclty behave as plain text.
2017-04-01 15:12:31 +02:00
digitalcraftsman 05949c9038 docs: Fix typo/source link in firstname.club showcase addition 2017-03-31 22:49:09 +02:00
Pedro Gomes d5036c3ab5 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.
2017-03-31 22:41:22 +02:00
bit swarm af1f9ecf91 docs: Add firstname.club to the showcase 2017-03-31 22:38:22 +02:00
Bjørn Erik Pedersen 42a4f6f9cb tplimpl: Fix map data race in URLLock 2017-03-31 10:40:33 +02:00
Bjørn Erik Pedersen 79b34c2f1e tplimpl: Fix deadlock in getJSON
Fixes #3211
2017-03-31 09:17:03 +02:00
Bjørn Erik Pedersen 3c6b16d5a2 vendor: Update fsnotify with several Linux-fixes 2017-03-29 13:30:31 +02:00
Bjørn Erik Pedersen 87b3cd4655 hugolib, helpers: Reduce log level to WARN on .Render for non-regular pages
We will eventually support all types in the Render method.
2017-03-29 08:08:45 +02:00
Bjørn Erik Pedersen 5989c4d464 helpers, output: Fix spelling 2017-03-28 01:19:46 +02:00
Bjørn Erik Pedersen af55ec7661 hugolib, output: Gofmt 2017-03-28 01:18:15 +02:00
Bjørn Erik Pedersen f2fbf0b2ea media: Add some more relevant MIME types 2017-03-28 00:09:25 +02:00
Bjørn Erik Pedersen 4923273688 tplimpl: Fix lookup with non-standard layout folder 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 930a3df1b7 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.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen e49a2b83ad hugolib: Fix Render layouts for list pages 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 9a0aa5fdbe hugolib: Wrap pageOutput create in sync.Once 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 0aaf3c56a5 hugolib: Fix panic for Permalink in 404 etc. templates 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen ee4a33b14f commands: Fix broken commandeer 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 09c88e84d1 output: Rename HTMLType etc. to HTMLFormat 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 24c1770288 hugolib: Revise paginator alias path handling 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen b7ed67d425 hugolib: More TODO fixes 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 3cd97951f1 hugolib, layout: Consolidate RSS template handling 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen ee75e2999b Remove the now superflous defaultExtension
And some other unsed fields and methods.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 15b64d51da all: Propagate baseURL error to the callers 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 148fedd227 hugolib, tplimpl: Use OutputFormats to create atom links 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen ec01c3a7f0 hugolib: Add 404 test 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 5761b93c96 hugolib, output: Fix RSSLink vs output formats
And remove the now superflous setPageURLs method.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 87188496fb hugolib, output: Handle aliases for all HTML formats 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 0c4701f0ef hugolib: Update site stats to take output formats into account 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen d851d6b98f Add custom protocol support in Permalink 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 8bcc08e3b0 media, output: Add Calendar type 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen dbb83f925a hugolib: Read default output formats from site config 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 4aaed87dd9 hugolib, media: Make the MediaType available to the templates 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen c7dbee2321 hugolib, output: Add Rel to the output format
To make it super-easy to create rel-links.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 29d3778ba1 docs: Move the rough custom output formats spec to docs
This isn't meant to be the final useer docs on this feature!
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 1b2be5e878 hugolib: Add OutputFormats with permalinks to Page 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen baa29f6534 output: Rework the base template logic
Extract the logic to a testable function and add support for custom output types.

Fixes #2995
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen c7c6b47ba8 hubolib: Pick layout per output format 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 08fa2b1124 hugolib: Fix layout lookup order for Render func
Will have to fix this in a better way later in relation to the non-renderable pages.

But this commit brings the Hugo Benchmark down to "only slightly slower" than master.

```
benchmark           old ns/op       new ns/op       delta
BenchmarkHugo-4     10074504521     10071236251     -0.03%

benchmark           old allocs     new allocs     delta
BenchmarkHugo-4     43623091       49271859       +12.95%

benchmark           old bytes      new bytes      delta
BenchmarkHugo-4     9468322704     9725848376     +2.72%
```

Which is something we can work with.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 6178238a0b output: Speed up layout calculations
```
BenchmarkLayout-4     4883          497           -89.82%

benchmark             old allocs     new allocs     delta
BenchmarkLayout-4     18             1              -94.44%

benchmark             old bytes     new bytes     delta
BenchmarkLayout-4     1624          32            -98.03%
```
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen df95383914 hugolib: Speed up URL handling 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen a49bf8707b hugolib: Remove siteWriter 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen d76e5f36b4 hugolib: Pull all alias handling into one file 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen ad8cea87f3 Refactor layout resolve to a descriptor/adapter pattern 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 4c2abe0015 Rename OutputType to OutputFormat 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 6bf010fed4 hugolib: Refactor/-work the permalink/target path logic
This is a pretty fundamental change in Hugo, but absolutely needed if we should have any hope of getting "multiple outputs" done.

This commit's goal is to say:

* Every file target path is created by `createTargetPath`, i.e. one function for all.
* That function takes every page and site parameter into account, to avoid fragile string parsing to uglify etc. later on.
* The path creation logic has full test coverage.
* All permalinks, paginator URLs etc. are then built on top of that same logic.

Fixes #1252
Fixes #2110
Closes #2374
Fixes #1885
Fixes #3102
Fixes #3179
Fixes #1641
Fixes #1989
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen c8fff9501d Implement the first generic JSON output testcase 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 3ec5fc3504 hugolib, output: Incorporate suffix and type in layout resolve
And remove some now superflous and hard to maintain tests.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen f091fc23ed hugolib: Add basic setup for output def per Kind 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 03122e51fa hugolib: Revert to using Page as the render chan type
Changing it to PageOutput was a mistake. You may think that the increased parallelism should be a good thing.

But not so much with the increased lock contention and more complex concurrency model.
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen e5200ddaa4 hugolib: Remove the copying in the renderRSS 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen a8244658f7 hugolib: Put back taxonomy term paginator logic lost in rebase 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 50c64415aa hugolib, output: Add theme logic to LayoutHandler 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 348834d017 hugolib: Add a PageOutput wrapper for rendering 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 254cd89c8e hugolob: A first incorporation of output types in rendering 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 10de077164 hugolib: Use the new layout logic in Page 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 3bb52bf7bf output: Move layout logic to the output package 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen d3d2c63dd9 output: Add output type 2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen c4989c39f1 Add MediaType and a crude implementation
See #2828
2017-03-27 15:43:56 +02:00
Bjørn Erik Pedersen 9262c5b32f Exit -1 on ERROR in non-global logger
Fixes #3239
2017-03-27 10:55:29 +02:00
Bjørn Erik Pedersen 2bea9d0ca1 Revert "tplimpl: return an error on unsupported type in isSet"
This breaks the theme site and lots of themes, so we will have to thinkg a little harder about this one.

This reverts commit 74ea81b885.
2017-03-26 20:09:08 +02:00
Darwin 1b92c8b713 Change RSS description from full .Content to .Summary 2017-03-25 22:58:41 +01:00
Bjørn Erik Pedersen 17b21e0af1 hugolib: Correctly identify "my_index_page.md"
The above example was earlier identified as a section page and not a regular page.

Fixes #3234
2017-03-25 19:57:01 +01:00
Anthony Fok 7f68e3199e snapcraft: Bump version to 0.20-DEV 2017-03-25 02:55:10 -06:00
Anthony Fok 2ed75f3462 snapcraft: Add vendoring support
Also, build with go1.8, run "make test", and strip the binary.

Fixes #3226
2017-03-25 02:54:30 -06:00
digitalcraftsman 9d9ec1ddd9 docs: Add Hugo SFTP Upload to the tools section
/cc @rdwatters
2017-03-24 23:31:31 +01:00
Albert Nigmatzianov 9f0b02b898 commands: Fix case of createpath in new.go 2017-03-24 22:19:03 +01:00
Albert Nigmatzianov a159feffb2 create: Delete redundant viper calls
Also make easier to read the code
2017-03-24 22:19:03 +01:00
Ryan Watters d07ff9d221 docs: Remove dead links, consistent formatting...
This page was a real chore chore on the POC. In the event that a new doc site won't be approved by v20, this will at least clean up the broken links I found during my audit. I would like to eventually create this as a [data file](https://github.com/spf13/hugo/pull/2508#commitcomment-18705617) since md tables get unwieldy pretty quickly.
2017-03-22 21:32:31 +01:00
Prayag Verma f1b1df5058 docs: Fix typo in templates/functions.md (#3214)
limitted → limited
2017-03-22 13:21:00 +05:00
Eamonn 559b4007f7 commands: Keep "." directories on cleanDestinationDir
Fixes #3208
2017-03-21 13:10:31 +01:00
Bharath M. Palavalli 5e191ccf4c docs: Add bharathpalavalli.com to the showcase 2017-03-21 10:30:20 +01:00
Albert Nigmatzianov d3cd68e656 parser: Improve TOML frontmatter parser performance
Difference between toml.Load(string(datum)) and
toml.LoadReader(bytes.NewReader(datum)):
benchmark           old ns/op     new ns/op     delta
BenchmarkLoad-4     82068         78489         -4.36%

benchmark           old allocs     new allocs     delta
BenchmarkLoad-4     494            493            -0.20%

benchmark           old bytes     new bytes     delta
BenchmarkLoad-4     17009         16913         -0.56%
2017-03-20 09:02:35 +01:00
Ryan Watters 68f4cd829e Removing .Site.Recent
Per forum:

https://discuss.gohugo.io/t/site-recent-deprecated-or-removed/5851/2
2017-03-19 19:41:22 -05:00
Bjørn Erik Pedersen 3fa7bc9c53 Revert "Add support for a flatter and simpler language file structure"
This reverts commit 0e75f6e7b1.
2017-03-19 22:34:22 +01:00
Bjørn Erik Pedersen 3518de1057 Revert "vendor: Fix broken i18m definition"
This reverts commit 7c48ad57a9.
2017-03-19 22:34:16 +01:00
Bjørn Erik Pedersen 7c48ad57a9 vendor: Fix broken i18m definition 2017-03-19 21:46:19 +01:00
Bjørn Erik Pedersen 0e75f6e7b1 Add support for a flatter and simpler language file structure
See https://github.com/nicksnyder/go-i18n/issues/62
See #2577
2017-03-19 21:23:48 +01:00
Bjørn Erik Pedersen 6eddb3e587 Revert "helpers: Add a Debug method to DistinctLogger"
Not needed.

This reverts commit 4382a8a6a0.
2017-03-19 10:24:12 +01:00
Tibo Beijen 6e03c96a20 docs: Add tibobeijen.nl to site showcase 2017-03-18 21:54:54 +01:00
Bjørn Erik Pedersen 4382a8a6a0 helpers: Add a Debug method to DistinctLogger 2017-03-18 17:34:49 +01:00
Stefan Buynov 9dfb9c1445 Case insensitive translation of the 'more' tag when importing from Jekyll 2017-03-18 16:16:25 +01:00
Dan Callahan c2ffdfab63 docs: Fix documentation of non-existent 'editor' config 2017-03-17 23:57:53 +01:00
Anthony Fok a99661031a docs: Change OS X to macOS in README and CONTRIBUTING 2017-03-15 07:58:58 -06:00
Albert Nigmatzianov 491d406881 docs: Fix CONTRIBUTING.md 2017-03-15 09:27:02 +01:00
Bjørn Erik Pedersen d8923eb676 Update to new go-toml API
Closes #3142
2017-03-15 08:04:52 +01:00
Cameron Moore d6093aba4d docs: Update contributing guides
Add vendoring and make targets.  Require Go 1.8+ and remove mention of
GOPATH (just assume $HOME/go).

Due to time contraints, the contributing tutorial was only slightly
updated to make obvious corrections.

Fixes #3153
2017-03-14 23:03:49 +01:00
Anthony Fok 638cc806d6 docs: Optimize 11 showcase thumbnail images 2017-03-14 07:34:42 -06:00
Anthony Fok ec3dc32511 docs: Add Linux distro-specific installation instructions
Backported from https://hugodocs.info/getting-started/installing/
with added mention for Fedora and Red Hat.
2017-03-14 06:13:28 -06:00
Anthony Fok b156ef2712 docs: Note Hugo as Snap package can write only inside $HOME
Backported from https://hugodocs.info/getting-started/installing/

Fixes #3143
2017-03-14 06:13:28 -06:00
Anthony Fok 042f8fca03 docs: Replace Mac OS X with macOS in three places 2017-03-14 06:13:28 -06:00
Rosen Lu 431d597442 docs: Add lucumt.info to showcase 2017-03-13 20:46:50 +01:00
crasm ede452d34e parser: Accept JSON frontmatter without leading "{\n"
Accept JSON frontmatter without leading "{\n" so that one line
frontmatters such as `{"param":"paramvalue"}` no longer silently render
empty html.
2017-03-13 17:19:03 +01:00
Anthony Kong 62efcdfed4 commands: Improve jekyll import date format
Allow both yyyy-mm-dd and yyyy-m-d formats in jekyll markdown
file names.
2017-03-13 12:50:57 +01:00
Mark D. Blackwell 4b9493cb03 docs: Improve command reference page 2017-03-13 12:40:19 +01:00
digitalcraftsman 5d0748ce51 tpl: Add union template func 2017-03-12 23:04:12 +01:00
Bjørn Erik Pedersen 63e2a46f63 docs: Add Android to README 2017-03-12 00:52:40 +01:00
Bjørn Erik Pedersen 2f2ea42c09 hugolib: Fix reloading corner cases for shortcodes
This commit fixes two different, but related issues:

1) Live-reload when a new shortcode was defined in the content file before the shortcode itself was created.
2) Live-reload when a newly defined shortcode changed its "inner content" status.

This commit also improves the shortcode related error messages to include the full path to the content file in question.

Fixes #3156
2017-03-11 20:21:06 +01:00
Bjørn Erik Pedersen 5f443bd45b commands: t.Error => t.Errorf 2017-03-11 19:07:32 +01:00
Cameron Moore f039e3be9e parser: Refactor frontmatter parser and add tests
Lots of cleanups here:

- Refactor InterfaceToConfig and InterfaceToFrontMatter to use io.Writer.
- Simplify InterfaceToFrontMatter by wrapping InterfaceToConfig.
- Export FrontmatterType since we return it in DetectFrontMatter.
- Refactor removeTOMLIdentifier to avoid blindly replacing "+++".
- Update HandleJSONMetaData to return an empty map on nil input.
- Updates vendored goorgeous package and test for org-mode frontmatter.
- Add tests and godoc comments.

Coverage for parser package increased from 45.2% to 85.2%.
2017-03-11 17:52:25 +01:00
Cameron Moore ddc8cc0082 hugolib: Clean up redundant frontmatter error logging
Fixes #3157
2017-03-10 23:22:43 +01:00
C. S. Samulski 0e44f75ebd docs: Explain themes dir in quickstart guide
Themes is currently not included in the description that follows `tree -a` even
though it is autogenerated for you by `new site`.
2017-03-10 22:05:28 +01:00
Jay Dreyer 690961ba02 docs: Add myearworms.com to the showcase 2017-03-10 22:01:33 +01:00
Cameron Moore fe41bd61bb hugolib: Default rssLimit to unlimited
Fixes #3145
2017-03-10 21:27:45 +01:00
Albert Nigmatzianov 48120ccfd2 all: Fix some govet complaints 2017-03-09 14:18:12 +01:00
Cameron Moore 560ed6e686 Update appveyor config
Remove "image" setting as the "WMF 5" image is deprecated.

Fixes #3061, #3142
2017-03-09 09:31:22 +01:00
Cameron Moore 45b9d7223a tplimpl: Add built-in print funcs to FuncMap
Add print, printf, and println to the Hugo FuncMap so that they are
accessible to the apply template func.

Updates #3139
2017-03-09 00:21:55 +01:00
Bjørn Erik Pedersen a2a8a651f7 hugolib: Don't report taxonomy count if disabled 2017-03-08 14:20:17 +01:00
Albert Nigmatzianov 4bfa189031 hugolib: Remove unnecessary params
Found by github.com/mvdan/unparam
2017-03-08 12:28:56 +01:00
Shubhojyoti Bhattacharya a2ec372a03 docs: Add enjoyable.recipes to the showcase 2017-03-07 23:37:07 +01:00
Anton Staaf c950699907 hugolib: Populate the taxonomy term Pages list
Previously this was left empty, but it is very handy to have a list
of term pages for a given taxonomy.  This list can now be paginated
like other page lists.  It makes it possible to render summary
content from each terms index page for instance.  It also makes it
possible to sort the term pages in the same way that other page
lists can be sorted.  An RSS feed is now generated for
KindTaxonomyTerm pages as well.

This also fixes a bug in HugoSites.createMissingPages.  Previously
it would only check for existing KindTaxonomyTerm pages if the
taxonomy had any terms defined.  So for a taxonomy with no terms
but a taxonomy terms page it would generate a second empty terms
page.
2017-03-05 21:24:14 +01:00
Bjørn Erik Pedersen 6c5ef71368 hugolib: Add a temporary workaround for page.copy() data race
See ##3129
2017-03-05 15:41:58 +01:00
Stanislav Popov c7b8c45d12 docs: Correct toml syntax in Github deploy tutorial 2017-03-05 11:33:37 +01:00
Bjørn Erik Pedersen e52e2a70e5 hugolib, target: Rework/move the target package
This relates to #3123.

The interfaces and types in `target` made sense at some point, but now this package is too restricted to a hardcoded set of media types.

The overall current logic:

* Create a file path based on some `Translator` with some hardcoded logic handling uglyURLs, hardcoded html suffix etc.
* In in some cases (alias), a template is applied to create the alias file.
* Then the content is written to destination.

One could argue that it is the last bullet that is the actual core responsibility.

This commit fixes that by moving the `hugolib`-related logic where it belong, and simplify the code, i.e. remove the abstractions.

This code will most certainly evolve once we start on #3123, but now it is at least possible to understand where to start.

Fixes #3123
2017-03-04 23:33:35 +01:00
Bjørn Erik Pedersen ea165bf9e7 vendor: Update cast 2017-03-04 23:19:19 +01:00
Anton Staaf 22c89dcb6c hugolib: Fix HugoSites.createMissingPages
Previously it would only check for existing KindTaxonomyTerm pages
if the taxonomy had any terms defined.  So for a taxonomy with no terms
but a taxonomy terms page it would generate a second empty terms page.
2017-03-04 21:37:52 +01:00
Josh Habdas d0e2a1fa14 docs: Add blog post from After Dark creator 2017-03-03 09:24:59 +01:00
Bjørn Erik Pedersen 5a94e4cfb9 hugolib: Add section template baseof test case
Closes #2995
See #3116
2017-03-02 13:52:08 +01:00
Bjørn Erik Pedersen f4779b25bc docs: Add new section list lookup alternative
Updates #3116
2017-03-02 10:08:41 +01:00
Bjørn Erik Pedersen 8203fc5923 hugolib: Add /layouts/SECTION/list.html to template lookup
Fixes #3116
2017-03-02 10:08:37 +01:00
Bjørn Erik Pedersen 7acec3c639 helpers: Return partially cleaned URL in case of error in URLPrep anyway
Closes #2987
2017-03-02 00:21:39 +01:00
Cameron Moore 74ea81b885 tplimpl: return an error on unsupported type in isSet
Fixes #3092
2017-03-02 00:11:10 +01:00
Bjørn Erik Pedersen 577522bd45 helpers: Remove unused arg 2017-03-01 23:49:24 +01:00
Bjørn Erik Pedersen 23f5b9ac4e hugolib: Fix broken test
See #2977
2017-03-01 18:44:30 +01:00
Bjørn Erik Pedersen 1279ca201a docs: Add some more quotes 2017-03-01 18:37:44 +01:00
Bjørn Erik Pedersen 9671162a22 hugolib: Make sure that empty terms lists are still created
Fixes #2977
2017-03-01 17:07:38 +01:00
Bjørn Erik Pedersen 3669015f56 Handle Hugo version strings with patch level
Fixes #3025
2017-03-01 15:49:07 +01:00
Bjørn Erik Pedersen a0e3ff1645 helpers: Fix version string for Hugo 0.20 and similar
Fixes #3112
2017-03-01 14:34:40 +01:00
Bjørn Erik Pedersen cc15864744 hugolib: Only return RSSLink when RSS is available
Fixes #1302
2017-03-01 12:30:41 +01:00
Bjørn Erik Pedersen b7a672fd22 vendor: Update Cobra
Fixes #2349
2017-02-28 21:25:08 +01:00
Keane Nguyen 972649c684 docs: Correct date in automated deployment tutorial
Last modified date couldn't be parsed by Hugo.
2017-02-28 21:12:34 +01:00
vsopvsop afb3334ed8 docs: Correct link of 'now' tpl func in release notes
When mentioning the commit for 'now' template function the previous line's github link is repeated unfortunately.
2017-02-28 21:06:48 +01:00
Bjørn Erik Pedersen c266cd2d86 vendor: Bump versions 2017-02-28 10:07:10 +01:00
Bjørn Erik Pedersen 0b91053c9f hugolib: Only consider regular pages in Prev/Next
Fixes #3108
2017-02-28 09:07:00 +01:00
Keane Nguyen 396276aafa docs: Revise automated deployment tutorial
Update tutorial to reflect changes to Wercker website.
2017-02-27 20:31:38 +01:00
Bjørn Erik Pedersen 072cd00305 Bump version to 0.20-DEV 2017-02-27 13:58:50 +01:00
Bjørn Erik Pedersen 0a99168220 docs: Some minor release notes fixes 2017-02-27 11:21:29 +01:00
Bjørn Erik Pedersen 28198ce982 docs: Fix shortcode param in release notes 2017-02-27 11:16:19 +01:00
Bjørn Erik Pedersen a1741f192c Update versions to 0.19 release 2017-02-27 10:49:35 +01:00
Bjørn Erik Pedersen c9c889c198 docs: Add release notes for Hugo 0.19 2017-02-27 10:35:31 +01:00
Bjørn Erik Pedersen eb572c8a18 docs: Add documentation for disableKinds
Fixes #3054
2017-02-26 21:51:53 +01:00
Cameron Moore 8d5132229f docs: Update RSS docs with rssLimit changes
Side effect: remove unnecessary XML templates from example blog site.

Fixes #3065
2017-02-26 21:47:05 +01:00
Bjørn Erik Pedersen 0eb76b0863 Revert "hugolib: Add terms' pages to .Data.Pages"
This reverts commit e117b1b2c7.

Will have to think a little about this.
2017-02-25 18:14:48 +01:00
Bjørn Erik Pedersen a8a8249f67 Revert "hugolib: Render paginator pages for taxonomy terms"
This reverts commit 4d679627ec.

Will have to think a little more about this.
2017-02-25 18:10:51 +01:00
Bjørn Erik Pedersen 3631fd2f0e docs: Regenerate commands doc 2017-02-25 10:03:28 +01:00
digitalcraftsman e37e3dcc04 tpl: Add title meta tag to twitter card template
Fixes #3095
2017-02-25 09:53:25 +01:00
digitalcraftsman 6dd57f7a11 docs: Remove waffle.io graph from CONTRIBUTING.md
Fixes #2892
2017-02-24 22:21:58 +01:00
Josh Archer eaabecf586 docs: Adds 'Using _index.md' page
There has been confusion regarding the use of _index.md pages following
the shift to 'Everything is a Page' in Hugo v0.18:

https://discuss.gohugo.io/t/hugo-0-18-ignores-index-md-in-the-section/4896

This has lead to attempts at clarification:

https://discuss.gohugo.io/t/-index-md-pages-in-section-taxonomies-etc-are-not-rendered-using-single-html-template/5466

There is also an open issue regarding improving the docs on this topic:

https://github.com/spf13/hugo/issues/2827

This commit adds a dedicated page explaining how _index.md files fit
into Hugo's template hierarchy, what they can contain and how to render
content from them onto the respective list/terms/home page.

What this commit doesn't do is address confusion over former behaviour
of the 'index.md' files (note the lack of _). Instead it focuses on
clarifying the new behaviour in the hope of rendering the old moot.

Fixes #2827
2017-02-24 21:07:15 +01:00
Kiley Dorton e21fdbae8d docs: Fix ambiguous typo in quickstart 2017-02-24 20:54:03 +01:00
digitalcraftsman e9921ae4b2 docs: Mention Hugo's official twitter account 2017-02-23 22:05:38 +01:00
jacob-long 950d1aa1b3 docs: Add article to press.md + cleanup
Added article from gettingthingstech.com.
I also cleaned up some poorly-aligned entries near the top of markdown table
(though it doesn't affect the HTML output either way).
2017-02-23 21:11:25 +01:00
Bjørn Erik Pedersen c1425a166d hugolib: Fix preserveTaxonomyNames regression
Fixes #3070
2017-02-23 10:09:42 +01:00
Hauke Löffler 831bfd36aa Update Docker file to Go 1.8
* new go-version, switch to alpine (reduce size by 500mb)
* use govendor
2017-02-23 00:17:14 +01:00
Bjørn Erik Pedersen 4d679627ec hugolib: Render paginator pages for taxonomy terms
See #2826
2017-02-22 21:31:52 +01:00
Bjørn Erik Pedersen e117b1b2c7 hugolib: Add terms' pages to .Data.Pages
Fixes #2826
2017-02-22 21:13:21 +01:00
Bjørn Erik Pedersen 9e6b5eb98e hugolib: Temporarily disable leaktest
See #3082
2017-02-22 09:38:55 +01:00
Bjørn Erik Pedersen 0f109faefb hugolib: Fix broken shortcode tests 2017-02-22 00:14:27 +01:00
Bjørn Erik Pedersen 6278393540 hugolib: Include full filepath on shortcode errors
Fixes #3079
2017-02-21 22:54:19 +01:00
Félix Blanco 87acf292e5 docs: Add promotive.es to the showcase 2017-02-21 20:30:02 +01:00
Bjørn Erik Pedersen 13972d6c83 hugolib: Cleanup the Goroutine count calculation 2017-02-21 18:56:56 +01:00
Bjørn Erik Pedersen 91968f3b1f vendor: Update cast
Fixes #3059
2017-02-21 16:24:47 +01:00
bogem 7934db9169 commands: Cache logFile in createLogger 2017-02-21 15:08:45 +01:00
bogem 9e52477d94 hugolib: Add relativeURLs and canonifyURLs to Site 2017-02-21 15:08:45 +01:00
bogem c7535b9c25 commands: Remove flagChanged from commandeer 2017-02-21 15:08:45 +01:00
Alan Orth eb27c47fc5 tpl: Use og:updated_time OpenGraph tag on nodes
A previous commit greatly improved the OpenGraph tags generated by
Hugo's internal opengraph template, but there was a minor error in
the fix. Nodes are of type "website" and according to the Facebook
docs they should use og:updated_time.

See: https://github.com/spf13/hugo/pull/2979
See: https://developers.facebook.com/docs/reference/opengraph/object-type/website/
2017-02-21 14:41:09 +01:00
John Feminella df1ff57d1a Use Page.Params more consistently when adding metadata 2017-02-21 14:23:39 +01:00
Bjørn Erik Pedersen 2cbdd65330 tpl, hugolib: Fix live-reload of non-renderable content pages
Fixes #3062
2017-02-21 13:56:20 +01:00
Alan Orth 4e77c8717b tpl: Remove twitter:domain tag from internal shortcode
It seems this metadata tag is no longer used by Twitter, as it has
been removed from their Cards Markup Tag Reference since at least
2013 according to a post on the W3 mailing list.

See: https://dev.twitter.com/cards/markup
See: https://lists.w3.org/Archives/Public/www-validator/2013Oct/0025.html
2017-02-21 13:24:44 +01:00
Li-aung Yip d3fb196067 docs: Improve documentation for menu rendering
Fixes #1393
2017-02-21 10:38:12 +01:00
Bjørn Erik Pedersen 2320c5682c commands: Make sure build error is logged in watch mode
See #3062
2017-02-21 09:46:56 +01:00
Bjørn Erik Pedersen 41857d036d utils: Use local logger 2017-02-21 09:41:56 +01:00
Bjørn Erik Pedersen 75d855c086 hugolib: Add check for p.Markup == "org"
To be improved.
2017-02-21 08:49:04 +01:00
Chase Adams 86e8dd62f0 all: Add org-mode support
Fixes #1483 
See #936
2017-02-21 08:46:03 +01:00
Bjørn Erik Pedersen a3af4fe46e hugolib: Finish menu vs section content pages
This commit also fixes the default menu sort when the weight is 0.

Closes #2974
2017-02-20 22:20:02 +01:00
Abdo Roig-Maranges 2a6b26a7a5 hugolib: Improve menu generation for section pages with content
When using the lazy blogger setting to automatically generate menu
entries from section pages, we now recognize section pages that have
content, and use the weight and linktitle configured in the frontmatter.

This way, we can use the lazy blogger automatic generation, and
influence menu order and translations, directly from the frontmatter.

Updates #2974
2017-02-20 22:20:02 +01:00
Bjørn Erik Pedersen fe9fd0acf4 hugolib: Cache the value of Page's RelPermalink 2017-02-20 09:05:35 +01:00
bogem 7e0fa13faa Get rid of some viper.Get* calls
Enforce usage of PathSpec

Fixes #3060
Updates #2728
2017-02-20 08:10:13 +01:00
Bjørn Erik Pedersen 3d4e99ed50 config: Remove unused var 2017-02-19 20:08:36 +01:00
Abdó Roig-Maranges 02b120d1bd hugolib: Discard current language based on .Lang()
Otherwise we fail to skip the current language in translations
for paginated pages.

Fixes #2972
2017-02-19 15:00:18 +01:00
Bjørn Erik Pedersen 6809ea1e7c hugolib: Fix .Site.LastChange
This commit makes sure that the `.Site.LastChange` is fetched from the latest page modification date.

Previously, this value was fetched from the last page in the default page sort, which may not be the last by date
if weight is set.

Fixes #2909
Closes #2910
2017-02-19 13:48:21 +01:00
Bjørn Erik Pedersen a0b3d9db16 hugolib: Add temporary date parse test
To debug the irregular Windows test failure.

See #3059
2017-02-19 13:19:15 +01:00
Bjørn Erik Pedersen 2ea242d5fe hugolib: Minor Go vet fix 2017-02-19 10:33:28 +01:00
Anton Staaf 99fbc75e7a hugolib: Fix regression of .Truncated evaluation in manual summaries
This fixes the behavior of .Truncated that was introduced with commit
bef496b97e which was later broken.  The
desired behavior is that .Truncated would evaluate to false when there
was nothing after the user defined summary marker.

This also adds a simple unit test to ensure that this feature isn't
broken again.  The check for content after the user defined summary
marker is done on the raw content instead of the working copy because
some of the markup renderers add elements after the marker, making it
difficult to determine if there is actually any content.

The behavior (evaluating to false when there is no content, just
summary) is also now documented.
2017-02-19 10:11:49 +01:00
Bjørn Erik Pedersen 9416fdd334 hugolib: Add missing page kind to allKinds 2017-02-19 09:15:30 +01:00
John Feminella b2e3748a4e hugolib: Enhance .Param to permit arbitrarily nested parameter references
The Param method currently assumes that its argument is a single,
distinct, top-level key to look up in the Params map. This enhances the
Param method; it will now also attempt to see if the key can be
interpreted as a nested chain of keys to look up in Params.

Fixes #2598
2017-02-19 08:50:08 +01:00
Bjørn Erik Pedersen 6d2281c8ea hugolib: Add disableKinds option
Fixes #2534
2017-02-18 22:53:23 +01:00
Bjørn Erik Pedersen e096917f87 appveyor: Add go version 2017-02-18 22:15:25 +01:00
Bjørn Erik Pedersen 13ca0b4c95 appveyor: Fix build, take 2 2017-02-18 22:08:10 +01:00
Bjørn Erik Pedersen 3dade5de09 appveyor: Fix build 2017-02-18 22:07:17 +01:00
Bjørn Erik Pedersen b360f9b30e appveyor: Print Go environment 2017-02-18 21:56:03 +01:00
Bjørn Erik Pedersen bdc02edfa8 tplimpl: Fix issue with recursive templates
Fixes #2927
2017-02-18 09:08:40 +01:00
Bjørn Erik Pedersen 4493e8ed9f hugolib: Fix issue with taxonomies when only some have content page
Fixes #2992
2017-02-18 08:37:11 +01:00
Bjørn Erik Pedersen 07ab7ae3d2 hugolib: More test helper cleanup 2017-02-18 07:53:25 +01:00
Bjørn Erik Pedersen ed847ed93d hugolib: Test helper cleanup 2017-02-17 20:52:50 +01:00
Cameron Moore 10c13f5d79 hugolib: Make RSS item limit configurable
Add a new rssLimit site configuration option with default of 15.  Prior
to this fix, you could create your own RSS feed to override the default
limit of 15, but we still had a hardcoded limit of 50 items set in
`hugolib.renderRSS()`.

With this option in place, the `range first 15 .Data.Pages` logic is no
longer hardcoded into the embedded RSS template.

Because the size of the slice passed to the template is now limited to
rssLimit instead of 50, this commit is a breaking change for sites
with a custom RSS template that expects more than 15 items.

Fixes #3035
2017-02-17 19:53:08 +01:00
Bjørn Erik Pedersen ade207635e hugolib: Fix Windows build failure, final take 2017-02-17 18:34:58 +01:00
Bjørn Erik Pedersen 0946630715 hugolib: Fix Windows build failure, take 2 2017-02-17 18:28:14 +01:00
Bjørn Erik Pedersen 9421690281 hugolib: Fix Windows build failure 2017-02-17 18:22:36 +01:00
Cameron Moore d3abb93cc7 tplimpl: Fix instagram shortcode panic on invalid ID
Instagram doesn't return a valid JSON response when the requested ID is
invalid or not found.

Fixes #3048
2017-02-17 17:50:37 +01:00
Bjørn Erik Pedersen b7aa230458 travis: Bump to Go 1.7.5 and 1.8 (Yay!) 2017-02-17 17:39:33 +01:00
Bjørn Erik Pedersen edfb9d5565 vendor: Update Viper
Fixes #2603
2017-02-17 17:33:26 +01:00
Bjørn Erik Pedersen 53d07fb409 hugolib: Add test case for empty Pages in regular pages
Fixes #2947
2017-02-17 17:26:09 +01:00
Bjørn Erik Pedersen 04a4a193a9 hugolib: Remove deprecated marked for removal
Fixes #3029
2017-02-17 17:20:46 +01:00
Bjørn Erik Pedersen 4b3ca38b2e tplimpl: Fix data race in resGetResource
Fixes #3045
2017-02-17 17:15:26 +01:00
Bjørn Erik Pedersen 77cbe4d60b tplimpl: Refactor imageConfig into a struct
Updates #2701
2017-02-17 17:15:26 +01:00
Bjørn Erik Pedersen c507e2717d tpl: Refactor package
Now:

* The template API lives in /tpl
* The rest lives in /tpl/tplimpl

This is bound te be more improved in the future.

Updates #2701
2017-02-17 17:15:26 +01:00
Bjørn Erik Pedersen 93ca7c9e95 all: Refactor to nonglobal Viper, i18n etc.
This is a final rewrite that removes all the global state in Hugo, which also enables
the use if `t.Parallel` in tests.

Updates #2701
Fixes #3016
2017-02-17 17:15:26 +01:00
digitalcraftsman e34af6ee30 docs: Add hugofy for atom to the tools section 2017-02-16 09:44:27 +01:00
Bjørn Erik Pedersen 691156c5ba Use OS fs by default
Fixes #3032
2017-02-15 10:00:34 +01:00
Bjørn Erik Pedersen a988d3cf36 docs: Remove the source relative links docs
See #3028
2017-02-13 16:35:05 +07:00
ITSecMedia 2ded3bf30f docs: Update www.bullion-investor.com/report/ in the showcase 2017-02-12 10:03:44 +01:00
Bjørn Erik Pedersen 234273a5b5 Deprecate sourceRelativeLinks
Fixes #3028
Closes #3026
Closes #2891
Closes #2691
2017-02-11 16:51:22 +07:00
Cameron Moore 5cc8b58907 tpl: Accept limit as interface in findRE func
Fixes #3018
2017-02-10 20:02:28 +07:00
John Feminella 298ebc37c2 hugolib: Add ability to sort by frontmatter parameters 2017-02-10 20:01:25 +07:00
Bjørn Erik Pedersen 2618cfbeaa hugolib: Fix error for non-renderable HTML content with shortcodes
This commit re-introduces template lookup order that was accidently removed as
part of the template nonglobal refactoring.

Fixes #3021
2017-02-10 18:57:38 +07:00
Bjørn Erik Pedersen 25bfa7e12f hugolib: Use the site's Tmpl for non-renderable pages 2017-02-10 10:44:35 +07:00
Yizhe Xu 7a5cc3cfd7 docs: Add instructions for customized domain 2017-02-09 10:50:16 +01:00
John Feminella 962443ade8 hugolib: Correct repeated spelling errors in documentation 2017-02-09 10:48:07 +01:00
Bjørn Erik Pedersen a89fb86cdf tpl: Must do a extra lookup of cloned base templates
See #2549
Fixes #3013
2017-02-07 10:43:30 +07:00
Bjørn Erik Pedersen f404603340 Revert "hugolib: Add some baseof test variants"
This reverts commit d11f37d97c.

Will have to look more closely into this.

See #2995
2017-02-07 02:04:12 +07:00
Bjørn Erik Pedersen d11f37d97c hugolib: Add some baseof test variants
See #2995
2017-02-07 00:01:28 +07:00
Dundonian 3e5ad4aeeb docs: Update Bitbucket Hosting Tutorial 2017-02-05 21:55:18 +01:00
Pascal Aubort 9c97949513 docs: Add article to press section
Link blog post which describes how to use Cloud9 IDE to make a Hugo site and then deploy it to Google App Engine.
2017-02-05 21:53:14 +01:00
ominty 7fd88fb199 docs: Update link to blog post in community/press.md
changed link to german tutorial series as site structure has changed due to page update
2017-02-04 22:30:29 +01:00
bogem faba90ab96 helpers: Fix misspells 2017-02-04 22:28:36 +01:00
Andrew 2af2ff3c1f docs: Add tuorial "How to use Google Firebase to host a Hugo site"
Aerobatic.io migrated their Bitbucket hosting plugin and no longer provide
a free tier with a custom domain.  This tutorial covers setting up Firebase
to host a Hugo site that was previously hosted on Aerobatic.
2017-02-04 22:26:10 +01:00
digitalcraftsman dae6a4539f docs: Fix typo in templates/functions.md 2017-02-04 22:23:57 +01:00
Bjørn Erik Pedersen 19aff029b1 hugolib: Skip rendering for the page tests 2017-02-04 23:15:07 +07:00
Bjørn Erik Pedersen c71e1b106e all: Refactor to nonglobal file systems
Updates #2701
Fixes #2951
2017-02-04 11:37:25 +07:00
Bjørn Erik Pedersen 0ada405912 vendor: Revert to previous cast
The new cast caused test failures.
2017-02-03 19:23:32 +07:00
Bjørn Erik Pedersen c2f692266d vendor: Update cast 2017-02-03 18:47:10 +07:00
Devin Schulz 24512fa82b docs: Add engineering.invisionapp.com to the showcase 2017-01-29 15:58:15 +01:00
Sebastian G 7241253c22 docs: Multilingual documentation for frontmatter params
Fixes #2990
2017-01-27 19:14:48 +01:00
ZaneDev 1e79900860 docs: Add netlify to the list of static hosting solutions
Netlify is a solid solution similar to surge and aerobatic and they have a great free plan and pro plan for open source projects.
2017-01-26 19:42:56 +01:00
Alan Orth 72cffed89b docs: Add picturingjordan.com to the showcase 2017-01-24 15:45:59 +01:00
Leo Arias feeb93d4f1 Add pygmentize to the hugo snap
closes #2914
2017-01-23 21:31:52 +07:00
Alan Orth 95ad3ad2fa tpl: Improve generation of OpenGraph date tags
Allow all nodes/pages to use date-related OpenGraph meta tags, not
only sites which are using the as-of-yet unfinished .Site.Authors
functionality.

Improve compliance of tags with Facebook's OpenGraph docs for the
"website" and "article" types[0][1]. Also, use the proper tag for
modification date (og:update_time vs article:modified_time).

Generate date published using either .PublishDate or .Date, and use
.Lastmod for modification date, which can use the new enableGitInfo
functionality from Hugo 0.18, but seamlessly falls back to .Date if
the site does not have this enabled/supported.

[0] https://developers.facebook.com/docs/reference/opengraph/object-type/website/
[1] https://developers.facebook.com/docs/reference/opengraph/object-type/article/
2017-01-23 21:31:30 +07:00
Ardianta Pargo 91c569c7e5 docs: Add petanikode.com to the showcase 2017-01-22 14:10:55 +01:00
digitalcraftsman 99fd7c684f cmd: Remove empty tags/features strings in theme.toml template 2017-01-20 23:44:40 +07:00
Wouter Groeneveld d949c34af1 docs: Add Dokuwiki to hugo conversion tool
I've written a DokuWiki to hugo conversion tool in python to migrate my blog content to Hugo. I hope others will also benefit from it. Feel free to take a look and give some feedback.
2017-01-18 19:39:07 +01:00
Dmitry Kurkin 7dc9458167 make: Fix typo 2017-01-18 19:30:25 +01:00
digitalcraftsman 940c5d8bae docs: Add tumblr-to-hugo to tools section 2017-01-18 19:24:32 +01:00
Cameron Moore 3ac1b9fe33 tpl: Fix deadlock in cached partials
Cached partials that contained cached partials would create a deadlock.

Fixes #2935
2017-01-18 10:30:22 +01:00
digitalcraftsman dc61d3b6b3 docs: Update author credits in GH pages tutorial 2017-01-15 20:08:34 +01:00
Gunnar Morling 3818d6967a docs: Update tutorial on GitHub Pages deployment
Now it describes the deployment via /docs folder and git worktree.
2017-01-15 19:50:20 +01:00
Bjørn Erik Pedersen 85c7578313 tpl: Fix broken benchmarks
But that did not explain issue #2935:

```
BenchmarkPartial-4                       200000          6452 ns/op        1040 B/op          30 allocs/op
BenchmarkPartialCached-4                 500000          4104 ns/op         544 B/op          14 allocs/op
BenchmarkPartialCachedVariants-4         500000          3398 ns/op         624 B/op          17 allocs/op
```
2017-01-14 12:39:52 +01:00
Bjørn Erik Pedersen 92ba7219dc commands: Fix newly broken server flag handling 2017-01-11 18:54:27 +01:00
Cameron Moore 1d7b960614 Clean up Makefile (#2924)
Add missing deprecated targets.  Remove `test` from `check` target since
we already have `test-race`.

Fixes #2901
2017-01-11 10:07:35 +01:00
Brad Peabody db33a33e61 Show full template error 2017-01-11 09:56:03 +01:00
Bjørn Erik Pedersen d6000a208c all: Refactor to nonglobal template handling
Updates #2701
2017-01-10 01:36:59 +01:00
Bjørn Erik Pedersen 4ea4359ac1 hugolib: Avoid double-encoding of paginator URLs
Fixes #2177
2017-01-08 17:13:46 +01:00
Bjørn Erik Pedersen bc06135c96 helpers: Allow tilde in URLs
See #2177
2017-01-07 19:29:20 +01:00
Bjørn Erik Pedersen 45e3ed517a all: Refactor to non-global logger
Note that this looks like overkill for just the logger, and that is correct,
but this will make sense once we start with the template handling etc.

Updates #2701
2017-01-07 17:06:35 +01:00
Leo Arias 24a286791f Add the instructions to install the snap 2017-01-06 18:55:25 +01:00
magikstm 56c5eadc38 hugolib: Remove summary.go
Became obsolete after refactoring.

Fixes #2888.
2017-01-06 16:40:51 +01:00
Cameron Moore 3d058a936f hugolib: Allow arrays of arrays in frontmatter Params
Fixes #2752
2017-01-06 11:56:22 +01:00
Cameron Moore 3286b24fce commands: Show OS and ARCH in version output 2017-01-06 11:54:53 +01:00
Mathias Biilmann 2989c38245 tpl: Add truncate template function
This commit adds a truncate template function for safely truncating text without
breaking words. The truncate function is HTML aware, so if the input text is a
template.HTML it will be truncated without leaving broken or unclosed HTML tags.

    {{ "this is a very long text" | truncate 10 " ..." }}
    {{ "With [Markdown](/markdown) inside." | markdownify | truncate 10 }}
2017-01-06 10:42:32 +01:00
magikstm 9c19ef0f87 target: Add COM0 and LPT0 as reservedNames on Windows
Fixes #2883
2017-01-06 02:32:49 -07:00
Bjørn Erik Pedersen 9f20e648b9 hugolib: Sync page collections with Site.Info on rebuild in watch mode
There is definitive potential for cleanup in this area, but this will have to do for now.

Fixes #2869
2017-01-05 20:57:24 +01:00
Bjørn Erik Pedersen c60c41e051 commans: Remove unneeded build constraint
Fixes #2886
2017-01-05 15:45:25 +01:00
magikstm 01ee525f47 hugolib: Correct usage of "shortcode" in error messages 2017-01-05 15:40:28 +01:00
Bjørn Erik Pedersen 1b46d2cfee commands, vendor: Remove log level setting in Jekyll command
And update the JWW lib.
2017-01-05 11:58:11 +01:00
Bjørn Erik Pedersen fff6617c69 vendor: Update jww logger 2017-01-05 11:25:27 +01:00
Bjørn Erik Pedersen 0dad69325d docs: Vanity-update of site meta description 2017-01-05 01:40:00 +01:00
Bjørn Erik Pedersen 001dd01ee2 helpers: Remove unusded WordCount 2017-01-05 00:00:00 +01:00
Ryan Watters e856f24129 docs: Update references to _index.md 2017-01-04 17:20:01 +01:00
Anthony Fok 49a840be83 docs: Add new article about Netlify's PR site preview
Written by @keybits and mentioned by @bep on Gitter
2017-01-04 01:17:36 -07:00
Anthony Fok e3e5600b81 helpers: Fix minor typo in error message for Seq() 2017-01-04 00:57:28 -07:00
Anthony Fok 19b6fdf2b1 tpl: Fix Unix time test case in TestDateFormat()
Fixes #2855
2017-01-03 23:43:17 +01:00
Bjørn Erik Pedersen b8057b4989 vendor: Fix broken build 2017-01-03 17:51:25 +01:00
Daniel Lang 2127203ae3 Update documentation and test for sitemap template 2017-01-03 17:11:22 +01:00
Cameron Moore cb63e87f8d hugolib: Clean up a benchmark 2017-01-03 17:08:59 +01:00
Bjørn Erik Pedersen c344b1901f commands, helpers, vendor: Update to the latest jww logger
Updates #2701
2017-01-03 16:57:43 +01:00
bogem 2ac9817eae helpers: Add doc to Language.SetParam 2017-01-02 17:01:58 +01:00
bogem 4352156a27 commands, helpers: Fix docs 2017-01-02 17:01:58 +01:00
bogem 52976da0ec commands: Fix case in default config variable 2017-01-02 17:01:12 +01:00
bogem 6fb4f048e1 commands: Fix case in names of some methods 2017-01-02 17:01:12 +01:00
digitalcraftsman be39ae5e11 docs: Fix typo in overview/source-directory.md 2017-01-02 15:58:48 +01:00
Timo Litzius 2ece1b325b docs: Add heimatverein-niederjosbach.de to the showcase 2017-01-02 15:51:05 +01:00
Timo Litzius 433c03616b docs: Add dbzman-online.eu to the showcase 2017-01-02 15:44:31 +01:00
Bret Mogilefsky 0d330b0d5d docs: Fix typo in v0.18 release notes 2017-01-02 14:11:04 +01:00
Cameron Moore 6a51216c6a docs: Don't use binary version in docs site
Adds a "release" Site param that will be need to be updated for each
release.

Fixes #2857
2017-01-02 14:08:36 +01:00
Bjørn Erik Pedersen 5834efd5fd hugolib: Add a taxonomy test case 2017-01-02 12:28:26 +01:00
Cameron Moore f79877cbb7 Remove waffle.io graph from README
Waffle.io's throughput graph appears to be broken.  Remove the graph and
simply link to GitHub's Pulse page.

Fixes #2865
2017-01-02 11:42:58 +01:00
Bjørn Erik Pedersen a60ec06383 docs: Replace .Now with now 2017-01-01 23:54:19 +01:00
David Kassa 09a0af94f5 Fix Appveyor Windows build and GitInfo path issue on Windows 2017-01-01 23:16:58 +01:00
Bjørn Erik Pedersen 6e0f326b9d hugolib: Deprecate Page.Now
Use `now` (template func).

See cabc6b3186
2017-01-01 13:10:36 +01:00
Bjørn Erik Pedersen 695be00c07 hugolib: Bump the current warning deprecations
Fixes #2836
2017-01-01 12:36:21 +01:00
Nishanth Shanmugham cabc6b3186 tpl: Add now function
Add a now template function that returns the current time as time.Time.
Also, update related docs.
2017-01-01 02:50:46 +01:00
digitalcraftsman 707d3cf137 docs, tpl: Fix documentation of UniqueID
See #2861
2016-12-31 17:55:03 +01:00
Bjørn Erik Pedersen 7d072fbbe6 source: Make UniqueID ... unique
Fixes #2861
2016-12-31 17:46:11 +01:00
digitalcraftsman 02d6f5320f tpl: Use HTTPS in Google Analytics template
Fixes #2858
2016-12-31 12:43:33 +01:00
Gertjan van den Burg 73c1e271f7 docs: Add HugoPhotoSwipe to the tools section
HugoPhotoSwipe is a command line tool to create and manage PhotoSwipe galleries with Hugo. It resizes images for responsive layouts in PhotoSwipe and generates the Markdown necessary for Hugo to create the gallery. I think this can be a useful tool for Hugo users.
2016-12-31 12:39:58 +01:00
Bjørn Erik Pedersen 6374d82b82 travis: Add GOARCH 386 test
Closes #2847
2016-12-29 16:44:39 +01:00
Bjørn Erik Pedersen e9e4fd90e4 docs: Add release notes for Hugo 0.18.1 2016-12-29 16:43:10 +01:00
Anthony Fok a18b9e72c4 vendor: Update Cobra
Fixes #2695
2016-12-29 05:19:37 -07:00
Gilbert Gilb's 95a473e7ec Fix Dockerfile 2016-12-28 19:16:12 +01:00
Asif Mehedi 211d20a3c7 docs: Update GitLab depleyment in /themes/installing.md
Deployment to Gitlab fails if the theme folder is a git submodule.
2016-12-28 14:01:09 +01:00
Jean-Yves Gastaud 164d0fb6a7 docs: Hide next arrow in theme 2016-12-28 13:54:30 +01:00
Jean-Yves Gastaud 8a63e092fa docs: Remove right padding in theme 2016-12-28 13:54:30 +01:00
Jean-Yves Gastaud 83b4c40566 docs: Fix h1 size on small breakpoint in theme 2016-12-28 13:54:30 +01:00
Jean-Yves Gastaud c22b7ff8d9 docs: Remove unuseful breakpoint in theme 2016-12-28 13:54:29 +01:00
Jean-Yves Gastaud 8489608012 docs: Fix menu arrows position on mobile devices 2016-12-28 13:54:29 +01:00
Bjørn Erik Pedersen bcb3ef7413 hugolib: Fix preserveTaxonomyNames regressions
Fixes #2809
2016-12-28 13:44:55 +01:00
digitalcraftsman 862f09babe docs: Add hugofy for VS Code to the tools section 2016-12-28 13:41:54 +01:00
Cameron Moore 6affd31b3e livereload: Simplify RefreshPath 2016-12-28 11:09:50 +01:00
Bjørn Erik Pedersen 88b5bbd532 hugolib: Fix IsTranslated for "old" node types
The new logic for creating Page objects from old node types
didn't include itself in the translation logic, so
`IsTranslated` returned falsely false for sites with only two languages.

The `AllTranslations` method also returned too few pages in that case.

This commit fixes that.

Fixes #2812
2016-12-27 12:01:54 +01:00
Cameron Moore d1b89f5c7c hugolib: Use reflect.DeepEqual in tests 2016-12-27 11:19:25 +01:00
Cameron Moore 17f851780c hugolib: Fix redundant URL file extension on taxonomy terms pages
Fixes #2819
2016-12-27 11:18:47 +01:00
Bjørn Erik Pedersen e78dd3cd48 docs: Enable ToC for extras/shortcodes 2016-12-26 19:31:34 +01:00
Bjørn Erik Pedersen 7d991ed89c hugolib: Make template error messages more verbose
Fixes #2820
2016-12-26 14:52:31 +01:00
Bjørn Erik Pedersen 3e4fbbaae4 helpers: Add patch version
Fixes #2832
2016-12-26 14:03:50 +01:00
Bjørn Erik Pedersen 99e5fc63c2 vendor: Update Afero
Fixes #2833
2016-12-26 10:53:52 +01:00
Bjørn Erik Pedersen 63d3c4ce25 vendor: Temp roll back to an older Afero
See #2833
2016-12-25 15:20:29 +01:00
Bjørn Erik Pedersen bc060ee1c9 tpl: Update dateFormat test expectations for epoch values
As `Cast` now supports `int` inputs.
2016-12-25 14:53:34 +01:00
Bjørn Erik Pedersen b0e86dcde0 vendor: Update dependencies 2016-12-25 14:53:24 +01:00
Tristan Rice d055862a41 tpl: Fix crash when using imageConfig
defaultImageConfigCache is now initialized statically instead of relying on it
being initialized in the reset function.

Fixes #2806
2016-12-25 13:43:50 +01:00
Cameron Moore 8b0c3b9b27 helpers: Remove "no theme set" warning
Fixes #2821
2016-12-23 19:48:50 +01:00
Cameron Moore 34c87421b8 tpl: Update getenv to accept interface{} params
Updates #2822
2016-12-23 09:51:03 +01:00
Cameron Moore 29caaddce6 tpl: Update title to accept interface{} params
Updates #2822
2016-12-23 09:51:03 +01:00
Cameron Moore 661d64c46a tpl: Update upper to accept interface{} params
Updates #2822
2016-12-23 09:51:03 +01:00
Cameron Moore 4e5b4ac504 tpl: Update lower to accept interface{} params
Updates #2822
2016-12-23 09:51:03 +01:00
Cameron Moore 6b8422bb35 tpl: Update hasPrefix to accept interface{} params
Updates #2822
2016-12-23 09:51:03 +01:00
Cameron Moore f25f837339 Update Travis go versions 2016-12-23 09:49:15 +01:00
Asif Mehedi 441476b6c5 docs: Convert code in multilingual.md to TOML
There was a mix of TOML and YAML in the first example config.
2016-12-22 17:19:10 +01:00
patrick ec34ed0520 docs: Add neavey.net to the showcase. 2016-12-22 17:16:01 +01:00
Emily Huynh a4fc20a12b docs: Fix typo in templates/blocks
Fixed typo in templates/blocks.md in the docs.
2016-12-22 17:05:48 +01:00
Akilan Elango e7ff094d63 docs: Add details about binary names for setup on Windows
The tutorial for installing on windows didn't mention the exact name of the
hugo executable in windows which is generally hugo_<hugo-version>_windows_<arch>.exe.
The tutorial mentioned the windows executable's name as hugo.exe, which
can be confusing sometimes. So extra information has been added to
rename the executable to hugo.exe which would be easy to use.

Fixes #2656
2016-12-22 17:03:33 +01:00
avi b2687ab1f7 command: Add themesDir command argument to specify themes directory 2016-12-22 09:33:08 +01:00
Christian Mendoza 4845a13c9e docs: Update christianmendoza.me in the showcase 2016-12-21 18:52:08 +01:00
Bjørn Erik Pedersen 1881f60a16 hugolib: Add a test assertion for IsTranslated
See #2812
2016-12-21 10:17:05 +01:00
Bjørn Erik Pedersen 1eb079543f docs: Regenerate commands doc 2016-12-20 09:39:25 +01:00
Bjørn Erik Pedersen 1e313ced3f Bump to 0.19-DEV 2016-12-19 23:14:10 +01:00
Bjørn Erik Pedersen 8b410347a6 Add GoBuilds to .gitignore 2016-12-19 17:12:11 +01:00
Bjørn Erik Pedersen 09cc7915ed docs: Add new alias feature to release docs 2016-12-19 15:38:10 +01:00
Bjørn Erik Pedersen 3d6fdb8ed3 Bump to 0.18 release version 2016-12-19 15:35:20 +01:00
Bjørn Erik Pedersen 4de808ae7c docs: Add 0.18 release notes 2016-12-19 14:42:01 +01:00
Bjørn Erik Pedersen 018813caf6 vendor: Update go-toml
Fixes #2800
2016-12-16 21:04:45 +01:00
Ashutosh Gangwar 71aa797b27 docs: Fix broken link to Content Types 2016-12-16 11:10:14 +01:00
Brian Shumate 6fd4bfcae3 docs: Update layouts path name 2016-12-16 01:09:51 +01:00
Bjørn Erik Pedersen 79b2725ac4 docs: Improve documentation for block templates
Hopefully.

Fixes #2363
2016-12-15 22:02:21 +01:00
Bjørn Erik Pedersen a3a67163f9 hugolib: Enable override of theme base template only
This commit fixes the base template lookup order to match the behaviour of regular templates.

```
1. <current-path>/<template-name>-baseof.<suffix>, e.g. list-baseof.<suffix>.
2. <current-path>/baseof.<suffix>
3. _default/<template-name>-baseof.<suffix>, e.g. list-baseof.<suffix>.
4. _default/baseof.<suffix>

For each of the steps above, it will first look in the project, then, if theme is set,
in the theme's layouts folder.
```

Fixes #2783
2016-12-15 21:35:38 +01:00
Cameron Moore 596bbea815 docs: Clarify single page template search path
Fixes #2791
2016-12-15 19:34:25 +01:00
Cameron Moore 26084ad198 docs: Fix pipe examples
Fixes #2787
2016-12-15 19:33:40 +01:00
Cameron Moore fa09e20d9a docs: Fix Ref and RelRef syntax
Fixes #2793
2016-12-15 19:32:41 +01:00
Cameron Moore 2f0e81989a docs: Document partialCached func
Fixes #2779
2016-12-15 19:31:43 +01:00
Cameron Moore 9c2ea3691a docs: Add .Site.RegularPages docs
Fixes #2775
2016-12-15 11:15:42 +01:00
Cameron Moore d332aa1606 docs: Update GitInfo usage docs 2016-12-15 11:15:15 +01:00
Cameron Moore f8190777f2 docs: Cleanup Extras menu ordering 2016-12-15 11:15:15 +01:00
Cameron Moore aecabfcd4f docs: Add Extras > GitInfo
Fixes #2670
2016-12-15 11:15:15 +01:00
Bjørn Erik Pedersen ef03c6f954 create: Allow empty dates in archetype in new
To make it behave the same as Hugo 0.17.
2016-12-15 09:27:30 +01:00
madhead e4ebe0d5bf docs: Fix querify example 2016-12-14 11:01:11 +01:00
Bjørn Erik Pedersen 7862de91de tpl: Add a querify test case that is actually and URL
See #2780
2016-12-13 00:16:09 +01:00
Bjørn Erik Pedersen 83c6806576 Fix menu URL for node type pages
By delaying the menu assembly.

Fixes #2770
2016-12-11 16:16:24 +01:00
Eugene Brodsky c7f67dd63c docs: Clarify usage of archetypes provided by themes 2016-12-10 10:50:48 +01:00
Cameron Moore b4404a9554 docs: Update File variables 2016-12-10 10:47:23 +01:00
Cipto Hadi b4cbccaaf4 docs: Fix prev/next links in content section 2016-12-09 16:28:34 +01:00
Bjørn Erik Pedersen e3d48760c9 hugolib: Fix comment 2016-12-06 09:57:05 +01:00
Bjørn Erik Pedersen d4b9fa96f9 hugolib: Respect disableRSS
Fixes #2764
2016-12-06 09:32:14 +01:00
Bjørn Erik Pedersen 5b1eee44c6 tpl: Avoid repeating the same test case in TestMD5 and TesSHA* 2016-12-05 00:27:49 +01:00
digitalcraftsman 2236056672 docs: Fix linebreaks in templates/variables.md 2016-12-04 18:21:52 +01:00
digitalcraftsman 0f6c73cf2e tpl: Add sha256 template function
Fixes #2742
2016-12-04 15:03:52 +01:00
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
Bjørn Erik Pedersen 382582fcda node to page: Re-add translations sort of regular pages
Was removed by mistake.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 6c0ecc2d28 docs: Add release notes about node to page
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen e29f6fe527 docs: Add sections on node now being a page
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 0eb5f54d30 node to page: Fix site pages sort
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 976f8f84bf node to page: Fixe index page translation issues
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen aafbd3b4bf docs: Revise docs to reflect that Node is gone
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen ae1de7abb1 docs: Make the tools content page a section page
Because it is the right solution and it the avoids naming conflict with section vs page.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 7e81971b46 node to page: Don't repeat the RSS title if it is the same
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen f776af6c9b node to page: Temporary set RSS date to zero
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 0bbdcf24fe node to page: Render aliases before pages
Some sites, Hugo docs included, have faulty alias definitions that point
to itself or another real page. These will be overwritten in the next step.

This is how it behaves in Hugo 0.17, too.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 32fb1e6fac node to page: Need to append theme templates
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 28031b0897 node to page: Only return regular pages in home.Data.Pages
Returning all types is both confusing and too breaking.

All page types can be fetched in .Site.Pages.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen a843d5d3bb node to page: Final TODO-fixes
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 99d11386a7 node to page: Fix the Page copy()
By embeding the init sync.Once var in a pointer so we can reset it when we copy the page.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 62e9e7e6ba node to page: Misc. TODO-fixes
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 524eb16686 node to page: Handle URLs
This includes removing the error return value from Permalink and RelPermalink.

We ignore that error all over the place, so we might as well remove it.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen c8d3124dde node to page: Remove Node
And misc. TODO-fixes

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 9347084d61 node to page: Make Kind a string
Having a custom string type isn't worth it when it doesn't work
with `where`, `eq` etc.

Fixes #2689
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 9fba2a30a9 node to page: Rename PageType to Kind
And embed that on Page.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 96f71141bd node to page: Export GetPage to the templates
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 487b210fb8 node to page: Handle Date and Lastmod
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen c80308e6b3 node to page: Add Pages to Page
As an alias to .Data.Pages for home page etc.

Also renamte NodeType to PageType and make it a string so it can be used in `where`.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 063b78d2ec node to page: Make Nodes into Pages
* `.Site.Pages` now contains all page types, including sections etc.
* `.Data.Pages` will also contain "node type" pages where relevant.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 88972b0d5b node to page: Refactor the build process
To make it easier to follow and understand.

Both building and rebuilding now follow a four step flow:

1. Init
2. Process
3. Assemble
4. Render

And now there are only one Build method, used for both builds and rebuilds.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 640b8bed21 node to page: Handle sections with only _index.md
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 2d91b17c04 node to page: Handle aliases on home page etc.
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 7cb0e34dce node to page: Handle menus on home page etc.
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen ecedc85cb7 node to page: Handle taxonomies on home page etc.
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen d3d3863c05 node to page: Add all nodes to sitemap
Updates #2297
Fixes #1303
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 7cc637e97a node to page: Do not create section node for root
Because that will overwrite the home page, which is bad.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 503fb29953 node to page: Get Rebuild up to speed
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 80e453f114 node to page: Fix home target path on Windows
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 94ea12ebcf node to page: Remove unused code
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen bde1bfd34a node to page: Handle aliases, 404, robots.txt, sitemap
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen ec2d502b4f node to page: Handle translations
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 698b994f71 node to page: Fix the page collections
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen c175407fa4 node to page: Use _index as identificator for the list nodes
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 3ff25b37a3 node to page: Handle RSS
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 75c38071d8 node to page: Create pages for nodes without content
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen f8bda16e15 node to page: Handle taxonomy terms
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 3737c9bcb3 node to page: Handle taxonomy lists
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen c2f3cb2d7a node to page: Handle sections
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen 734b6508a1 node to page: Handle home
With refactored paginator handling.

Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen e371ac0b6f node to page: Basic outline
Updates #2297
2016-11-22 09:57:03 +01:00
Bjørn Erik Pedersen e7d0bc8a74 Revert "Fix case issues with Params"
This reverts commit 239c75c7f8.

There is a ininite loop in there somewhere on my site that needs to be resolved.
2016-11-22 09:42:11 +01:00
Bjørn Erik Pedersen 239c75c7f8 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 09:04:38 +01:00
Bjørn Erik Pedersen 1eb3c4a8e7 docs: Fix list template link 2016-11-22 00:37:10 +01:00
Bjørn Erik Pedersen 3031793431 docs: Add a simple list template
Fixes #2710
2016-11-20 15:37:18 +01:00
Bjørn Erik Pedersen 3b42640e3f hugolib: Don't write zero-bytes files to disk
Fixes #2709
2016-11-20 14:59:21 +01:00
Bjørn Erik Pedersen 65f803e1fa docs: Rename RSSlink to RSSLink
The former will be deprecated.
2016-11-19 12:00:25 +01:00
Albert Nigmatzianov 29fda0e683 commands: Make benchmark command more useful
* Add information about average time, memory consumption and
allocations.
* Fix situation, when user provides memprofile and cpuprofile, but
cpuprofile will not created.

Fixes #2432
2016-11-19 00:06:54 +01:00
balaramadurai 7b8a09d5f9 docs: Add balaramadurai.net to the showcase 2016-11-18 17:41:18 +01:00
Bjørn Erik Pedersen ce5f41ffb6 vendor: Update deps 2016-11-16 13:28:21 +01:00
Tristan Rice a49f838cd0 tpl: Add imageConfig function
Add imageConfig function which calls image.DecodeConfig and returns the height, width and color mode of the image. (#2677)

This allows for more advanced image shortcodes and templates such as those required by AMP.

layouts/shortcodes/amp-img.html
```
{{ $src := .Get "src" }}
{{ $config := imageConfig (printf "/static/%s" $src) }}

<amp-img src="{{$src}}"
           height="{{$config.Height}}"
           width="{{$config.Width}}"
           layout="responsive">
</amp-img>
```
2016-11-16 13:00:45 +01:00
Albert Nigmatzianov 950034db5c source, tpl: Fix staticcheck complaints
tpl/template_funcs.go:1019:3: the surrounding loop is unconditionally terminated
source/lazy_file_reader.go:66:5: err != nil is always true for all possible
values ([nil:error] != [nil:error])
2016-11-15 21:22:43 +01:00
Rafael Monteiro bb36d57be5 docs: Fix typos in extras/scratch.md 2016-11-13 13:45:31 +01:00
Bjørn Erik Pedersen 4d4c7791ac hugolib: Must update PathSpec on SiteInfo per language 2016-11-07 21:17:51 +01:00
Albert Nigmatzianov 85a2d81e3c commands, tpl: Get rid of repeating viper accesses
* all: Delete some blank lines
* commands, tpl: Get rid of repeating viper accesses
2016-11-07 00:10:32 +01:00
Bjørn Erik Pedersen 4b4ab47553 hugolib: Fix page sorting when weight is zero
Fixes #2673
2016-11-06 15:39:33 +01:00
Ahmed Zetao Yang 52e2fd27f8 docs: Add article by Zetao Yang 2016-11-06 14:33:24 +01:00
JoeArizona b619eb5ad1 docs: Compress Hugo logo (hugo.png) 2016-11-06 14:26:44 +01:00
Bjørn Erik Pedersen 07eb3a50c7 tpl: Golint fixes 2016-11-05 17:28:14 +01:00
Bjørn Erik Pedersen d4830fc4fd helpers: Golint fixes 2016-11-05 17:28:14 +01:00
Bjørn Erik Pedersen 72156e403c hugolib: Simplify range 2016-11-05 17:28:13 +01:00
digitalcraftsman 8dace9ad6d docs: Update roadmap
Closes #2666
2016-11-04 20:18:13 +01:00
digitalcraftsman f4afd13386 Enhance commit message guidelines 2016-11-04 19:37:41 +01:00
digitalcraftsman ec44ad5c0b docs: Link latest change as commit in the footer 2016-11-04 19:12:17 +01:00
Adrien Poupin 774f13bd5d doc: Add a "Deployment with rsync" tutorial page
This is kind of a generic process and not so difficult. It seems important to me that it should be documented.
2016-11-04 17:00:24 +01:00
Bjørn Erik Pedersen 0cd0adda20 transform: Return any read or write error from Apply 2016-11-04 00:44:49 +01:00
Albert Nigmatzianov 3a86aba517 commands: Move initialization of flags in separate function
And clean up flag variables.
2016-11-03 11:33:53 +01:00
Bjørn Erik Pedersen c9be931ebe docs: Remove non-showcase Hugo sites
I.e. sites with no mention of Hugo or hugo etc. in the HTML source.

Fixes #2655
2016-11-02 19:12:58 +01:00
Bjørn Erik Pedersen e8380e612f Add GitInfo
This commit adds a `GitInfo` object to `Page` if `EnableGitInfo` is set.

It then also sets `Lastmod` for the given `Page` to the author date provided by Git.

The Git integrations should be fairly performant, but it adds "some time" to the build, somewhat depending on the Git history size.

If you want, you can run without during development and turn it on when deploying to the live server: `hugo --enableGitInfo`.

Fixes #2102
2016-11-01 23:04:12 +01:00
Prashant Karmakar 186db7cd7a Fix page names that contain dot
changes:
    - in hugolib/page.go, `func permalink` and `func TargetPath`
      Fixed the attempt to *replace* the extension of something
      that was *already* a basename.
    - in source/file.go, `func NewFile`
      added check for allowed languages before translating filename

Fixes #2555
2016-11-01 14:18:24 +01:00
Bjørn Erik Pedersen cda3b36fe2 Revert "docs: Add www.bullion-investor.com to the showcase gallery"
No hugo generator tag, probably not a Hugo a site, certainly not a showcase.

This reverts commit b5bc74ca46.
2016-10-31 22:32:53 +01:00
ITSecMedia b5bc74ca46 docs: Add www.bullion-investor.com to the showcase gallery 2016-10-29 14:21:25 +02:00
digitalcraftsman 01cfcce6c0 docs: Add two articles written by Hash Borgir 2016-10-29 14:02:14 +02:00
Bjørn Erik Pedersen 6a3d1037b3 Fix RSS Title regression
And add tests to make sure it doesn't happen again.

Fixes #2645
2016-10-28 14:46:33 +02:00
Bjørn Erik Pedersen 342b6fe8a5 Make it clear that Path is relative to content root
Fixes #2290
2016-10-28 10:35:19 +02:00
Bjørn Erik Pedersen 4ad39445ef Refactor Page tests
* To handle config in one place
* To use the real builder chain
2016-10-28 10:02:46 +02:00
Bjørn Erik Pedersen f5b2645566 Remove Wercker config
Hopefully fixes
2016-10-27 21:43:43 +02:00
Bjørn Erik Pedersen 301e4c7e78 Make Amber read from the Afero source file system 2016-10-26 20:50:12 +02:00
Bjørn Erik Pedersen 0406be3d54 Add missing template error logging 2016-10-25 22:56:44 +02:00
Joonatan Saarhelo 89e3125664 Get rid of the rawContentCopy field of the Page struct
It is not needed, because it is only used to store temporary data during `preparePagesForRender`.
2016-10-25 20:40:32 +02:00
Sam Klein c936b6c89a docs: Fix punctuation in content.md
- removed comma on line 16 to avoid confusion between clauses
- added period to line 24 for consistency
- clarified "read on" on line 30 to follow style above it while
  also verbally writing what the author seems to intend
- removed "You probably know what to do." on line 30 due to wordiness
  that could lead to confusion and a drag in reading speed
2016-10-24 23:56:39 +02:00
teodorraul c859810b37 docs: Add clearhaus.com to the showcase 2016-10-24 23:52:21 +02:00
Sam Klein a2cc2e75a6 docs: Fix typos in content section
- changed preposition into intended infinitive for syntactical clarity
- removed "easily" as it doesn't describe anything technical and is
  confusing (which is why the author may have used a preposition)
2016-10-24 23:43:28 +02:00
Bjørn Erik Pedersen 333bb05512 Remove now superfluous lowercasing
See #2615
See #1129
2016-10-24 21:33:11 +02:00
Bjørn Erik Pedersen 5859c691ec vendor: Update Viper 2016-10-24 21:21:37 +02:00
Albert Nigmatzianov f21e2f25c9 all: Unify case of config variable names
All config variables starts with low-case and uses camelCase.

If there is abbreviation at the beginning of the name, the whole
abbreviation will be written in low-case.
If there is abbreviation at the end of the name, the
whole abbreviation will be written in upper-case.
For example, rssURI.
2016-10-24 20:56:00 +02:00
Luca Corbatto d9f54a13c1 Handle ToC before handling shortcodes
Fixes #2433
2016-10-24 14:40:57 +02:00
Bjørn Erik Pedersen 165edc7f0a tpl: Fix comment 2016-10-24 14:32:31 +02:00
Bjørn Erik Pedersen a10b2cd372 Avoid reading from Viper for path and URL funcs
The gain, given the "real sites benchmark" below, is obvious:

```
benchmark           old ns/op       new ns/op       delta
BenchmarkHugo-4     14497594101     13084156335     -9.75%

benchmark           old allocs     new allocs     delta
BenchmarkHugo-4     57404335       48282002       -15.89%

benchmark           old bytes       new bytes      delta
BenchmarkHugo-4     9933505624      9721984424     -2.13%
```

Fixes #2495
2016-10-24 13:45:30 +02:00
digitalcraftsman dffd7da07c docs: Clarify installation of themes 2016-10-22 17:08:35 +02:00
Nicholas Thomson 6427fba90b docs: Improve instructions in quickstart.md 2016-10-21 19:20:34 +02:00
Dmitrii Dimandt db86f48082 docs: Add dmitriid.com to the showcase 2016-10-19 22:38:19 +02:00
Bjørn Erik Pedersen 1992b356b0 Bump Travis to Go 1.7.3 2016-10-19 21:53:56 +02:00
Bjørn Erik Pedersen d0d24b4337 commands: Do not print error on missing unknown dirs
See #2602
2016-10-19 20:08:57 +02:00
Bjørn Erik Pedersen f0af80753c commands: Only watch relevant themes dir
The same behavior as for the root project.

Fixes #2602
2016-10-19 20:00:51 +02:00
choeppler ddf2a3407a Add page context to error logging in rendering
Add logging of the errors/warnings which rst2html outputs to its stderr
stream when rendering rst documents. Note that rst2html outputs warnings
and errors to stderr but it also adds them to the generated html. ->
hugo logs everything in stderr as error.

Add / complete adding page context (path to file being rendered) to
anything logged by getRstContent and getAsciidocContent.

See #2570
2016-10-19 15:22:40 +02:00
Bjørn Erik Pedersen 67df33d83f Fix a more summary corner case
Also refactor the rendering pages test to accept more than one page source per test run, which wasn't really needed for this issue, but may be in the future.

Closes #2586
Fixes #2538
2016-10-18 08:43:44 +02:00
Bjørn Erik Pedersen 58f31d2769 Consolidate the Param methods
Maps in Viper, Hugo's config backing store, is now properly lower-cased not just on top level, the current situation.

While this is mostly a good thing, as you don't need to know the original casing to look up a value, it will be breaking for people doing direct lookups in the ´Site.Params` map.

We will try to find a solution to this "breakage", but the recommended method to get params values is via the `.Param` methods.

This method is now implemented on `Node`, `Page` and `Site` and is case-insensitive:

* Use `.Param "someKey" ` if you want page param with fall back to site param if not found on page.
* Use `.Site.Param "someKey"` to get a site param

See #2590
2016-10-17 19:36:58 +02:00
Bjørn Erik Pedersen faa64abdc2 docs: Add singular/plural i18n example 2016-10-17 17:01:38 +02:00
Christian Mendoza e6f2426ef0 docs: Add christianmendoza.me to the showcase 2016-10-17 16:58:06 +02:00
Chen Fangzhou 3a5b702712 docs: Add fixatom.com to the showcase 2016-10-17 16:00:08 +02:00
digitalcraftsman 6a7f989d7b docs: Add hugojoomla to the tools section 2016-10-17 15:50:49 +02:00
János Illés 7f4d90250f docs: Remove merge artifact 2016-10-17 15:44:05 +02:00
Bjørn Erik Pedersen df943595a7 helpers: Slight improvement of ToLowerMap
See #2581
2016-10-16 22:49:56 +02:00
Bjørn Erik Pedersen 40b1b8f703 Fix case issue Viper vs Blackfriday config
There are still work to be done in the case department, but that will have to be another day.

Fixes #2581
See https://github.com/spf13/viper/issues/261
2016-10-16 19:28:21 +02:00
digitalcraftsman 4d6cd3cb2a docs: Update link for Ace template site 2016-10-16 14:39:48 +02:00
iktakahiro 2ea22a422c docs: Add docs.eurie.io to the showcase 2016-10-16 14:37:15 +02:00
digitalcraftsman 0456f950a3 docs: Add GitLab to Forestry.io integrations 2016-10-16 14:26:48 +02:00
Bjørn Erik Pedersen 35dda2d938 Fix pygments check in test 2016-10-15 16:47:43 +02:00
Bjørn Erik Pedersen 9ee2538e0b vendor: Add external 2016-10-15 16:37:48 +02:00
Bjørn Erik Pedersen 2e0e77bed1 Make the pygments shortcode test matching less specific
So it does not fail on "other" pygments versions.
2016-10-15 15:29:17 +02:00
Nate Finch 10a773cde7 Implement support for alias templates
This change adds a canonical alias.html template that is used for page
redirects, and passes the page as data to the template under .Page

Fixes #2533
Closes #2576
2016-10-15 15:25:05 +02:00
vsopvsop 886754738b Updated link for Ace template site 2016-10-15 16:48:26 +05:30
Cameron Moore 8b43d39ef3 Use govendor sync instead of get 2016-10-14 23:41:02 +02:00
Bjørn Erik Pedersen 3ce904669a Rewrite TestRSSOutput to use Afero
When we have a virtual filesystem, we might as well test as close to the iron as possible.
2016-10-14 16:41:55 +02:00
Bjørn Erik Pedersen 588256776e Add workaround for block template crash
Fixes #2549
2016-10-14 11:01:49 +02:00
Bjørn Erik Pedersen 794589fbfd Use example.org for replace-this-with-your-hugo-site.com
Fixes #2575
2016-10-14 09:51:39 +02:00
Scott Gallant 4e0c71a6eb Added GitLab to Forestry.io integrations 2016-10-13 10:24:51 -04:00
Albert 8fa871a05f all: Remove dead code 2016-10-13 13:51:16 +02:00
C. Hoeppler 766c82a6bb Add context to asciidoc/-tor error logging
Add DocumentName (path to the file being rendered) to RenderingContext
and use that information to include the path in the error print.

See #2399
Closes #2567
2016-10-13 13:48:43 +02:00
C. Hoeppler 9f9b93af2c Add logging of asciidoc/-tor errors
Add logging of the errors which asciidoc and asciidoctor output to their
stderr stream when converting asciidoc documents. Note that
asciidoctor's exit code may be SUCCESS even if there are ERROR messages
in its stderr output (tested with Asciidoctor 0.1.4 and 1.5.5).
Therefore log the stderr output whenever it is non-empty.

See #2399
2016-10-13 13:48:30 +02:00
Bjørn Erik Pedersen 998034faad Log on error in translation file
Fixes #2562
2016-10-12 16:54:29 +02:00
Bjørn Erik Pedersen eb00c621e0 tpl: Remove the spamming template errors
Fixes #2343
2016-10-12 10:12:15 +02:00
Cameron Moore 8ddd95e361 tpl: Factor out double Lookup in executeTemplate 2016-10-12 08:26:39 +02:00
Cameron Moore 474eb454df tpl: Add partialCached template function
Supports an optional variant string parameter so that a given partial
will be cached based upon the name+variant.

Fixes #1368
Closes #2552
2016-10-11 23:56:06 +02:00
Bjørn Erik Pedersen d2bc64bee3 Add draft test
See #2549
2016-10-11 18:12:28 +02:00
digitalcraftsman 5355ddf621 docs: Remove deleted article "Hugo on Netlify — Insanely Fast Deploys" 2016-10-10 21:00:41 +02:00
voom bfe9b8708a docs: Add "Hugo on Netlify" article to press.md 2016-10-10 20:55:21 +02:00
George Ornbo 8a63ebcb3d docs: Add shapeshed.com to the showcase 2016-10-10 20:42:29 +02:00
TheCodeKing 9d0b1320e0 docs: Add thecodeking.co.uk to the showcase 2016-10-10 20:38:55 +02:00
Michael Bleigh 71422a7dee docs: Add Firebase Hosting to usage.md 2016-10-10 20:26:46 +02:00
Michael Bleigh df7b8b5c38 docs: Add Firebase Hosting to hosting providers 2016-10-10 20:26:02 +02:00
Adnan Hajdarević b3bcd78f4f docs: Add webhook to tools for deployments 2016-10-10 20:20:41 +02:00
Robert Schilling 8d50925820 docs: Mention GitLab hosting support 2016-10-10 20:14:23 +02:00
Bjørn Erik Pedersen 8b8a1e0a4c Fix broken build 2016-10-10 15:17:13 +02:00
Cameron Moore 0206be0275 hugolib: Prevent TestShortcodeTweet from accessing network
Overload `getJSON` and return mock response.  Also standardized error
reporting strings in tests.

Fixes #2359
2016-10-10 15:10:14 +02:00
Bjørn Erik Pedersen 7b0f92db0b vendor: Update Viper
See #2536
2016-10-10 13:41:14 +02:00
Anthony Fok 1f0877947e snap: Add "network-bind" plug for "hugo server" to work
See #2532
2016-10-09 10:10:50 -06:00
digitalcraftsman a7e2a04d5b docs: Add Forestry.io to the tools section 2016-10-09 14:20:14 +02:00
Bjørn Erik Pedersen c2bf748ec5 docs: Refactor /docs to use the block keyword
Fixes #2226
2016-10-09 11:20:46 +02:00
Dimitri Merejkowsky 56512e816f Allow to set cache dir in config file 2016-10-09 11:00:36 +02:00
Chase Adams 3616fb629b command: Fix hugo new for multiple architectures
Changes `%q` to `%s`. `%q` was safely escaping the `\` in windows so that it was printing `\\`. Uses `filepath.Join` for example filepath so that the output is OS specific and since this required splitting up the multiline string, it's refactored into a separate function..

Fixes #2401
2016-10-09 10:59:07 +02:00
Bjørn Erik Pedersen cf5d2e2753 vendor: Revert latest Viper
See #2536
2016-10-08 19:05:41 +02:00
Bjørn Erik Pedersen 1c214fcb7c Add quiet mode
Needed to run benchmarks without the stats getting in the way of the benchmark stats.

Fixes #1218
2016-10-08 18:26:16 +02:00
Bjørn Erik Pedersen 7cdd230e16 vendor: Update dependencies 2016-10-08 15:09:34 +02:00
Anthony Fok a22294aa7c docs: Stylize "Mac OS" as "macOS" in v0.17 release notes 2016-10-07 10:43:34 -06:00
Cameron Moore 6195d8f79b docs: Fix grammar in v0.17 release notes
Also trimmed trailing whitespace.
2016-10-07 10:39:56 -06:00
Anthony Fok 1adfaf4972 snapcraft.yaml: Bump version to 0.18-DEV
and set grade to "devel" for the new development series.
2016-10-07 10:12:46 -06:00
Steve Francia d54d6633ad release: version bump to v0.18-DEV 2016-10-07 11:11:43 -04:00
Anthony Fok e1e677f6da snapcraft.yaml: Bump version to 0.17 for release 2016-10-07 08:42:05 -06:00
Anthony Fok fe2d246c73 commands: Bump min_version to 0.17 for "new theme" subcommand 2016-10-07 08:36:28 -06:00
Steve Francia 5b9f488304 release: version bump to 0.17 2016-10-07 10:08:57 -04:00
Steve Francia 8bc390d8de vendor: update viper to latest version 2016-10-07 10:05:27 -04:00
Steve Francia f9c70c0f89 add release notes for v0.17 2016-10-07 09:58:32 -04:00
Rahul Rai 57d7dd5bd9 docs: Add rahulrai.in to the showcase 2016-10-06 18:19:56 +02:00
Kim Gressens fbce84450b Whitelist startinline pygments option 2016-10-06 14:59:49 +02:00
Bjørn Erik Pedersen 27d7aa5f10 travis: Reintroduce asciidoctor to build
Fixes #2524
2016-10-06 09:31:57 +02:00
Anthony Fok f8e968b2d1 snapcraft.yaml: Change grade from "devel" to "stable"
So that the snap can be uploaded to the Candidate channel
in the Ubuntu store, now that the 0.17 release is impending.
2016-10-05 07:01:57 -06:00
Bjørn Erik Pedersen 00b3667f30 travis: Remove asciidoctor from build
It fails. Will have to investigate.
2016-10-05 14:36:50 +02:00
Bjørn Erik Pedersen 217d6ea605 travis: Fix asciidoctor build 2016-10-05 14:35:02 +02:00
Bjørn Erik Pedersen f37f57a814 travis: Lock asciidoctor to 1.5.4
1.5.5 (the newly released) seems to break.
2016-10-05 14:11:56 +02:00
Bjørn Erik Pedersen b3a113b73a docs: Regenerate commands doc 2016-10-05 10:23:45 +02:00
Bjørn Erik Pedersen 2a4ed1c492 Add hugo env command
Useful for bug reports.

Fixes #2523
2016-10-05 10:20:25 +02:00
Pine 80367ea218 docs: Us vs you 2016-10-03 00:45:23 +02:00
Mark D. Blackwell 88ec7d88d1 docs: Improve home page
Organize CSS and Javascript files into directories, separating vendor
source code from home-grown.

Separate new properties and selectors in Bootstrap CSS (already edited
for Hugo) from:
1. Original property values; and
2. Changed property values.

For the home page:

1. Clarify the English text;
2. Add some element names to classes in CSS selectors (to speed loading);
3. Document the Owl Carousel and Highlight.js versions;
4. Add Owl Carousel's license;
5. Restore HTML comments to browser source views;
6. Make the beginning GitHub button transparent on focus (like the others);

7. For the final, colored Twitter and Github buttons:
  a. Remove the dotted box on focus; and
  b. Color them green on active.

8. To increase (layout/) source readability:
  a. Place `class` attributes before `href` attributes;
  b. In `class` attributes, place more-specific class names before
     less-specific; and
  c. Comment the beginnings and ends of Bootstrap rows.

9. To increase understandability during development:
  a. Document the meaning of CSS file, `HPstyles` by renaming it to
     `home-page-style`;
  b. Move inline styling to CSS stylesheets;
  c. Separate @media queries to a file;
  d. Separate the inline Owl Carousel custom Javascript to a file;
  e. Use regular Owl Carousel CSS files instead of minified ones; and
  f. Rename the wide, landscape desk background image filename from
     `desk-long` to `desk-wide`.
2016-10-01 22:19:22 -04:00
Tim Rourke ffbf3dd319 doc: Improving language in archetypes doc 2016-10-01 15:05:38 +02:00
Andrew Speed 0721a9c730 Update Dockerfile to pull in missing test dependency
Add the missing github.com/fortytw2/leaktest dependency required for
hugo_site_tests.
2016-10-01 13:02:35 +02:00
digitalcraftsman d9c1f1eee7 docs: Add Lipi to tools section 2016-10-01 11:43:38 +02:00
Bjørn Erik Pedersen bf0dfa3e2d Fix URL in multilanguage sitemap index
Fixes #2509
2016-09-30 16:24:57 +02:00
digitalcraftsman d30c6a26d1 docs: Fix typo in tutorials/how-to-contribute-to-hugo.md 2016-09-28 17:27:18 +02:00
digitalcraftsman 50c43c36f1 Contributing: Link the "How to contribute" tutorial 2016-09-28 17:25:24 +02:00
digitalcraftsman 0043b48658 docs: Add notes about multilingual menus 2016-09-28 17:19:33 +02:00
digitalcraftsman 78e5263ca9 Readme: Clarify usage of Gitter 2016-09-28 14:51:40 +02:00
patdhlk e36b0305ca docs: Add tryo labs article to press.md 2016-09-28 12:37:52 +02:00
Bjørn Erik Pedersen 614dd2aa16 Deprecate PageMeta.WordCount etc.
Fix #2503
2016-09-28 11:05:21 +02:00
Bjørn Erik Pedersen 59df7db764 Fix half-broken self-closing shortcodes
Fixes #2498
2016-09-27 21:11:34 +02:00
Joseph Anderson 8b0d16b8d9 docs: Fix typo on hosting-on-gitlab
Corrects "github" typo to "gitlab"
2016-09-27 16:22:42 +02:00
Anthony Fok 6b4d3263b6 commands: Revise instructions after "hugo new site"
mainly to fit inside 80-column wide terminal windows.

See #1164
2016-09-26 14:23:57 -06:00
Bjørn Erik Pedersen 0c223d9c7a vendor: Update Viper
See #2495
2016-09-26 17:06:58 +02:00
Bjørn Erik Pedersen a61b1497c6 vendor: Update cast
See #2495
2016-09-26 10:50:38 +02:00
Bjørn Erik Pedersen a0167d838e Fix leaky goroutine
By making the err chan buffered so both go routines can return.

Also make sure that any errors are logged.

Fixes #2488
2016-09-23 19:04:19 +02:00
Bjørn Erik Pedersen 63a6da06d8 Make multilingual respect DisableSitemap
Fixes #2485
2016-09-23 10:30:55 +02:00
Bjørn Erik Pedersen 73894cca56 Add TestChangeDefaultLanguage 2016-09-21 14:09:41 +02:00
Bjørn Erik Pedersen 2071d470e6 tpl: Polish i18n tests
* Make the type/var names more specific. They live in the test namespace, but there are other tests there.
* Camel case variable
* Small change suggested by Golint
2016-09-20 13:22:56 +02:00
Mitchell Cohen e7e2a1ca02 tpl: Improve tests and docs for i18n 2016-09-20 11:11:57 +02:00
Bjørn Erik Pedersen e7ff5c2d6a vendor: Update go-toml
Fixes #2439
2016-09-20 10:35:11 +02:00
Bjørn Erik Pedersen 608b90da8d vendor: Update dependencies 2016-09-19 23:24:36 +02:00
Bjørn Erik Pedersen 894b69dba5 Remove some unused vars 2016-09-19 22:14:15 +02:00
Bjørn Erik Pedersen 9c017e512e commands: Add some band-aid to convert
Fixes #2458
2016-09-19 10:52:07 +02:00
Bjørn Erik Pedersen 2105e42aca tpl: Set i18n bundle once per test run
No real practical difference, but more clear.
2016-09-19 02:44:21 +02:00
Cameron Moore 6e692f2d11 Add vendoring with govendor 2016-09-19 00:10:10 +02:00
Mitchell Cohen b3a721559a Fix i18n with missing translations and add tests 2016-09-18 22:18:13 +02:00
Bjørn Erik Pedersen bacc1706cb helpers: Skip TestGetRealPath on Windows when not in CI
`os.Symlink` needs administrator rights on Windows,
and this seems to be the simplest fix while still getting the tests run on Appveyor.

Fixes #2476
2016-09-18 22:04:32 +02:00
Bjørn Erik Pedersen 98c12b7b3d Fail early in TestGetRealPath
See #2476
2016-09-18 19:52:42 +02:00
Bjørn Erik Pedersen 4a79fa0c33 Revert the "standardize author data"
There were some breaking changes etc. that is too late to fix for 0.17.

Let us think this through and add proper author support for Hugo 0.18.

Fixes #2464

Revert "docs: Add documentation for author profiles"

This reverts commit b6673e5309.

Revert "Add First Class Author Support"

This reverts commit cf978c0649.
2016-09-18 19:16:39 +02:00
Mark D. Blackwell 83533a8881 docs: Improve Overview Configuration manual 2016-09-17 21:29:37 -04:00
Bjørn Erik Pedersen a7af63037c Make suure SectionPagesMenu setting is always loaded per language 2016-09-17 16:54:35 +02:00
digitalcraftsman b6673e5309 docs: Add documentation for author profiles 2016-09-17 13:14:05 +02:00
Mitchell Cohen 56afd943a8 docs: Add multilingual alias example 2016-09-17 11:23:47 +02:00
Bjørn Erik Pedersen 51c9bfbc9e Remove Authors.Sort
We may add it again in the future, but let us try to keep the API as small as possible for now.

See #1850
2016-09-17 00:50:11 +02:00
Derek Perkins cf978c0649 Add First Class Author Support
Closes #1850
2016-09-17 00:49:24 +02:00
Daniel Holbach 44bf76d0f2 Add snapcraft.yaml file 2016-09-16 10:08:10 -06:00
digitalcraftsman 742911146a docs: Clarify difference between slug and url 2016-09-16 17:38:08 +02:00
digitalcraftsman e80453a991 tpl: Add EnableMissingTranslationPlaceholders option
Fixes #2451
2016-09-16 17:20:29 +02:00
digitalcraftsman 0dd57b907b docs: List i18n folder in source organization 2016-09-16 17:13:59 +02:00
digitalcraftsman bca567faea docs: Clarify usecase of data files
Fixes #1769
2016-09-16 17:05:38 +02:00
digitalcraftsman 0c49370ca0 docs: Fix example of displaying taxonomies
Fixes #2216
2016-09-16 16:43:50 +02:00
digitalcraftsman 3410007dca docs: List multilingual tpl vars and show menu creation
Fixes #2436
2016-09-16 15:37:12 +02:00
digitalcraftsman 9dab62c559 docs: List config options for multilingual feature 2016-09-16 14:36:54 +02:00
Jacob Walker 4e16a6d4fd docs: Fix markdown in content/extras/scratch.md 2016-09-15 11:35:39 -05:00
Frank Taillandier cdf1edd549 docs: Fix French translation in multilingual.md 2016-09-15 15:25:31 +02:00
Mark D. Blackwell 0d1e96701f docs: Improve Traversing Local Files 2016-09-15 15:15:04 +02:00
Bjørn Erik Pedersen b86a605bfb Make paginate settings configurable per language
Fixes #2449
2016-09-15 09:32:52 +02:00
Bjørn Erik Pedersen bbb11a4a0f Do not add lang prefix in URL when set in frontmatter
Fixes #2450
2016-09-14 18:51:34 +02:00
Bjørn Erik Pedersen dd45e6d7e5 Lazy calculate WordCount, ReadingTime and FuzzyWordCount
This avoids having to execute these expensive operations for sites not using these values.

This commit sums up a set of wordcounting and autosummary related performance improvements.

The effect of these kind of depends on what features your site use, but a benchmark from 4 Hugo sites in the wild shows promise:

```
benchmark           old ns/op       new ns/op       delta
BenchmarkHugo-4     21293005843     20032857342     -5.92%

benchmark           old allocs     new allocs     delta
BenchmarkHugo-4     65290922       65186032       -0.16%

benchmark           old bytes      new bytes      delta
BenchmarkHugo-4     9771213416     9681866464     -0.91%
```

Closes #2378
2016-09-14 10:57:39 +02:00
Bjørn Erik Pedersen 4abaec5c04 Improve TotalWords counter func
It is obviously more efficient when we do not care about the actual words.

```
BenchmarkTotalWords-4            100000         18795 ns/op           0 B/op           0 allocs/op
BenchmarkTotalWordsOld-4          30000         46751 ns/op        6400 B/op           1 allocs/op
```
2016-09-14 10:50:56 +02:00
Bjørn Erik Pedersen bcd434794a Avoid splitting words for summary
For people using autogenerated summaries, this is one of the hot spots in the memory department.

We don't need to split al the content into words to do proper summary truncation.

This is obviously more effective:

```
BenchmarkTestTruncateWordsToWholeSentence-4            300000          4720 ns/op           0 B/op           0 allocs/op
BenchmarkTestTruncateWordsToWholeSentenceOld-4         100000         17699 ns/op        3072 B/op           3 allocs/op
```
2016-09-14 10:50:55 +02:00
Bjørn Erik Pedersen 74ffb45fbe helpers: Improve the language prefix logic
See #2444
2016-09-13 23:44:16 +02:00
Bjørn Erik Pedersen f53145b274 helpers: Avoid adding language prefix if already present
Fixes #2444
2016-09-13 21:37:27 +02:00
Bjørn Erik Pedersen 8d040c966f commands: Improve error messages in convert
See #2440
2016-09-13 19:11:59 +02:00
Bjørn Erik Pedersen a04abf0dda tpl: Make the *langURL funcs tace interface{}
Fixes #2447
2016-09-13 17:07:52 +02:00
Bjørn Erik Pedersen 7615ef0c28 commands: Report errors in convert
Fixes #2440
2016-09-13 10:49:51 +02:00
Bjørn Erik Pedersen be09781af1 Fix broken convert command
Fixes #2437
2016-09-13 09:59:18 +02:00
Bjørn Erik Pedersen 69a97823c4 Add Language.LanguageName
Fixes #2435
2016-09-12 20:59:03 +02:00
Bjørn Erik Pedersen a7dc3c082e Support site menu per language
Fixes #2434
2016-09-12 20:59:03 +02:00
Albert f0ac26c944 commands: Fix typos 2016-09-12 11:32:11 +02:00
Cameron Moore 3908489ccd tpl: Extend where to iterate over maps
Fixes #2028
2016-09-12 11:03:53 +02:00
Cameron Moore 640121423c tpl: Fix typos in tests
Closes #2370
2016-09-12 10:56:24 +02:00
Cameron Moore 46342ad5e8 hugolib: Fix typos in tests 2016-09-12 10:56:16 +02:00
Bjørn Erik Pedersen c700cdc39c Replace some leftover os.Stat with hugofs.Source 2016-09-11 20:00:38 +02:00
Bjørn Erik Pedersen ef3c4a56d8 Fix reload dir matching in theme
Fixes #2430
2016-09-11 20:00:38 +02:00
Bjørn Erik Pedersen 364e69ab7f Handle symlink change event
Hugo 0.16 announced support for symbolic links for the root folders, /content, /static etc., but this got broken pretty fast.

The main problem this commit tries to solve is the matching of file change events to "what changed".

An example:

ContentDir: /mysites/site/content where /mysites/site/content is a symlink to /mycontent

/mycontent:

/mypost1.md
/post/mypost2.md

* A change to mypost1.md (on OS X) will trigger a file change event with name "/mycontent/mypost1.md"
* A change to mypost2.md gives event with name "/mysites/site/content/mypost2.md"

The first change will not trigger a correct update of Hugo before this commit. This commit fixes this by doing a two-step check:

1. Check if "/mysites/site/content/mypost2.md" is within /mysites/site/content
2. Check if  "/mysites/site/content/mypost2.md" is within the real path that /mysites/site/content points to

Fixes #2265
Closes #2273
2016-09-11 20:00:38 +02:00
digitalcraftsman e70cf1ace4 docs: Remove JPEG as format for showcase thumbnails 2016-09-11 18:18:28 +02:00
David Yates d5379fd1fe docs: Add davidyat.es to the showcase 2016-09-11 18:11:50 +02:00
bogem 4d1cb50003 parser: Use strings.Contains instead of strings.Index
Closes #2400
2016-09-11 12:23:15 +02:00
bogem 798bf60c56 parser: Simplify err conditions 2016-09-11 12:23:09 +02:00
bogem 60baec8005 commands: Delete useless conversion 2016-09-11 12:23:09 +02:00
bogem 2294b0226d commands: Simplify err condition 2016-09-11 12:23:09 +02:00
bogem 1e18087356 commands: Delete unused newUserErrorF 2016-09-11 12:23:09 +02:00
Jelmer Tiete 5867cb5a92 Fixe target path location check in jekyll import command 2016-09-11 10:48:31 +02:00
Mathias Biilmann 7d3dfba84b Prevent panic on empty authorlist 2016-09-11 10:46:56 +02:00
Ben Campbell 3392133128 Remove redundant field in sort helper struct
The pair struct used by sortSeq() had two key fields, where only one
is really needed.
2016-09-11 10:42:50 +02:00
Bjørn Erik Pedersen 9c5f2befc0 tpl: Make it more clear on missing language string 2016-09-09 21:21:16 +02:00
Bjørn Erik Pedersen 43bf9ed38e Redirect to root when DefaultContentLanguageInSubdir = false
Fixes #2422
2016-09-09 17:42:02 +02:00
Bjørn Erik Pedersen 4df86a703a Fix paginator counter on x86-32
Atomic operations with 64 bit values must be aligned for 64-bit on x86-32.

According to the spec:

"The first word in a global variable or in an allocated struct or slice can be relied upon to be 64-bit aligned."

The above wasn't enough for the `paginationPageCount` on `SiteInfo`, maybe due to how `SiteInfo` is embedded.

This commit adds a 4 byte padding before the `uint64` that creates the correct alignment.

Fixes #2415
2016-09-09 14:31:49 +02:00
Bjørn Erik Pedersen eaf2f9bce5 Add TODO list support for Blackfriday
* Add CSS class to TODO list and list items
* Add a flag to turn task list support off

Fixes #2269
2016-09-09 13:08:20 +02:00
Bjørn Erik Pedersen 76bf2dcdd2 Fix shortcode vs pygments
This is the nth attempt to fix an issue by changing the placeholder token pattern, but
now we actually have tests for all the historic trouble cases.

Fixes #2223
2016-09-08 21:23:01 +02:00
Bjørn Erik Pedersen ccb3040ad4 Fix pagination page counter on 32 bit
Updates #2415
2016-09-08 17:18:11 +03:00
Bjørn Erik Pedersen fe0c270577 Reset the i18n func map on reload
Also improve the error message on missing resource bundles.
2016-09-08 17:18:11 +03:00
Pascal Aubort 5ef45bec63 docs: Fix typos in multilingual section 2016-09-08 15:54:26 +02:00
Bjørn Erik Pedersen 97c57fe37a Add missing read lock in getNodes 2016-09-08 16:51:32 +03:00
Bjørn Erik Pedersen a8fad86671 Bump Travis to Go 1.7.1 2016-09-08 00:37:04 +03:00
Bjørn Erik Pedersen 34fe5cd34f tpl: Fix echoParam
Fixes #2406
2016-09-07 22:03:09 +03:00
Bjørn Erik Pedersen a00edff5b1 Make it the DEV version 2016-09-06 23:20:59 +03:00
Bjørn Erik Pedersen 35d2eac490 Fix go vet 1.7 issues
Updates #2309
2016-09-06 18:32:21 +03:00
Bjørn Erik Pedersen 09ed41be71 Add a global Reset func
So we can do some benchmarking.
2016-09-06 18:32:21 +03:00
Bjørn Erik Pedersen dc3618abcd Make sure the 404 node has .Data.Pages
Updates #2309
2016-09-06 18:32:21 +03:00
Bjørn Erik Pedersen 30d65fd48d Fix site reset for benchmarks etc.
Updates #2309
2016-09-06 18:32:21 +03:00
Bjørn Erik Pedersen b3563b40a4 Fix multilingual reload when shortcode changes
This commit also refines the partial rebuild logic, to make sure we do not do more work than needed.

Updates #2309
2016-09-06 18:32:21 +03:00
Bjørn Erik Pedersen a823b1572b Set lang template globals for each site when render shortcodes
We should get rid of these globals, but that is another month.
2016-09-06 18:32:21 +03:00
Bjørn Erik Pedersen 28696b5dca Small adjustment to SiteInfo init
After a visual inspection to make (pretty) sure it is correct re multiple languages.

Updates #2309
2016-09-06 18:32:20 +03:00
Bjørn Erik Pedersen 2f7e8df5ba docs: Fix spelling: HasTranslations > IsTranslated 2016-09-06 18:32:20 +03:00
Bjørn Erik Pedersen 1bce8a854b Create a copy of the section node for RSS
So the Permalink gets correct when listing translations.

I have also checked the other relevant places to make sure we do not overwrite node values we need later.

Pointers can be tricky, but lesson learned is: A copy is cheap.

Updates #2309
2016-09-06 18:32:20 +03:00
Bjørn Erik Pedersen bbfebdea43 Fix Data in multisites
Updates #2309
2016-09-06 18:32:20 +03:00
Bjørn Erik Pedersen 93717aac5c docs: Get the variable and funcs re multilingual up-to-date 2016-09-06 18:32:20 +03:00
Bjørn Erik Pedersen 4fbce78740 Add JSON config to the multilanguage testing
Updates #2309
2016-09-06 18:32:20 +03:00
Bjørn Erik Pedersen d8a256c155 Fix YAML loading of multilingual config
And some other minor fixes from code review.

Updates #2309
2016-09-06 18:32:20 +03:00
Bjørn Erik Pedersen 446e606a09 Add data tests
Updates #2309
2016-09-06 18:32:20 +03:00
Bjørn Erik Pedersen 5b331a18d7 Add temp MULTILINGUAL version suffix to this branch
For people having trouble building this.

Now `hugo version` should print something like:

```
Hugo Static Site Generator v0.17-MULTILINGUAL BuildDate: 2016-08-10T08:20:36+02:00
```
2016-09-06 18:32:19 +03:00
Bjørn Erik Pedersen a07293cf97 Create a Node map to get proper node translations
In a multi-language setup, before this commit the Node's Translations() method
would return some "dummy nodes" that would point to the correct page (Permalink),
but would not be the same as the node it points to -- it would not have the translated
title etc.

The node creation is, however, so mingled with rendering, whihc is too early to have any global state,
so the nodes has to be split in a prepare and a render phase. This commits does that with as small
a change as possible. This implementation is a temp solution until we fix #2297.

Updates #2309
2016-09-06 18:32:19 +03:00
Bjørn Erik Pedersen d1212307f2 doc: Fix TOML vs YAML in multilang section
Updates ##2309
2016-09-06 18:32:19 +03:00
Bjørn Erik Pedersen 45c69dd168 Handle error in config loading
See #2309
2016-09-06 18:32:19 +03:00
Bjørn Erik Pedersen 7610844004 Add IsTranslated to Node and Page
Makes the templates simpler.

See #2309
2016-09-06 18:32:19 +03:00
Bjørn Erik Pedersen 8b55bfc814 Remove unused Multilingual Viper default
See #2312
2016-09-06 18:32:19 +03:00
Bjørn Erik Pedersen f1e1cdab3f Improve i18n string handling
* Fall back to default language on missing translation file
* Add a i18n-warnings build flag
* If that flag is set, print a parseable and greppable string on missing translation strings

See #2303
2016-09-06 18:32:19 +03:00
Bjørn Erik Pedersen 8da040342e Render main content language in root by default
Fixes #2312
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen d953e39e63 Add parent as owner to Site
And pull up common member vars like Tmpl and Multilinguage.

Or: the final multilingual TODO-fixes.

See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen 9798a95670 Make the check command work in multilingual mode
Or: some more multilingual TODO-fixes.

See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen 6b552db75f Make sure drafts etc. are not processed
See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen e56ecab157 Multilingual TODO-fixes, take 1
See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen 0a7d1d0ddc Fix some corner cases in revised summary handling
And clean up the test.

See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen d18a8cbe15 Fix livereload in multilingual mode
See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen 506e131f28 Fix the shortcode ref tests
See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen 54141f71dd Improve language handling in URLs
The current "rendering language" is needed outside of Site. This commit moves the Language type to the helpers package, and then used to get correct correct language configuration in the markdownify template func.
This commit also adds two new template funcs: relLangURL and absLangURL.

See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen 2079a23dd8 Make it possible to configure Blackfroday per language
See #2309
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen 596e0e98e4 Make it possible to add a language in server mode
See #2309
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen 7cac19b1e3 cmd: Load config from the common config loader in hugolib
See #2309
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen 8b657a11ee Get the list commands up to multi-site level
This commit also unexports some Site methods, making it clear what the external build API really is.

See #2312
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen 90de511017 Make taxonomies configurable per language
See #2312
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen 36f2a1f676 Make the config loading testable
This is needed to verify  #2309, but it closes a big hole in Hugo's automated tests.

The loading of the config is now moved to `hugolib` and the same default settings are now used
in production and tests.

As Viper now uses Afero as its filesystem, we now can write fairly complete integration tests with ease.

See #2309
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen b6fcb3d0bb Add sitemap index for multilingual sites
See #2309
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen d572071784 Redirect to main language from root
See #2312
See #2309
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen f0b91852ea Rework the multilingual docs
And in the same go adjusted some minor parts of the language API:

Add LanguagePrefix alias to Node and rename the Multilingual config section to Languages.

See #2309
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen ed0985404d Render the shortcodes as late as possible
This is needed to make shortcode users happy with the new multilanguage support,
but it will also solve many other related posts about "stuff not available in the shortcode".

We will have to revisit this re the handler chain at some point, but that will be easier
now as the integration test story has improved so much.

As part of this commit, the site-building tests in page_test.go is refreshed, they now
tests for all the rendering engines (when available), and all of them now uses the
same code-path as used in production.

Fixes #1229
Fixes #2323
Fixes ##1076
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen 708bc78770 Optimize the multilanguage build process
Work In Progress!

This commit makes a rework of the build and rebuild process to better suit a multi-site setup.

This also includes a complete overhaul of the site tests. Previous these were a messy mix that
were testing just small parts of the build chain, some of it testing code-paths not even used in
"real life". Now all tests that depends on a built site follows the same and real production code path.

See #2309
Closes #2211
Closes #477
Closes #1744
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen f023dfd763 Move the Build* methods to HugoSites
See #2309
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen 5b9c2a40f1 Move HugoSites to hugolib
It will get more involved in the build process in a minute.

See #2309
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen 3a02807970 Add Translations and AllTranslations to Node
This commit also consolidates URLs on Node vs Page, so now .Permalink should be interoperable.

Note that this implementations should be fairly short-livded, waiting for #2297, but the API should be stable.
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen 52bf8f9095 Rework the i18n template func handling
Setting the language to use when loading the language bundles just doesn't work.
The template system is unfortanetely a global, and the last languate processed won ...
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen 75dd596e6c Introduce HugoSites type
And a Hugo global variable which contains the site under build.

This is really needed to get some level of control of the "multiple languages" in play.

There are still work related to this scattered around, but that will come.

With this commit, the multilingual feature is starting to work.
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen 618948e4a8 Reset translation slice on rebuild
Also add all translations, including the current, to the slice. We filter later.
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen c447b7dd6e Rename MainSites to Sites
Having many *main* sites doesn't make much sense.
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen c4e7c37055 Add Translations and AllTranslations methods to Page
Will revisit Node later.
2016-09-06 18:32:15 +03:00
Bjørn Erik Pedersen 06d12ab895 Add proper Language and Languages types 2016-09-06 18:32:15 +03:00
Alexandre Bourget ec33732fbe Add multilingual support in Hugo
Implements:
* support to render:
  * content/post/whatever.en.md to /en/2015/12/22/whatever/index.html
  * content/post/whatever.fr.md to /fr/2015/12/22/whatever/index.html
* gets enabled when `Multilingual:` is specified in config.
* support having language switchers in templates, that know
  where the translated page is (with .Page.Translations)
  (when you're on /en/about/, you can have a "Francais" link pointing to
   /fr/a-propos/)
  * all translations are in the `.Page.Translations` map, including the current one.
* easily tweak themes to support Multilingual mode
* renders in a single swift, no need for two config files.

Adds a couple of variables useful for multilingual sites

Adds documentation (content/multilingual.md)

Added language prefixing for all URL generation/permalinking see in the
code base.

Implements i18n. Leverages the great github.com/nicksnyder/go-i18n lib.. thanks Nick.
* Adds "i18n" and "T" template functions..
2016-09-06 18:32:15 +03:00
Russ Shanahan faa3472fa2 docs: Fix typo in Quickstart guide
To publish a post, draft status should be changed to `false`.
2016-09-06 14:34:46 +02:00
Vasiliy Solovey ccc51fe764 docs: Add open.cinegy.com to the showcase 2016-09-06 14:32:33 +02:00
digitalcraftsman 723d4656b5 docs: Add Vim/Emacs plugin to tools section 2016-09-04 15:22:05 +02:00
integrii a48ac6e945 docs: Clarify first level URL generation 2016-09-03 15:32:29 +02:00
Mark D. Blackwell 0614a59b0f docs: Improve Quickstart guide
Fixes #2331.
2016-09-03 15:19:01 +02:00
Mark D. Blackwell 696c67b04a docs: Clarify Creating a New Theme 2016-09-01 20:34:00 -04:00
Nichlas Hummelsberger bb1812b6af docs: Mention theme config option on Usage page 2016-09-01 17:22:50 +02:00
sethmacleod 8e1bcea82f docs: Update documentation for URLs
Using absolute URLs overrides relative URL behavior. This should be explicit in the docs.
2016-08-30 01:26:21 -04:00
Cameron Moore b6635e1baf helpers: Fix bug in emoji renderer
Fixes #2391
2016-08-30 00:34:48 +02:00
vsopvsop 7cb8107735 docs: Correct spelling for "parameters" in partials.md 2016-08-29 12:25:53 +02:00
digitalcraftsman 38d034df38 docs: Document shuffle template func
Fixes #2393.
2016-08-29 12:22:37 +02:00
Andreas Grunewald 6eff9e5015 docs: Update highlight.js example to latest version
Highlight.js has evolved quite a bit since it this doc was written. Updating the example to the latest 9.6 version of Highlight JS hosted by cloudflare
2016-08-25 14:05:34 +02:00
Eric 2fc05dad4e docs: Add location of block template 2016-08-20 21:54:14 +02:00
Bjørn Erik Pedersen fee9ee72a6 tpl: Add missing arg to Fatalf 2016-08-20 20:52:14 +01:00
Bjørn Erik Pedersen 20c4311df4 Switch to a more up to date TOML library
Fixes #2089
2016-08-20 20:33:06 +01:00
Mark D. Blackwell 81f04ef4f0 docs: Clarify Usage 2016-08-19 14:38:20 -04:00
Anthony Fok 2530087ab1 docs: Add Spanish video tutorial by Verónica López to press.md 2016-08-19 08:26:26 -06:00
Cameron Moore 715d4425ad hugolib: Use named keys in composite literals
Make `go vet` great again
2016-08-19 12:22:19 +01:00
Steef Hegeman c5d072990a docs: Just a small grammar fix in quickstart.md 2016-08-18 20:58:29 +02:00
Mark D. Blackwell 3ce9de7672 docs: Follow through on watch default 2016-08-18 20:55:05 +02:00
Georg Hartmann 68c8e0e23d docs: Correct name of release archives for OS X
Fixes #2341
2016-08-18 20:49:13 +02:00
Mark D. Blackwell be429d2268 docs: Correct all erroneous swaps of "it's" and "its" 2016-08-18 20:42:40 +02:00
Mark D. Blackwell 8474b9defe docs: Improve section 'Why did you write Hugo?' 2016-08-18 20:33:57 +02:00
Stephan Kulla de1ca477b8 docs: Fix URLs in examples sites with path prefix
When baseurl ist something like "http://example.com/hugo/" a link to
"/tags/..." does not work. Therefore I fixed the examples so that they
also work in cases where the website is not saved at the server's root.
See also https://discuss.gohugo.io/t/how-shall-i-link-a-taxonomy-page/3920
2016-08-18 20:15:37 +02:00
Anthony Fok f914774f6b Remove broken Bitdeli badge from README.md 2016-08-16 21:13:21 -06:00
Cameron Moore 5498a1bd56 tpl: Return all errors from casting
Most non-boolean template functions should return errors.

Fixes #2354
2016-08-16 21:42:38 -05:00
Cameron Moore d3627b1747 Simplify Travis build 2016-08-16 17:01:59 -05:00
Stephan Kulla d72c454f78 Fix command for getting hugo in CONTRIBUTING.md 2016-08-16 08:56:45 -05:00
Bjørn Erik Pedersen 97c37732b4 Add a global Reset func
So we can do some benchmarking.
2016-08-16 12:50:26 +02:00
Bjørn Erik Pedersen 2175ea5b06 Bump Travis to Go 1.7 2016-08-16 10:05:10 +02:00
Kishin Yagami 661c9787ea commands: Suppress 'missing static' error
Fixes #2311
2016-08-14 00:35:43 +02:00
Bjørn Erik Pedersen f6d4801ba4 Skipt Twitter test in short mode 2016-08-13 18:50:06 +02:00
Bjørn Erik Pedersen 09612f7af8 tpl: Fix faulty ordering of relURL test cases 2016-08-13 00:36:15 +02:00
Stephan Kulla 88dcbc6efa tpl: Make absURL and relURL accept anything 2016-08-13 00:31:50 +02:00
Mark Ayers 26725515c8 docs: Convert toml to yaml in config overview 2016-08-12 13:37:30 +02:00
Kishin Yagami 39df7724ad source: Normalize file name to NFC
Fixes #2203
2016-08-08 20:25:00 +02:00
Wade Fitzpatrick b33bfd40be docs: Add doc for time template func 2016-08-08 12:28:41 +02:00
Maxime Michel f2faae0805 Remove maximeguitare.com from showcase 2016-08-06 23:37:11 +02:00
Randall Degges 0d9c0677f6 docs: Add rdegges.com to the showcase 2016-08-06 15:06:10 +02:00
digitalcraftsman 914e4d8535 tpl: Fix typo in FindRE test 2016-08-04 14:37:15 +02:00
Bjørn Erik Pedersen 93f3a85bf8 Fix the time template func test
By making it not depend on the locale setup.
2016-08-04 10:36:44 +02:00
Wade Fitzpatrick 70544f9e62 tpl: Add time template func
Fixes #2328
2016-08-04 01:55:24 +02:00
Jeremy Brown d7f364c27e Fix for meminterval not using specified interval
Hugo seems to ignore the meminterval I specify and always uses it's default of 100ms.
This seems to be because Hugo tries to take the meminterval from the command line
(an Int) and converts it to a String and passes it to time.ParseDuration. If you pass a
different meminterval (such as `1000` as above) it will fail (time.ParseDuration requires
some units) and use the default instead.

Changed `meminterval` to be a String and added better documentation for valid time units.

Resolves: #2325
2016-08-02 19:48:07 +02:00
astrochili 5824e80932 docs: Add romansilin.com to the showcase 2016-07-31 13:09:25 +02:00
Bjørn Erik Pedersen b426c20e14 Return specific error on walk path too short 2016-07-30 22:32:03 +02:00
Bjørn Erik Pedersen 15b6693541 Adjust the sanity check to path length 4 2016-07-30 20:07:35 +02:00
Bjørn Erik Pedersen 94d998989d Add sanity check to the file walker
As more tests now hit the virtual filesystem, add this check
to prevent any walking of the entire file system.
2016-07-30 19:54:07 +02:00
Bjørn Erik Pedersen 802d43cbfd Disable Go 1.5.4 in Travis
There is one failing test there now, a odd filesystem issue.

Since Go 1.7 is only "days" away, I'm not spending time debugging this.
2016-07-30 19:37:15 +02:00
Bjørn Erik Pedersen 285807ba7a Take 2: Load templates from the Afero source fs
See #2321
2016-07-30 17:28:40 +02:00
Bjørn Erik Pedersen ec23aa998a Load templates from the Afero source fs
Fixes #2321
2016-07-30 17:16:04 +02:00
Bjørn Erik Pedersen 5f5fccbc36 Do not return empty theme dirs
This prevents reading data etc. from the root.

Fixes #2320
2016-07-30 16:21:57 +02:00
Bjørn Erik Pedersen 4ddd5361c1 Use the Afero source fs where relevant
Fixes #2319
2016-07-30 15:37:03 +02:00
Bjørn Erik Pedersen a0859dc672 Make LazyFileReader use the Afero source fs
Fixes #2317
2016-07-30 15:21:02 +02:00
Bjørn Erik Pedersen 9489272681 Handle errors during filesystem walk
Fixes #2318
2016-07-30 14:03:38 +02:00
digitalcraftsman 0087beefe1 docs: Add tumblr2hugomarkdown to tools section 2016-07-29 20:37:32 +02:00
digitalcraftsman 0d0a7596a2 docs: Add tumblr-importr to tools section 2016-07-29 20:36:10 +02:00
Richard Metzler 5b40eeede1 examples: Add example for translation files 2016-07-29 20:21:52 +02:00
digitalcraftsman 04889a5ee6 docs: Document .File variables for pages
Fixes #2154.
2016-07-29 20:12:28 +02:00
Chris DeLuca 333646c52d docs: Drop .isDraft to new line
Bring **.isDraft** onto a new line, to be consistent with the other list items.
2016-07-29 20:10:40 +02:00
Jeremy Brown e3e1f7a2bb docs: Add a link to hugo-openapispec-shortcode
Added a link to the Hugo Open API Spec shortcode which allows you to embed OAI Spec (formerly known as Swagger) in your site.
2016-07-29 20:07:46 +02:00
Felipe Rohde ddd5a92240 docs: Removed comma from json example.
The comma causing invalid json and hugo not compile the file based on the same example.
2016-07-29 20:01:23 +02:00
Max Milton df0a4534cd docs: Add missing configuration option disableHugoGeneratorInject 2016-07-29 19:58:25 +02:00
Weilin 9c458657da docs: Add weilinshi.org to the showcase 2016-07-29 19:51:28 +02:00
zarina 17f53526ca docs: Add CTL Compiled edtech blog to showcase 2016-07-29 19:46:53 +02:00
Leow Kah Man 76f332bfdc docs: Add www.leowkahman.com to the showcase 2016-07-29 19:38:18 +02:00
Pedro Melo 3e1b579c17 Be less aggressive with CHMOD filesystem events
On 4679fbee41, rebuild was disabled on
CHMOD filesystem events, but the code is overly aggressive.

In some situations, specially with older Mac's (using a Late 2008
Macbook), the events we receive might be aggregated. On my
particular laptop, I get this events:

    INFO: 2016/07/26 18:08:51 hugo.go:737: Received System Events: ["<path>": WRITE|CHMOD]

These events are ignored because the code only checks for Chmod. This
commit fixes this by checking that the event is also not a Write or Create.

Related to #1587.
2016-07-26 22:18:15 +02:00
Bjørn Erik Pedersen 91b61b976d Simplify the configuration of HugoHTMLRenderer 2016-07-22 11:00:52 +02:00
Bjørn Erik Pedersen 4d4da001a0 Fix broken shortcode test
See #2249
2016-07-21 22:30:10 +02:00
Bjørn Erik Pedersen 39a452a4c7 Add "missing slice" to the Params test
See #2249
2016-07-21 21:03:44 +02:00
Bjørn Erik Pedersen 593a546fc6 Check for nil Params in shortcode's Get
Fixes #2294
2016-07-21 17:22:31 +02:00
Bjørn Erik Pedersen 0bdc0d62d4 Add shortcode null param variant
See #2294
2016-07-21 15:30:43 +02:00
Peter Panagiotakos 198efc89ca docs: Add Algolia as commercial search service 2016-07-21 14:53:23 +02:00
Bjørn Erik Pedersen e9924e964b Add shortcode test for mmark 2016-07-20 00:40:40 +02:00
Anthony Fok c0eedfe956 docs: Update last-mod date of installing-on-windows.md
Sorry, this should have been part of the previous commit.
2016-07-18 18:06:39 -06:00
Anthony Fok 10ad648e2f docs: Fix PATH issue in the instruction for Windows 10
i.e., "The PATH entry should be the folder where Hugo lives, not the binary."
Fixes #2280.

Also fix a rendering issue with list entries that consist of multiple
paragraphs by using four spaces instead of two.  Special thanks to
@shurcooL for the insight!  (Fixes #2285)

Also made a few minor formatting tweaks.
2016-07-18 17:58:26 -06:00
Cathal Garvey 20555b1630 Add htmlEscape and htmlUnescape template functions
These functions allow trivial escaping and unescaping of HTML entities,
and make it far easier to compose other functions for the creation of
parameterised URLs.
2016-07-19 00:14:05 +02:00
Bjørn Erik Pedersen 7dd5cd675a Bump Travis to Go 1.6.3 2016-07-18 23:46:37 +02:00
Bjørn Erik Pedersen 3564f09e3d tpl: Add humanize examples to smoke tests 2016-07-14 20:32:32 +02:00
Cathal Garvey 55a4f6e48e Do not double-escape in querify
Test case modified and expanded for querify to reflect original bug and changes.

Fixes #2279
2016-07-14 15:53:33 +02:00
Bjørn Erik Pedersen ef9b915680 Revert "Throw a noisy error when a post has no layout"
We have to figure out another way. There are perfectly valid reasons not having a layout for a page (I have have some broken sites as result of this).

See #1313

This reverts commit b15934008f.
2016-07-14 11:29:21 +02:00
Bjørn Erik Pedersen 318558f26c docs: Add 404 template
Closes #1965
2016-07-14 00:01:06 +02:00
Aditya Bhargava b15934008f Throw a noisy error when a post has no layout
Fixes #1313
2016-07-13 23:57:18 +02:00
Henrique Dias af34613f75 Update frontmatter.go 2016-07-13 23:53:06 +02:00
Michael Orr 0a812beb12 tpl: Modify tpl.humanize to ordinalize integer input
Add logic to tpl.humanize such that it understands input of int literals
or strings which represent an integer. When tpl.humanize sees this type
of input, it will use inflect.Ordinalize as opposed to the standard
inflect.Humanize.

Fixes #1886
2016-07-13 22:09:59 +02:00
Mathias Biilmann 330639d2ae Fix panic when using URLize
Using URLize on a string like '100%-true' would cause a panic
2016-07-11 10:06:40 +02:00
Alexandre Bourget 32d82a4496 Ignore emacs temp files 2016-07-11 02:01:45 +02:00
Bjørn Erik Pedersen d44bb4ec05 Revert "Use bufferpool in Asciidoc handler"
This reverts commit 068a77151e.

This was hasty. We would need to create a copy to use the pool in this case.
2016-07-10 19:42:14 +02:00
Bjørn Erik Pedersen 7c125ebb7d Revert "Use bufferpool in Rst handler"
This reverts commit d9bc233f1f.

This was hasty. We would need to make a copy to use the pool in this case.
2016-07-10 19:41:16 +02:00
Bjørn Erik Pedersen adf405496e Fix humanize when string is empty
Fixes #2272
2016-07-10 15:10:22 +02:00
Bjørn Erik Pedersen d9bc233f1f Use bufferpool in Rst handler 2016-07-10 12:54:15 +02:00
Bjørn Erik Pedersen 00d70e5569 Remove []byte to string to []byte conversion in Rst 2016-07-10 12:52:20 +02:00
Bjørn Erik Pedersen 068a77151e Use bufferpool in Asciidoc handler 2016-07-10 12:31:31 +02:00
Bjørn Erik Pedersen ed5ad12af3 Remove []byte to string to []byte conversion in Asciidoc 2016-07-10 12:28:34 +02:00
Bjørn Erik Pedersen 1d7f4413f5 Consolidate the Render funcs 2016-07-10 11:36:25 +02:00
Bjørn Erik Pedersen 4a48b5f326 Replace replace-this-with-your-hugo-site.com with example.org
Fixes #2264
2016-07-08 21:38:28 +02:00
Vincent Batoufflet b8af06f26a Make auto-date disabled by default
Fixes #2244
Closes #2260
2016-07-08 14:43:10 +02:00
Bjørn Erik Pedersen b581bbd856 Make config flag global
Fixes #2261
2016-07-07 18:06:48 +02:00
Bjørn Erik Pedersen 223073c6fd transform: Add missing GoDoc 2016-07-06 23:23:44 +02:00
Bjørn Erik Pedersen 39fe42cf6b Simplify querify 2016-07-06 20:57:37 +02:00
Jimmy Sawczuk fbf48824ae tpl: Add a querify function to generate query strings inside templates
The query function will take a set of parameters specified like a dict and return a url.Values object which can be .Encode'd into a query string.

Example:

<a href="http://www.google.com?{{ (querify "q" "test" "page" 3).Encode | safeHTML }}">Search</a>

Returns:

<a href="http://www.google.com?page=3&q=test">Search</a>

Closes #2257
2016-07-05 19:52:45 +02:00
Bjørn Erik Pedersen 770df77b22 Add Docutils to Travis
Fixes #2255
Closes #2254
2016-07-04 12:58:14 +02:00
Bjørn Erik Pedersen 05a33e314e Add Asciidoctor to Travis
Fixes #2250
2016-07-04 12:58:09 +02:00
Bjørn Erik Pedersen e6d97c4fca Add Rst shortcode test
Fixes #2253
2016-07-04 10:49:20 +02:00
Bjørn Erik Pedersen 5388211c11 Add Asciidoc shortcode test
Fixes #2249
2016-07-04 00:33:08 +02:00
Bjørn Erik Pedersen 6c0f705217 Fix Emoji benchmark
The Emoji implementations gives slightly different output. One of them pads with a space.
2016-07-01 17:59:39 +02:00
Bjørn Erik Pedersen aa66478c20 Add Emoji test case
See #2246
2016-07-01 17:06:13 +02:00
Dragos Plesca 7e08d23eeb transform: Explicitly bind LiveReload to server port
If hugo server is run on port 80 or 443, LiveReload does not
correctly bind to the same port, instead using port 35729.
This commit adds functionality to inform LiveReload of the
correct port to bind to.

See https://github.com/livereload/livereload-js/issues/16

Partially contributed by Jeff Minard (@chuyskywalker).

Fixes #2205
2016-06-30 16:47:56 -06:00
JoeArizona 0ce6438268 docs: Update install instructions to reflect hugo.exe filename change
The install tutorial instructed users to rename the *.exe file to
hugo.exe because it used to have a big long name.
In Hugo 0.16 the file is already named hugo.exe, so the tutorial
made no sense on that point. Edited out those instructions.
2016-06-30 02:16:16 -06:00
Riku-Pekka Silvola e140070c9a docs: Add tutorial for GitLab Pages 2016-06-30 00:35:59 -06:00
Cameron Moore ca6b26fe65 commands: Allow schema-less baseURL on command line
Fixes #1632
2016-06-29 23:08:55 -06:00
Anthony Fok 5572e3496b Update Travis config to Go 1.6.2 2016-06-29 23:05:48 -06:00
Anthony Fok 195a2b3845 docs: Suggests the use of delimiter for taxonomy listing
as a shortcut suggested by @digitalcraftsman.

See #2143
2016-06-29 22:52:29 -06:00
Roy Reveltas 364686ecbb docs: Add additional example for taxonomies listing
Add another example how to list taxonomies inline,
adding title (singular or plural) and commas between taxonomies.

See #2143
2016-06-29 22:36:34 -06:00
Vincent Batoufflet eda3678742 Add automatic page date fallback
Closes #2239
2016-06-28 23:50:50 +02:00
marco c21e2b3b4d tpl: Enable safeHTMLAttr
See #2234 and #347
2016-06-27 09:18:14 -06:00
Bjørn Erik Pedersen cdd6a124c2 Add test for shortcode in fenced code block
Which I expected to fail, but it doesn't ...

See #2223
2016-06-26 19:46:29 +02:00
Cameron Moore e3b162ccc6 transform: Don't use helpers.StringToReader 2016-06-25 18:02:07 -05:00
Cameron Moore e2aea65170 helpers: Remove ToReader funcs
Remove StringToReader and BytesToReader in favor of using the stdlib directly.
2016-06-25 17:57:05 -05:00
Bjørn Erik Pedersen 29ca323a34 docs: Regen commands doc
Fixes #2235
2016-06-22 14:03:18 +02:00
Bjørn Erik Pedersen 1accd3ba88 Fix example for autocomplete
See #2235
2016-06-22 13:59:53 +02:00
Cameron Moore a4b8496210 docs: Fix typo is 0.16 release notes 2016-06-20 13:21:10 -05:00
Bjørn Erik Pedersen ca5ae50c2b Revert "docs: Refactor /docs to use the block keyword"
I forgot that we support Go 1.5 ...

This reverts commit 3a2748e0d2.
2016-06-20 17:53:27 +02:00
Bjørn Erik Pedersen 3a2748e0d2 docs: Refactor /docs to use the block keyword
Fixes #2226
Closes #2229
2016-06-20 15:50:41 +02:00
Martijn ten Bhömer 357c9db235 docs: Add mtbhomer.com to the showcase 2016-06-19 16:12:59 +02:00
Bjørn Erik Pedersen 714d4a9a97 Fix failing Windows test
Closes #2225
2016-06-18 13:58:54 +02:00
Kishin Yagami 44edd9382a Add tests for embedded shortcodes
Fixes #1956
Closes #2204
2016-06-18 11:49:55 +02:00
Cameron Moore 8b54843a0d hugo: Revert git commit message guidelines 2016-06-17 08:23:43 -05:00
Cameron Moore 373ca66287 hugo: Update contribution guidelines
Refactor the contribution guidelines in the README and CONTRIBUTING
files.

Simplify the contribution guide in the README and move most of the
complex stuff into CONTRIBUTING.

Add an explicit commit message guidelines section to CONTRIBUTING.  Keep
all of the guidelines from Chris Beams except for the 72 character line
limit (we don't follow that, nor does the Go team).  Add three new
guidelines: package prefix in subject, references in body, and
encouragement of message body in general.

Add a new section to CONTRIBUTING on using Git Remotes.
2016-06-16 16:31:22 -05:00
Hanchen Wang c52bb4efbe commands: Specify os port generic errors
Closes #2217
2016-06-16 15:28:06 +02:00
Bjørn Erik Pedersen aa690c8e95 commands: Fix charsets in mimetypes
Fixes #2218
2016-06-15 19:34:21 +02:00
Bjørn Erik Pedersen 34f40044d7 Fix shortcode in markdown headers
This issue was introduced as a fix to shortcode not working in RST.

One could argue that Blackfriday and friends should handle `#` in titles, but that will be a discussion
for another day.

The new placeholder pattern should be RST safe and work with titles.

And now with a test so this doesn't break again.

Fixes #2192
Fixes #2209
Closes #2210
2016-06-15 09:12:07 +02:00
Cesare 6ba074562c docs: Add upbeat.it to the showcase 2016-06-14 18:19:03 +02:00
Roberto Rosario c01f98255b docs: Add mayan-edms to the showcase 2016-06-14 18:13:19 +02:00
Bjørn Erik Pedersen 8588103316 Unexport ShouldBuild and AssertShouldBuild 2016-06-14 15:53:49 +02:00
Hanchen Wang eeaafb4b26 hugolib: futureStats plural 2016-06-14 15:45:27 +02:00
Hanchen Wang fb0c1350d4 hugolib: Handle unpecified date for IsFuture and IsExpired 2016-06-14 15:45:26 +02:00
Hanchen Wang 673e41bf6a hugolib: Add expiredStats to build feedback 2016-06-14 15:45:26 +02:00
Hanchen Wang 32c0e3fd1f hugolib: Bug fix futureStats 2016-06-14 15:45:26 +02:00
Hanchen Wang 4724a5794e hugolib: Refactor page.ShouldBuild and table driven test 2016-06-14 15:45:26 +02:00
Hanchen Wang f7b2e532e2 docs: Add ExpiryDate to the list of variables 2016-06-14 15:45:26 +02:00
Hanchen Wang 448f0306d7 docs: Example of how to use Order by ExpiryDate 2016-06-14 15:45:26 +02:00
Hanchen Wang 02d2f05e74 docs: Add instructions on buildExpired in build configurations 2016-06-14 15:45:26 +02:00
Hanchen Wang 6e9fbf8ad6 docs: Add expirydate to front-matter doc 2016-06-14 15:45:26 +02:00
Hanchen Wang 5461a5e03d commands: Add listExpiredCmd for expired pages 2016-06-14 15:45:26 +02:00
Hanchen Wang 51f7cd9bde commands: Add buildExpired flag 2016-06-14 15:45:26 +02:00
Hanchen Wang c1c8ecc9d6 hugolib: Add GroupByExpireDate function 2016-06-14 15:45:26 +02:00
Hanchen Wang 091915c75d hugolib: Add sort ByExpiryDate function 2016-06-14 15:45:25 +02:00
Hanchen Wang 6472f158a4 hugelib: Add expiredCount as a Site variable 2016-06-14 15:45:25 +02:00
Hanchen Wang d4156e6127 hugolib: Support an expiration date 2016-06-14 15:45:25 +02:00
Bjørn Erik Pedersen 2564f46a68 Fix Emojfy for certain text patterns
Fixes #2198
2016-06-11 20:40:56 +02:00
Bjørn Erik Pedersen 683888ebc8 Change hugo to Hugo in help text 2016-06-09 16:03:25 +02:00
Marvin Pinto 5d3aabcb32 Update the alias generated HTML files to conform to the W3C HTML spec
- W3C recommends that there be a [whitespace character][1] between the
`;` and the `url=` portions.

- W3C also recommends that there be a [title][2] child in the `head`
element

[1]: https://www.w3.org/TR/html-markup/meta.http-equiv.refresh.html
[2]: https://www.w3.org/TR/html-markup/head.html

Closes #1933
2016-06-09 15:57:35 +02:00
Sam Broughton 75deb923d9 Remove unneeded casts in page.getParam
Closes #2186
2016-06-09 15:40:06 +02:00
Cody W. Opel acbedf6220 Fix urlesc import url in Dockerfile 2016-06-08 01:33:14 -06:00
James Campbell 48ebd598a9 docs: Add jamescampbell.us to the showcase 2016-06-06 21:04:02 +02:00
Steve Francia f9cadee8de Bump version to 0.17-DEV 2016-06-06 09:10:55 -04:00
Steve Francia 7212e51347 Update release-notes.md
bump 0.16 to the correct date and add meta generator note.
2016-06-06 08:37:59 -04:00
Bjørn Erik Pedersen b7513ea6ff Get Dockerfile up-to-date 2016-06-05 11:06:04 +02:00
Bjørn Erik Pedersen a7f51703c4 Add Hugo generator tag to home page if not present
Fixes #2182
2016-06-04 21:55:56 -04:00
Bjørn Erik Pedersen 80ebe0578a Update release-notes.md 2016-06-04 21:44:38 +02:00
Bjørn Erik Pedersen 60184823e5 docs. Add the guranteed exit -1 on eror to Hugo 0.16 rel notes
It is a minor thing, but  BIG thing for many, including myself.
2016-06-04 00:14:32 +02:00
Bjørn Erik Pedersen cf10d4ce79 Some polish and addends to 0.16 release notes 2016-06-03 22:54:18 +02:00
Bjørn Erik Pedersen d4e5fa6fdf Pull the shootouts about 0.16 into the intro section 2016-06-03 20:53:33 +02:00
Steve Francia 26c18005a2 Remove HugoVersionSuffix "-DEV" prior to 0.16 release 2016-06-03 11:51:45 -04:00
Steve Francia 834d41771b update release notes for 0.16 release 2016-06-03 11:33:51 -04:00
Steve Francia f94cd2813d Handle errors during rereading properly
Without this fix, any error during rereading would cause Hugo to hang.
Fixes #2168
Closes #2179
2016-06-02 23:47:30 +02:00
Steve Francia d1cf262b74 Ignore __jb_tmp___ files created by IntelliJ 2016-06-02 23:47:01 +02:00
Steve Francia f8e4a0608c Annotate temp files that Hugo ignores 2016-06-02 23:47:01 +02:00
Frank Blecha ce05dfa553 docs: Grammar fix in overview/quickstart.md 2016-06-02 22:13:01 +02:00
digitalcraftsman 4ab5ed6c21 docs: Add Digital Ocean articles to press section 2016-05-30 20:25:50 +02:00
digitalcraftsman d486396ff5 docs: Add c't magazine article to press section 2016-05-29 12:02:07 +02:00
digitalcraftsman 20358f46c8 docs: Document UniqueID page variable 2016-05-27 20:14:52 +02:00
Roy Reveltas 5611631539 docs: Add an example of how to use .PrevInSection
It's not a common knowledge what the "pointer" is so let's
add an example of how to use .PrevInSection
2016-05-27 20:02:29 +02:00
David King c21b1558ae docs: Add note about live reload script injection
Answers common question in docs.
https://discuss.gohugo.io/t/livereload-only-works-on-the-homepage/1006/4
2016-05-27 19:51:17 +02:00
Brijesh Bittu dcee05b2ae docs: Fix minor typo in overview/quickstart.md 2016-05-27 19:32:27 +02:00
Peter Y. Chuang efae41c186 docs: Add novelist.xyz to the showcase 2016-05-22 14:08:45 +02:00
Martin Linkov 90362933ee docs: Fix typo / readability in extras/menu.md 2016-05-22 11:30:29 +02:00
Stefano Chiodino 6dec7b3ea6 docs: Add stefano.chodino.uk to the showcase gallery. 2016-05-22 11:25:07 +02:00
Andreas Linz dec744316e docs: Add klingt.net to the showcase gallery 2016-05-18 12:23:40 +02:00
Amit Saha 9305deca15 docs: Clarify that watch is enabled by default 2016-05-18 12:08:26 +02:00
nurp 9aa70af1a3 docs: Fix git clone for hugo_theme_robust in quickstart guide 2016-05-17 21:10:04 +02:00
digitalcraftsman ac938d9da7 docs: Improve description for .Hugo.Generator 2016-05-11 20:59:31 +02:00
Bjørn Erik Pedersen 64817cc0d1 Fix broken template test 2016-05-09 23:18:18 +02:00
Bjørn Erik Pedersen 26906d8569 Don't add any space around Emojis 2016-05-09 22:59:49 +02:00
Bjørn Erik Pedersen 608cfe62cf Remove kr/pretty dependency
Fixes #2124
See https://github.com/kr/text/issues/6
2016-05-08 13:16:16 +02:00
Cameron Moore fd40fe39bc docs: Document relativeURLs
Fixes #1342
2016-05-07 16:52:18 -05:00
Bjørn Erik Pedersen b5030782ae Ignore Byword temp files
Fixes #2126
2016-05-06 20:30:03 +02:00
Bjørn Erik Pedersen 273a68400f Add non-string support in markdownify 2016-05-06 10:11:17 +02:00
yuzroz 7cbafa4ec5 docs: Fix typo in overview/configuration.md 2016-05-04 21:44:28 +02:00
Alex Leventer a07889d4a3 docs: Fix typo in templates/content.md 2016-05-04 21:40:22 +02:00
mattjmcnaughton bf4206a02f docs: Fix links in the documentation
A couple of internal links use `#toc_4` to attempt to locate a document
element within another document page. In both of these instances, there
is no element on the linked to pages with the id `#toc_4`. This commit
updates those links with the document elements which were the original
intended links, meaning these links now take you directly to the
intended element.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2016-05-04 21:35:24 +02:00
Masashi Tsuru 5caea6f2da docs: Add 2626.info to the showcase 2016-05-03 20:23:04 +02:00
Christopher Mancini 09038865c2 tpl: Add intersect operator to where function
Returns true if a given field value that is a slice / array of strings, integers or floats contains elements in common with the matching value. It follows the same rules as the intersect function.

Closes #1945
2016-04-28 00:58:47 +02:00
Göran Svensson ffbd2b6c67 docs: Add appernetic blog to showcase 2016-04-27 22:05:45 +02:00
Bjørn Erik Pedersen 2b02a402a0 commands: Sett mime type for CSS in Hugo server
Fixes #2104
2016-04-27 21:40:35 +02:00
Cameron Moore e4ee1b89ad helpers: Use net/url for URL parsing in AbsURL
Fixes #2112
2016-04-27 10:29:46 -05:00
Henrique Dias 16b71bbbb4 Export "detectFrontMatter" to fix caddy-hugo
Closes #2108
2016-04-26 22:28:47 +02:00
Fahri Aydos c5723a8931 docs: Add aydos.com to the showcase 2016-04-23 21:57:31 +02:00
Bjørn Erik Pedersen 4152ce886b Update release-notes.md 2016-04-22 23:45:39 +02:00
Bjørn Erik Pedersen 7da9163df9 docs: More on release notes 2016-04-22 21:37:36 +02:00
Bjørn Erik Pedersen efa9bdcc11 docs: Order by Lastmod in release notes 2016-04-22 20:47:21 +02:00
Bjørn Erik Pedersen eb627ca16d docs: Order by Lastmod 2016-04-22 20:46:04 +02:00
Bjørn Erik Pedersen 10af906371 Add ByLastmod page sort 2016-04-22 20:43:18 +02:00
Alvaro Garcia fbca53ac32 docs: Add notion of exiting the themes folder in quickstart 2016-04-22 19:47:59 +02:00
Cian Ruane fe2b22fe6f docs: Grammar fixes in overview/quickstart.md 2016-04-22 19:43:11 +02:00
lynxiayel 19afa5ee6c docs: Update showcase screenshot of yulinling.net 2016-04-22 19:36:33 +02:00
Bjørn Erik Pedersen 81a2466b80 docs: Add some more fixes to release notes 2016-04-22 19:03:46 +02:00
digitalcraftsman ebefa47691 docs: Move image-width fix to style.css 2016-04-22 18:23:12 +02:00
digitalcraftsman 48fce6110d docs: Move Algolia styling into style.css 2016-04-22 18:18:50 +02:00
Sven Dowideit 22683a3b66 Make alias redirect output URL's relative
Closes #2093
2016-04-22 08:14:19 +02:00
Cameron Moore 76738347d3 docs: Fix findRE typo 2016-04-21 12:38:40 -05:00
Bjørn Erik Pedersen a8e05b1196 docs: Fix some typos in release notes 2016-04-21 11:27:12 +02:00
Bjørn Erik Pedersen 56cd308184 doc: Get feature list of 0.16 release notes up to date 2016-04-21 11:23:54 +02:00
Bjørn Erik Pedersen 01c3389857 📚 Add ENV support to release notes 2016-04-20 23:50:43 +02:00
Anthony Fok 9ddf52021b Update import path of fsnotify
Rename "gopkg.in/fsnotify.v1" to "github.com/fsnotify/fsnotify"
per upstream recommendation.

See https://github.com/fsnotify/fsnotify/issues/108 for rationale.
2016-04-20 22:28:26 +08:00
Bjørn Erik Pedersen 5e9b147c2a docs: Add some doc about ENV config
See #2090
2016-04-18 18:45:37 +02:00
Bjørn Erik Pedersen b7fd410245 commands: Support config from ENV
So

```bash
env HUGO_TITLE="Some Title" hugo server
```

Will change the `title`.

Fixes #2090
2016-04-18 18:45:37 +02:00
digitalcraftsman 0743c76795 docs: Fix typo in tutorials/how-to-contribute-to-hugo.md 2016-04-17 20:57:21 +02:00
Bjørn Erik Pedersen 77159b4b9b Add some schemaless BaseURL tests
See #2085
2016-04-17 20:01:21 +02:00
Ernie Hershey 215b8939bd docs: Fix grammar in templates/partials.md
Noticed this sentence seemingly missing a word or two.
2016-04-15 18:57:30 +02:00
callmelanmao fed5f20f89 docs: Add tutorialonfly.com to the showcase 2016-04-15 18:54:42 +02:00
digitalcraftsman 4b4bfa6a9c docs: Fix lastmod date for chipsncookies in showcase 2016-04-15 18:45:46 +02:00
David Coallier 6fdb0ca6eb docs: Add barricade.io to the showcase 2016-04-15 18:43:55 +02:00
Sam Debruyn ba0a661410 docs: sa.muel.be has moved to chipsncookies.com in showcase 2016-04-15 18:31:07 +02:00
Bjørn Erik Pedersen c40bc27468 Improve build labels in README 2016-04-15 13:02:03 +02:00
Robert Basic 24cb0d1f58 tpl: Do not write to cache when ignoring cache
Fixes #2067
Closes #2069
2016-04-14 10:48:26 +02:00
Mattias Wadman 5d50c46482 Chomp Unicode BOM if present
Useful if using or sharing files with users that use editors that
append a unicode byte order marker header (like Windows notepad).

This will still assume files are UTF-8 encoded.

Closes #2075
2016-04-14 10:46:27 +02:00
Bjørn Erik Pedersen d48b986c45 Revert "tpl: Extend where to iterate over maps"
Committed by accident.

This reverts commit 0141a02160.
2016-04-13 19:13:33 +02:00
Bjørn Erik Pedersen dc8659c539 Update Travis config to Go 1.5.4 and 1.6.1 2016-04-13 16:17:43 +02:00
Cameron Moore 0141a02160 tpl: Extend where to iterate over maps
Refactor and extend where to iterate over maps.
2016-04-13 11:43:06 +02:00
Bjørn Erik Pedersen 206440eef2 Fix broken tests 2016-04-12 19:18:02 +02:00
Bjørn Erik Pedersen 88759eecf7 docs: Add plainIDAnchors change to release notes 2016-04-12 18:39:07 +02:00
Bjørn Erik Pedersen 0d9a5f8023 docs: Update default for plainIDAnchors 2016-04-12 18:36:45 +02:00
Bjørn Erik Pedersen 06772eefcd Default to plainIDAnchors
Fixes #2057
2016-04-12 18:34:46 +02:00
Bjørn Erik Pedersen c3d28d2897 Revert "Add Node.ID"
This reverts commit 5ef52294f9.
2016-04-12 18:11:52 +02:00
Bjørn Erik Pedersen 39c9ae3108 Revert "Use Node.ID for anchor ID"
This reverts commit cd558958a0.
2016-04-12 18:11:24 +02:00
Bjørn Erik Pedersen 2468b10eb3 docs: Fix example for Param method
Fixes #2070
2016-04-11 13:26:33 +02:00
Bjørn Erik Pedersen cd558958a0 Use Node.ID for anchor ID
Fixes #2057
2016-04-11 13:17:25 +02:00
Bjørn Erik Pedersen 5ef52294f9 Add Node.ID
Fixes #2071
2016-04-11 11:49:02 +02:00
Robert Basic 37fb2d43e5 helpers: Ignore cache for Pygments when flag set
When the --ignoreCache flag is set to true, do not write and read
the Pygments results to/from the cache directory.

Fixes #2066
Closes #2068
2016-04-10 20:55:57 +02:00
Bjørn Erik Pedersen c0cf1a7e37 Fix section menus for lazy blogger
IsMenuCurrent was always returning false for the top level entries.

Fixes #2065
2016-04-10 13:49:32 +02:00
Bjørn Erik Pedersen dde967d8ca hugofs: Add package doc 2016-04-10 01:36:53 +02:00
Bjørn Erik Pedersen 16ee856636 create: Add package doc 2016-04-10 01:36:03 +02:00
Bjørn Erik Pedersen 257dee5356 bufpool: Add package doc 2016-04-10 01:34:15 +02:00
Bjørn Erik Pedersen 4d34a98a28 Add GoDocs badge 2016-04-10 00:14:16 +02:00
Bjørn Erik Pedersen ff7eec2f48 docs: Regenerate the commands docs 2016-04-09 23:01:55 +02:00
digitalcraftsman b7efbdc12f hugolib: Add option to disable rendering of 404 page
Fixes #1889
Closes #2037
2016-04-09 20:25:59 +02:00
nitoyon 72bda5ad26 Move section initialization to Site.assembleSections
Closes #1527
2016-04-09 20:13:35 +02:00
Bjørn Erik Pedersen 8fe48a6576 Fix potential data race in test 2016-04-09 14:30:22 +02:00
Göran Svensson 39c74b70dc docs: Add commercial services to the "Tools" section 2016-04-09 14:03:45 +02:00
Aditya Bhargava 51ee3fc735 docs: Document how to install dependencies for tests
Fixes #919
2016-04-09 13:52:00 +02:00
JoeArizona 88a07b7564 docs: Fix missing step in Windows version check instructions
The procedure Start button --> Settings --> About was missing a step. Corrected it to: Start --> Settings --> System --> About. Also replaced ASCII arrows (-->) with Unicode right arrow character (U+2192).
2016-04-09 13:43:40 +02:00
Erik Ebsen 65f9427031 docs: Document Go 1.6's new ability to trim whitespace 2016-04-09 13:21:23 +02:00
Bjørn Erik Pedersen e4d328d835 docs: Fix Go version in install guide 2016-04-09 13:16:56 +02:00
digitalcraftsman ac1ec5c72c docs: Remove remaining Mercurial references 2016-04-09 12:40:58 +02:00
ypnos 9f6b5ad3b4 Save auto-detected markup type in Page.Markup
If Page.Markup was not set by the user, it will now be set after
guessing from the file extension. This means, Page.Markup will be set in
any case. It can be used by a theme to differentiate between markup
types.

Fixes #1950
2016-04-09 00:48:53 +02:00
digitalcraftsman e6e98bf52d docs: Remove Mercurial from contribution tutorial
Fixes #2064
2016-04-08 21:52:50 +02:00
digitalcraftsman 6c900380dc tpl: Add replaceRE to the "smoke tests"
Fixes #2063
2016-04-08 21:36:35 +02:00
Bjørn Erik Pedersen f2ff77f3ac Make Hugo build without Mercurial
By creating a fork of the Bitbucket inflect repo. It hasn't changed since 2013,
so it must be considered pretty stable.

Fixes #2062
2016-04-08 21:11:44 +02:00
digitalcraftsman ebf3cef162 docs: Add "How to contribute to Hugo" tutorial 2016-04-08 19:18:58 +02:00
Nik Nyby 970f15cf7a docs: Use HTTPS links in README where appropriate 2016-04-08 19:14:08 +02:00
digitalcraftsman d3e829508b commands: Add helpful instuctions after "hugo new site"
Fixes #1164
2016-04-08 18:03:49 +02:00
Bjørn Erik Pedersen 1c3c148b38 hugolib: Un-export internal Site-methods
These are obviously internal and for the most part undocumented, creating lots of GoLint warnings.

See #1160
See #2014
2016-04-08 17:55:23 +02:00
Julien Chien 16ad628114 docs: Fix references to section list templates
Fixes #2032
2016-04-08 10:15:48 -05:00
Anthony Fok 6d2898b33b docs: Correct date for proper sorting in showcase 2016-04-08 20:23:10 +08:00
Bjørn Erik Pedersen 1873826651 docs: Add one more quote 2016-04-08 00:06:39 +02:00
Bjørn Erik Pedersen ef933e4a7f docs: Limit the quotes on front page to the last two years
We should get some new ones in there.

Also shuffle the order. This also means no merging into 0.15-docs ...

Which also means we should get a release out there ... soon!

See #2055

Also See https://github.com/BurntSushi/toml/issues/129 for an explanation to the little bit ugly dates.
2016-04-07 23:46:46 +02:00
Robert Basic 40f62a863c docs: Use data folder for website carousel
Fixes #2055
2016-04-07 22:50:38 +02:00
Sven Dowideit 1648e327c0 Document and clean SourceRelativeLinksEval code 2016-04-07 20:10:38 +02:00
Bjørn Erik Pedersen 819271cb78 Re-export the methods used in page group tests 2016-04-07 18:44:58 +02:00
Bjørn Erik Pedersen 3950b1375c hugolib: Camelcase ALL_CAPS vars and const in tests
See #2014
2016-04-07 16:10:41 +02:00
Bjørn Erik Pedersen 05b888877d huglib: Add even more missing GoDoc
See #2014
2016-04-07 16:05:23 +02:00
Bjørn Erik Pedersen 85bcac530a source: Add missing GoDoc in File
See #2014
2016-04-07 15:44:53 +02:00
Bjørn Erik Pedersen ddd02b2f6a hugolib: Camel-case ALL_CAPS const in test 2016-04-07 15:22:41 +02:00
Bjørn Erik Pedersen 98ee8c3f7b hugolib: Add GoDoc to pageGroup.go
See #2014
2016-04-07 15:21:41 +02:00
Bjørn Erik Pedersen 57c347e4cc hugofs: Fix GoDoc 2016-04-07 13:56:11 +02:00
Bjørn Erik Pedersen 969f9311c1 Build Hugo in Travis with race detection enabled 2016-04-07 13:40:18 +02:00
Bjørn Erik Pedersen fd5d573566 Add go test -race to make check 2016-04-07 13:36:48 +02:00
Bjørn Erik Pedersen 27f9e62bb3 Remove Wercker badge
See #2054
2016-04-07 13:28:26 +02:00
digitalcraftsman 5bfe16ef8d tpl: Add findRE template func 2016-04-05 22:26:03 +02:00
Bjørn Erik Pedersen 54750b0780 Do not create robots.txt by default
Meny people, including me, have a custom robots.txt in static.

Also remove that option from the command line; it doesn't feel
important enough.

Fixes ##2049
2016-04-05 22:20:39 +02:00
Philipp Oppermann 43b5dfabb5 Disable syntax guessing for PygmentsCodeFences by default
This disables highlighting for fenced code blocks without explicitly specified language. It also introduces a new `PygmentsCodeFencesGuessSyntax` config option (defaulting to false).

To enable syntax guessing again, add the following to your config file: `PygmentsCodeFencesGuessSyntax = true`

This is a breaking change.
2016-04-04 22:19:36 +02:00
ysqi 0698f294c6 docs: Add yushuangqi.com to the showcase 2016-04-04 20:37:39 +02:00
digitalcraftsman dea06f863e docs: embed YouTube video in Windows installation tutorial 2016-04-03 14:28:12 +02:00
JohnBlood 2304614639 docs: Update set PATH instructions for Windows 2016-04-03 14:22:50 +02:00
Robert Basic 21e0515fed docs: Fix menu in firefox
Fixes #1875
2016-04-03 14:04:48 +02:00
JohnBlood 1adf40355b docs: Add alternative for Wordpress import
I have had trouble getting the Wordpress to Hugo exporter working, so I
added this tip for others to take advantage of.
2016-04-03 13:35:42 +02:00
Bjørn Erik Pedersen f0dbf2c88f tpl: Add the other test case for hasPrefix 2016-04-03 01:59:47 +02:00
Bjørn Erik Pedersen aaee038581 tpl: Sort the smoke tests 2016-04-03 01:57:22 +02:00
digitalcraftsman 80d02a14ab tpl: Add hasPrefix to the template funcs' "smoke test" 2016-04-03 01:30:14 +02:00
digitalcraftsman 4502c4e3ae docs: Add documentation for hasPrefix template func
Fixes #2039
2016-04-03 00:44:43 +02:00
Cameron Moore fe929114d3 tpl: Fix panic in sort of nil sequence
Properly handle a nil sequence in the sortSeq function.  Test included.
Discovered while using `range sort .Site.Data.source.Undefined "foo"`.
2016-04-02 23:06:48 +02:00
Cameron Moore d15fda5000 tpl: Fix panic in pairList.Less
While sorting on data sources with missing fields, a panic can occur in
pairList.Less if `Interface()` is called on a invalid `reflect.Value`.
This commit detects an invalid Value and replacing it with a zero value
for the comparison.
2016-04-02 23:01:36 +02:00
Robert Basic 7d5c9fbf44 Make ByCount sort consistently
When two or more taxonomies have the same number of pages,
sort them by name to have consistent ByCount sorting of
taxonomies.

Fixes #1930
2016-04-02 22:59:10 +02:00
Bjørn Erik Pedersen c6c2c689d6 hugofs: Add missing not nil checks to tests 2016-04-02 01:23:12 +02:00
Bjørn Erik Pedersen b678e90db7 Use to most specific interface in WriteDestPage 2016-04-02 00:04:08 +02:00
Bjørn Erik Pedersen c2277fcbc1 docs: Add doc and a test for readDir
Fixes #2009
2016-03-31 23:16:42 +02:00
Bjørn Erik Pedersen cb89ae63e9 tpl: Make readDir use the WorkingDir fs
Fixes #2010
2016-03-31 23:06:51 +02:00
Bjørn Erik Pedersen 4f66f790b1 Add readFile template func
This also includes a refactor of the hugofs package and its usage.

The motivation for that is:

The Afero filesystems are brilliant. Hugo's way of adding a dozen of global variables for the different filesystems was a mistake. In readFile (and also in some other places in Hugo today) we need a way to restrict the access inside the working dir. We could use ioutil.ReadFile and implement the path checking, checking the base path and the dots ("..") etc. But it is obviously better to use an Afero BasePathFs combined witha ReadOnlyFs. We could create a use-once-filesystem and handle the initialization ourselves, but since this is also useful to others and the initialization depends on some other global state (which would mean to create a new file system on every invocation), we might as well do it properly and encapsulate the predefined set of filesystems. This change also leads the way, if needed, to encapsulate the file systems in a struct, making it possible to have several file system sets in action at once (parallel multilanguage site building? With Moore's law and all...)

Fixes #1551
2016-03-31 21:24:18 +02:00
digitalcraftsman a89035bdaa docs: Mention CLA in the showcase contribution guidelines 2016-03-30 18:01:50 +02:00
Rob Muhlestein 6a3a6f683d docs: Remove incorrent reference to list.html 2016-03-30 17:54:31 +02:00
digitalcraftsman 93e41a1fb2 docs: Fix typo in templates/functions.md 2016-03-28 17:04:29 +02:00
Rob Muhlestein d65fbfe16c docs: Add surge.sh to main page of static site hosters
See #1994
2016-03-28 16:44:13 +02:00
Robert Basic effaf6c2c9 docs: Document GitHub flavoured code fences
Fixes #1259
2016-03-28 16:38:28 +02:00
Robert Basic e35a69216e docs: Document lastmod variable
Fixes #1351
2016-03-28 16:33:50 +02:00
Robert Basic 50506ebeac docs: Document the split function
Fixes #1997
2016-03-28 15:58:41 +02:00
Scopel Emanuele 4c95b70020 docs: Add silvergeko.it to the showcase 2016-03-28 14:48:01 +02:00
Robert Basic 79af7143c9 docs: Add robertbasic.com to the showcase 2016-03-27 19:52:07 +02:00
Bjørn Erik Pedersen dbfc7ea024 Fix error handling in SymbolicWalk 2016-03-25 18:18:39 +01:00
Bjørn Erik Pedersen bfe8009415 helpers: Fix SymbolicWalk for the root folder
handle the root folders themselves.

This commit fixes that.

Fixes #2018
2016-03-25 12:49:23 +01:00
digitalcraftsman 977b0e342c docs: Adapt commit message for showcase additions 2016-03-25 12:32:46 +01:00
digitalcraftsman 8890885a70 docs: Add search form powered by Algolia 2016-03-25 11:22:01 +01:00
Bjørn Erik Pedersen 8aec5ee2dd hugolib: Some more unexports 2016-03-25 03:12:31 +01:00
digitalcraftsman 7c81c86bdd commands: Apply Golint rules 2016-03-24 23:34:12 +01:00
digitalcraftsman 5d3705df16 helpers: Apply GoLint rules 2016-03-24 23:16:18 +01:00
digitalcraftsman 7fa2cec906 tpl: Small Golint fixes 2016-03-24 22:56:50 +01:00
Bjørn Erik Pedersen b71f391cd7 parser: Remove unused vars 2016-03-24 21:34:34 +01:00
Bjørn Erik Pedersen 6dbae7b671 Be explicit about the type in Scratch test
A puzzle, but it sometimes produces a int64 as it is now.
2016-03-24 19:57:26 +01:00
Bjørn Erik Pedersen d770130530 hugolib: Remove unused Tmpl on Page 2016-03-24 18:34:41 +01:00
Bjørn Erik Pedersen c846b051f3 Do not use defer for unlocking in Scratch
It is a fairly costly operation:

```
benchmark                 old ns/op     new ns/op     delta
BenchmarkScratchGet-4     109           31.6          -71.01%

benchmark                 old allocs     new allocs     delta
BenchmarkScratchGet-4     0              0              +0.00%

benchmark                 old bytes     new bytes     delta
BenchmarkScratchGet-4     0             0             +0.00%
´´´
2016-03-24 16:03:31 +01:00
Bjørn Erik Pedersen fa1a9653e5 hugolib: Taxonomy GoDoc cleanup 2016-03-24 16:01:25 +01:00
Bjørn Erik Pedersen b5bced1db4 Add a simple benchmark for Scratch 2016-03-24 15:05:40 +01:00
Bjørn Erik Pedersen 7c84e6b3e3 hugolib: Even more Golint fixes 2016-03-24 14:42:03 +01:00
Bjørn Erik Pedersen 3e77886aad helpers: Fix GoDoc in Hugo version constants 2016-03-24 14:27:36 +01:00
Bjørn Erik Pedersen a7953e25bb commands: Apply Golint rules to hugo.go 2016-03-24 14:24:22 +01:00
Bjørn Erik Pedersen 3bbfd99176 hugolib: Apply Golint rules to rss_test.go 2016-03-24 14:20:00 +01:00
Bjørn Erik Pedersen b8bf01cdc6 hugolib: Add missing GoDoc in pagination.go 2016-03-24 14:18:47 +01:00
Bjørn Erik Pedersen c2c73c2bd2 hugolib: Some more GoLint fixes 2016-03-24 14:11:04 +01:00
Bjørn Erik Pedersen 218fceac35 livereload: Add missing GoDoc 2016-03-24 14:05:08 +01:00
Bjørn Erik Pedersen e467d23374 hugoblib: Clean up the time tests 2016-03-24 13:30:08 +01:00
Bjørn Erik Pedersen 944090722e transform: Group vars and consts in chain_test 2016-03-23 21:55:14 +01:00
Bjørn Erik Pedersen c7869fd772 transform: Clean up the var naming mess in chain_test 2016-03-23 20:03:13 +01:00
Bjørn Erik Pedersen a6de8dfb42 hugolib: Some more Golint fixes 2016-03-23 17:17:54 +01:00
Bjørn Erik Pedersen dac34f9bfd hugolib: Fix spelling mistake 2016-03-23 17:12:47 +01:00
Bjørn Erik Pedersen c31fa378c7 hugolib: Add Godoc to pageSort 2016-03-23 17:11:29 +01:00
Bjørn Erik Pedersen c20dee9d7f parser: Make the constant vars ... constants 2016-03-23 15:05:32 +01:00
Bjørn Erik Pedersen bf76e74432 parser: Fix ALL_CAPS var names in test 2016-03-23 15:02:00 +01:00
Bjørn Erik Pedersen 1cb7ed6ac7 parser: Spring code cleaning 2016-03-23 14:51:16 +01:00
Bjørn Erik Pedersen 937592cb85 hugolib: Fix some more Golint warnings 2016-03-23 10:10:28 +01:00
Bjørn Erik Pedersen 8a60571fd2 helpers: Fix and add Godoc in path* 2016-03-23 10:03:29 +01:00
Bjørn Erik Pedersen 6ff2e1dbe7 helpers: Remove the else in MakePathSanitized 2016-03-23 09:45:18 +01:00
Bjørn Erik Pedersen faf2e50685 Do some minor code cleaning of Site
* Unexport some methods/fields
* Add some godoc

Still plenty to do here.
2016-03-23 09:43:04 +01:00
Bjørn Erik Pedersen 626874b94c transform: Golint fixes 2016-03-23 09:35:50 +01:00
Bjørn Erik Pedersen 672890339e target: Fix some Golint warnings 2016-03-23 00:44:51 +01:00
Bjørn Erik Pedersen dc7d8a9eac Spring cleaning of the menu code 2016-03-23 00:29:39 +01:00
Bjørn Erik Pedersen 4f00f1c94f heloers: Add a linefeed to make Golint happy 2016-03-23 00:07:44 +01:00
Bjørn Erik Pedersen 9cf93e11f8 commands: Fix remaining Golint warning 2016-03-23 00:06:10 +01:00
Bjørn Erik Pedersen da4d4164f1 utils: Add godoc 2016-03-23 00:04:28 +01:00
Bjørn Erik Pedersen df92fc31ca hugolib: Fix Java-styled all-caps consts 2016-03-22 23:59:07 +01:00
Bjørn Erik Pedersen b0e21f967b helpers: Silence some Golint warnings 2016-03-22 23:53:19 +01:00
Bjørn Erik Pedersen 283b866386 commands: Do not use named return vals in Jekyll import 2016-03-22 23:44:02 +01:00
Bjørn Erik Pedersen 35b798247e Check returned error in Scratch-test 2016-03-22 23:40:39 +01:00
Bjørn Erik Pedersen 691c2ea970 Do make check in Travis 2016-03-22 23:14:17 +01:00
srinivasreddy b319c18969 source: Consolidate if conditions 2016-03-22 19:49:16 +01:00
srinivasreddy c54df37f6a source: Remove unnecessary else condition 2016-03-22 19:47:47 +01:00
Cameron Moore b1b7ac7e75 hugolib: Use field keys in composite literals
Small fix in shortcode tests to use field keys in a composite literal.
2016-03-22 19:43:28 +01:00
Bjørn Erik Pedersen b9127ecca6 helpers: Apply gofmt 2016-03-22 19:43:03 +01:00
Cameron Moore e8cf8b40df hugo: Add check tasks to Makefile
Add some helpful tasks to the Makefile to make it easier to test code quality
prior to committing.  Use `make check` to run the standard checks.  As of now,
the cyclo and lint tasks are not part of the standard checks since Hugo doesn't
pass those checks.
2016-03-22 19:40:27 +01:00
Bjørn Erik Pedersen 048e07422d Add Scratch to shortcode
Fixes #2000
2016-03-21 21:11:20 -04:00
Bjørn Erik Pedersen de8fc8761a Re-render shortcode on template or data file change
Fixes  #1971
2016-03-21 21:09:25 -04:00
Bjørn Erik Pedersen e5e1bcc271 Add plainify template function
To strip away any HTML. May be useful for the .Title in head etc.

People may shoot themself in the foot with this, maybe ...

The replacement function is pretty fast.
2016-03-21 20:27:25 -04:00
Bjørn Erik Pedersen e5aa477491 Add support for symbolic links for content, layout, static, theme
Note: This is for the content roots only, but that should satisfy most needs.

Fixes #1855
2016-03-21 19:13:29 -04:00
srinivasreddy 6258d48b02 Utils methods refactored for readability 2016-03-21 19:08:49 -04:00
Aditya Bhargava c42982f76b Add '+' as one of the valid characters in urls specified in the front matter
Fixes #1290
2016-03-21 18:48:50 -04:00
Bjørn Erik Pedersen 02effd9dc4 Protect against concurrent Scratch read and write
Fixes #2005
2016-03-21 20:42:27 +01:00
Cameron Moore f52b040ee1 docs: Draft of 0.16 release notes
Also included is an enhancement to the gh shortcode to support sending commit
hashes by prepending "0x" to the hash.
2016-03-21 14:08:39 +01:00
Anthony Fok d45b55bdd4 helpers: Rename getMmarkHtmlRenderer to getMmarkHTMLRenderer
To be consistent with the changes made in commit 67df33f, see #959.
2016-03-21 15:17:37 +08:00
Anthony Fok bec1ac7b33 livereload: Run go fmt on connection.go
See #1998 and commit bafb771
2016-03-21 14:25:00 +08:00
Cameron Moore 9323707b32 create: Refactor NewContent to be testable
NewContent is refactored to use the afero.Fs interface that should allow
full testing.  This commit also pulls the metadata creation logic out of
NewContent and into a separate function to decrease the cyclomatic
complexity of NewContent.
2016-03-20 23:51:17 +01:00
srinivasreddy bafb77172b livereload: Simplify conditional 2016-03-20 19:42:10 +01:00
Anthony Fok 2c5e4f7640 helpers: Support EXTENSION_BACKSLASH_LINE_BREAK for Blackfriday
Exposed as "backslashLineBreak" and enabled by default
as upstream have done.

Fixes #1935
2016-03-20 04:21:16 +08:00
Anthony Fok 4c4ce55217 helpers: Fix minor typo in content_test.go 2016-03-20 04:12:53 +08:00
Bjørn Erik Pedersen 0a768ec95f Simplify GetDottedRelativePath 2016-03-19 17:17:17 +01:00
Bjørn Erik Pedersen 8d86f1ec6e Return early from parseOptions 2016-03-19 17:12:10 +01:00
Bjørn Erik Pedersen 02e50c0126 Remove duplicate doArithmetic 2016-03-18 23:18:40 +01:00
Bjørn Erik Pedersen 42b302fc6b Revert "Add Codebeat badge"
Will have to review the rules on this code report  before people start sending PRs based on this.

This reverts commit c50c66879d.
2016-03-17 23:50:42 +01:00
Bjørn Erik Pedersen 3529152efe Return early from appendThemeTemplates 2016-03-17 23:36:11 +01:00
Tomasz Korzeniowski c50c66879d Add Codebeat badge 2016-03-17 23:28:41 +01:00
Bjørn Erik Pedersen 0ec8fc5490 Add Go Report Card badge to README 2016-03-17 23:24:24 +01:00
srinivasreddy 21054f730a source: Consolidate filepath.Split calls 2016-03-17 20:11:29 +01:00
Cameron Moore df44b1930a tpl: Send actual values to in from intersect
The `intersect` function uses `in` to avoid adding duplicates to the
resulting set.  We were passing `reflect.Value` items when we should
have been using `Value.Interface()` to send the actual data structure.
This fixes that.

See #1952
2016-03-17 20:09:43 +01:00
Cameron Moore 600558273e tpl: Add missing printf param in t.Errorf call 2016-03-17 20:07:41 +01:00
Cameron Moore b0326a1c0f tpl: Treat booleans as set in default function
Booleans and `default` don't really make sense together, so we'll always treat
booleans as "set" and return the given value.
2016-03-16 20:05:48 +01:00
digitalcraftsman b5c718a4de docs: Fix typos in functions.md and contributing.md 2016-03-16 13:04:41 +01:00
Bjørn Erik Pedersen 575ae1b3f9 Remove CircleCI badge for now 2016-03-15 19:04:24 +01:00
Bjørn Erik Pedersen 58802de313 No block support in shortcodes
So no need to check them.
2016-03-15 10:22:08 +01:00
Bjørn Erik Pedersen 3a2a4c3b07 tpl: Make the safeHTML and cousins accept more than strings 2016-03-14 22:27:40 +01:00
Bjørn Erik Pedersen 70739c972e Remove unnecessary type conversions 2016-03-14 20:35:50 +01:00
Bjørn Erik Pedersen 3a82ae7114 parser: Unexport some internals 2016-03-14 17:52:11 +01:00
Bjørn Erik Pedersen 5d915e7e96 helpers: Unexport some internals 2016-03-14 17:27:15 +01:00
Cameron Moore aedb13b219 tpl: Fix race condition in regexp cache
Protect regular expression cache with a mutex.

Fixes #1973
2016-03-14 16:58:08 +01:00
Bjørn Erik Pedersen f6c3ca8b2a transform: Remove unused code 2016-03-14 15:46:20 +01:00
Bjørn Erik Pedersen 263daaeabc target: Remove unused code 2016-03-14 15:44:45 +01:00
Bjørn Erik Pedersen 4ada1cab4d source: Remove unused code 2016-03-14 15:43:51 +01:00
Bjørn Erik Pedersen df3f2af0a8 parser: Remove unused code 2016-03-14 15:42:59 +01:00
Bjørn Erik Pedersen dea185aa9b hugolib: Remove unused code 2016-03-14 15:41:03 +01:00
Bjørn Erik Pedersen c21dc16dbe commands: Remove unused code 2016-03-14 15:24:42 +01:00
Bjørn Erik Pedersen 91ffc76b24 helpers: Remove unused code 2016-03-14 15:20:36 +01:00
Bjørn Erik Pedersen 0fb31e4a82 Create an alias from shortcode.Page.Site to shortcode.Site
Fixes #1976
2016-03-14 14:10:15 +01:00
Bjørn Erik Pedersen 734dd1c4d0 Bump Pygment version to 2.1.3
Fixes #1969
2016-03-13 22:16:00 +01:00
Bjørn Erik Pedersen 542e220cc4 Make tests green on both Pygments 2.0.2 and 2.1.3
See #1969
2016-03-13 22:06:51 +01:00
Bjørn Erik Pedersen 988962e8b5 Add Pygments 2.0.2 to CircleCI build
Hugo tests fail with 2.1.*, that have to be fixed before we upgrade,  see #1969
2016-03-13 13:45:46 +01:00
Bjørn Erik Pedersen 989c7487eb Add emojify to the template func smoke tests 2016-03-12 16:53:39 +01:00
digitalcraftsman 612c61146d Docs: move tutorial screenshots in their own subfolder 2016-03-12 13:08:46 +01:00
JoeArizona a103d58162 Docs: update Windows install instructions
- updated the instructions to account for Windows 10 path editor
- linked to third-party editors for pre-10 Windows
- separated instructions for technical and non-technical users changed
D drive paths to C drive since D is the default optical drive on most
Windows systems
- cut the assumption about 64-bit Windows since 32-bit binary is also available
- cut the assumption about command line since we're giving GUI instructions
to non-technical users
- cut a bug in the doc where we had people typing D: at the command prompt
*after* submitting `cd D:\Hugo\Sites.` Recommend snipping 386 and AMD from
ZIP file names, since they don't add useful info and will just confuse novices.
2016-03-12 13:02:54 +01:00
Jason Gowans 6fb4e0718a Docs: add Aerobatic as a deployment option in the Introduction 2016-03-12 12:19:56 +01:00
Jason Gowans d9049752dc Docs: add tutorial for Hosting on Bitbucket 2016-03-12 12:19:31 +01:00
Daniel Compton 153dccc0e8 Add debugging steps for no variables defined 2016-03-12 21:44:50 +13:00
John Ku 0ab4162413 Ability to config layout and content dir via cli
fixes spf13/hugo#1598
2016-03-11 23:42:27 +01:00
Bjørn Erik Pedersen cafb784799 Add emoji support
This uses the Emoji map from https://github.com/kyokomi/emoji -- but with a custom replacement implementation.

The built-in are fine for most use cases, but in Hugo we do care about pure speed.

The benchmarks below are skewed in Hugo's direction as the source and result is a byte slice,
Kyokomi's implementation works best with strings.

Curious: The easy-to-use `strings.Replacer` is also plenty fast.

```
BenchmarkEmojiKyokomiFprint-4  	   20000	     86038 ns/op	   33960 B/op	     117 allocs/op
BenchmarkEmojiKyokomiSprint-4  	   20000	     83252 ns/op	   38232 B/op	     122 allocs/op
BenchmarkEmojiStringsReplacer-4	  100000	     21092 ns/op	   17248 B/op	      25 allocs/op
BenchmarkHugoEmoji-4           	  500000	      5728 ns/op	     624 B/op	      13 allocs/op
```

Fixes #1891
2016-03-11 15:51:37 -06:00
Salar Rahmanian 5926c6c8d5 Update showcase entry and article link to softinio.com 2016-03-11 22:31:59 +01:00
Cameron Moore b8d3651242 tpl: Add replaceRE function
This commit addes a `replaceRE` template function.  Regexp patterns are compiled
once and cached.
2016-03-11 19:59:18 +01:00
Konstantin Kliakhandler e9008b91fa Allow picking a specific file out of a gist 2016-03-11 18:29:07 +01:00
Bjørn Erik Pedersen 7cd69aaae8 Exit with error code on any error
Fixes #740
2016-03-11 10:57:13 +01:00
Bjørn Erik Pedersen 077b0fa71f Add package prefix to the commit message guidelines 2016-03-11 10:30:17 +01:00
Avery Rosen 0667d8a0f5 Add engineering.mongodb.com to the showcase 2016-03-10 21:46:12 +01:00
Bjørn Erik Pedersen 941b4caf57 tpl: Add Copyright reference to the Go authors
Also a reference to the `index`issue in Go's issue tracker.
2016-03-10 21:00:53 +01:00
Shekhar Gulati 6cb032b67e Docs: use Shekhar Gulati's Hugo tutorial as quickstart guide 2016-03-10 20:36:54 +01:00
Cameron Moore 2d0650dbd9 tpl: Add custom index function
This commit adds a custom index template function that deviates from the stdlib
simply by not returning an "index out of range" error if an array, slice or
string index is out of range.  Instead, we just return nil values.  This should
help make the new default function more useful for Hugo users.

Fixes #1949
2016-03-10 17:47:59 +01:00
Cameron Moore f3f9763afd tpl: Add time note to default func description 2016-03-10 17:47:59 +01:00
Cameron Moore 09c8c17bf0 tpl: fix default function
This commit fixes a few things:

1. `given` is now a variadic parameter so that piping works properly
2. add separate template tests to make sure piping works
3. support time values
4. add more tests of the dfault function
2016-03-10 17:47:59 +01:00
Cameron Moore 0743646f32 docs: add better default example 2016-03-10 17:47:59 +01:00
Cameron Moore ce9ee3cf49 tpl: Add default function 2016-03-10 17:47:59 +01:00
Marek Janda 0962470850 Make absURL properly handle baseURL with path component 2016-03-10 11:08:50 +01:00
digitalcraftsman 94c3825e5b Add md5 and sha1 template funcs 2016-03-10 11:03:06 +01:00
Ján Koščo be3519fac0 Use default sitemap configuration for homepage
Fixes #1304
2016-03-10 11:02:00 +01:00
Ivan Fraixedes 0945673f05 Update Dockerfile to use golang:1.6 base image
Hugo has been confirmed which runs on Golang 1.6, as travis uses 1.6
vesion. Dockerfile must be consistend with it so it has to use golang:1.6
as base image than golang:1.5
2016-03-10 10:59:52 +01:00
Bjørn Erik Pedersen a2abad9677 Add support for Go 1.6 block keyword in templates
NOTE: Needs Go 1.6 to use the new feature.

Fixes #1832
2016-03-10 10:53:54 +01:00
Bjørn Erik Pedersen 924028a9be Fix for page in multiple menus
Fixes #1934
2016-03-10 10:31:12 +01:00
Bjørn Erik Pedersen 973393c99e Create template clone for late template execution
Fixing some breaking blogs on Go 1.6

Fixes #1879
2016-03-09 14:37:58 +01:00
Bjørn Erik Pedersen 9896cd0030 Add reference to parent shortcode
Fixes #1936
2016-03-09 11:06:40 +01:00
Steve Moser 866176be97 Docs: fix missing words, tense in datadrivencontent.md 2016-03-07 20:39:55 +01:00
digitalcraftsman 7705e32ec2 Resize showcase thumbnail of h10n.me 2016-03-07 18:54:41 +01:00
Fabio Alessandro Locati 0f48631351 Add viglug website to showcase 2016-03-07 18:30:16 +01:00
Horst Gutmann 64ed64d93f Add h10n.me to the showcase 2016-03-07 18:09:01 +01:00
Fabio Alessandro Locati 2a75e9704e Add fale.io website to showcase 2016-03-07 18:03:09 +01:00
Bjørn Erik Pedersen 429b669a29 doc: Correct Scratch slice example 2016-03-06 16:38:38 +01:00
Bjørn Erik Pedersen c7d2260420 doc: Add some Scratch slice samples 2016-03-06 16:36:46 +01:00
Bjørn Erik Pedersen c7acc318b5 Add some missing resets on rebuild
Fixes #1928
Fixes #1929
2016-03-06 16:33:32 +01:00
Bjørn Erik Pedersen eaba04e82b Add list support in Scratch 2016-03-06 15:44:17 +01:00
Bjørn Erik Pedersen 435e996c4f Add jsonify template func 2016-03-06 15:01:14 +01:00
Bjørn Erik Pedersen c8c6f5d05b Add json mime extension type 2016-03-06 14:10:06 +01:00
Bjørn Erik Pedersen d774b142e8 Make where accept slice
Fixes #1926
2016-03-06 13:15:07 +01:00
Bjørn Erik Pedersen 4e32dc80a2 Simplify the IsHome test cases 2016-03-06 00:41:11 +01:00
Bjørn Erik Pedersen 023992abad Unexport the target handlers
These are of no interest outside the package.
2016-03-05 20:56:38 +01:00
Bjørn Erik Pedersen 27f8d8f963 Allow URL with extension in frontmatter
Fixes #1923
2016-03-05 20:50:53 +01:00
Bjørn Erik Pedersen 3c100cc32c tpl: Unexport the rest of the internal template funcs 2016-03-04 01:00:41 +01:00
Bjørn Erik Pedersen f6591eca35 tpl: Add some dateFormat testcases with both time and date
See #235
2016-03-03 23:17:35 +01:00
Bjørn Erik Pedersen 8aa90f2b7e Try both prepped and unprepped taxonomy keys
Fixes #1869
2016-03-03 22:01:09 +01:00
Bjørn Erik Pedersen ccd2f4c32b Prevent capitalized taxonomy labels
Fixes #1880
2016-03-03 21:54:23 +01:00
Bjørn Erik Pedersen e85b821d3e tpl: Fix broken chomp test 2016-03-03 21:24:21 +01:00
Bjørn Erik Pedersen f223f17c76 tpl: Make chomp return template.HTML 2016-03-03 19:45:23 +01:00
Bjørn Erik Pedersen daaf4eb330 tpl: Add integration tests for most of the template funcs examples in doc 2016-03-03 19:35:04 +01:00
Bjørn Erik Pedersen 80e1fd29ab Log fsync errors 2016-03-01 16:38:56 +01:00
Bjørn Erik Pedersen 5b065a27a2 Some missing shortcode replacements
See #1904
2016-03-01 13:51:46 +01:00
Bjørn Erik Pedersen 7f682d7802 Fix shortcode handling in RST
Fixes #1904
2016-03-01 11:04:25 +01:00
Samuel Debruyn cc38a40f4e Docs: fix typo in tools section 2016-02-29 21:59:43 +01:00
digitalcraftsman e2965a3507 Remove superfluous FontAwesome files 2016-02-29 21:53:28 +01:00
Bjørn Erik Pedersen 6b922750f3 Revert "Create template clone for late template execution"
This reverts commit 93b04e67f6.
2016-02-28 12:15:33 +01:00
Bjørn Erik Pedersen 93b04e67f6 Create template clone for late template execution
Fixing some breaking blogs on Go 1.6

Fixes #1879
2016-02-28 11:51:51 +01:00
Bjørn Erik Pedersen 804603155f Check for the presence of pages before setting dates
See #1903
2016-02-27 23:25:41 +01:00
Bjørn Erik Pedersen 75cf324322 Set Date and Lastmod for main home page
Fixes #1903
2016-02-27 23:21:07 +01:00
Bjørn Erik Pedersen 1f61f40328 Use flagChanged in all places 2016-02-27 18:01:01 +01:00
digitalcraftsman c1f8b188f7 Add template function slice 2016-02-27 17:04:45 +01:00
Bjørn Erik Pedersen 9349a889e2 Do not try to find available port if set by user
He/she probably really meant it.

Fixes #1901
2016-02-27 16:58:42 +01:00
Thijs de Zoute ff4ca99286 Press: add "Comparison site built with Hugo" 2016-02-26 21:32:54 +01:00
Bjørn Erik Pedersen 455df10752 Optimize replaceShortcodeTokens
We can of course skip reading the entire byte slice again and again.

This was a slip in the original implementation; functionally the same,
but is slightly faster, esp. for larger data sets with many shortcodes:

```
benchmark                             old ns/op     new ns/op     delta
BenchmarkReplaceShortcodeTokens-4     15505         14753         -4.85%

benchmark                             old allocs     new allocs     delta
BenchmarkReplaceShortcodeTokens-4     1              1              +0.00%

benchmark                             old bytes     new bytes     delta
BenchmarkReplaceShortcodeTokens-4     3072          3072          +0.00%
```
2016-02-25 23:50:43 +01:00
Bjørn Erik Pedersen 8375995378 Enlarge data in BenchmarkReplaceShortcodeTokens 2016-02-25 21:45:13 +01:00
Shekhar Gulati ac2eaca06d Press: add tutorial written by Shekhar Gulati 2016-02-24 20:07:16 +01:00
Marq Martí c59bdc20af Press: add article from sitelabs.es 2016-02-24 19:57:35 +01:00
Akagi201 d1bf2f5435 Docs: fix typo in introduction.md 2016-02-24 19:43:05 +01:00
Wouter Spee 086d6540c3 Add cdnoverview.com to the showcase 2016-02-24 19:37:05 +01:00
Paul Koppen 060f0206ee Docs: remove .Taxonomies from Page variables
The property seems to have never existed on Pages.

Fixes #1865.
2016-02-24 19:22:53 +01:00
Thijs de Zoute d607f4c7df Docs: fix small typos in functions.md 2016-02-24 19:14:04 +01:00
Ratson 3749dc76f7 Docs: add "Minify Hugo Generated HTML" to press 2016-02-24 19:04:45 +01:00
Tatsushi Demachi e9853642e5 Listen channel before sending values to it
The 'results' channel is not listend before sending error values in a
loop checking IsRenderable or not. This fixes it.
2016-02-20 14:03:06 +09:00
Bjørn Erik Pedersen 253a618854 Go 1.6 is out! 2016-02-17 23:18:54 +01:00
David Roda 284e959fc4 Close file handle when finished reading file 2016-02-17 21:42:56 +01:00
digitalcraftsman df17fae532 Docs: add hugo-lunr to the tools section 2016-02-16 23:14:22 +01:00
Bjørn Erik Pedersen 50182cd06b Remove superfluous Errorf 2016-02-16 02:05:59 +01:00
Bjørn Erik Pedersen c1e4309516 Clean up the trim template func test 2016-02-16 00:47:14 +01:00
Bjørn Erik Pedersen 8c84048033 Force full rebuild when site config changes
Fixes #1840
2016-02-14 15:16:55 +01:00
Henrique Dias ad176055d9 Export MainSite var
Fixes hacdias/caddy-hugo#46
2016-02-14 13:50:03 +01:00
Andrew Langhorn ce7c267140 Docs: clarify that Amazon WS is, actually, AWS
Amazon WS is an uncommon way of referring to Amazon Web Services, which
is usually referred to either by its full name, or as AWS.
2016-02-14 12:12:03 +01:00
Gustav Näslund 4ecf019e2f Add gntech.se to the showcase 2016-02-14 12:03:57 +01:00
digitalcraftsman 2b1ad54617 Docs: fix typo in YouTube shortcode description 2016-02-13 16:41:25 +01:00
Derek Perkins bac1ba4655 Fix spelling and go vet errors 2016-02-13 19:08:48 +08:00
digitalcraftsman 0d415e453b Link Gitter as Dev Chat in README 2016-02-13 12:04:36 +01:00
Anthony Fok 21b0aa8633 Restore the wercker status badge to original small size
Fix my brown paper bag bug in commit a0eec02.
Sorry for not double-checking before pushing!
2016-02-13 18:48:51 +08:00
Darrel Herbst 06e90b1237 Add documentation for Google Analytics internal template
Fixes #1654
2016-02-13 11:41:21 +01:00
Anthony Fok a0eec02bd6 Set the wercker badge to track the aaster branch only 2016-02-13 18:39:38 +08:00
Cameron Moore 207a574f0c Docs: fix Disqus shortname reference 2016-02-13 11:23:21 +01:00
digitalcraftsman cfbae7cea2 docs: Add guideline for showcase additions 2016-02-13 10:05:08 +08:00
Anthony Fok 4a15051e4c Crop, resize and optimize shelan-tn.png
The original image was 2055px × 1252px, which was oversized
and did not fit the required dimension of 600px × 400px
(3:2 aspect ratio).

To fix, the image was cropped and resized to the required dimension,
and was further optimized:

    $ pngquant --nofs -v --speed 1 --quality 65-80 shelan-tn.png
    $ optipng -o7 -zm1-9 shelan-tn-or8.png
    $ mv shelan-tn-or8.png shelan-tn.png

reducing its filesize from 334125 bytes to 26929 bytes.

See #1831
2016-02-13 00:31:25 +08:00
Anthony Fok 2d11551c53 Ignore temporary file "4913" created by Vim 2016-02-13 00:03:29 +08:00
Jörgen Nilsson 42f43ad433 Add jorgennilsson.com to showcases 2016-02-12 15:24:22 +01:00
Morton Fox 28e6e19d0a Fix git commit blog article link
The blog article linked in the README misses the trailing forward slash
which produces a 404 error instead of redirecting to the correct URL.
2016-02-10 14:55:25 +01:00
Bjørn Erik Pedersen 8fe1070872 Prevent confusing template errors when seq is nil
The common is the `where` func and this:

```
panic: reflect: call of reflect.Value.Type on zero Value [recovered]
	panic: reflect: call of reflect.Value.Type on zero Value
```
2016-02-09 19:02:05 +01:00
Tatsushi Demachi 2b3b90a6df Add test for Hugo hanging up with empty content
This adds a test for the issue #1797 and its fix in 68e2e63.
2016-02-08 20:55:19 +09:00
shelan d1b0290fef Add shelan.org to showcase page 2016-02-07 23:38:51 +01:00
Bjørn Erik Pedersen 2b0fad79b7 tpl: Add two more doArithmetic test cases 2016-02-07 23:02:46 +01:00
Bjørn Erik Pedersen f90b45f7f3 tpl: Test with nil value in first, last, after and shuffle 2016-02-07 21:16:43 +01:00
Bjørn Erik Pedersen 3cc468a82f tpl: Add missing test variants for slicestr 2016-02-07 20:14:24 +01:00
Bjørn Erik Pedersen 05c8bccf84 hugolib: Add test for parseSitemap 2016-02-07 15:56:56 +01:00
Bjørn Erik Pedersen b3c2d90ba2 tpl: Add missing substr test variants 2016-02-07 15:22:57 +01:00
Bjørn Erik Pedersen 4dcb63c2f6 tpl: Add highlight test 2016-02-07 15:15:27 +01:00
Bjørn Erik Pedersen 0a8583a451 tpl: Add missing base64 tests 2016-02-07 14:58:23 +01:00
Bjørn Erik Pedersen 0888ddd01f tpl: Add tests for word and rune counting 2016-02-07 14:51:06 +01:00
Bjørn Erik Pedersen ec49dbb8f5 tpl: Consolidate and complete the Inflect tests 2016-02-07 14:37:04 +01:00
Bjørn Erik Pedersen 1e8b4d9cde Add some missing doArithmetic test cases 2016-02-07 14:20:25 +01:00
Bjørn Erik Pedersen 0f6c8439b9 Add missing menu tests 2016-02-07 13:43:42 +01:00
Bjørn Erik Pedersen c462440dcd Add Page tests for simple methods 2016-02-07 13:32:08 +01:00
Bjørn Erik Pedersen 66570d2fb3 Add Node tests for simple methods 2016-02-07 13:18:16 +01:00
Bjørn Erik Pedersen 75044c199f Add menu sort tests 2016-02-07 12:34:43 +01:00
Bjørn Erik Pedersen 5995eaaa08 tpl: Unexport all template funcs
There is no good reason to export all the template funcs:

* They're not used outside the templates.
* If usable in other packages, they should be moved (to helpers?)
* They create too broad an interface;
  users of the tpl package don't see the forest for all the trees.
2016-02-07 11:45:45 +01:00
Rick Cogley d1d7702c06 Add a benefit and a simple example to return current year
Thanks @bep!
2016-02-07 13:04:35 +08:00
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
Steve Francia 74c90553b4 Static file incremental sync improvements
in tandem with Afero improvements
2016-01-26 14:31:43 -05:00
Steve Francia 7e196a8294 Handle remove & rename source operations incrementally 2016-01-26 14:30:28 -05:00
Steve Francia e01c340915 A single file can be replaced in site.Files 2016-01-26 14:29:37 -05:00
Steve Francia 45e5091428 Process only the source content that has changed 2016-01-26 14:28:53 -05:00
Steve Francia 9f3796a31d Read/reread individual source content files
next is incremental conversion
2016-01-26 14:26:23 -05:00
Steve Francia ca6ca4f4fc Separate handling content, data and template changes
Data & Templates reading independently
Need to work on page source reading and other source files
2016-01-26 14:25:39 -05:00
Steve Francia bcc42c0549 Separate reading source and processing source operations 2016-01-25 14:41:47 -05:00
Steve Francia f3aa93fa48 Ignore temp files created by IntelliJ when saving 2016-01-25 14:41:47 -05:00
leepenney 0525fbddbc Add leepenney.com to showcase page 2016-01-24 16:22:55 +00:00
Brynjar Harðarson eae46bdc1f Add Web Study List to showcase page 2016-01-21 23:35:13 +00:00
digitalcraftsman 8537cecb00 Docs: add Hugopit to tools section 2016-01-21 14:30:06 +01:00
tcnksm e27beadfe8 Add Rakuten Tech Blog in showcase page 2016-01-20 22:36:24 +01:00
callmelanmao ca8d187b0d add javaunion in showcase 2016-01-20 11:58:35 +08:00
Bjørn Erik Pedersen 3526afc773 Fix some Go vet errors 2016-01-16 00:28:48 +01:00
Bjørn Erik Pedersen 58a183c330 Docs: Add doc for string and int 2016-01-16 00:06:32 +01:00
Bjørn Erik Pedersen 75ba84acbf Add int and string cast template funcs 2016-01-15 23:56:45 +01:00
Bjørn Erik Pedersen f89eb349e4 Docs: Enable plain id anchors
Making it possible to post permanent anchored links to StackExchange etc.
2016-01-15 12:55:35 +01:00
Bjørn Erik Pedersen 78f9bf2444 Add one more menu test
See #1774
2016-01-14 17:30:05 +01:00
Bjørn Erik Pedersen ab70e6f52f Add menu test for external URL
See #1774
2016-01-14 15:14:21 +01:00
Anthony Fok dd85c29091 Docs: Add missing "-b master" parameter to "git submodule add" command
for correct deployment on GitHub Pages.  Thanks, @adrianmoya!

Fixes #1777
2016-01-14 01:24:45 -07:00
Bjørn Erik Pedersen e69e276ac9 Update Travis config to Go 1.5.3 2016-01-13 22:43:55 +01:00
Bjørn Erik Pedersen e8ca52e93a Add one more temporary template test for linux/arm
See #1771
2016-01-13 14:26:25 +01:00
Bjørn Erik Pedersen bca2d38e52 Add temporary template test for linux/arm
See #1771
2016-01-13 14:10:14 +01:00
Steve Francia ed3015c350 update server to match latest afero 2016-01-11 21:45:05 -05:00
Anthony Fok dd1d655617 Docs: Change the pseudo-absolute path to a relative one
See #1765
2016-01-09 11:57:14 -07:00
Emily Horsman 082476e713 Docs: add emilyhorsman.com (buttercup theme) to showcase 2016-01-09 11:02:27 -07:00
Bjørn Erik Pedersen 1ce184b7f1 Add some p-wrap shortcode tests
Deliberetely made to pass, even if they (probably) should not.

See #1642
2016-01-09 16:11:38 +01:00
Bjørn Erik Pedersen 48870fef2e Group vars in paginator
It's easier to read.
2016-01-08 22:55:19 +01:00
digitalcraftsman b47652fb29 Docs: add panel showing the last revision of a page
The panel also contains the version of the
documentation.
2016-01-07 04:23:26 -07:00
Anthony Fok 2c66167431 Docs: Copyedit extras/robots-txt.md 2016-01-06 21:11:02 -07:00
Bjørn Erik Pedersen 01f71babfc docs: Add lastmod to content files
Based on last commit in Git.
2016-01-06 23:55:18 +01:00
ominty 9d70e78031 Update press.md
New entry: Harald Weidner in german at Cologne Linux Meeting 2015: Link to set of slides available on bottom of page
2016-01-06 12:02:42 -05:00
Ivan Fraixedes 9a6dc6c791 Add embeded template for robots.txt 2016-01-05 23:36:16 +01:00
Daniel Martí 7c5a1fd16b Replace *bytes.Buffer with io.Writer in rendering
Found via github.com/mvdan/interfacer.
2016-01-05 23:32:03 +01:00
Cameron Moore 4c596483e1 Update and refactor to ack Go Authors 2016-01-05 23:30:33 +01:00
Anthony Fok 6a23cd65e1 Docs: Update copyright year on gohugo.io front page 2016-01-04 23:47:12 -07:00
Anthony Fok 851c16ef3b Docs: Run "brew update" before "brew install hugo"
Remind user to always run "brew update" first in order to avoid
repeated bug reports from users who didn't do that.

See #824, #1067, #1537, #1633 and #1749
2016-01-04 23:36:57 -07:00
Bjørn Erik Pedersen 9ff36c5a8f Add some trailing newline shortcode tests
See #1753
2016-01-04 23:48:05 +01:00
Sven Dowideit 7bc5d3663f Use a Docker container to build hugo
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-01-04 12:47:23 -05:00
Alexandre Bourget bc48b4606a Added documentation about variable scoping in "partials". 2016-01-04 12:42:48 -05:00
Alexandre Bourget 8f8120ba14 Added "Caddy server"'s handling of 404 errors. 2016-01-04 12:42:47 -05:00
Alexandre Bourget dcad066025 Small refactor: don't call p.Permalink() for all aliases, call it only
once and only if necessary.
2016-01-04 12:41:06 -05:00
Kartik Singhal 0bb3b49c00 Update doc to reflect default value of watch variable 2016-01-04 12:35:26 -05:00
Gerben Castel 6cdb8109cf Allow renaming of sitemap.xml 2016-01-04 12:28:49 -05:00
Ben Thomas 26d23f7f4b added remaining relevant options 2016-01-04 11:52:40 -05:00
Ben Thomas e904ccffb6 added more pygments opts 2016-01-04 11:52:40 -05:00
Antti Järvinen 9008ac0b55 Rename random to shuffle. Remove count parameteter to simplify its role. Add tests for randomising. 2016-01-04 11:47:37 -05:00
Antti Järvinen 302a6ac701 Add Random function to template functions
Adds Random function to pick N random items from sequence.
2016-01-04 11:38:57 -05:00
John McFarlane b1f2b433bc Fix /.xml RSSLink when uglyurls are enabled
Prior to this commit the root url with uglyurls enabled is "/.xml".
This commit relates to #175.
2016-01-04 11:25:37 -05:00
Wade Fitzpatrick ff28120e53 Added async version of Google Analytics internal template 2016-01-04 10:33:18 -05:00
Fabiano Frizzo 8f6f13104e Copy static files changed
Fix watcher copy static theme files for
changed files

See #1644 #1559
2016-01-04 10:32:21 -05:00
Anthony Fok f310492cb0 Add to press.md two articles about Hugo on AWS Lambda
and one article about WordPress-to-Hugo migration
2016-01-03 05:14:13 -07:00
Anthony Fok ce0304a1d1 Change Gitter badge to "gitter | dev chat" in README.md
using the badges-as-a service provided by Shields.io
2016-01-03 03:33:10 -07:00
ominty b309fe853e Update press.md
Fix table, and add new entry
2016-01-02 13:25:04 -07:00
digitalcraftsman dfa34afd86 Add template funcs countwords and countrunes 2016-01-02 11:00:03 -05:00
Colin Bate 2e92f36890 Add hasPrefix template function. 2016-01-02 10:47:17 -05:00
Sven Dowideit 0f6b334b67 Source file based relative linking
ala GitHub repository markdown for both md files and non-md files

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-01-01 15:23:11 -05:00
Sven Dowideit b78f13b041 Write a simplistic test for site.refLink
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-01-01 14:50:37 -05:00
digitalcraftsman 47587321d9 Add themesDir option to configuration
themesDir can be used to change the default
path of the themes folder.

Fixes 1556
2016-01-01 14:46:40 -05:00
Daniel TISCHER 40fccf2251 Fixes #1292 2016-01-01 14:35:58 -05:00
digitalcraftsman b56362defd Docs: add hugodeploy to tools section 2015-12-31 14:38:09 -07:00
ominty 3b2a78ba10 Add to press.md Beginners Tutorial for Hugo (German) 2015-12-31 14:34:49 -07:00
digitalcraftsman fc627d5553 Docs: remove unnecessary --watch flag 2015-12-26 20:03:23 -07:00
digitalcraftsman 796ef3a335 Docs: add cross-references to installation guides 2015-12-26 20:03:23 -07:00
digitalcraftsman f807953a27 Update Hugo examples 2015-12-26 20:02:21 -07:00
Igor Kulman cd54042c76 Add Coding Journal (blog.kulman.sk) to the Showcase 2015-12-25 04:12:17 -07:00
Steve Francia 1d6286b094 update to use cobra's sub package doc 2015-12-24 10:31:44 -05:00
Fabiano Frizzo a291f3c5d9 Copy only the static files changed
Update on the watcher copy static to copy only the
changed files and add an flag forceSyncStatic to
copy all statics always a static is changed

See #1644 #1559
2015-12-23 18:49:06 -05:00
Steve Francia 277425bada Ignore temp files created by IntelliJ when saving 2015-12-23 17:45:39 -05:00
Anthony Fok cb8f459127 Docs: Add nohighlight shortcode and improve formatting
And some random formatting and copyediting fixes.

See also #1708
2015-12-23 09:31:07 -07:00
Anthony Fok 22bd485072 Docs: Add lang attribute to Chinese and Japanese Press entries
This helps the web browser display the article titles and author names
with the correct CJK glyph variants.
2015-12-23 03:40:52 -07:00
Anthony Fok ea75985c7d Update embedded livereload.js to 2.2.1 in livereload.go
Also add a copyright notice, download URL and the ugliflyjs command
used to update the livereloadJS variable.
2015-12-22 16:21:03 -07:00
Anthony Fok 5b1261c4be Upgrade Bootswatch, Font Awesome and jQuery in examples/blog
- Upgrade Bootswatch Yeti theme (3.2.0+3 → to 3.3.6)
 - Upgrade Font Awesome (4.2.0 → 4.5.0)
 - Upgrade jQuery (1.11.1 → 1.11.3)

Also keep the upstream filenames, e.g. bootstrap.min.css rather than
bootstrap.css for the minified CSS, and jquery-1.11.3.min.js rather than
jquery.js for the minified jQuery.
2015-12-22 14:09:38 -07:00
Anthony Fok 7cf7f85ad6 Docs: Upgrade highlight.js to 9.0.0
with the following added languages in anticipation of document expansion:

    apache dockerfile dos less php powershell python tex yaml

To reproduce docs/static/js/highlight.pack.js on Debian/Ubuntu:

    $ sudo apt-get install nodejs npm
    $ wget https://github.com/isagalaev/highlight.js/archive/9.0.0.tar.gz
    $ tar xzf 9.0.0.tar.gz
    $ cd highlight.js-9.0.0/
    $ npm install
    $ nodejs tools/build.js markdown asciidoc xml css javascript \
      ini yaml json go bash diff dockerfile dos powershell makefile \
      apache nginx tex http php python ruby django haml handlebars \
      scss less coffeescript

Then, copy the resulting build/highlight.pack.js as well as
src/styles/monokai-sublime.css to the appropriate Hugo docs directories.
2015-12-22 13:54:35 -07:00
Anthony Fok df92a6b998 Docs: Upgrade InstantClick from 3.0.1 to 3.1.0
Note: It is not currently used on http://gohugo.io/
2015-12-21 17:28:06 -07:00
Anthony Fok aee92f2aee Docs: Upgrade livereload.js from post-2.0.8 to 2.2.1
Note: It is not currently used on http://gohugo.io/
2015-12-21 17:27:43 -07:00
Anthony Fok 23abad7b1d Docs: Upgrade Owl Carousel to 2.0.0-beta.3 (2015-06-19)
Downloaded from
http://smashingboxes.github.io/OwlCarousel2/download/owl.carousel.2.0.0-beta.3.zip

Also modify /index.html to use minified version of CSS files.
2015-12-21 13:21:42 -07:00
Anthony Fok 4b521b4ffb Docs: Upgrade jquery.scrollTo from 1.4.6 to 2.1.2 2015-12-21 12:54:47 -07:00
Anthony Fok cca49ad01d Docs: Correct file permissions from 0755 to 0644 2015-12-21 12:40:08 -07:00
Anthony Fok f6f0111db6 Docs: Rebase bootstrap-gohugo.css on Bootstrap v3.3.6
It was previously based on a customized version of bootstrap.css
from Bootstrap v3.0.0.

Also add a brief copyright notice and description.
2015-12-21 12:12:12 -07:00
Anthony Fok 883431442d Docs: Rename bootstrap-theme.css to bootstrap-gohugo.css
because our bootstrap-theme.css was originally a customized
core bootstrap.css file from Bootstrap v3.0.0.

This rename helps to avoid confusion with Bootstrap’s official
bootstrap-theme.css files.
2015-12-21 12:04:11 -07:00
Anthony Fok ad6717bd11 Docs: Upgrade Bootstrap from v3.2.0 to v3.3.6
Fonts and JavaScript files only
2015-12-21 11:57:55 -07:00
Anthony Fok f8f128a08a Docs: Remove octicons fonts
The GitHub octicons fonts, which, in our case, came with GitHub:buttons,
are not actually used on gohugo.io.  Rather, the icons inside the GitHub
buttons are actually glyphs from Font Awesome.
2015-12-21 03:28:07 -07:00
Anthony Fok 7c84ad56cb Docs: Remove unused GitHub:buttons files
The GitHub:buttons JavaScript code docs/static/js/buttons.js
from https://github.com/ntkme/github-buttons was referenced
in docs/layouts/partials/footer.html but never used.

Apparently, the actual code for the GitHub buttons on the upper-left
corner of gohugo.io documentation was written by @spf13 in
docs/static/js/scripts.js.
2015-12-20 13:18:18 -07:00
Anthony Fok 217d25f560 Docs: Upgrade Font Awesome from 4.1.0 to 4.5.0
From https://fortawesome.github.io/Font-Awesome/assets/font-awesome-4.5.0.zip
2015-12-19 14:47:26 -07:00
Anthony Fok a84d82121a Upgrade jQuery 2.1.1 to 2.1.4 in doc 2015-12-19 12:19:26 -07:00
Bjørn Erik Pedersen 7a5a52f468 Clean up the loop counter variables confusion in TestPageCache
See #1601
2015-12-19 15:38:28 +01:00
Anthony Fok f24ffc9c3d Docs: Allow HTML in Showcase titles
This allows, for example, marking with the lang attribute
so that the correct CJK glyph variants are displayed.
2015-12-19 06:15:08 -07:00
Anthony Fok e1af7cb9d0 Use MkdirAll instead of Mkdir in hugo gen doc
Also print a feedback if the path does not exist and needs to be created.
2015-12-19 06:08:01 -07:00
Anthony Fok de82404d35 Fix hugo server "Watching for changes" path display
especially when the given `--source` path is a relative directory.

Also, when `--source` is specified, make WorkingDir an absolute path
from the very beginning, to be consistent with the case when `--source`
is not given.  Otherwise, the function name helpers.AbsPathify(), which
prepends WorkingDir to a relative path, does not really make sense.

Fixes #1721
2015-12-19 05:19:31 -07:00
Anthony Fok a1d232f4b6 Docs: Make <hr> slightly darker on gohugo.io 2015-12-19 05:11:54 -07:00
Anthony Fok 00fc038da7 Document 32-bit hugo server crash in v0.15 Release Note
See #1716
2015-12-19 04:33:45 -07:00
Salar Rahmanian 5af8cc2970 Add gadgetplayboy.com to Showcase and an article to Press 2015-12-19 01:05:03 -07:00
Bjørn Erik Pedersen fe7ca7d78c Fix build 2015-12-18 23:23:37 +01:00
Bjørn Erik Pedersen 13d14ab94d Remove "Host:" prefix from Host header
That thould work with Go 1.4.3 according to sources inside Google.
2015-12-18 23:09:50 +01:00
Bjørn Erik Pedersen dd2ab2820e Correct the strings.Contains syntax in failing test 2015-12-18 16:19:00 +01:00
Bjørn Erik Pedersen 31035f8ad1 Fix remote test on Go 1.4 2015-12-18 16:05:24 +01:00
Bjørn Erik Pedersen 89f8fa586c Set the request Host on http test server
Needed for the remote tests to pass on Go 1.6.

See #1470
2015-12-18 15:52:17 +01:00
Bjørn Erik Pedersen 9edc58a03a Fix failing template related tests in Go 1.6
Fixes #1470
2015-12-18 15:28:43 +01:00
Bjørn Erik Pedersen 8cea428802 Fix data race in non-renderable pages
Fixes #1601
2015-12-18 11:24:35 +01:00
Bjørn Erik Pedersen 0c01fef321 Fix 2 data races in TestPageCache
See #1601
2015-12-18 09:35:14 +01:00
digitalcraftsman 32da9b20bc Docs: add hugo-lambda to tools section 2015-12-17 10:28:52 -07:00
Anthony Fok 3574304c68 Improve some random feedback messages
Also clean up a couple random comments.
2015-12-16 21:26:51 -07:00
Anthony Fok 9c39593dee Move cobra.MousetrapHelpText to hugo_windows.go
Fix build error due to Cobra API change, see
spf13/cobra#195: Compile mousetrap only on Windows
2015-12-16 21:26:47 -07:00
Anthony Fok 705104338e Docs: Enhance contrast and increase font-weight
Also replace 'Courier New' with newer monospace fonts,
and make font in main text slightly smaller to better fit
smaller screen.

See #1678.
2015-12-16 19:10:46 -07:00
Anthony Fok 868e4798d5 Fix formatting of "Installing on Windows" tutorial 2015-12-16 18:43:55 -07:00
Anthony Fok 67b4c52466 Regenerate the commands section of doc
Reason: The `--source` flag was added back to the `hugo new` commands
in commit c1e134f.

See #1624, #1589
2015-12-16 09:26:06 -07:00
Anthony Fok c1e134f1c2 Add --source flag back to hugo new command
v0.15 had it, but I removed it inadvertently for 0.16-DEV
in commit 00d04774 in PR #1652.

Also add directory bash-completion for `--source`
for `hugo convert`, `hugo list` and `hugo new`.

See #1624, #1589
2015-12-16 00:00:05 -07:00
John Ku 41a3af1a29 Use absolute path when editing with editor
Fixes #1589
2015-12-16 00:00:05 -07:00
digitalcraftsman 78576019cf Docs: reference Jekyll import command in tools section 2015-12-16 00:00:05 -07:00
digitalcraftsman ebc187b480 Docs: add Contentful converter to tools section 2015-12-16 00:00:05 -07:00
Bjørn Erik Pedersen d1bec54293 Do not fail on unknown Jekyll file
Fixes #1705
2015-12-14 15:30:58 +01:00
Anthony Fok d5ebf64836 Remove/update outdated links in Press and Showcase 2015-12-13 05:57:18 -07:00
Bjørn Erik Pedersen 9569d116cb Duplicate p.Description in Params map
Fixes #1484
2015-12-12 22:20:26 +01:00
Maxime Michel 38c5db98b5 Added a missing closing tag 2015-12-11 10:51:17 -07:00
Anthony Fok f22d59bb19 Revise docs/content/tools/index.md (minor fixes) 2015-12-11 10:49:38 -07:00
Michael Holt 1469ce0edf Remove Duplicate "Editor Plugins" Section
Editor Plugins was repeated a second time. with identical content
2015-12-11 10:36:21 -07:00
Cameron Moore 280b2f294e Document PreserveTaxonomyNames
Fixes #1648
2015-12-11 10:17:26 -07:00
Anthony Fok 4a2623c899 Regenerate the commands section of doc
See #1624
2015-12-11 09:50:36 -07:00
Cameron Moore 768370a503 Docs: remove references to dynamic CMS products
There's no need to call out other projects here, especially when we might
mischaracterize what they do.

See #1688
2015-12-11 09:25:00 -07:00
Cameron Moore 9ae07c4f21 Docs: document Node.IsHome 2015-12-11 09:18:05 -07:00
Anthony Fok 8509727fe8 Add copyright header to that source files that don’t have one.
See #1646
2015-12-10 15:19:38 -07:00
Steve Francia e29ede7055 Fix some of the "new site" tests 2015-12-08 17:38:48 -05:00
Steve Francia b81fc1be4e add more architectures to .goxc 2015-12-08 16:46:43 -05:00
Steve Francia 6042fc2b83 move some of the path helper utilities to afero
and provide wrappers in Hugo.
2015-12-08 16:46:43 -05:00
Steve Francia de14ceecc9 Update "Join Chat" to "Dev Chat" 2015-12-08 15:10:53 -05:00
Bjørn Erik Pedersen 56d6c0be5a Turn off failing new site test
Until @spf13 gets some free time in his busy calendar.

See #1680
2015-12-08 19:25:34 +01:00
Tatsushi Demachi f3c74c9db4 Add boolean value comparison to where tpl function
`where` template function's internal condition check function doesn't
check boolean values and always returns `false` silently.

This adds missing boolean value comparison to the function.
`where Values ".Param.key" true` like clause can be used.

Only "=", "==", "eq", "!=", "<>", "ne" operators are allowed to be used
with a boolean value. If an other operator is passed with it, the
condition check function returns `false` like before.
2015-12-08 05:39:11 +09:00
Bjørn Erik Pedersen e445c35d6a Fix copyright headers in source files
Still need to add some missing headers and an AUTHORS file.

See #1646
2015-12-07 19:57:01 +01:00
Anthony Fok f13db9328b Sort and remove "" from "Available templates" list 2015-12-06 23:23:54 -07:00
gunnaraasen d35d82060f Remove transformation of menu URLs
Fixes #1239
2015-12-06 15:25:23 +01:00
inondle f6fdfcd429 Added 'themes' as a default new site directory
Fixes #1507
2015-12-04 02:19:53 -07:00
Bjørn Erik Pedersen 6a519e692b Update Travis config to Go 1.5.2 2015-12-04 02:09:03 +01:00
Anthony Fok cd062623bd Fix crash with "config", "check" and "benchmark"
The crash was introduced by commit 00d04774 in PR #1652
where access to NoTimes was attempted even though --noTimes
was not defined for the config, check and benchmark commands.

Special thanks to @bep for the heads-up!

See also #1624 - CLI UX: Flags shouldn't be global
2015-12-03 12:02:38 -07:00
Bjørn Erik Pedersen 69c28985ea Fix broken Highlight test 2015-12-03 12:37:48 +01:00
Anthony Fok c1b5a48f4e Add sanity checks for hugo import jekyll
Also add `--force` flag copied from `hugo new site`.

Fixes #1625
2015-12-03 00:39:00 -07:00
Anthony Fok 00d04774f0 Change most global flags into local ones
This is to ensure that only the relevant command-line flags
for a certain Hugo subcommand is shown to the end user,
reducing clutter and improving user experience.

Fixes #1624 - CLI UX: Flags shouldn't be global
2015-12-03 00:36:38 -07:00
Anthony Fok c9526f6e3f Revise format for "Unable to locate Config file" error 2015-12-03 00:28:09 -07:00
Bjørn Erik Pedersen df85e5a0aa Switch to container-based Travis 2015-12-02 23:52:56 +01:00
Bjørn Erik Pedersen be28d9d943 Fix some errors with format patterns
See #1502
2015-12-02 23:37:40 +01:00
Anthony Fok f363faadab Add a number sign "#" before a GitHub issue number
to make it more readily recognizable.
2015-12-02 13:11:24 -07:00
Cameron Moore 6812229bb8 Add gh shortcode to docs site
The `gh` shortcode has two modes: users and issues.  For user mode, pass a list
of `@username` arguments.  For the issues/PR mode, pass a list of issue or PR
numbers.  PRs link to the "issues/" URL since Github redirects to the correct
URL.

Thanks to @ryanclarke for suggesting an improved template.
2015-12-02 12:18:04 -07:00
Anthony Fok d48781badf One more error fix in the server command
And some other small code clean-up.

See #1502
2015-12-02 11:56:36 -07:00
Bjørn Erik Pedersen c5287e7817 Some more error fixes in commands
See #1502
2015-12-02 16:27:08 +01:00
Bjørn Erik Pedersen 3f0f7eed68 Improve error handling in commands
Cobra, the CLI commander in use in Hugo, has some long awaited improvements in the error handling department.
This enables a more centralized error handling approach.

This commit introduces that by changing all the command funcs to `RunE`:

* The core part of the error logging, usage logging and `os.Exit(-1)` is now performed in one place and that one place only.
* The usage text is now only shown on invalid arguments etc. (user errors)

Fixes #1502
2015-12-02 07:07:05 -07:00
tryer3000 6959b7fa80 Update external tutorial links in usage.md 2015-12-02 07:03:54 -07:00
Anthony Fok 75c61236f1 Move import jekyll functions to import_jekyll.go
Also rename import_test.go to import_jekyll_test.go
2015-12-02 03:39:10 -07:00
Anthony Fok 666ddd2377 Enable dirname and filename completion for more flags
These flags are:

 * --source (-s), --cacheDir, --destination (-d) and --logFile
 * --completionfile and --dir.
2015-12-02 02:24:49 -07:00
Anthony Fok 0d1d33d7f3 Print error when /index.html is zero-length
Also print warning (in verbose mode) for other empty pages.

See #947
2015-12-01 21:03:17 -07:00
Anthony Fok f8302768c7 Run go fmt hugolib/site.go 2015-12-01 21:01:19 -07:00
Anthony Fok afbc18c09a Bump min_version to 0.15 for hugo new theme 2015-12-01 10:27:36 -07:00
Tatsushi Demachi e989468341 Make noTimes command flag work
Hugo command provides "noTimes" flag but it doesn't affect synced files
timestamp regardless of whether the flag is specified or not.

This fixes it by adding a flag check and overwriting configuration if it
is specified.

Fix #1583
2015-12-01 10:01:44 -07:00
Tatsushi Demachi 6c8103144f Copy static dir files without theme's static dir
Hugo command doesn't copy site's "static" directory files to "public"
directory if a specified theme doesn't have "static" directory because
theme's "static" directory checking always returns an error.

This fixes it by just showing a warning message about theme's "static"
directory absence and not skipping following processes.

Fix #1655
2015-12-01 10:01:21 -07:00
Takeru Naito c5e68ba197 Fix typo in "Creating a New Theme"
the the skeleton's ->
the theme skeleton's
2015-12-01 00:13:48 -07:00
David Oliver 91771ee3b6 Add Draft page variable to docs
Also tweaks language used in page params sentence.
2015-11-30 23:38:34 -07:00
Gustav Näslund b0b6a8c7ac Use .Site.Pages in the documentation examples instead of .Site.Recent 2015-11-30 23:31:18 -07:00
Valentin Vago d7ef272a23 Add Camunda blog and docs showcases 2015-11-30 23:16:58 -07:00
Anthony Fok b557f6249f Change plainIdAnchors to plainIDAnchors in docs
Also add a note saying that these blackfriday flags are
very case-sensitive as of Hugo v0.15.

Thanks to @ryanclarke for noticing the change in behaviour.

See also spf13/hugo@5838420
2015-11-30 00:19:04 -07:00
Anthony Fok 249cd62541 Copyedit the shortcodes documentation some more 2015-11-29 23:23:25 -07:00
digitalcraftsman 2e3d5c2df6 Docs: improve shortcodes page
See #1613
2015-11-29 22:01:31 -07:00
Anthony Fok cf732940a3 Remove an erroneous "$" prompt in quickstart guide 2015-11-29 21:43:49 -07:00
Doug Horner c83e10a48e Added the command in the documentation.
It was confusing that the command was not in step 5, while it is in step 6.
2015-11-29 21:38:52 -07:00
Anthony Fok 50b5d0af29 Support setting target directory in hugo gen man
Fixes #1627
2015-11-28 07:32:02 -07:00
Michael Henderson 09379e893e Update for version 0.16
Updated output of commands. Removed unneeded flags such as
--watch. Didn't resist the temptation to reword some parts.
2015-11-28 07:09:42 -07:00
digitalcraftsman 2519b70793 Docs: remove note about config changes and manual livereload 2015-11-27 15:40:17 -07:00
digitalcraftsman ffb1a96e76 Docs: improve usage.md 2015-11-27 15:40:17 -07:00
digitalcraftsman 37676a25c6 Docs: improve quickstart guide
Fixes #1553
2015-11-27 15:40:16 -07:00
ChristophFloat 72a66972b6 Update press.md
Include my Blogpost about using Hugo together with git to automatically
generate the site when you push it into your Repo using a Git Hook (German).
2015-11-26 16:41:44 -07:00
Bjørn Erik Pedersen 26af48a596 Add note in doc about Jekyll import 2015-11-25 23:18:20 +01:00
Bjørn Erik Pedersen f77a899ddd Regenerate the commands section of doc 2015-11-25 23:11:16 +01:00
Steve Francia d356720f74 Version bump to 0.16-DEV 2015-11-25 09:49:03 -05:00
Steve Francia 6faf1d01e0 version bump to v0.15 2015-11-25 09:33:53 -05:00
Steve Francia 9c1319cdea Update license file in the docs/website to apache 2015-11-25 08:33:38 -05:00
Cameron Moore 9410d25e96 Update release notes with additional new features 2015-11-25 09:30:17 +01:00
Steve Francia 171fb883de Update and reorganize 0.15 release notes 2015-11-24 16:51:01 -05:00
Bjørn Erik Pedersen 0f11eb4f12 Make the release note about renderToDisk more consise
See #1611
2015-11-24 21:13:02 +01:00
digitalcraftsman 234fac4a45 Update release notes 2015-11-24 21:10:35 +01:00
digitalcraftsman 311307c9e4 Add IsNamedParams property in shortcodes 2015-11-24 08:59:32 +01:00
digitalcraftsman 86dcac614b Add documentation for built-in shortcodes
Fixes #1576
2015-11-24 08:59:32 +01:00
digitalcraftsman 7d31d5f59d Add shortcode for tweets 2015-11-24 08:59:32 +01:00
digitalcraftsman e03f27ccf8 Add shortcode for github gists 2015-11-24 08:59:32 +01:00
digitalcraftsman 3027b15176 Add shortcode for vimeo 2015-11-24 08:59:32 +01:00
digitalcraftsman 4424288d9b Add shortcode for youtube 2015-11-24 08:59:32 +01:00
digitalcraftsman cc3f52b9c1 Add shortcode for speakerdeck 2015-11-24 08:59:31 +01:00
Cameron Moore fe2a9fa21d Update shortcode docs with .IsNamedParams
There are some minor cleanups included here as well.

Fixes #1607
2015-11-24 08:47:06 +01:00
Steve Francia f045d7a611 Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
Bjørn Erik Pedersen b00771ca14 Simplify ExtractRootPaths 2015-11-23 22:35:54 +01:00
Andrew Brampton c3931ef748 Add PygmentsOptions option
This allows default pygments settings to be used, if none are explictly set per shortcode.

Fixes #1260
2015-11-23 17:50:54 +01:00
Kato Kazuyoshi 99acbb2eb2 Permalink on Node and Page should be of string
This change fixes #1384.
2015-11-23 17:41:29 +01:00
Marek Janda 5838420aa1 Move blackfriday site-wide config loading to NewBlackFriday() 2015-11-23 17:35:36 +01:00
Cameron Moore fde47c5eb9 Add shortcode IsNamedParams property
It would be helpful to know whether a shortcode was called with positional or
named parameters.  This commit adds a boolean `IsNamedParams` property to the
`ShortcodeWithPage` struct.
2015-11-23 17:17:18 +01:00
Bjørn Erik Pedersen 3d09de8910 Restructure the gen commands
Fixes #1603
2015-11-23 16:51:12 +01:00
Bjørn Erik Pedersen 831e936846 Improve "watching for ..." logging 2015-11-23 16:32:06 +01:00
Anthony Fok 098a0c819a Add commands/genman.go to autogenerate man pages
Fixes #1369
2015-11-22 18:54:44 +01:00
Anthony Fok 8727475596 Fix missing word in code comment (my own fault) 2015-11-22 09:40:22 -07:00
Bjørn Erik Pedersen 6fa7f2ac3e Avoid multiple locks for shortcode template
Fixes #1600
2015-11-21 23:29:58 +01:00
Bjørn Erik Pedersen c5f40e8b8b Improve RW-locking of template in shortcode handling
See #1599
2015-11-21 21:57:26 +01:00
Bjørn Erik Pedersen 58c446f562 Fix recently introduced new data race in the shortcode handling
Fixes #1599
2015-11-21 20:03:18 +01:00
Anthony Fok 5c7234015d Copyedit long help message in commands/server.go 2015-11-21 06:31:10 -07:00
Cameron Moore 3abb2675c5 Add RSSLink to SiteInfo 2015-11-20 23:38:15 +01:00
Marek Janda afbd52f78e Apply absURL on social tag urls 2015-11-20 23:36:48 +01:00
Cameron Moore 05c29ad593 Return error if shortcode template.Tree is nil
If a shortcode template fails to compile, the template will be non-nil, but
template.Tree will be nil which caused a panic.
2015-11-20 23:34:30 +01:00
Anthony Fok e59aabcf46 docs: Change "Github" to "GitHub" 2015-11-20 14:24:22 -07:00
Anthony Fok a871c87f90 docs: Optimize a few large showcase thumbnail PNGs
using pngquant and OptiPNG.  Result:

    arresteddevops-tn.png   154734 bytes → 47184 bytes
    maximeguitare-tn.png     95571 bytes → 24183 bytes
    ridingbytes-tn.png      262222 bytes → 66491 bytes

And a small one to an even smaller one too:

    goin5minutes-tn.png      26220 bytes →  9297 bytes
2015-11-20 14:17:02 -07:00
digitalcraftsman 2e1d2ba018 Add Go in 5 minutes to the showcases 2015-11-20 13:49:27 -07:00
digitalcraftsman a5bd101d27 Docs: fix typo in template function section 2015-11-20 13:30:27 -07:00
Cameron Moore c5a4c07b89 Add SafeJS template function
This commit adds a SafeJS template function.  Tests and documentation are
included.

Fixes #1579
2015-11-20 21:12:01 +01:00
Bjørn Erik Pedersen 7c9a2dfee2 Add increased time.Time support to the 0.15 release notes 2015-11-20 19:18:38 +01:00
Bjørn Erik Pedersen f6ba48f2d0 Update Travis 1.4.2 > 1.4.3 2015-11-20 19:16:13 +01:00
Steve Francia f99730e84e fix broken image in showcase 2015-11-20 10:26:21 -05:00
kmonsoor 83f19d8d87 fixed documentation link 2015-11-20 10:20:40 -05:00
Matt Stratton 923e455731 Add Arrested DevOps site to Showcase 2015-11-20 10:16:04 -05:00
Steve Francia 97d0689580 Hugo server watch by default 2015-11-20 10:14:24 -05:00
Bjørn Erik Pedersen 35abd179e2 Add time.Time support in ge, gt, le, lt
Fixes #1593
2015-11-20 11:53:25 +01:00
Bjørn Erik Pedersen 8d8fa7222f Remove some superficial tests 2015-11-19 20:27:02 +01:00
Bjørn Erik Pedersen 3f5ddd5242 Revert "Disable render-to-memory on Windows"
This reverts commit 91e0c2b1fe.

This should now work.
2015-11-19 19:48:40 +01:00
Bjørn Erik Pedersen 91e0c2b1fe Disable render-to-memory on Windows
See #1586
2015-11-18 23:10:56 +01:00
Bjørn Erik Pedersen 4679fbee41 Do not rebuild on extra Spotlight filesystem events
Write and rename operations are often followed by CHMOD.
There may be valid use cases for rebuilding the site on CHMOD,
but that will require more complex logic than this simple conditional.

On OS X this seems to be related to Spotlight, see:
https://github.com/go-fsnotify/fsnotify/issues/15

A workaround is to put your site(s) on the Spotlight exception list,
but that may be a little mysterious for most end users.

So, for now, we skip reload on CHMOD.

This small commit will be a 100% improvement for most OS X-users.

Fixes #1587
2015-11-18 22:59:32 +01:00
Bjørn Erik Pedersen b08d9f26ae Make replaceShortcodeTokens rewrite the input slice
Currently a `[]byte` copy is returned. In most cases this is the safe thing to do, but we should just modify/grow the slice as needed.

This is faster and consumes less memory:

```
benchmark                             old ns/op     new ns/op     delta
BenchmarkReplaceShortcodeTokens-4     7350          4419          -39.88%

benchmark                             old allocs     new allocs     delta
BenchmarkReplaceShortcodeTokens-4     5              1              -80.00%

benchmark                             old bytes     new bytes     delta
BenchmarkReplaceShortcodeTokens-4     4816          1152          -76.08%
```

This commit is aso a small spring cleaning of duplicated code in the different `PageConvert` methods.

Fixes #1516
2015-11-17 18:24:17 +01:00
Anthony Fok 4ecf56b891 Add latest review from Smashing Magazine to Press page 2015-11-16 22:54:15 -07:00
spf13 df824fa31b Hugo server renders and serves from memory by default (30%+ improvement) 2015-11-16 22:00:11 -05:00
spf13 e1618e9d2f permit the notimes flag on hugo server 2015-11-16 21:56:14 -05:00
spf13 cb48425f2d No double slash when destination set to '/' 2015-11-16 21:56:14 -05:00
spf13 ef0b9b511c Handle sync (file copy) errors better) 2015-11-16 21:56:14 -05:00
Anthony Fok 18a29964fa Fix trivial typos in code 2015-11-16 07:15:17 -07:00
Anthony Fok 452ffab461 Copyedit docs/content/tools/index.md 2015-11-16 06:59:14 -07:00
Anthony Fok 2fec32a2da Add @wicast’s "Hugo is cool" post to Press page 2015-11-16 06:51:57 -07:00
Anthony Fok acd720df92 Add docs/data/titles.toml to set title "Site Showcase"
Idea from https://discuss.gohugo.io/t/how-to-name-list-templates/949
2015-11-16 06:48:20 -07:00
tuxy 5c6d8c57b9 Add ReadText project to Site Showcase 2015-11-16 06:14:32 -07:00
Richard Sumilang 39933111b9 Adding LosslessLife blog to showcase. 2015-11-16 06:03:28 -07:00
Bjørn Erik Pedersen 2843605963 Emphasize that commit message titles should start with a capital letter 2015-11-15 17:49:30 +01:00
spf13 619c16fd03 re-simplify SafeHTML function 2015-11-15 11:10:35 -05:00
digitalcraftsman 1a26e35136 Docs: add hugofy to tools 2015-11-15 11:05:17 -05:00
spf13 5c1204c24b simplify rssuri logic 2015-11-15 11:05:16 -05:00
spf13 062f6c3383 rewrite safeHTML function 2015-11-15 11:05:16 -05:00
Bjørn Erik Pedersen dcf1f96c2d Revert "Update Go release version to 1.5.2 in Travis config"
This reverts commit 30ebf6b823.

There is no Go 1.5.2... Where did I get that info!?
2015-11-14 16:59:45 +01:00
Bjørn Erik Pedersen 53a5932fa4 Get rid of allocation in the BenchmarkReplaceShortcodeTokens itself
So we can see the real numbers.

See #1516
2015-11-13 22:37:07 +01:00
digitalcraftsman d7588fac21 Docs: fix typo in tools section 2015-11-13 11:19:55 -07:00
digitalcraftsman b8effd8a17 Docs: add hugofy to tools 2015-11-13 04:25:34 -07:00
digitalcraftsman b4ebd0eb57 Update release notes
Note the new built-in Google Analytics template.
2015-11-13 04:21:05 -07:00
Coders Digest 8e68a6487c Adding article about moving to hugo 2015-11-13 03:51:13 -07:00
spf13 a50133ff38 Improve the server usage output 2015-11-12 10:23:41 -05:00
Bjørn Erik Pedersen 3bbd02a1ca Print parse errors from Viper 2015-11-11 22:47:24 +01:00
Fabiano Frizzo 469d268cc8 doc: Add new article by Fabiano Frizzo to Press 2015-11-10 16:05:16 -07:00
Bjørn Erik Pedersen 30ebf6b823 Update Go release version to 1.5.2 in Travis config 2015-11-10 21:41:47 +01:00
Tatsushi Demachi 139be09f17 Fix GroupByParam to return original param string
Page.GroupByParam function internally uses Page.GetParam to get a
parameter value for a key of a page group but now Page.GetParam returns
a lowercase character string every time. It has no need to using
lowercase character string as a group key value and it confuse a
function user.

This fixes it to keep and return an original parameter string as a group
key value.

Fix #1564
2015-11-10 14:57:03 +01:00
spf13 bccf957e36 Add support for dynamic reloading of config file when watching 2015-11-09 23:31:52 -05:00
spf13 488966dcb2 Add hugo theme site to the sidebar
Also reorder the menu a bit and clarify a couple items.
2015-11-09 23:23:39 -05:00
Bjørn Erik Pedersen 570713a478 Use Identifier as last sort resort for default menu sort
Fixes #1562
2015-11-09 21:02:21 +01:00
Billy Burrows 01c87d2d23 Small Doc Changes 2015-11-07 20:13:20 -07:00
Bjørn Erik Pedersen 1758db29f5 Cosmetic change in README to trigger new build 2015-11-07 01:39:10 +01:00
digitalcraftsman 341dcc4765 Docs: fix broken links 2015-11-06 08:51:40 -05:00
digitalcraftsman 9dbb6dc50d Add internal Google Analytics template
This commits also adds the GoogleAnalytics
variable to insert the tracking code.

Fixes #1424.
2015-11-04 17:11:38 -05:00
Arjen Schwarz ca55ea505a Improvements to Automated Deployments tutorial
Prevent some frequently occurring problems

* Ensure version number is between quotes
* Ensure git and SSH are installed for the deployment step
* Focus extra attention on the wercker.yml verification site
2015-11-02 23:27:55 -07:00
Bjørn Erik Pedersen 5bda0398e7 Export Page.Layout
And at the same time rename and unexport the badly named `Layout()` func. That method is not very usable outside the package.

Fixes #1539
2015-11-02 17:24:50 +01:00
Anthony Fok e1729935b5 doc: Add new article by Thomas Peham to Press 2015-10-31 10:54:55 -06:00
Timothy Hopper 08b3004fcb Update link to S3 deploy instructions
Previous link goes to page with warning "This article is outdated"
2015-10-31 10:09:34 -06:00
Fabiano Frizzo 217ffa87c9 Fix doc render on Firefox
Fix #1523
2015-10-31 09:59:02 -06:00
Sergey Mudrik c8f2a57430 Fixed link to Google Prettify
Google Prettify has been moved to github
2015-10-31 09:54:14 -06:00
Robert Aistleitner 42453357aa add bugtrackers.io to hugo docs showcases 2015-10-31 09:50:42 -06:00
Arun Sori 277d0ae4a5 Fix spell mistake in variables.md 2015-10-31 09:47:07 -06:00
Shivanshu Agrawal 1ce3bb22f8 add ninjaducks.in to showcase 2015-10-31 09:36:50 -06:00
Arun Sori 83e46555dd Disable directory listing for Hugo file server
Fix #1400
2015-10-31 09:23:30 -06:00
Shai Efrati 50c819cede Remove dots from snippets.
See confusing issue #1513.
2015-10-30 15:08:49 -06:00
digitalcraftsman 3d96dfc924 Docs: fix typo under tools section 2015-10-30 14:47:06 -06:00
Anthony Fok 6c6905d5f4 Fix missing "]" in README.md in commit 2242712 2015-10-30 14:12:01 -06:00
Anthony Fok 2242712b0c Add CircleCI status badge to README.md
Also, following the example of title="wercker status",
add "title" attribute to the other status badges
in order to show tooltips.
2015-10-30 14:08:21 -06:00
Anthony Fok e95db67b20 Add smartDashes flag for Blackfriday
To allow the end users to disable any form of smart dashes
(LaTeX-style or not) while keeping the rest of Blackfriday
SmartyPants features.

Depends on https://github.com/russross/blackfriday/pull/190
"Add HTML_SMARTYPANTS_DASHES for toggling smart dashes"
to be accepted by Blackfriday developers.
2015-10-30 13:30:25 -06:00
Bjørn Erik Pedersen 6b34a4e4e8 Remove anchor from fork link in README 2015-10-21 10:48:16 +02:00
Bjørn Erik Pedersen f77279bb00 Turn all README headlines into imperative mode
This also matches the commit guidelines.
2015-10-20 23:16:21 +02:00
Bjørn Erik Pedersen 4974a62c70 Trim down 'Adding Compile Information to Hugo' in README 2015-10-20 21:25:27 +02:00
Ethan Madison 5cf1475ecd Improve README
All-around improvements to the README.
Each sentence now gets its own line to eliminate ultra-long lines in the
source (expect in bullet points--separating a bullet point into multiple
lines looks weird and decreases readability).
HTTPS links are now preferred to HTTP links and used where applicable.
Link to Mercurial's website corrected to www.mercurial-scm.org
Link to Hugo's docs is now accessible with [Hugo Documentatio][] since
it is used more than once in the README.
Multiline code blocks are now fenced rather than indented and include
syntax highlighting.
2015-10-20 20:43:36 +02:00
Bjørn Erik Pedersen 36adb5fb88 Preserve Unicode marks in MakePath
Fixes #1488
2015-10-18 10:36:27 +02:00
Bjørn Erik Pedersen 9d603ce88a Show usage when new site creation fails 2015-10-17 14:08:45 +02:00
Bjørn Erik Pedersen ab7223df8c Improve error message on new site command 2015-10-17 14:05:48 +02:00
Safonov Nikita 5e97cf3020 Add force flag
If flag is passed the site will be created inside non-empty folder
only if there are no existent folders or config with the same name
hugo creates.

Resolves: #1163
2015-10-17 13:58:43 +02:00
Kato Kazuyoshi 3a412543f6 The missing static directory shouldn't fail the build
The lack of the directory would be worth to warn, since the directory is
created by "huge new site". But it doesn't have to fail the build.

This change fixes #759.
2015-10-17 13:50:37 +02:00
Tobias 4e9a5d8bd1 Fix some typos in docs 2015-10-17 13:48:10 +02:00
Steve Francia 0c66ad8775 Add CLA assist to the contribution workflow in README 2015-10-16 17:57:37 -04:00
Gloria Dwomoh fb0e17a3ed Update README.md 2015-10-16 23:24:35 +02:00
Kato Kazuyoshi 698019a552 Disable LiveReload when Hugo is not running as a server
This change fixes #1410.
2015-10-15 16:36:14 -04:00
Kato Kazuyoshi ef4dfcec6c Load livereload.js from "/"
Fix #1406
Instead of loading the file from http://localhost:port/, it can be
loaded from /.
2015-10-15 16:36:13 -04:00
Andy Williams 0f438d1852 Create minimal default.md in archetype file
fixes #315
To fix the cast error, create a minimal default.md in the archetype
folder.
2015-10-15 16:36:13 -04:00
Nathan Youngman bea7b2e202 Fix typo in shortcode tests 2015-10-15 18:00:10 +02:00
Nathan Youngman ec9c691216 Insert code tag for server-side syntax highlighting
Inserts a code tag into Pygments output with the language-info that is present when using client-side highlighting (useful for CSS hooks)

```html
<code class="language-go" data-lang="go">
```

closes #1490
2015-10-15 17:59:28 +02:00
Bjørn Erik Pedersen 6a3aced15a Rename prettiyPath to prettifyPath 2015-10-15 10:15:26 +02:00
Bjørn Erik Pedersen 5619fe52d3 Unexport internal path helper 2015-10-14 21:34:34 +02:00
Bjørn Erik Pedersen 4c04d7101a Fix In func given an []interface{}
Fixes #1486
2015-10-13 17:05:36 +02:00
Diego Medina ddd8c77938 Use https
The Hugo site uses HTTPS but the video link was HTTP, which made chrome block the video
2015-10-12 13:38:33 -06:00
Bjørn Erik Pedersen 17fb752279 Correct number of args to Errorf 2015-10-12 21:34:15 +02:00
Bjørn Erik Pedersen 72f14a8202 Apply project wide go fmt 2015-10-12 20:47:06 +02:00
Bjørn Erik Pedersen c274e21356 Add Param to release notes
See #1462
2015-10-12 06:11:01 +02:00
Bjørn Erik Pedersen 65beca13b0 Add Param to the docs
See #1462
2015-10-12 06:11:01 +02:00
Bjørn Erik Pedersen 078fad49e2 Add Param(key) to Node and Page
This  is a convenience method to do lookups in Page's (Page only)  and Site's Params map (Page and Node), in that order.

Fixes #1462
2015-10-12 06:11:01 +02:00
Anthony Fok 3586d77bd5 Docs: Add pointers to the new themes.gohugo.io site
in "Themes Overview" and "Installing Themes".

TODO: Should look at all other pages and see where else
      we should add pointers to the Hugo Themes site.
2015-10-10 10:52:23 -06:00
Bjørn Erik Pedersen 63d9859c09 Expose canonifyURLs as a command flag
Needed by the theme site.
2015-10-10 10:53:13 +02:00
Bjørn Erik Pedersen 002227e05e Add dict func to release notes 2015-10-09 18:51:03 +02:00
NotZippy 3a27cefec1 Add dictionary function to be passed into a template
Allows templates to dynamically build maps.

Example usage: Creating and passing a map to a subtemplate while in a range on the parent.
2015-10-09 18:29:16 +02:00
coderzh ccd83c3040 Docs: Added hasCJKLanguage global config flag and isCJKLanguage FrontMatter
See #1399
2015-10-09 16:26:48 +02:00
Alexander Morozov 7b4e4769d0 Fix comment for NormalizeHugoFlags 2015-10-07 21:28:29 +02:00
Bjørn Erik Pedersen c1a60732ae Remove Go 1.3 from README 2015-10-07 21:09:50 +02:00
coderzh 823334875d WordCount and Summary support CJK Language
* add global `hasCJKLanguage` flag, if true, turn on auto-detecting CJKLanguage
 * add `isCJKLanguage` frontmatter to force specify whether is CJKLanguage or not
 * For .Summary: If isCJKLanguage is true, use the runes as basis for truncation, else keep as today.
 * For WordCount: If isCJKLanguage is true, use the runes as basis for calculation, else keep as today.
 * Unexport RuneCount

Fixes #1377
2015-10-07 15:14:57 +02:00
Bjørn Erik Pedersen 2c045ac449 Remove RuneCount from doc 2015-10-06 18:48:42 +02:00
Bjørn Erik Pedersen 5ec6a61d97 Add Mmark GitHub-flavoured markdown to release notes 2015-10-06 14:16:29 +02:00
Andrew Brampton c2c694f136 Add GitHub style code fence support to mmark
Fixes #1258.
2015-10-05 17:45:37 -04:00
Ramon Bartl 7ecf2a55c1 Docs: Added RIDING BYTES to Showcase Page 2015-10-05 17:38:13 -04:00
Maxime Michel 622d872418 Adding maximeguitare.com to showcase 2015-10-05 17:35:19 -04:00
Bjørn Erik Pedersen b25ba8b095 Let Cobra do the usage error logging
Fixes #1472
2015-10-05 20:26:49 +02:00
Bjørn Erik Pedersen b9aaa0079b Improve command text for import command 2015-10-05 11:25:42 +02:00
Bjørn Erik Pedersen ac1e3c3cc0 Capital J in Jekyll 2015-10-04 23:26:18 +02:00
Bjørn Erik Pedersen 0387deee03 Add Jekyll import to release notes 2015-10-04 20:10:29 +02:00
coderzh 9a2f6c62a6 Hugo import from jekyll
usage: hugo import jekyll jekyll_root_path target_path

Implemented:
 * Create new hugo site
 * Create config.yaml
 * Convert all markdown contents.
 * Copy all other files and folders to static

Fixes #101
2015-10-04 20:02:53 +02:00
Anthony Fok 08d41c3a48 Fix strange carousel width on http://gohugo.io/
The solution is to add `table-layout:fixed` when `display:table` is used
as per the answer given at:

    http://stackoverflow.com/questions/21230184/owl-carousel-inside-a-table-cell-parent-makes-parent-to-expand-weird

Fixes #1465
2015-10-02 03:32:33 -06:00
Bjørn Erik Pedersen 218554e363 Rename NormalizeHugoFlagsFunc to NormalizeHugoFlags
It IS a func.
2015-10-02 06:48:02 +02:00
vsopvsop ead339abbe is it .md instead of .ad? 2015-09-30 16:35:46 -04:00
Michael Käufl 7fd42af3b1 Used leading slash more consistently 2015-09-30 16:33:11 -04:00
Michael Käufl d06ebc98e1 Marked the whole path as code 2015-09-30 16:33:10 -04:00
Bjørn Erik Pedersen dcd9c69aa8 Use filepath as the last default sort key for pages 2015-09-30 05:43:11 +02:00
Bjørn Erik Pedersen 7708d4556d Add the base64 template funcs to release notes 2015-09-25 21:34:32 +02:00
digitalcraftsman 79f8bb625d Add base64Decode and base64Encode template functions
Fixes #1416
2015-09-25 21:31:55 +02:00
Sven Dowideit a1e32439fb Allow for any (short) line begining or ending with html comment
Fixes #1428
2015-09-25 18:32:32 +02:00
Ben Turner a43b037651 Change port number from 1414 to 1313 (default)
Change the port number to access the site locally from 1414 to 1313 as per the default and the image.
2015-09-23 19:07:01 -06:00
Bjørn Erik Pedersen 82f770a6f5 Remove superfluous g in docs 2015-09-23 09:18:20 +02:00
digitalcraftsman 493147a73f Tools: Add more to tools to the list 2015-09-22 22:34:35 +02:00
Bjørn Erik Pedersen 06caa025a4 Fix typo in docs
See #1438
2015-09-22 22:33:41 +02:00
Bjørn Erik Pedersen 8d695ec592 Add singularize template func
See #1438
2015-09-22 22:31:02 +02:00
Bjørn Erik Pedersen 751d4906ef Add pluralize template func
Fixes #1438
2015-09-22 22:25:25 +02:00
vsopvsop 74924dd50d correct spelling for 'including' and 'counterpart' 2015-09-20 19:31:35 -06:00
Anthony Fok ab0d29aa51 Press: Update URL to Spencer Lyon’s “Hugo and GitHub Pages”
Spencer had moved his web site from http://sglyon.com/ to
http://spencerlyon.com/.  Special thanks to @vsopvsop
for noticing the dead link on the Press coverage page.

Resolves #1446
2015-09-20 17:33:08 -06:00
Anthony Fok 740dc2caf1 Press: New URL to Kenny Woo’s blog about Hugo
Kenny had moved his blog from http://kennywoo.com/ to http://kenwoo.io/
2015-09-20 17:25:04 -06:00
vsopvsop c397c0b238 dead link
Hugo over Octopress 
http://kennywoo.com/blog/hugo---golang-based-static-site-generator/
2015-09-20 07:42:40 -06:00
vsopvsop 0bdb9b7da4 Link no longer works - Dead link
http://commiechink.com/2014/08/hello-hugo/
2015-09-18 20:46:56 -06:00
Anthony Fok b29ca44c6e Show both baseURL and bind address in hugo server output
Fixes #1426
2015-09-15 23:12:01 -06:00
Anthony Fok d984dde2f5 Update .travis.yml for Go 1.5.1
Also replaced CRLF with LF in .travis.yml
2015-09-15 23:06:00 -06:00
Edward Vielmetti b5b8cc9bd3 Test builds on OS X
Add an "os" target for OS X to test builds on Mac. No reason to believe it won't work, but always worth testing things.
2015-09-15 22:59:19 -06:00
Ben Turner c2a7c456cc Fix typo in terms.md 2015-09-15 21:23:44 -06:00
Anthony Fok e67bee93ce Revert "docs: Fix URL to yulinling.net (https → http) in Showcase"
This reverts commit ca74dd233d.
2015-09-15 06:12:25 -06:00
Samuel Prashker 1abc12a949 docs: Fix typo in url extras 2015-09-14 14:40:38 -06:00
Anthony Fok ca74dd233d docs: Fix URL to yulinling.net (https → http) in Showcase 2015-09-14 14:32:38 -06:00
lynxiayel 68b8dd73de Add yulinling.net to Showcase 2015-09-14 14:12:49 -06:00
Anthony Fok cd4f36ba57 docs: Optimize recent thumbnail images in Showcase 2015-09-14 14:04:21 -06:00
Anthony Fok 0a80ead5c9 docs: Fix formatting in overview/usage.md 2015-09-14 12:47:43 -06:00
Anthony Fok 397080eabe docs: Add a few more blog articles to Press
Also add `&nbsp;` to one of the dates in the table
to prevent the Date column from wrapping
2015-09-14 12:44:33 -06:00
Anthony Fok 3679fe6712 Add "control code" and "trailing space" to alias validation 2015-09-14 12:32:54 -06:00
Bjørn Erik Pedersen f5308da320 Move isThemeVsHugoVersionMismatch to /commands
To prevent potential package cycles in /helpers.
2015-09-14 17:31:39 +02:00
Anthony Fok e71bef79e5 Validate aliases to prevent directory traversal etc.
Add validation before creating aliases:

 * Prevent creating aliases outside webroot (public/ dir)
 * Skip empty "" alias
 * Skip "/" → "/index.html", which gets overwritten anyway
 * Refuse to create Windows-invalid filenames on Windows;
   warn on other platforms
 * In case of invalid aliases, after skipping them,
   return `err = nil` to prevent the error passing up
   all the way to `hugolib.Render()` and causing Hugo to abort.
 * Update alias tests.

Fixes #701: Add support for alias with whitespace
Fixes #1418: Add validation for alias
2015-09-13 18:08:42 +02:00
Anthony Fok db85299c00 Complete the Url-to-URL transition in docs
See #959
2015-09-13 05:22:12 -06:00
Anthony Fok 29aa9baecd Complete the Url-to-URL transition in tests
See #959
2015-09-13 05:21:24 -06:00
Anthony Fok d05b297e61 Add helpers.NormalizeHugoFlagsFunc() to handle flag name changes
It currently handles --baseUrl to --baseURL, and --uglyUrls to --uglyURLs.

Special thanks to Eric Paris (@eparis) for writing the
"normalized name" support in Cobra, and for showing us
how it is used in Kubernetes.

See Issue #959
2015-09-13 05:20:14 -06:00
digitalcraftsman 833a396f6b Docs: extend the migration tool list and add a cross-reference in the start guide 2015-09-12 21:51:35 +02:00
digitalcraftsman 60f7394bdc Docs: Add a section about tools around Hugo 2015-09-12 15:41:56 +02:00
coderzh 0e1fd78fb2 WordCount Summary support UTF-8 string 2015-09-12 15:41:17 +02:00
Anthony Fok c7521b3d67 docs: Change redirect documentation to aliases
Fixes #962
2015-09-10 03:08:32 -06:00
Anthony Fok cf7318a057 Convert example/blog to use new syntax for Hugo v0.14+
safeHtml → safeHTML, .Site.BaseUrl → .Site.BaseURL

(Hmm... How did we miss that earlier?)
2015-09-08 22:51:57 -06:00
Anthony Fok cec9054bb8 docs: Remove empty sourceLink from two sites in Showcase
The empty sourceLink created an empty HTML anchor
which got pointed back to http://gohugo.io/showcase/
2015-09-08 22:35:26 -06:00
Kohei Yoshino 93b3898633 Add FxSiteCompat.com to Showcase 2015-09-08 22:58:43 -04:00
spf13 9e526b65d3 fix showcase to render properly 2015-09-08 22:55:17 -04:00
Richard Sumilang daf5f32cba Adding RichardSumilang.com to the showcases. 2015-09-08 11:35:33 -04:00
Benoit Benedetti aec0e17ae1 Docs: Add Humboldtux.net to Showcase page 2015-09-08 11:34:52 -04:00
Benoit Benedetti c7b701eae3 Docs: Add new french mag article by @humboldtux to Press page 2015-09-08 11:34:18 -04:00
jlengstorf 9f75a51854 Added details about generated files and development flows 2015-09-08 11:32:47 -04:00
digitalcraftsman fd7b315572 Add a 404.html file if a new theme is created 2015-09-08 11:29:04 -04:00
Isaac Gregson d6f6945525 Update organization.md
Increases clarity on the different between `section` and `type`. 

The current `section` information here is wrong (sections can *not* be specified in front matter). This caused quite the headache. This change fixes this and also adds `type`, since it *can* be specified in front matter.
2015-09-08 11:25:59 -04:00
spf13 bfa06fff86 showcase layout improved when thumbnails are different proportions 2015-09-08 11:23:14 -04:00
sergeant 138ffefd6a Add NoDesk to Showcase 2015-09-08 09:11:44 -04:00
sergeant ea852b8dc7 Add NoDesk to Showcase 2015-09-08 09:11:44 -04:00
digitalcraftsman d584ca59f0 Describe the use of custom archetypes in the docs 2015-09-08 09:03:03 -04:00
Karim Ali 16cbda979c Add GreenITGlobe website for showcases page 2015-09-08 08:56:41 -04:00
Hugh Grigg 570d4e4cc4 Add Chinese Grammar to showcase 2015-09-08 08:54:56 -04:00
Anthony Fok 1b8440af50 Docs: Add new blog post by @CoderZh to Press page 2015-09-01 12:06:34 -06:00
chrongzhang 52d94fa675 Add config option "disablePathToLower"
Enabling this prevents lowercasing of the path/url.

Fixes #557
2015-09-01 15:26:02 +02:00
Jeff Hodges 49fe04c0bd Correct check of published boolean 2015-08-31 05:26:46 +02:00
Jeff Hodges 311593bff0 Add undocumented published setting to front matter
A new "published" setting that is the opposite of "draft" is added and
left intentionally undocumented.

This setting comes from jekyll and eases the transition to hugo
greatly. We leave it undocumented so that folks don't rely on it, but
also don't shoot themselves in the foot during a jekyll migration.

The foot-shooting occurs if they have only a few documents that were
drafts ("published: false") in the jekyll version of their site and
don't notice that they were published in the migration to hugo.
2015-08-30 20:40:56 +02:00
Bjørn Erik Pedersen 5b90b388cb Unexport FileAndExt
If needed outside helpers, create an exported file path (FilePathAndExt?)  and/or a url version.
2015-08-26 21:29:32 +02:00
Bjørn Erik Pedersen fd2fc1d3ce Polish 0.15 release notes 2015-08-23 15:14:48 +02:00
Bjørn Erik Pedersen 1e06dfd12c Add first draft of Hugo 0.15 Release Notes 2015-08-23 14:20:14 +02:00
Tatsushi Demachi 0c98d8e9ed Use LazyFileReader for reading file contents
Simple ioutil.ReadFile is used for reading file contents but it reads
all of the file contents and copies them into the memory and is run in a
single goroutine. It causes much memory consumption at copying media
files in content directory to publish directory and it is not good at
performance.

This improves the both issue by replacing ReadFile with LazyFileReader.

It postpones reading the file contents until it is really needed. As the
result, actual file read is run in parallelized goroutine. It improves
performance especially in a really big site.

In addition, if this reader is called from io.Copy, it does not copy the
file contents into the memory but just copies them into destination
file. It improves much memory consumption issue when the site has many
media files.

Fix #1181
2015-08-22 19:43:15 +02:00
Tatsushi Demachi 97eb55da89 Add LazyFileReader type to source library
LazyFileReader is an io.Reader implementation to postpone reading the
file contents until it is really needed. It is introduced for improving
performance and memory consumption at reading media files in content
directory.
2015-08-22 19:43:15 +02:00
Bjørn Erik Pedersen 3982854eeb Update Travis for Go 1.5 2015-08-21 09:17:53 +02:00
Andrew Carter c2869aead0 Fix -ldflags for Go 1.5
Use correct form -X <name>=<value> for Go 1.5
2015-08-21 09:14:15 +02:00
Icaro Seara e791835e6d Fix typo, "delemiters" -> "delimiters" 2015-08-19 08:06:13 -06:00
Francois Lanthier Nadeau 35ff685c30 Update press.md
New article about Hugo on the Snipcart blog.
2015-08-19 07:50:52 -06:00
Anthony Fok 4047ca5c3c Search current directory for config file by default
As of 2015-08-16, Viper no longer searches the CWD
for config file by default to avoid unintended surprises,
but Hugo relies on the original behaviour.

Fixed by calling

    viper.AddConfigPath(".")

at the appropriate place.

See https://github.com/spf13/viper/issues/73 for more information.

Fixes #1363
2015-08-19 00:36:22 -06:00
Bjørn Erik Pedersen dac9c0dae6 Use cast.ToIntE for int conversions in substr and slicestr
It is less restrictive, and it is what is used in other template funcs.
2015-08-15 15:47:16 +02:00
Benny Wu 5b51b3b9fb Slicestr fix for other int type param
Fixes #1347
2015-08-14 17:26:30 +02:00
Benny Wu d313bc78a4 Documentation update on Template Where Function for nil 2015-08-13 23:05:10 +02:00
Anthony Fok 29c9a40a8d Implement hugo --theme=[Tab][Tab] bash completion
using the new BashCompSubdirsInDir annotation in spf13/cobra.
2015-08-11 15:08:10 +02:00
Anthony Fok 7555e364d0 Print feedback for hugo genautocomplete 2015-08-09 17:59:44 +02:00
Anthony Fok c69835daba Print feedback for hugo gendoc 2015-08-09 17:58:01 +02:00
Anthony Fok fee5519129 Use spf13/pflag's new SetAnnotation helper
And make our bash completion code more compact.
2015-08-09 17:56:15 +02:00
Michael Diamond 209166a261 Added sitemap configuration documentation. 2015-08-08 15:04:52 -06:00
Michael Diamond caaf637068 Added mention of .Data.Pages, removed duplicate .Site.Pages mention. 2015-08-08 14:54:46 -06:00
Anthony Fok cafcd1909f docs: Remove minodisk's http://dsk.mn/ from Showcase
The domain dsk.mn expired in January 2015,
and unfortunately I was unable to reach the author
nor find his replacement website.
2015-08-08 14:48:01 -06:00
Anthony Fok 68b424c233 docs: Clean up and align Showcase thumbnail images
Some of the thumbnails in Showcase were out of place
because of several irregularly sized thumbnails,
and some of them almost 300KB in filesize.

Resize them all to 600x400 (pixels), and use the `-tn.png`
suffix.

When necessary, the website snapshot is re-captured using
gnome-web-photo.  Then, the following commands (or a combination
thereof) are used to crop and resize the image into a thumbnail,
and to reduce its filesize:

    $ convert example.png -crop 900x600+0+0 \
                          -filter Lanczos2Sharp -distort Resize 600x400 \
                          example-tn.png
    $ pngquant --nofs -v --speed 1 --quality 65-80 example-tn.png
    $ optipng -o7 -zm1-9 example-tn-or8.png
    $ mv example-tn-or8.png example-tn.png
2015-08-08 14:22:48 -06:00
Anthony Fok 36b374f8ab docs: Add site title; set pluralizeListTitles = false
To prevent "Showcase" from becoming "Showcases",
also to have the RSS feed display correct titles,
i.e. "Showcase on gohugo.io" rather than "Showcase on ".
2015-08-08 01:41:18 -06:00
Bruno Calheira b14b90435a Add Arqueart to Showcase 2015-08-07 23:34:59 -06:00
Bruno Calheira 8c3b6f8b62 Create arqueart.md 2015-08-07 23:34:59 -06:00
Anthony Fok ee7dd2929f docs: More detailed explanation of .Site.LastChange 2015-08-07 23:30:11 -06:00
Austin Dizzy 6511e2c48f Removed extra .Site.LastChange listing 2015-08-07 23:13:18 -06:00
Baptiste Mathus 7a681035ce Doc for other supported formats (external helpers)
As Hugo now supports more formats thanks to the new "external helpers"
feature recently introduced, and as requested by some people, I added
some lines in the doc:
* basically confirming it actually exists
* how to use it
2015-08-07 22:55:03 -06:00
Bjørn Erik Pedersen 04b4c996ac Reset Scratch for 404
The 404 pages etc. need a better solution, but fix this issue for now.

Fixes #1336
2015-08-07 20:30:01 +02:00
Bjørn Erik Pedersen b05a292c21 Revert "Fix some Go code doc issues"
This reverts commit de7dd70bbc.

Broke the code fence feat.
2015-08-07 20:09:40 +02:00
Bjørn Erik Pedersen 0f1fb8c7d8 Avoid panic in shortcode param handling
Fixes #1337
2015-08-07 20:08:23 +02:00
Bjørn Erik Pedersen 35bb72c83e Do not panic on index out of range in shortcode.Get
Fixes #1335
2015-08-07 19:21:26 +02:00
Bjørn Erik Pedersen 2805a6f80e Also rename readDir in docs shortcode 2015-08-07 14:55:53 +02:00
Bjørn Erik Pedersen cea82842f0 Rename ReadDir to readDir
To make it consistent with the other template funcs.
2015-08-07 14:33:48 +02:00
Tatsushi Demachi 153332706a Make sort tpl func accept field/key chaining arg
'sort' template function used to accept only each element's struct field
name, method name and map key name as its second argument. This extends
it to accept a field/method/key chaining key string like
'Params.foo.bar' as the argument. It evaluates sub elements of each
array or map elements and sorts by them.

Typical use case would be sorting pages by user defined front matter
value. For example, sorting pages by 'Params.foo.bar' is possible by
writing the following template code

    {{ range sort .Data.Pages "Params.foo.bar" }}
        {{ .Content }}
    {{ end }}

It ignores all leading and trailing dots so "Params.foo.bar" can be
written in ".Params.foo.bar"

This also fixes the issue that 'sort' cannot evaluate a pointer value.

Fix #1330
2015-08-07 14:06:06 +02:00
Tatsushi Demachi 56534beaf6 Fix sort tpl func to return explicit type value
sort template function returns `[]interface{}` type slice value
regardless of its original element type.

This fixes it to keep the original element type. For example, if it
sorts `map[string]int` type value, it returns `[]int` slice value
instead of `[]interface{}` slice value.
2015-08-07 14:06:06 +02:00
Bjørn Erik Pedersen c7aa881d90 Fix Unicode issue in Slicestr and Substr
Fixes #1333
2015-08-07 08:52:22 +02:00
Bjørn Erik Pedersen de7dd70bbc Fix some Go code doc issues 2015-08-06 22:58:10 +02:00
Bjørn Erik Pedersen 1583d8d094 Add missing formatting directive in Printf call
To make Go Vet happy.
2015-08-06 22:46:35 +02:00
Anthony Fok 5b19a26556 docs: Extend documentation on Blackfriday options
Especially to spell out how the `latexDashes` flag
changes the behavior of smart dashes
2015-08-05 16:24:03 -06:00
Bjørn Erik Pedersen 0b7229f7b2 Add some float tests to TestArethmic 2015-08-05 18:55:25 +02:00
Anthony Fok 4a2eda49cd Add option to disable Blackfriday Smartypants
Can be used in site config or per page front matter:

```
[blackfriday]
smartypants = false
```
2015-08-04 21:42:32 +02:00
Anthony Fok eb519afefd docs: Fix typos 2015-08-04 13:01:25 -06:00
Anthony Fok ab8e189a2a docs: Bolden the blackfriday flags to make them stand out
And other minor HTML/CSS tweaks.
2015-08-04 12:34:47 -06:00
Anthony Fok 5505ac0d72 doc: Strip trailing whitespace; other revisions
Make some random and non-comprehensive changes to the
template functions documentation to make them more
consistent.
2015-08-04 12:00:08 -06:00
Anthony Fok b0416e9bef Strip trailing whitespace in code 2015-08-04 11:59:32 -06:00
Anthony Fok f2ab0b2608 Improve formatting of Hugo command descriptions
Trying to make them look good both in the terminal (`hugo help [command]`)
and in the web browser (http://gohugo.io/commands/).  :-)
2015-08-04 03:19:57 -06:00
Anthony Fok e64e571b67 Bump hugo new theme template min_version to 0.14 2015-08-04 02:59:57 -06:00
Tatsushi Demachi 98659bf3b8 Fix searching YAML/TOML delimiters in frontmatter
When a YAML/TOML's delimiter character sequence is included in a
frontmatter string, parser mistakes it as a delimiter. This fixes it by
checking a character right before the delimiter sequence is '\n' or it
is the beginning of the frontmatter.

Fix #1320
2015-08-03 18:30:55 +02:00
Marek Janda 4bed69629e Add map support to scratch 2015-08-02 17:23:36 +02:00
Jeff Hodges 8d28686edc Trim trailing spaces from YAML and TOML delimiters
When someone hits space after typing "---" (or "+++") but before they
hit return, hugo silently failed to parse the file. This corrects that.
2015-08-02 14:46:46 +02:00
Anthony Fok 211b757fee [Docs] Add <br> to an extra-long title in the Press page 2015-08-01 11:38:58 -06:00
Bjørn Erik Pedersen 738f9561ab docs: add netlify article to press section 2015-07-31 13:43:45 +02:00
Anthony Fok 252ea96d1d Remove deprecated fields and methods for v0.15
Special thanks to @bep for his guidance and
for making sure all of the Hugo themes get updated.

Fixes #1172
2015-07-30 13:33:38 +02:00
Baptiste Mathus b23b546a30 Asciidoc[tor]: use --no-header-footer option
This simplifies the retrieval of the HTML (no more need to extract the
part within body) and also removes the unwanted "Last Updated" part in
the article.
2015-07-29 17:36:19 +02:00
Bjørn Erik Pedersen 43891e3994 Always use the template provided in page.Render
Fixes #1306
2015-07-29 01:19:29 +02:00
Bjørn Erik Pedersen 3037d200cb Fix inconsistent front matter handling
Fixes #768
2015-07-26 15:28:56 +02:00
Russell Oliver 81e69c416d Add ReadDir function to list local files.
Includes documentation.
2015-07-25 21:56:38 +02:00
Scott C Wilson 72ecd0cdc7 Ignore non-presence of "layouts" directory in watch logic
Fixes #691
2015-07-25 21:50:24 +02:00
Ryan Clarke 18d69d7f8c Fix periods in taxonomies create bad paths
Fixes #1188
2015-07-25 21:43:20 +02:00
Bjørn Erik Pedersen c1a2b7a102 Replace strings.Compare
Which is a Go 1.5 func.

See #1299
2015-07-25 17:38:13 +02:00
Bjørn Erik Pedersen 40efc8677a Fix sort test and title sort
See #1299
2015-07-25 17:22:46 +02:00
Bjørn Erik Pedersen 36e0d005ed Fall back to link title for default page sort
Fixes #1299
2015-07-25 16:34:35 +02:00
Sam Debruyn 6674189bc2 The guide is updated to fit the current Wercker interface and configurations.
Wercker changed its interface and default infrastructure (Docker).
2015-07-24 14:35:39 +02:00
Bjørn Erik Pedersen da0715a0c5 Remove point 7 in contributors guide
It makes sense on its own, but it contradicts 6). We need to revisit this one to make it more clear/better.
2015-07-24 11:41:45 +02:00
Scott C Wilson d25cd03994 Make small fixes to README file
- Add a step to Contributor instructions for those modifying commands
- Change forum link to http (https does not work)
- Add "Sign the forum release thread" to contributor instructions
2015-07-24 11:35:20 +02:00
Bjørn Erik Pedersen 027abcfbb9 docs: fix prev in highlightling 2015-07-24 11:31:26 +02:00
Szymon Katra 9c8ce0d935 Added szymonkatra.github.io site to showcase 2015-07-24 11:26:24 +02:00
Scott C Wilson cdefb5a027 Fix links to Ace and Amber pages 2015-07-24 11:22:05 +02:00
Scott C Wilson de38524cd1 Add scottcwilson.github.io to showcase site 2015-07-24 11:21:56 +02:00
Bjørn Erik Pedersen 28020f866b Move apply before cache put
It just looks better.

See #1293
2015-07-24 00:28:21 +02:00
Bjørn Erik Pedersen 47e65c4acd docs: Rename dynamic content to data-driven content
Fixes #925
2015-07-23 12:54:58 +02:00
Bjørn Erik Pedersen a9c5133a77 Fix data races in sorting and Reverse
The custom sort functions used from the templates had some subtle data race- and related issues,
especially when used in the single page template.

This commit fixes this by making copies and protect the read and writes with a RWMutex.

The results are cached (it will typically be invoked *number of pages* times with exactly the same data).

This is, not surprisingly, also faster:

```
benchmark                           old ns/op     new ns/op     delta
BenchmarkSortByWeightAndReverse     14228         491           -96.55%

benchmark                           old allocs     new allocs     delta
BenchmarkSortByWeightAndReverse     1              0              -100.00%

benchmark                           old bytes     new bytes     delta
BenchmarkSortByWeightAndReverse     32            0             -100.00%
```

Fixes #1293
2015-07-23 12:43:57 +02:00
Bjørn Erik Pedersen ea6ae769dc Fix broken test 2015-07-21 21:12:03 +02:00
Bjørn Erik Pedersen 5cf0aa2fc0 Add benchmark for sort and reverse 2015-07-21 21:08:20 +02:00
Bjørn Erik Pedersen aca0f60448 source/File: Fix data races 2015-07-21 20:02:42 +02:00
Scott C Wilson dec9749bbc Document Amber templates
Fixes #1064
2015-07-20 15:28:20 +02:00
Scott C Wilson 8a48412c44 On error, return error message, not nil 2015-07-20 14:49:21 +02:00
Scott C Wilson c00a1fcb7f Add a check for the setting of watch flag in config file
Fixes #1074
2015-07-20 14:20:07 +02:00
Tatsushi Demachi 03a7016104 Let Amber template call Hugo's custom functions
Amber doesn't share text/template `FuncMap` functions and has its own
function list. This allows Amber to call Hugo's custom functions.
2015-07-20 11:29:15 +02:00
Bjørn Erik Pedersen e3ea4b48a2 Fix name logic for Amber templates 2015-07-19 20:12:05 +02:00
Christopher Eliot 7f1bcd89b2 Fix link to front matter
added leading backslash, changing [front matter](content/front-matter) to [front matter](/content/front-matter)
2015-07-19 19:41:20 +02:00
Clam- 85f4935dec Fix unclear RSS template docs
The documentation for the RSS templating is a little unclear.
http://gohugo.io/templates/rss/

Some users may attempt to look for a ```__internal``` directory rather than assume that's the aforementioned "Hugo own template."

Here's my suggestion.
2015-07-19 19:40:34 +02:00
digitalcraftsman bfcf95b9de Add mention about .Hugo.Generator in 'Creating a theme' section 2015-07-19 19:39:32 +02:00
Edward Vielmetti c8477c4f6e Fix typo: "taxononomy" -> "taxonomy" 2015-07-19 19:36:23 +02:00
Bjørn Erik Pedersen 1a94148d06 Add paginator support for page groups
Fixed #1274
2015-07-18 14:53:52 +02:00
Valere JEANTET 2c22a8b79a fix TestHomeNodeMenu test
Signed-off-by: Valere JEANTET <valere.jeantet@gmail.com>
2015-07-14 21:31:47 +02:00
Valere JEANTET 247574976c Allow page.HasMenuCurrent() and node.HasMenuCurrent() to proceed with multi-level nested menus
Currently HasMenuCurrent only process the first 2 levels.
2015-07-14 21:31:47 +02:00
Bjørn Erik Pedersen 354192d2b8 Log missing theme as FATAL
See #1234
2015-07-13 10:38:28 +02:00
Scott C Wilson 029cdb68f5 Checks to ensure theme directory, if specified, exists
See #1234
2015-07-13 10:31:59 +02:00
Bjørn Erik Pedersen a2fa3895ee Fix log message in test 2015-07-12 19:27:29 +02:00
Bjørn Erik Pedersen 3663828f5e Optimize RuneCount
Do not create it unless used.

See #1266
2015-07-12 11:28:19 +02:00
Bjørn Erik Pedersen 77c60a3440 Add RuneCount to Page
Fixes #1266
2015-07-12 11:05:37 +02:00
Éli Marshal 90af334c21 Omit protocol from embedded font resources
Fixes the mixed content errors and loads fonts when accessing
https://gohugo.io/
2015-07-11 01:10:45 +02:00
Arian Allenson M. Valdez c4f81840f7 Change arianv sourceLink to master branch 2015-07-09 19:13:31 +02:00
Arian Allenson M. Valdez 88fe0e7c2c Add learnoverpass 2015-07-09 19:13:31 +02:00
Arian Allenson M. Valdez 5f69d3d654 Add arianv 2015-07-09 19:13:31 +02:00
Sam Debruyn 6807151a22 add a showcase of sa.muel.be 2015-07-09 10:56:40 +02:00
Borys Borysenko c6d46ff2bd [Docs] Press page. Fix URL 2015-07-09 10:52:00 +02:00
Andrew Brampton c139c6e1ef Add support for GitHub-flavoured markdown code fences for highlighting
This commit adds a new PygmentsCodeFences config option (default false), which if true will allow GitHub style backtick code fences around code, which will then be rendered by Pygments.

For example:

``` language
your code
```

can be used instead of {{< highlight language >}}your code {{< /highlight >}}.

Fixes #362
2015-07-08 08:12:52 +02:00
Andrew Brampton fdab118010 If no language is provided to Pygments, then try and guess it
Previously if no language was specified, then illegal args would be passed to pygments, for example `pygments -l -fhtml`, which would result in pygments printing an error.
2015-07-08 08:12:06 +02:00
kangkona 450dc7a411 Add a showcase of Kangkona 2015-07-08 07:42:04 +02:00
Rick Cogley a945412475 Add how-to for foreign language month names
FYI @nicolinuxfr, added the month name example.
2015-07-08 07:38:52 +02:00
Rick Cogley 617fa2fe65 Add Rick and eSolia's sites to the Hugo docs showcase 2015-07-08 07:37:30 +02:00
delputnam 9b3d0cf5bf Added missing "Social" section to SiteInfo
I could be wrong here, but it looks to me like .Site.Social.facebook is used in tpl/template_embedded.go, but the variable is never set. I've added a line to initializeSiteInfo to map the info from config into this variable.
2015-07-02 19:26:01 +02:00
Marc-Antoine Ruel 24c8226cbf Document Page.RawContent in templates/variables/ 2015-07-02 19:24:30 +02:00
Marc-Antoine Ruel c9fc0e786f Add Page.RawContent() to access raw Markdown as a string.
In particular, RawContent() excludes the metadata header.

This is necessary in the use case of embedding remarkjs.com slides, as it needs
the unprocessed Markdown content to generate the slides.
2015-07-02 19:24:30 +02:00
Tatsushi Demachi dd732e84f4 Add nil comparison to where tpl function
`where` template function's internal condition check function always
returns `false` when a target value doesn't exist or it's nil value but
this behavior makes it difficult to filter values which doesn't have a
particular parameter.

To solve it, this adds nil value comparison to the function.
`where Values ".Param.key" nil` like clause can be used for the case
above.

Only "=", "==", "eq", "!=", "<>", "ne" operators are allowed to be used
with `nil`. If an other operator is passed with `nil`, the condition
check function returns `false` like before.

Fix #1232
2015-06-29 19:50:45 +02:00
Bjørn Erik Pedersen 033a13e10e Fix watcher detecting changes as static when no theme
There have been some changes to the ´helpers.GetThemesDirPath()´ so it now returns an empty string when no theme.

This is correct, but it broke the watch service (at lest on OSX), as `strings.HasPrefix("", "somestring") evaluates to true somehow, and content changes are incorrectly branded as static.

There are other issues in there, but that will come later ...

See #1236
2015-06-28 19:27:28 +02:00
Bjørn Erik Pedersen a509a23255 Add doc for new Blackfriday options
See #1220
See #1231
2015-06-28 15:27:47 +02:00
Bjørn Erik Pedersen 483fc8fa3d Add config option for Blackfriday HTML_HREF_TARGET_BLANK
Fixes #1220
2015-06-28 15:18:15 +02:00
Bjørn Erik Pedersen 05c07c561a Add option to disable Blackfriday LaTeX style dashes
Can be used in site config of per page front matter:

```
[blackfriday]
latexDashes = false
```

Fixes #1231
2015-06-28 15:08:52 +02:00
Bjørn Erik Pedersen 664a97819f 404 is homeless
Fixes #1235
2015-06-28 10:43:43 +02:00
Mario Sanchez Carrion 50df31406f added thumbnail 2015-06-26 21:26:17 +02:00
Mario Sanchez Carrion d118d03714 Create mariosanchez.md
Submitting site for consideration in Hugo Showcase
2015-06-26 21:26:08 +02:00
tim 1b50ccd162 add vamp.io site as showcase 2015-06-26 20:59:40 +02:00
Jonathan Anderson c4ad8f6498 Use helpers.GetThemeDir() to find base templates.
Now that we have the helpers.GetThemeDir() function, use it instead of
calling directly into viper.
2015-06-25 18:05:43 +02:00
Jonathan Anderson 1058cb17d1 Refactor theme path helper functions.
Reduce duplication (`x + FilePathSeparator + y` a few lines away from `filepath.Join(x, y)`) and add a `GetThemeDir()` function to get the current theme's directory.

Also add a comment complaining about the `GetThemesDirPath()` function, which doesn't seem to do what its name would suggest. This might be a candidate for deprecation?
2015-06-25 18:05:43 +02:00
Jonathan Anderson 0987e98db3 Add support for baseof.ace templates in themes.
When we find a template that requires a base template, we should also look
for that base template in the current theme.

Fixes #1215.
2015-06-25 18:05:43 +02:00
Piotr Kowalczuk 29e786aac5 Proper parsing structured array from yaml based FrontMatter 2015-06-25 17:56:22 +02:00
Bjørn Erik Pedersen e764a6e638 Use pooled buffer in replaceShortcodes
Even as a copy at the end is needed, this consumes way less memory on Go 1.4.2:

```benchmark                           old ns/op     new ns/op     delta
BenchmarkParsePage                  145979        139964        -4.12%
BenchmarkReplaceShortcodeTokens     633574        631946        -0.26%
BenchmarkShortcodeLexer             195842        187938        -4.04%

benchmark                           old allocs     new allocs     delta
BenchmarkParsePage                  87             87             +0.00%
BenchmarkReplaceShortcodeTokens     9424           9415           -0.10%
BenchmarkShortcodeLexer             274            274            +0.00%

benchmark                           old bytes     new bytes     delta
BenchmarkParsePage                  141830        141830        +0.00%
BenchmarkReplaceShortcodeTokens     35219         25385         -27.92%
BenchmarkShortcodeLexer             30178         30177         -0.00%
```
See #1148
2015-06-22 20:30:20 +02:00
Bjørn Erik Pedersen 67209dbfb3 docs: make the named value Data File example simpler 2015-06-22 20:25:17 +02:00
Sebastian Krause e96624cce8 Update datafiles.md
additional example for named data values
2015-06-22 00:02:48 +02:00
Bjørn Erik Pedersen d4b6f9aca3 Fix map-order dependent menu tests
Fixes #1222
2015-06-21 23:36:58 +02:00
Bjørn Erik Pedersen c507229191 Print URL when failing menu test
See #1222
2015-06-21 23:09:39 +02:00
Bjørn Erik Pedersen dbd93f5112 Remove unused var 2015-06-21 22:57:42 +02:00
Bjørn Erik Pedersen 004fcddc80 Remove superfluous p-tags around shortcodes
This commit replaces the regexp driven `replaceShortcodeTokens` with a handwritten one.

It wasnt't possible to handle the p-tags case without breaking performance.

This fix actually improves in that area:

```
benchmark                           old ns/op     new ns/op     delta
BenchmarkParsePage                  142738        142667        -0.05%
BenchmarkReplaceShortcodeTokens     665590        575645        -13.51%
BenchmarkShortcodeLexer             176038        181074        +2.86%

benchmark                           old allocs     new allocs     delta
BenchmarkParsePage                  87             87             +0.00%
BenchmarkReplaceShortcodeTokens     9631           9424           -2.15%
BenchmarkShortcodeLexer             274            274            +0.00%

benchmark                           old bytes     new bytes     delta
BenchmarkParsePage                  141830        141830        +0.00%
BenchmarkReplaceShortcodeTokens     52275         35219         -32.63%
BenchmarkShortcodeLexer             30177         30178         +0.00%
```

Fixes #1148
2015-06-21 22:51:12 +02:00
Bjørn Erik Pedersen ae4f72b091 Comment out mystery test
Fails on Travis in Go 1.3 + 1.5.

Will have to look into that one.
2015-06-21 22:28:50 +02:00
Bjørn Erik Pedersen 6bcb7e83e7 Revert "add preliminary support for content/index.md file to be homepage content"
This reverts commit 5f84bc02cd.
2015-06-21 15:01:09 +02:00
Bjørn Erik Pedersen 3eb301b57a Revert "refactor and clean up site tests"
This reverts commit 99e250917d.
2015-06-21 15:01:06 +02:00
Bjørn Erik Pedersen f25ce7fefa Revert "Move matchRender to test helpers file"
This reverts commit 32d91d616e.
2015-06-21 15:01:02 +02:00
Bjørn Erik Pedersen d770fa59a5 Revert "Add tests for homepage content support"
This reverts commit 24351c58be.
2015-06-21 15:01:01 +02:00
Bjørn Erik Pedersen 59c6ba4e45 Revert "Make .IsHome work when homepage as page"
This reverts commit 7e765cc1bd.
2015-06-21 15:00:53 +02:00
spf13 7e765cc1bd Make .IsHome work when homepage as page 2015-06-19 10:07:47 -04:00
spf13 24351c58be Add tests for homepage content support 2015-06-17 12:35:44 -04:00
spf13 32d91d616e Move matchRender to test helpers file 2015-06-17 10:47:49 -04:00
spf13 99e250917d refactor and clean up site tests 2015-06-17 10:47:49 -04:00
spf13 5f84bc02cd add preliminary support for content/index.md file to be homepage content 2015-06-17 10:47:49 -04:00
Bjørn Erik Pedersen 50269f2512 Remove superfluous return 2015-06-16 22:31:51 +02:00
Bjørn Erik Pedersen 4b7c1342fd Make removal of accents in taxonomy and section paths optional
And default off.

Fixes #1180
2015-06-16 19:25:48 +02:00
Rick Cogley 847ad36e45 Add new tutorial for multilingual sites
Simple tutorial showing one pattern for creating a multilingual site in
Hugo.
2015-06-16 12:17:09 +02:00
Ariejan de Vroom cc9536ec46 Update docs for last template function 2015-06-15 21:18:38 +02:00
Ariejan de Vroom 0a2e5424ab Add last template function
`last` allows the user to select the last X items of
and array.
2015-06-15 21:18:38 +02:00
Ariejan de Vroom 627d016cc9 Refactor var name limit to index 2015-06-15 21:18:38 +02:00
Ariejan de Vroom 40a92a062d Add after to template function documentation 2015-06-15 21:18:38 +02:00
Ariejan de Vroom c335efdd06 Add after template function
Where `first` will return the first N items of a rangeable list,
`after` will return all items after the Nth item.

This allows the user to do something with the first N items and
something different with the remaining items after N.
2015-06-15 21:18:38 +02:00
Vincent Batoufflet 82cc1ac0f8 Add Blackfriday definition lists extension support 2015-06-15 21:15:05 +02:00
bep be6cf6a9c6 Revert "Add some debug to failing menu test"
This reverts commit becc627e1e.
2015-06-12 22:49:49 +02:00
bep becc627e1e Add some debug to failing menu test 2015-06-11 22:49:07 +02:00
bep bed8197de5 Move Viper reset to correct level in menu tests 2015-06-11 22:41:17 +02:00
bep beda46d289 Reset Viper for every duplicate menu test iteration 2015-06-11 21:22:29 +02:00
David Calavera 53c9e890a2 Make sure target destination has the right path separator.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-06-11 21:16:51 +02:00
Ariejan de Vroom 3ab00e6e64 Let travis test against go-tip 2015-06-11 20:53:43 +02:00
bep bee46915d0 Temp remove tip from Travis
There is one failing test there. It runs fine for me on tip locally (Linux).

Will reinsert this once tip gets into stable mode.
2015-06-06 23:56:23 +02:00
Tatsushi Demachi 51cabe6faf Fix substr tpl func's int type variant issue
`substr` template function takes one or two range arguments. Both
arguments must be int type values but if it is used with a calclation
function e.g. `add`, `len` etc, it causes a wrong type error.

This fixes the issue to allow the function to take other integer type
variant like `int64` etc.

This also includes a small fix on no range argument case.

Fix #1190
2015-06-06 21:03:30 +02:00
bep be44345272 Silence chatty JSON test 2015-06-06 20:57:13 +02:00
bep beeae6ab69 Add some tests for IgnoreFiles
And log error on invalid regexp.

See #1189
2015-06-03 18:54:15 +02:00
bep beaa1b3aad Add some docs for IgnoreFiles
See #1189
2015-06-03 13:46:52 +02:00
bep bec3f40359 Rename WatchIgnoreFiles to IgnoreFiles
Because this isn't just about server and watching.

See #1189
2015-06-03 13:45:52 +02:00
bep bed227886b Add configurable list to ignore files in server watch
The following inside `config.toml` will ignore files ending with `.foo` and `.boo`.

```
watchIgnoreFiles = [ "\\.foo$", "\\.boo$" ]
```

The above is is a list of Reqular Expressions, but note the escaping of the `\` to make TOML happy.

Fixes #1189
2015-06-03 13:38:05 +02:00
Cyrill Schumacher cc5d63c37a GetJSON/GetCSV: Add retry on invalid content
The retry gets triggered when the parsing of the content fails.

Fixes #1166
2015-06-01 12:05:16 +02:00
bep be38acdce7 Add PreserveTaxonomyNames flag
Before this commit, taxonomy names were hyphenated, lower-cased and normalized -- then fixed and titleized on the archive page.

So what you entered in the front matter isn't necessarily what you got in the final site.

To preserve backwards compability, `PreserveTaxonomyNames` is default `false`.

Setting it to `true` will preserve what you type (the first characters is made toupper for titles), but normalized in URLs.

This also means that, if you manually construct URLs to the archive pages, you will have to pass the Taxonomy names through the `urlize` func.

Fixes #1180
2015-05-31 20:30:53 +02:00
bep 3ea4df35f2 Remove accents in URLs
So the taxonomy `Gérard Depardieu` gives paths on the form `gerard-depardieu`.

Unfortunately this introduces two imports from the `golang.org/`, but Unicode-normalization isn't something we'd want to write from scratch.

See https://blog.golang.org/normalization

See #1180
2015-05-31 20:30:45 +02:00
bep be0903c71a Fix FullFilePath
Fixes #732
2015-05-31 18:54:20 +02:00
Artem Vorotnikov 3cee9b7786 Allow custom RSS Uri for section and taxonomy feeds
Fixes #1147
2015-05-31 15:59:51 +02:00
vsopvsop 2690a8c1ea Update introduction.md 2015-05-31 13:49:41 +02:00
bep be0314b1d5 Fix Windows Ace path issue
Ace doesn't like Windows style filepath separators.

Fixes #1178
2015-05-31 13:13:21 +02:00
bep e4ed9d6b02 Add some Ace test cases
See #1178
2015-05-31 13:13:28 +02:00
bep be45399cba Extract Ace handling to a method
To prepare for some testing.

See #1178
2015-05-29 11:31:26 +02:00
bep be7404e337 Support Fish and Chips section
Section names are also used as the title of the list pages, but naming section folders as `Fish and Chips` and similar didn't work very well.

This commit fixes that.

This commit also changes the title casing of the section titles. Some may argue that this is a breaking change, but the old behaviour was also pretty broken,
even for languages that use title capitalizations, as it didn't follow any particular style guide, `fish and chips` became `Fish And Chips` etc.

Now it just turns the first letter into upper case, so `Fish and Chips` will be left as `Fish and Chips`.

People wanting the good old behaviour can use the `title` template func.

Fixes #1176
2015-05-28 23:05:17 +02:00
bep be535832f7 Add IsHome
To determine if a page is the "Home Page" has inspired lots of creativity in the template department.

This commit makes it simpler: IsHome will tell the truth.
2015-05-28 03:20:08 +02:00
bep be6dfcc495 Add some missing page permalink test cases 2015-05-28 02:30:01 +02:00
bep be964e95a1 Never remove trailing slash in RelPermalink
Fixed #1174
2015-05-27 20:41:43 +02:00
bep beffe756a9 docs: getting usage up to spec 2015-05-27 11:59:19 +02:00
Anthony Fok 2a40475235 Add two articles about Hugo to the Press page
* http://jbrodriguez.io/mobile-friendly-website-2/
* http://blog.hypriot.com/post/moved-from-posthaven-to-hugo/
2015-05-26 21:46:40 -06:00
bep beaa008c2f Make deprecated warning for this release more alert 2015-05-26 23:08:25 +02:00
bep be381683ff Hyphenate DEV version 2015-05-26 22:44:39 +02:00
Tatsushi Demachi 601a2ce124 Add time.Time type support to where tpl func
`where` tpl function doesn't support `time.Time` type so if people want
to compare such values, it's required that these values are converted
into `int` and compare them.

This improves it. If `time.Time` values are passed to `where`, it
converts them into `int` internally, compares them and returns the
result.

See also
http://discuss.gohugo.io/t/future-posts-and-past-posts/1229/3
2015-05-26 15:59:36 +02:00
bep beaa09a7f6 docs: add bepsays.com to showcase 2015-05-26 10:51:57 +02:00
Jeff Ramnani 102a3b95ae Document techniques for debugging templates.
This information was previously scattered around in the forums and
mailing list.  Add it to the official docs to make things easier for new
users.

Fixes #1167
2015-05-26 10:01:45 +02:00
spf13 cd06e89be3 adding goxc config file 2015-05-25 21:47:41 -04:00
spf13 d4de261508 bumping master version to v0.15-DEV 2015-05-25 21:46:29 -04:00
spf13 6af9d6789e Bump version to Hugo v0.14.0 2015-05-25 11:59:47 -04:00
spf13 fa58ef5394 Add GopherCon to the showcase 2015-05-25 11:55:48 -04:00
spf13 6f0b80c952 Add GoGB to the showcase 2015-05-25 11:55:33 -04:00
spf13 45efc5e4dc Add DavidePetilli to showcase 2015-05-25 11:55:19 -04:00
spf13 fe38dc2fa0 update release notes 2015-05-25 11:55:04 -04:00
spf13 20cb4c9314 Add new directions for maintaining press page 2015-05-25 11:54:47 -04:00
spf13 f49b63a4dd Move press page to top level menu 2015-05-25 11:54:22 -04:00
spf13 4a1773963b add dozens of articles to the press page 2015-05-25 11:53:37 -04:00
bep beee679dfb Unexport filepath/path bridge types
They are of no use outside the helpers package.

See #1160
2015-05-25 13:10:40 +02:00
bep be79c35bda Pass RenderingContext by reference in Mmark 2015-05-25 12:57:58 +02:00
bep befb54da46 Apply gofmt -s 2015-05-25 12:54:13 +02:00
bep bef34597f4 Add Go 1.4.2 to Travis config
Go tip is at 1.5 now; make sure we also test with the latest release version.
2015-05-24 18:46:36 +02:00
spf13 4c850b6921 Update release notes in prep for v0.14.0 2015-05-23 22:04:12 -04:00
bep bec697b0d5 Remove unused Completed chan on Site
See #1160
2015-05-23 22:13:07 +02:00
bep be7c3bbb09 Prevent cyclic ref crash in JSON encode
Note that this commit makes no promise about great JSON output from the encoder, but the cyclic refs should be broken.

Fixes #1123
2015-05-23 12:28:08 +02:00
bep be778c3160 docs: some more on absURL, relURL 2015-05-22 23:43:02 +02:00
bep be1366074c docs: add doc for substr
Fixes #1156
2015-05-22 22:36:25 +02:00
bep be4376a022 docs: add doc for slicestr
See #1156
2015-05-22 22:20:45 +02:00
bep be2e08c4ad docs: add doc for seq
See #1156
2015-05-22 22:17:41 +02:00
bep be4a404f28 docs: add ToC to some more pages 2015-05-22 20:45:52 +02:00
bep be71fda559 docs: avoid navbar hiding when jumping to in-page anchor 2015-05-22 20:18:22 +02:00
Jeff Ramnani 0d65ca27fd Docs: Add taxonomy term variables to the list of vars.
Taxonomy Term pages have variables in addition to those on "node"
pages.  Documenting these variables with all the other node variables
makes them easier to find.

Fixes: #1155
2015-05-22 19:41:34 +02:00
Jeff Ramnani 7125103b1e Add ".Render" to the list of functions.
Fixes: #1153
2015-05-22 19:38:01 +02:00
Rick Cogley 321bac2fc2 Clarifying Edits for templates/rss.md
Added clarification for RSS doc page.

* a little formatting to make key words jump out
* emphasize that you can create your own
* add how to link to the feed in <head>
* add what .RSSlink does
* added point that a link to an RSS feed should be of type application/rss+xml
2015-05-22 19:35:27 +02:00
bep be0784bbe9 Grammar fix in error message 2015-05-21 23:04:46 +02:00
bep be7f5a4268 Do not consider single.html for the home page
Fixes #1152
2015-05-21 20:12:18 +02:00
bep be2842da18 Fix formatting in hugo command description 2015-05-21 20:05:29 +02:00
bep be831d7409 Fix CLI command description for the top level
And regenerate the commands doc.
2015-05-21 13:30:11 +02:00
spf13 fc946ded29 Adding default handler & tests Fixes #147 2015-05-20 18:55:24 -04:00
spf13 fd5cf9ac8d Better organization of loading defaults 2015-05-20 18:50:32 -04:00
spf13 bdb187e482 Merge branch 'master' of GitHub.com:spf13/hugo 2015-05-20 18:48:33 -04:00
spf13 a584ff207b Stop Viper from leaking across many of the tests (now tests pass regardless of order tested) 2015-05-20 02:21:21 -04:00
bep be0262786e Add benchmark test for replaceShortcodeTokens 2015-05-19 22:00:48 +02:00
bep 599d1b9786 Add gendoc command
Using the new, great auto-doc in Cobra.

This commit also contains a current result of that command added to a commands section in docs.

Fixes #1136
2015-05-19 10:57:21 -04:00
bep be920fdb2c Add a line in doc about the RelativeURL setting
Fixes #1145
2015-05-17 15:44:33 +02:00
bep be5f865c5c Add bugfix to releasenotes 2015-05-17 15:01:28 +02:00
Takuya Wakisaka 2890b6db36 Fix UTF8 permalink
Generate unencoded directory in public dir.

Fixes #988
2015-05-17 14:54:59 +02:00
Takuya Wakisaka 8a96234b1f Add Page tests with UTF8 paths
See #988
2015-05-17 14:54:27 +02:00
bep befa26b152 Remove trailing spaces in completionfile flag 2015-05-16 19:52:09 +02:00
bep be1bac9ff4 Add some bullet points to 0.14 rel notes 2015-05-16 18:11:52 +02:00
bep be9224d720 Add Bash completion
Add a new command, genautocomplete, wich generates a Bash completion script (zsh and others later).

The script is by default written to `/etc/bash_completion.d/hugo.sh`; this can be set in `--completionfile=/some/file`.

Fixes #438
2015-05-16 18:04:59 +02:00
Andre R 84f4c21d4a Fix datePublished to publishdate 2015-05-16 15:58:37 +02:00
bep bee9718ac1 Do not shout about missing baseURL if relativeURLs is set 2015-05-16 15:42:15 +02:00
Rick Cogley 6b5ed88cde Edits on aliases, comments, theme customizing
Fleshed out aliases section, loading the "redirect" keyword so that it's easier to find. Specifically added a "how aliases work" section.

Added Discourse to comments section.

Fleshed out themes/customizing, because it seems to be the source of a lot of questions on the forum.
2015-05-16 15:38:18 +02:00
Rick Cogley 6453bb5838 Edit docs extras syntax highlighting.md
Added a bunch of clarifying narrative, looking at the discussion forum for what people are asking about, and what I myself was confused about.

* clearer separation of advantage of each style - server or client side - at the top
* inconsistent newlines (different column widths) so I just removed them from obvious paragraphs
* added that the highlight shortcode is not used for the client-side javascripts
* Hugo is taking crap for Pygments being slow, so tried to emphasize that's it's in Pygment's lap. I got your back, Hugo.
* On client-side added prism example
* More clarity on how the css and js needs to be added to your templates
* Explained how the client-side scripts work
2015-05-16 15:31:16 +02:00
bep beaa8b1bca Add support for URLs relative to context root
Setting `RelativeURLs` to `true` will make all relative URLs in the site *really* relative.

And will do so with speed.

So:

In `/post/myblogpost.html`:

`/mycss.css` becomes `../mycss.css`

The same in `/index.html` will become:

`./mycss.css` etc.

Note that absolute URLs will not be touched (either external resources, or URLs constructed with `BaseURL`).

The speediness is about the same as before:

```
benchmark                    old ns/op     new ns/op     delta
BenchmarkAbsURL              17462         18164         +4.02%
BenchmarkAbsURLSrcset        18842         19632         +4.19%
BenchmarkXMLAbsURLSrcset     18643         19313         +3.59%
BenchmarkXMLAbsURL           9283          9656          +4.02%

benchmark                    old allocs     new allocs     delta
BenchmarkAbsURL              24             28             +16.67%
BenchmarkAbsURLSrcset        29             32             +10.34%
BenchmarkXMLAbsURLSrcset     27             30             +11.11%
BenchmarkXMLAbsURL           12             14             +16.67%

benchmark                    old bytes     new bytes     delta
BenchmarkAbsURL              3154          3404          +7.93%
BenchmarkAbsURLSrcset        2376          2573          +8.29%
BenchmarkXMLAbsURLSrcset     2569          2763          +7.55%
BenchmarkXMLAbsURL           1888          1998          +5.83%

```

Fixes #1104
Fixes #622
Fixes #937
Fixes #157
2015-05-16 00:11:44 +02:00
Rick Cogley e522e5f415 Edits to templates/404.md
Added bit about how the 404.html page has to be set to load automatically - auto on Github but needs config on other web servers.

Also tweaked the text a little to emphasize it's a node type, and explain a little more about where the 404 template should be saved.
2015-05-16 00:05:45 +02:00
Juan B. Rodriguez d0a4645a34 Set s.Info.LastChange to Lastmod
Set sitemap.xml <lastmod> field to Lastmod.

See #733
2015-05-15 13:10:11 +02:00
Juan B. Rodriguez 3882e7ceaf Add Lastmod field
Create new field in Node
Update Page to look for lastmod field in the front matter. If not present, then assign Date to Lastmod
Update Site, to assign a value to Lastmod (based on the same logic used for Date)

Fixes #733
2015-05-15 13:09:30 +02:00
bep be534a865d Remove old baseline.txt with no current relevance 2015-05-14 23:24:11 +02:00
bep bef92baa48 Add convenience script to run benchmarks 2015-05-14 23:17:45 +02:00
bep be1a566203 Only uglify 404.html on server root
`404.html` needs to be that and not `/404/` in the root.

There seem to be content pages in the wild with the name `404` (Hugo docs),
so this commit adds an extra check so only root 404 pages ignore the `uglifyURLs`setting.

Fixes #1140
2015-05-14 21:37:45 +02:00
bep be1287fba0 Add data-no-instant to livereload script tag
To support instantclick.

Fixes #1135
2015-05-12 19:49:46 +02:00
bep be5fa2f3bd docs: reverse taxonomy entries 2015-05-12 18:46:55 +02:00
David Calavera d5c77bdf68 Allow to reverse taxonomy entries. 2015-05-12 18:26:40 +02:00
bep be3a3506c4 Allow forward slashes in Hugo new on Windows
Fixes  #1133
2015-05-12 18:12:58 +02:00
bep be72f234f8 docs: Use ToC length to pick the compact version 2015-05-11 22:23:35 +02:00
bep be82355570 Add doc for absURL and relURL
Also group URL related functions in doc.
2015-05-11 19:09:04 +02:00
bep be4f48652d Add ToC to long pages
* A compact, fixed box in the right screen
* Only for big screens, > 1200 px wide
2015-05-11 18:39:42 +02:00
bep be16e5ffb9 Add absURL and relURL to release notes 2015-05-11 18:06:38 +02:00
bep bec839e652 Add relURL template func
Fixes #1126
2015-05-11 13:59:02 +02:00
bep be0cbeee7f Add absURL template func
Fixes #1106
2015-05-11 12:28:35 +02:00
bep bec90e0850 Make page 1 alias ugly
When `uglyurls = true`

Fixes #1121
2015-05-10 18:28:44 +02:00
bep be0c1bfe13 Add docs for Section Menu for “the Lazy Blogger” 2015-05-10 16:18:19 +02:00
bep be7e746f2b Add list of deprecated names to release notes 2015-05-10 15:41:13 +02:00
bep beb1735d04 Add issue to release notes 2015-05-10 15:26:03 +02:00
bep 0e00ca6a6e Fix paginator with uglyurls
Fixes #1120
2015-05-10 15:23:36 +02:00
bep bef496b97e Fix .Truncated in manual summaries
Fixes #1119
2015-05-10 13:34:02 +02:00
bep be52eff699 Some notes on 0.14 rel notes 2015-05-09 22:03:51 +02:00
bep be325a3088 Fix IsMenuCurrent for SectionPagesMenu
Pretty sure it has worked at some point, but that PR probably has been rebased to pieces.

This refactors the fix by @dannys42 into a method, as this URL fix is applied several places.

Fixes #1114
2015-05-09 20:53:58 +02:00
bep bef0f281d1 Make sure that complete server URL is logged on startup
Fixes #1113
2015-05-09 08:03:06 +02:00
Bill Traynor feba35cd1f Added in set PATH and new site output.
I added in the instructions for how to add the hugo.exe to the PATH variable.  And I added in example output post new site command.

[close #1058]
2015-05-08 22:36:42 -04:00
bep a52e508d46 Update test logs for uniformity and consistency
Many minor fixes to make test logs more consistent and correct a
mispelling.

Standardize on "[%i] got X but expected Y" for log messages. Using
a consistent layout makes it easier to read the test results. This
was mostly changing "Got" to "got". Swapped the order of values on
several calls to bring them in line with the convention.

A few log messages had a sequence number added to identify the
exact scenario that failed. Otherwise, there would be no way to
ascertain which failed When there are many scenarios.

Correct spelling of "expected."

Fixes #1028
Merged be2097e1ad

[close #1040]
2015-05-08 22:27:00 -04:00
Danny Sung 2b91b480d0 IsMenuCurrent now resolving correctly when baseUrl is not at the root path 2015-05-08 22:22:50 -04:00
Joel Scoble b4871787f0 add undraft command 2015-05-08 22:18:51 -04:00
Anthony Fok 563a6302a0 Very experimental support for mmark
Either name the content files as `*.mmark`,
or add `markup = "mmark"` in the front matter
of your `*.md` content files.
2015-05-08 22:05:41 -04:00
bep d4acacd4f5 Section menu for the lazy blogger
The current menu system works great, but is too much work if all you want is a simple menu with the sections as menu items, and having these menu items connected to the pages in a way that enables setting the correct menu item as active for both the section lists and the pages itself.

This commit adds a new option `SectionPagesMenu' which, if set, will create a new menu with that name with all the sections as menu items. The pages in the sections will behave as "shadow members" of these section items as `blogpage.HasMenuCurrent "sectionmenu" $sectionmenuitem` will return true.

If a menu item with the same `identifier` is defined in site config, *that* item will take precedence.
2015-05-08 21:28:19 -04:00
bep beb4ab162d Make RSS output test more realistic
By setting a non-default RSS uri config value.
2015-05-08 20:33:37 +02:00
Dana H. P'Simer fd08e16ec8 Add RSSUri to specify the name of the RSS file 2015-05-07 22:20:00 +02:00
bep beccdc04f3 Add bind to release notes 2015-05-07 22:08:17 +02:00
Liam Bowen 2bfa9fb72b Make server bind interface configurable.
Bind by default to 127.0.0.1. Previously it always bound to all interfaces.

Always have log message display that the server is available on the
interface to which it is bound, instead of the baseUrl.

Fixes #1097
2015-05-07 22:04:40 +02:00
Egon Elbre 24d8ac1fc6 Fix multilingual styling with small screen. 2015-05-07 21:16:38 +02:00
Egon Elbre 9cd8673f3e Added missing files, make the site look better. 2015-05-07 21:16:38 +02:00
Egon Elbre 9123ac559e Fix multilingual site layouts/templates. 2015-05-07 21:16:38 +02:00
Yosuke INOUE 3596b1b810 Add blackfriday/ExtensionsMask option. 2015-05-07 21:12:28 +02:00
Andrew Gallant ee5a1bbf44 Allow 'classprefix' pygments options. 2015-05-07 03:45:51 +02:00
bep bec2c1e37a Add shortcode support for HTML files
Fixes #674
2015-05-06 19:11:42 +02:00
bep bea9280fb3 Do not add trailing slash to baseURL
Fixes #1105
2015-05-05 16:02:44 +02:00
bep bef3df7481 Polish absurlreplacer 2015-05-04 12:51:52 +02:00
bep be918d7145 Rename field i to the more descriptive idx 2015-05-04 00:06:00 +02:00
bep be57b1fe10 absurlreplacer: remove superfluous code, take 2
```
benchmark                    old ns/op     new ns/op     delta
BenchmarkAbsURL              17946         17454         -2.74%
BenchmarkAbsURLSrcset        19236         18979         -1.34%
BenchmarkXMLAbsURLSrcset     19046         18688         -1.88%
BenchmarkXMLAbsURL           9561          9432          -1.35%

benchmark                    old allocs     new allocs     delta
BenchmarkAbsURL              24             24             +0.00%
BenchmarkAbsURLSrcset        29             29             +0.00%
BenchmarkXMLAbsURLSrcset     27             27             +0.00%
BenchmarkXMLAbsURL           12             12             +0.00%

benchmark                    old bytes     new bytes     delta
BenchmarkAbsURL              3139          3139          +0.00%
BenchmarkAbsURLSrcset        2374          2369          -0.21%
BenchmarkXMLAbsURLSrcset     2574          2572          -0.08%
BenchmarkXMLAbsURL           1871          1871          +0.00%

```

See #1059
2015-05-03 23:04:37 +02:00
bep be4ca21746 absurlreplacer: remove superfluous code
```
benchmark                    old ns/op     new ns/op     delta
BenchmarkAbsURL              18381         17946         -2.37%
BenchmarkAbsURLSrcset        19531         19236         -1.51%
BenchmarkXMLAbsURLSrcset     19316         19046         -1.40%
BenchmarkXMLAbsURL           9818          9561          -2.62%

benchmark                    old allocs     new allocs     delta
BenchmarkAbsURL              24             24             +0.00%
BenchmarkAbsURLSrcset        29             29             +0.00%
BenchmarkXMLAbsURLSrcset     27             27             +0.00%
BenchmarkXMLAbsURL           12             12             +0.00%

benchmark                    old bytes     new bytes     delta
BenchmarkAbsURL              3139          3139          +0.00%
BenchmarkAbsURLSrcset        2354          2374          +0.85%
BenchmarkXMLAbsURLSrcset     2584          2574          -0.39%
BenchmarkXMLAbsURL           1864          1871          +0.38%
```

See #1059
2015-05-03 22:43:04 +02:00
bep be96aacb11 Add benchmark tests for srcset handling
See #1059
2015-05-03 20:57:39 +02:00
bep beb601c7ff Fix testdata: srcset items should be comma separated, according to spec
See #1059
2015-05-03 20:09:42 +02:00
bep bee6a69846 canonifyurls in srcset
Speed is about the same as before, uses slightly less memory:

```
benchmark              old ns/op     new ns/op     delta
BenchmarkAbsURL        17302         17713         +2.38%
BenchmarkXMLAbsURL     9463          9470          +0.07%

benchmark              old allocs     new allocs     delta
BenchmarkAbsURL        28             24             -14.29%
BenchmarkXMLAbsURL     14             12             -14.29%

benchmark              old bytes     new bytes     delta
BenchmarkAbsURL        3422          3144          -8.12%
BenchmarkXMLAbsURL     1985          1864          -6.10%
```

Fixes #1059
2015-05-03 19:54:23 +02:00
bep be6482603e Disable faulty range validation in apply
Fixed #1098
2015-05-02 11:32:28 +02:00
bep bee521c68f Try to make it more visible that you have to set baseUrl 2015-05-02 00:24:47 +02:00
bep be15927819 tpl: check that types in args match the target func's type
Fixes #1095
2015-05-01 17:00:34 +02:00
bep be049ff96a absurl: export a base url var for testing 2015-05-01 12:29:03 +02:00
bep be9df84772 shortcodeparser: fix panic on slash following opening shortcode comment
Fixes #1093
2015-04-30 15:59:07 +02:00
bep be7b830f33 tpl: add sanity check to prevent panic in seq on big nums
Fixes #1092
2015-04-30 13:25:46 +02:00
bep be190fdb0d tpl: check for too many arguments in apply
Fixes #1091
2015-04-30 11:41:27 +02:00
bep be017f187e tpl: check slice bounds in slicestr
Fixes #1090
2015-04-30 11:26:45 +02:00
bep be3b8a132b tpl: avoid panic on too few args to apply
Fixes #1089
2015-04-30 10:51:10 +02:00
bep beacfcf865 doc: move the index func reference to where it's used 2015-04-29 22:40:33 +02:00
Rick Cogley da08fad5f3 Add index reference to go template primer doc page
Related to @bjornerik 's answer in this discussion: http://discuss.gohugo.io/t/inserting-data-from-data-file-into-content-file-newbie-question/1002/3 ... I figured I'd make myself useful and add the reference to the index function, on the go template primer page.

Also, I moved the reference links to the bottom.

A general comment: as good as these docs are, the primer at this point makes some assumptions about audience knowledge, so some might find it lacking. Once I understand better, I might make some more clarifying edits.
2015-04-29 21:06:21 +02:00
bep be15b07733 Fix typo in test 2015-04-29 19:22:11 +02:00
bep bee1358e48 Return error from HandleShortcodes
To be able to test for it.
2015-04-29 19:08:27 +02:00
bep be29c0bfbd Print ERROR on theme vs Hugo version mismatch
Fixes #1070
2015-04-28 20:39:25 +02:00
Rick Cogley a8f91ace11 Clarify partials folder subfolders
A couple of edits to clarify that the layout/partials folder can contain arbitrarily-named subfolders, since I found the examples using ``{{ partial "post/tag/list" . }}`` confusing. Some folders are named specifically to work a certain way with hugo, but although the examples use key functional section and taxonomy names like post and tag, it does not matter what they are called. Hopefully this will help other newbs.
2015-04-27 11:44:26 +02:00
Rick Cogley 9e13ac9a8f Single rather than double backticks in types.md
Whoops, I had the new hugo new as double backticks but it appears only single are needed.
2015-04-25 00:06:29 +02:00
Rick Cogley 6b69f951c8 Clarify hugo new command in types.md
Elsewhere in the docs commands are entered as code, so to be consistent with that, added backticks and the word hugo.
2015-04-25 00:06:28 +02:00
bep be2c67ad45 Fix broken Travis tests
No idea why these suddenly starts to fail.
2015-04-22 18:59:42 +02:00
bep beb32af7a2 Do not fail on unknown files in /data
Fixes #1068
2015-04-22 18:35:56 +02:00
bep be366bfe1e pagination: export pager to make Golint happy 2015-04-21 21:25:34 +02:00
bep be8e6d4f1f Use fmt.Errorf to make Golint happy 2015-04-21 21:13:30 +02:00
bep be01f8430e Add shortcut to Scratch from shortcode 2015-04-19 14:50:27 +02:00
bep bef25432d1 doc: clarify Scratch usage in shortcodes 2015-04-19 11:30:11 +02:00
bep be62c94872 Check spelling and some minor additions to Ace doc 2015-04-18 23:06:18 +02:00
bep be7c1e5dd4 Add doc for Ace templates
Fixes #1063
2015-04-18 20:23:28 +02:00
bep beff680534 Expand the ACE base template lookup pattern
The previous implementation didn't easily support the use case "I want one base template for the single pages, another for the rest".

The new lookup order is:

1. <current-path>/<template-name>-baseof.ace, e.g. list-baseof.ace
2. <current-path>/baseof.ace
3. _default/<template-name>-baseof.ace, e.g. list-baseof.ace.
4. _default/baseof.ace
2015-04-18 13:58:20 +02:00
bep be46a4b9b0 Polish func naming in shortcode handling 2015-04-18 00:40:59 +02:00
bep bed053071e Remove unused types Shortcode and ShortcodeFunc 2015-04-18 00:31:56 +02:00
bep be0d977009 Only write highlight to cache when CacheDir is set
To avoid writing cache files when testing.
2015-04-16 02:27:23 +02:00
bep bee52f85ae Fix broken Highlight test 2015-04-16 02:20:10 +02:00
bep be6a92c8b6 Temporarily disable Highlight test 2015-04-16 00:58:21 +02:00
bep be24457acf Add more options to highlight
Fixes #1021
2015-04-15 20:31:06 +02:00
bep be540f5b8f Fix potential Windows path issue with Pygments cache 2015-04-14 19:58:33 +02:00
Florian Baumann 0fcb78e43b Added isso as a Disqus alternative to the docs
Hi,

I'm using isso with my hugo blog which works just fine.
I think this should be added to the docs :)

Thanks!
2015-04-10 22:45:22 -06:00
Anthony Fok 1b5b0b3a94 Add "Google Cloud Storage" article to docs Press page
See #1055
2015-04-10 14:19:54 -06:00
Samuel Lelièvre 1f4a3c1f38 Typo in mathjax.md 2015-04-10 18:18:14 +02:00
complexsplit 3b1db70af5 Add Google Cloud Storage to doc 2015-04-10 18:12:59 +02:00
bep bebb1b9d5d Fix spelling mistake in comment 2015-04-07 15:17:24 +02:00
bep be31b9e287 Add custom Windows mousestrap message
Fixes #1022
2015-04-07 13:01:11 +02:00
bep be4a9dd5d2 Remove section about the buildDate being configurable
It isn't.
2015-04-06 16:30:49 +02:00
bep be25acae28 Fix README part about missing Windows tests
We now have AppVeyor.
2015-04-06 15:15:54 +02:00
bep be1b7f67d3 Add git commit message guideline
Also rearranged the contribution section to get more attention to the important stuff.
2015-04-06 15:12:01 +02:00
bep be2097e1ad tpl: split template.go
The template funcs get their own file. This prevents having to scroll miles to get to the template infrastructure.
2015-04-05 21:03:12 +02:00
mdhender 42dcaabf4f Document getenv template function
Add `getenv` to the template function documentation.
2015-04-05 18:14:40 +02:00
mdhender 9a499b56c9 Add a section comparing the 'build' and 'server'
One of the first things that new users have to understand is the
difference between Hugo as a web server and Hugo as a web site
generator. Issue #852 asked for documentation to make that clear.

This patch updates the overview page with that information. It will
seem repetitive to users that understand the difference. Weigh that
against the needs of those that don't.

Reference #852
2015-04-04 23:58:10 +02:00
mdhender 6b50c8fb82 Sort function names in templates documentation
The documentation on the functions is long.  It is easier to find
a function name when they are sorted within the sections.

Fixes #981
2015-04-04 23:30:08 +02:00
Alex Dunn 9de78aab3f docs: how to compile on mac, fix minor errors 2015-04-04 22:30:42 +02:00
bep beb66c19a4 helpers: add some missing documentation 2015-04-03 22:30:08 +02:00
bep be57ec5331 Fix the last Go Vet error 2015-04-03 22:18:08 +02:00
bep be01d04870 hugolib: make Page implement the ReaderFrom interface 2015-04-03 21:41:24 +02:00
bep bea42218b6 helpers: fix some go vet errors 2015-04-03 21:20:25 +02:00
bep bea5feb34d Return early from DistinctErrorLogger's Printf 2015-04-03 21:16:32 +02:00
Dylan MacKenzie 99a18b21fc List directories being watched when server is run
Fixes part of issue 1030. Previously hugo only listed the content
directory as being watched. Now we list all files being watched
according to `commands.getDirList()`. We also introduce a RemoveSubpaths
function and test in the helpers module to reduce noise in the command
line output by not showing subdirectories of ones already being watched.

For example, instead of:
`Watching for changes in $HOME/blog/content`
We get:
`Watching for changes in
$HOME/blog/{data,content,layouts,static,themes/my-theme}`
2015-04-02 12:52:08 +02:00
bep 72aa516c75 documentation: mention data files under liverload 2015-04-01 23:26:33 +02:00
bep be627fa718 Remove paragraph tags produced by markdownify
Fixes #1025
2015-04-01 15:40:09 +02:00
bep bec9b92d0c Make contentTransformer names consistent 2015-04-01 00:54:40 +02:00
bep bec4bdae99 Return error on wrong use of the Paginator
`Paginate`now returns error when

1) `.Paginate` is called after `.Paginator`
2) `.Paginate` is repeatedly called with different arguments

This should help remove some confusion.

This commit also introduces DistinctErrorLogger, to prevent spamming the log for duplicate rendering errors from the pagers.

Fixes #993
2015-03-31 22:33:17 +02:00
bep bec22f8981 Add pager size argument to paginator methods
Fixes #1013
2015-03-31 19:12:56 +02:00
mdhender 06d704f243 Updates documentation with instructions for a Windows computer
Adds step-by-step instructions for installing from the official
tarball.

Fixes #1007
2015-03-31 00:35:38 -06:00
Bruno Clermont 3b2e1006fc Capitalize singular
Added in #523 it's ``Data.Singular``
2015-03-30 16:55:55 +02:00
Michael Henderson 0ab345236d Updates documentation with instructions for a Mac
Adds step-by-step instructions for installing from both brew and
the official tarball. Not sure if steps for installing from source
belong here, so left them out.

Fixes #1005
2015-03-30 16:54:38 +02:00
sainaen 6a539db58e Update embedded rss.xml code in the docs 2015-03-30 16:50:44 +02:00
bep be21e2cbed Add some more corner tests for ReaderContains 2015-03-30 01:22:09 +02:00
bep be1429fa88 Fix shortcode handling in ToC
Fixes #1010
2015-03-29 22:27:21 +02:00
bep be6696c34b Handle views in combo with Ace base templates
As views looks like a regular template, but doesn't need a base template, we have to look inside it.

Altough really not needed by this commit, reading the full file content into memory just to do a substring search is a waste.
So this commit implements a `ReaderContains` func that in most cases should be much faster than doing an `ioutil.ReadAll` and `bytes.Contains`:

```
benchmark                   old ns/op     new ns/op     delta
BenchmarkReaderContains     78452         20260         -74.18%

benchmark                   old allocs     new allocs     delta
BenchmarkReaderContains     46             20             -56.52%

benchmark                   old bytes     new bytes     delta
BenchmarkReaderContains     46496         1258          -97.29%
```

Fixes #999
2015-03-29 21:12:13 +02:00
Ruben Vermeersch e8ca8602c0 Hash all pygments parameters.
Ensures that Hugo rehighlights source code whenever one of the
highlighting options changes.
2015-03-29 13:01:44 +02:00
bep beaf5db3ff Use helpers.FilePathSeparator const 2015-03-28 21:46:06 +01:00
Nuno Antunes 61a02c4df8 Fix section name guessing on Windows 2015-03-28 21:43:55 +01:00
Ruben Vermeersch 15463d3d45 Cache pygments rendering between runs
Fixes #1000
2015-03-27 19:50:48 +01:00
bep be8c067577 Add support for Ace base and inner templates
Fixes #994
Fixes #511
2015-03-26 17:22:35 +01:00
Anthony Fok 0921761e47 Add missing ".adoc" extension in handler_page.go
Commit 358dcce supposedly added ".adoc" extension recognition
for AsciiDoc, but one place was missed.

Thanks to @sjfloat for reporting the bug!
See discussions at #470.
2015-03-24 20:27:06 -06:00
bep be84f93716 Change to variadic int args in Slicestr
Makes for a better template api.
2015-03-23 19:17:55 +01:00
Anthony Fok 5b0245ca59 Implement substr template function
Its behavior is similar to that in JavaScript
with special handling of negative length as found in in PHP.

Fixes #991
2015-03-23 18:56:58 +01:00
bep beb423a2d9 Rename Slice to Slicestr
Fixes #990
2015-03-23 16:24:15 +01:00
bep be82b5a94f Polish Slice doc 2015-03-23 12:42:54 +01:00
bep be19f4eb91 Rename Substr to Slice
That is whas was implemented, not Substr.

Also make the API more similar to Go's internal slice by making both the start and end indices optional.

See #990
2015-03-23 12:18:27 +01:00
bep be4fe8f8af Polish Substr and Split tests 2015-03-22 13:52:22 +01:00
Xin Fan 04817c7b83 Add Substr and Split template functions
Both of these can take any type the cast lib can turn into a string.
2015-03-22 13:24:47 +01:00
bep 9cc3d67c57 Pull Data Files tests into its own file 2015-03-19 17:23:14 +01:00
bep 1e8e5d4e7a Format docs 2015-03-19 02:09:42 +01:00
bep 66cf3bdc77 Rename interface contentRewriter to contentTransformer
Is is a much better name.
2015-03-19 02:07:57 +01:00
bep efb564775a Change safeHTtml to safeHTML in sitemap template 2015-03-18 21:27:29 +01:00
bep a8bfaba081 template: add some missing test cases for First 2015-03-18 20:47:10 +01:00
bep b15d0a168f transform: remove some superfluous int conversions 2015-03-18 20:18:18 +01:00
bep 658cfb287e Remove URL param from exported AbsURL methods
This is to make it clear that there is only one URL in play,
the BaseURL.
2015-03-18 20:03:34 +01:00
bep e7099cfa26 Un-export ContentReWriter 2015-03-18 17:33:12 +01:00
bep 98ee69bce2 Write to rotating ContentReWriter in transformer chain
This commit adds the interface ContentReWriter in the tranformer chain.

This is backed by two pooled byte buffers, alternating between being the reader or the writer.

This keeps the performance characteristic of the old implementation, but in a thread safe way.

Fixes #911

Benchmark old vs new:

benchmark              old ns/op     new ns/op     delta
BenchmarkAbsURL        17614         17384         -1.31%
BenchmarkXMLAbsURL     9431          9248          -1.94%

benchmark              old allocs     new allocs     delta
BenchmarkAbsURL        24             28             +16.67%
BenchmarkXMLAbsURL     12             14             +16.67%

benchmark              old bytes     new bytes     delta
BenchmarkAbsURL        3295          3424          +3.92%
BenchmarkXMLAbsURL     1954          1987          +1.69%
2015-03-18 17:05:54 +01:00
bep 9688ed2585 Comment out shaky Seq test 2015-03-18 12:42:00 +01:00
bep f4244be036 Calculate the next Hugo version in Deprecated
Deprecation will be an ongoing activity for many future versions.
2015-03-18 12:27:56 +01:00
bep 3273fce044 Refactor Hugo version
Put version handling into the helpers package so it can be used by many,
and split version and suffix to make it possible to calculate the next Hugo version.
2015-03-18 12:23:13 +01:00
bep 49f20bbc9b Add UrlPath to the deprecated list 2015-03-18 11:30:37 +01:00
bep e39a258ec4 Improve type handling in Seq 2015-03-18 11:30:37 +01:00
Anthony Fok b3bd71fec9 Update Hugo docs with the initialisms suggested by golint
In particular:

 * .Url → .URL (for node, menu and paginator)
 * .Site.BaseUrl → .Site.BaseURL
 * getJson → getJSON
 * getCsv → getCSV
 * safeHtml → safeHTML
 * safeCss → safeCSS
 * safeUrl → safeURL

Continued effort in fixing #959.
2015-03-18 11:30:37 +01:00
Anthony Fok 8b8fb417ae More initialism corrections (golint)
Thanks to @bep's new, brilliant helpers.Deprecated() function,
the following functions or variables are transitioned to their
new names, preserving backward compatibility for v0.14
and warning the user of upcoming obsolescence in v0.15:

 * .Url → .URL (for node, menu and paginator)
 * .Site.BaseUrl → .Site.BaseURL
 * .Site.Indexes → .Site.Taxonomies
 * .Site.Recent → .Site.Pages
 * getJson → getJSON
 * getCsv → getCSV
 * safeHtml → safeHTML
 * safeCss → safeCSS
 * safeUrl → safeURL

Also fix related initialisms in strings and comments.

Continued effort in fixing #959.
2015-03-18 11:30:37 +01:00
Anthony Fok ca69cad8aa Press: Add "Migrating to Hugo From Octopress" by Nathan LeClaire 2015-03-18 00:32:19 -06:00
Anthony Fok a220a3ba37 [Docs] Copyedit http://gohugo.io/extras/dynamiccontent/ 2015-03-17 23:53:17 -06:00
bep bcdad02c06 Use ReaderToString in site tests
Since a string is what's really needed.
2015-03-17 18:14:29 +01:00
bep e1340c060b Fix crossrefs on Windows
Have to convert path slashes to file path slashes before the URL path is compared to a file path.

Fixes #957
2015-03-17 16:29:10 +01:00
quoha a044734541 Add "getenv" as an wrapper for os.Getenv
Add a wrapper for the os.Getenv function. The
wrapper takes as input a string that is assumed to be an exported
variable name.

Fixes #977
2015-03-16 18:38:43 +01:00
Vitaly Haritonsky 32bf8b763c removed duplicate word in readme 2015-03-14 10:45:50 -06:00
bep 27ed49e532 Revert "Added image support to the sitemap.xml template"
This reverts commit 3c147bd419.

Fixes #972
2015-03-14 00:03:34 +01:00
Derek Perkins 3c147bd419 Added image support to the sitemap.xml template
Conflicts:
	tpl/template_embedded.go
2015-03-12 22:13:42 -04:00
bep 0be2aade99 Add Seq template func
Very similar to GNU's seq.

Fixes #552

Conflicts:
	tpl/template.go
2015-03-12 22:08:36 -04:00
Anthony Fok 358dcce7a6 Experimental AsciiDoc support with external helpers
See #470

 * Based on existing support for reStructuredText files

 * Handles content files with extensions `.asciidoc` and `.ad`

 * Pipes content through `asciidoctor --safe -`.
   If `asciidoctor` is not installed, then `asciidoc --safe -`.

 * To make sure `asciidoctor` or `asciidoc` is found, after adding
   a piece of AsciiDoc content, run `hugo` with the `-v` flag
   and look for this message:

        INFO: 2015/01/23 Rendering with /usr/bin/asciidoctor ...

Caveats:

 * The final "Last updated" timestamp is currently not stripped.

 * When `hugo` is run with `-v`, you may see a lot of these messages

        INFO: 2015/01/23 Rendering with /usr/bin/asciidoctor ...

   if you have lots of `*.ad`, `*.adoc` or `*.asciidoc` files.

 * Some versions of `asciidoc` may have trouble with its safe mode.
   To test if you are affected, try this:

        $ echo "Hello" | asciidoc --safe -
        asciidoc: ERROR: unsafe: ifeval invalid
        asciidoc: FAILED: ifeval invalid safe document

   If so, I recommend that you install `asciidoctor` instead.

Feedback and patches welcome!

Ideally, we should be using https://github.com/VonC/asciidocgo,
@VonC's wonderful Go implementation of Asciidoctor.  However,
there is still a bit of work needed for asciidocgo to expose
its API so that Hugo can actually use it.

Until then, hope this "experimental AsciiDoc support through external
helpers" can serve as a stopgap solution for our community. :-)

2015-01-30: Updated for the replaceShortcodeTokens() syntax change
2015-02-21: Add `.adoc` extension as suggested by @Fale

Conflicts:
	helpers/content.go
2015-03-12 22:01:49 -04:00
bep fbcda03029 Do not ERROR-log missing /data dir
Fixes #930
2015-03-12 21:44:36 +01:00
bep b190ad0ff9 source: add some test cases for File 2015-03-12 20:50:44 +01:00
bep f8a840a14c Add double checking in Deprecated
To prevent possible duplicate log statements.
2015-03-12 18:51:31 +01:00
bep 6e30c10d09 Add deprecated logger 2015-03-12 16:10:34 +01:00
Anthony Fok f848dc92db [Docs] Update and expand http://gohugo.io/overview/usage/
The `hugo help` output as shown in http://gohugo.io/overview/usage/
was not yet updated for v0.13. Thanks to @alebaffa for the heads up!

Also:
 - Clarify that, after using `hugo server`, the bare `hugo` command
   need to be run before deployment.
 - Add a section on running `hugo` as production web server,
   and add links to two blog posts of two Hugo users sharing
   their experience.

Partially fixes: #852 and #937
2015-03-12 08:53:48 -06:00
Anthony Fok d3c0fde5be Update press coverage: Fix URL; new tutorial in Chinese 2015-03-12 08:50:31 -06:00
Anthony Fok 232398f1b9 Remove trailing space from site build statistics 2015-03-12 08:46:42 -06:00
Anthony Fok 67df33f500 Correct initialisms as suggested by golint
First step to use initialisms that golint suggests,
for example:

    Line 116: func GetHtmlRenderer should be GetHTMLRenderer

as see on http://goreportcard.com/report/spf13/hugo

Thanks to @bep for the idea!

Note that command-line flags (cobra and pflag)
as well as struct fields like .BaseUrl and .Url
that are used in Go HTML templates need more work
to maintain backward-compatibility, and thus
are NOT yet dealt with in this commit.

First step in fixing #959.
2015-03-11 21:55:00 +01:00
bep 00f07c5374 doArithmetic: add test for division by zero 2015-03-11 10:25:53 +01:00
bep 43742e0277 Add some basic tests for doArithmetic
We might have to take precision into account for floating point nubers ... at some point.
2015-03-11 01:30:41 +01:00
Anthony Fok b9b70fb6b0 Skip directories like node_modules from the watchlist
A local `node_modules` directory can easily contain
tens of thousands of files, easily exhausting the tiny
default max open files limit especially on OS X Yosemite,
in spite of the fact that  Hugo already had code in place
since February 2014 to try to raise the maxfiles ulimit.

Also skip `.git` and `bower_components` directories.

The file watching situation will improve when
https://github.com/go-fsnotify/fsevents become ready,
but until then, we will be thrifty.  :-)

Thanks to @chibicode for the suggestion.

See #168 for continued discussions.
2015-03-10 16:55:23 -06:00
bep f85d1a7da2 parser: add some frontmatter test cases 2015-03-10 23:17:39 +01:00
bep c641ffea3a absurlreplacer: write replacements directly to the byte buffer
The extra step isn't needed and this makes the code simpler.

And slightly faster:

benchmark              old ns/op     new ns/op     delta
BenchmarkAbsUrl        19987         17498         -12.45%
BenchmarkXmlAbsUrl     10606         9503          -10.40%

benchmark              old allocs     new allocs     delta
BenchmarkAbsUrl        28             24             -14.29%
BenchmarkXmlAbsUrl     14             12             -14.29%

benchmark              old bytes     new bytes     delta
BenchmarkAbsUrl        3512          3297          -6.12%
BenchmarkXmlAbsUrl     2059          1963          -4.66%
2015-03-10 18:50:22 +01:00
Anthony Fok 3ba279c2e5 Do not parse backup files with trailing '~' as templates
Fixes #964
2015-03-10 10:18:40 -06:00
Anthony Fok 81695717e6 Switch from fsnotify.v0 to fsnotify.v1 API (watcher)
Fixes #357
See also #761
2015-03-10 09:59:55 -06:00
Anthony Fok 634548b9af Add new min_version field to theme.toml template 2015-03-10 09:49:42 -06:00
bep 4784b63eeb Add test cases for Ne and Eq type normalisation
See #961
2015-03-09 15:52:32 +01:00
Tatsushi Demachi 44cdb37b03 Fix eq and ne tpl function issue
`eq` and `ne` template functions don't work as expected when those are
used with a raw number and a calculated value by add, sub etc. It's
caused by both numbers type differences. For example, `eq 5 (add 2 3)`
returns `false` because raw 5 is `int` while `add 2 3` returns 5 with
`int64`

This normalizes `int`, `uint` and `float` type values to `int64`,
`uint64` and `float64` before comparing them. Other type of value is
passed to comparing function without any changes.

Fix #961
2015-03-09 15:28:31 +01:00
bep 91d16fbba0 Fix UglyUrls on Windows
Fixes #958
2015-03-07 18:03:17 +01:00
bep 602ceec06d Handle 404 thread safely
Replaces hack that temporarily changes a global flag.

Fixes #955
Fixes #939
2015-03-07 15:18:00 +01:00
bep 851badcb7e There is only one s.PageTarget() - so we cannot change it, even tempoararily. We have to find another solution to this.
...

Prevent 404.html from prettifying into 404/index.html

Restore @realchaseadams's commit 348e123
"Force `UglyUrls` option to force `404.html` file name"
which got lost after some refactoring (commit 8db3c0b).

Remove the equivalent "force `UglyUrls`" code for `sitemap.xml`
because the refactored code now calls `renderAndWriteXML()`
which uses `WriteDestFile()` which does not prettify a filename.

Fixes #939 (reverted from commit c4c19ad303)
2015-03-07 13:22:02 +01:00
bep 63ffb916d6 parser: apply some Golint rules 2015-03-07 12:59:04 +01:00
bep 81c41d6f20 livereload: apply some Golint rules 2015-03-07 12:58:51 +01:00
bep a91bcd85e2 source: apply some Golint rules 2015-03-07 12:58:39 +01:00
bep e007c9b25d hugolib: apply some more Golint rules 2015-03-07 12:53:20 +01:00
bep 5759007874 menu: make receiver name on Page methods consistent
Apply some Golint rules on Menu, esp. making the method receiver names consistent.
2015-03-07 12:52:29 +01:00
bep e24a775962 page: make receiver name on Page methods consistent
Apply some Golint rules on Page, esp. making the method receiver names consistent:

(page *Page) ==> (p *Page)
2015-03-07 12:25:38 +01:00
bep 8539f78143 hugolib: apply some Hugolint rules 2015-03-07 00:13:06 +01:00
bep b9f8c0c120 author: fix doc 2015-03-07 00:10:00 +01:00
bep bd2b679eaf helpers: apply some Golint rules 2015-03-07 00:02:06 +01:00
bep e685dfc0c6 Apply some more Golint suggestions 2015-03-06 18:07:50 +01:00
bep 224a2ddf3c Fix some Go Lint errors 2015-03-06 15:58:14 +01:00
bep 103ea842f8 Fix errors reported by Go Vet 2015-03-06 15:25:19 +01:00
Anthony Fok c4c19ad303 Prevent 404.html from prettifying into 404/index.html
Restore @realchaseadams's commit 348e123
"Force `UglyUrls` option to force `404.html` file name"
which got lost after some refactoring (commit 8db3c0b).

Remove the equivalent "force `UglyUrls`" code for `sitemap.xml`
because the refactored code now calls `renderAndWriteXML()`
which uses `WriteDestFile()` which does not prettify a filename.

Fixes #939
2015-03-06 13:12:01 +01:00
bep 3343cacc0e Avoid panic when pagination on 0 pages
Fixes #948
2015-03-06 00:48:33 +01:00
bep 6e1b0e0c00 Apply gofmt -s 2015-03-05 23:57:38 +01:00
bep 8557e2cbb8 Add benchmark for the shortcode lexer 2015-03-05 21:11:15 +01:00
Saint Asky ecb2aca6a2 Update github-pages-blog.md
change `hugo serve` to `hugo server`
2015-03-05 01:46:06 -07:00
Steve Francia fb0facefa8 Tidying the Readme a bit more 2015-03-04 09:17:35 -05:00
Steve Francia 6c9bdc2859 Using a smaller Header Image 2015-03-04 09:16:49 -05:00
Steve Francia 8aa646ced2 Fixing image in readme 2015-03-04 09:15:55 -05:00
Steve Francia 1e210a434d Restructure top of Readme.md 2015-03-04 09:15:03 -05:00
Steve Francia fa5cbb2a4a Merge pull request #944 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-03-04 09:08:03 -05:00
The Gitter Badger 45d962c60a Added Gitter badge 2015-03-04 14:06:38 +00:00
Steve Francia d5cb369556 Update Readme.md with additional contribution guides 2015-03-04 09:01:15 -05:00
bep ab5862cd00 Allow the same shortcode to be used with or without inline content
Fixes #934
2015-03-02 21:49:33 +01:00
bep 241f9f9e46 Improve error message on missing shortcode inner content
Fixes #933
2015-02-28 19:24:30 +01:00
bep 9d80ecb4d8 Keep trailing slash when baseUrl contains a sub path
Before this commit, .Site.BaseUrl ended up as:

http://mysite.com/ => http://mysite.com/
http://mysite.com/sub/ => http://mysite.com/sub

Now it becomes:

http://mysite.com/ => http://mysite.com/
http://mysite.com/sub/ => http://mysite.com/sub/

Fixed #931
2015-02-28 18:45:02 +01:00
bep 176ce5deab Allow hyphens in shortcode name
Fixes #929
2015-02-27 11:57:23 +01:00
bep 967d001ebe Use osext on GitHub
Fixes #922
2015-02-23 18:12:19 +01:00
Anthony Fok bb13d82677 [Docs] NetBSD and ARM pre-built binaries are already provided
See https://github.com/spf13/hugo/releases

What a pleasant surprise indeed!
How come I have never noticed them before?

And even `.deb` files are provided!  How amazing!
2015-02-21 23:26:34 -07:00
spf13 729a6739f2 Bumping to version "v0.14-DEV" 2015-02-21 23:11:36 -05:00
spf13 e43eabacee Updating the final release notes for v0.13 2015-02-21 22:31:01 -05:00
Anthony Fok 88e7c031a8 [Docs] Clarify the switch to canonifyurls = false as default
Quote from @spf13: "I also think it's the better default
and should continue to be the case going forward."

Also mention the use of `hugo config` to check the current value
of `canonifyurls`, thanks to suggestion by @bep.

Fixes #802
2015-02-21 14:50:14 -07:00
Anthony Fok ac189fd514 Update README.md and overview/installing.md
- Clarify that Hugo may be built wherever Go is available;
- Add links to Git, Mercurial and Go;
- Unlist Bazaar: No libraries that Hugo depends on use it any more;
- Suggest the user to simply run `make` to build `hugo`
  to get `hugo version` to display the commit hash.
2015-02-21 13:42:15 -07:00
bep dc7b7ef865 Avoid race condition in target list init
As reported by Go's race detector.

See #917
2015-02-20 18:38:35 +01:00
bep c33a8528f8 Avoid race condition in isInnerShortcode
As reported by Go's race detector.

See #917
2015-02-20 17:41:37 +01:00
Cyrill Schumacher a3892685bc Add trailing file separator to temp dir
Make sure that the file separator is added to the temp dir in all cases.

This prevents cache temp files being written to the root temp folder.

Fixes #910
2015-02-19 14:16:04 +01:00
bep f0c8585b50 Use $.Paginator in template
Since there will only be one paginator per page, this can get rid of some scoping confusion.
2015-02-19 11:36:09 +01:00
bep 62752cfee9 Return unmodified content if panic in LiveReloadInject 2015-02-18 22:16:40 +01:00
bep 4d708f096d Add revocer in LiveReloadInject
The panic cannot be reproduced, but add this as protection.

Fixes #911
2015-02-18 21:51:32 +01:00
René Jochum d2e022f2a7 Suppress errors for symbolic links witch point to a file. 2015-02-17 19:18:28 -08:00
riboflavin aeddaee901 add note that running with watch doesn't produce a site suitable for deployment 2015-02-17 19:17:38 -08:00
karland e31536dd85 Add information to highlighting with Payments
Conflicts:
	docs/content/extras/highlighting.md
2015-02-17 12:35:39 -05:00
Anthony Fok c4393257e8 Adapt to relative path bug fix in purell
Temporary workaround for the bug fix and resulting
behavioral change in purell.NormalizeURLString():
a leading '/' was inadvertently to relative links,
but no longer, see #878.

I think the real solution is to allow Hugo to
make relative URL with relative path,
e.g. "../../post/hello-again/", as wished by users
in issues #157, #622, etc., without forcing
relative URLs to begin with '/'.
Once the fixes are in, let's remove this kludge
and restore SanitizeUrl() to the way it was.

Fixes #878
2015-02-17 12:31:39 -05:00
Cyrill Schumacher 41c0e82f95 Moved futured getSQL topic to another branch 2015-02-17 12:14:39 -05:00
Cyrill Schumacher b209f44335 getJson and getCsv documentation proof reading by @msjulias 2015-02-17 12:14:39 -05:00
Cyrill Schumacher 4342dd84fc Update Dynamic Content docs 2015-02-17 12:14:39 -05:00
Cyrill Schumacher 48a6d44786 Update doc 2015-02-17 12:14:39 -05:00
Cyrill Schumacher 47b7cfeb44 Add getSQL idea 2015-02-17 12:14:39 -05:00
Cyrill Schumacher fdf8db9c21 Initial doc file: Dynamic Content 2015-02-17 12:14:39 -05:00
Cyrill Schumacher 32d645d900 Fix bug where running hugo without options causes to create
$TMPDIR/hugo_cache/ directory.
2015-02-17 12:14:39 -05:00
Cyrill Schumacher 076b618ff2 GetJson and GetCsv have now variadic URL parts so that you can submit pre or post parts of an URL. The parts will be joined to the final URL. 2015-02-17 12:14:39 -05:00
Cyrill Schumacher 10c2b41b85 Add --ignoreCache CLI flag with description "Ignores the
cache directory for reading but still writes to it" as @spf13
suggested.
2015-02-17 12:14:39 -05:00
Cyrill Schumacher c168666b6d Adding getJson and getCsv to funcMap 2015-02-17 12:14:39 -05:00
Cyrill Schumacher 41a5168198 Fix bug on windows where the backslash got removed in func MakePath() 2015-02-17 12:14:39 -05:00
Cyrill Schumacher 5e2d3d2e10 Merge to stay up to date with current dev
Feature: GetJson and GetJson in short codes or other layout files.
For more details please see: http://cyrillschumacher.com/2014/12/21/dynamic-pages-with-gohugo.io/
2015-02-17 12:14:39 -05:00
Anthony Fok 9bf223e584 Quote strings in hugo config output
Also, use ` = ` to separate keys and values
if metaformatdata is "toml".
2015-02-17 11:51:43 +01:00
Anthony Fok 82a0888995 Revert "Expansion of unit tests for utils/utils.go"
Rationale: Test failing on Windows with errors like this:

    utils_test.go:177: Error: Could not remove file "f".
    Error: remove C:\Users\appveyor\AppData\Local\Temp\utils_test_747965610:
    The process cannot access the file because it is being used by another
    process.

This reverts commit 6b28e38cea.

Sorry for my premature merge of Pull Request #818.
2015-02-17 03:35:23 -07:00
bep c2e2913872 Fix canonifyurl vs schemaless links
And looks even faster:

Compared to previous attempt:

benchmark              old ns/op     new ns/op     delta
BenchmarkAbsUrl        30902         27206         -11.96%
BenchmarkXmlAbsUrl     15389         14216         -7.62%

benchmark              old allocs     new allocs     delta
BenchmarkAbsUrl        33             28             -15.15%
BenchmarkXmlAbsUrl     16             14             -12.50%

benchmark              old bytes     new bytes     delta
BenchmarkAbsUrl        4167          3504          -15.91%
BenchmarkXmlAbsUrl     2057          2048          -0.44%

Compared to before I started all of this:

benchmark              old ns/op     new ns/op     delta
BenchmarkAbsUrl        36219         27206         -24.88%
BenchmarkXmlAbsUrl     23903         14216         -40.53%

benchmark              old allocs     new allocs     delta
BenchmarkAbsUrl        60             28             -53.33%
BenchmarkXmlAbsUrl     30             14             -53.33%

benchmark              old bytes     new bytes     delta
BenchmarkAbsUrl        5842          3504          -40.02%
BenchmarkXmlAbsUrl     3754          2048          -45.44%

Fixes #816
2015-02-17 11:07:24 +01:00
Owen Waller 6b28e38cea Expansion of unit tests for utils/utils.go
This commit expands the test coverage for the utils/utils.go module.

The utils module uses the 'github.com/spf13/jwalterweatherman' (aka jww)
package for logging. The tests take the approach of examining the log
file that is produced by this module to verify correct behaviour. This
avoids refactoring the utils module.

The log file messages written by the jww module are of the form:
<log level>: yyyy/mm/dd <string|error message>

The checkLogFile function checks each of these parts in turn except for
the date string, which is currently ignored. The final part of the log
file format can either be a single error message, or a series of
strings followed by an error message. Both the error message and the
series of strings can be empty strings.

The log file is checked using a combination of the regex package,
along with the bufio scanner type. Each test logs to its own temporary
log file. This is achieved with standard test setup and teardown
functions.

One consequence of these tests is that StopOnErr has been refactored
into call a new unexported function doStopOnErr which contains the bulk
of the original logic. This allows the same testing approach to be used
with StopOnErr as with CheckErr and cutUsageMessage, rather than look at
the exit status code of the test itself.

An unfortunate side effect of this is that the author of the tests must
now know if a log file is expected or not. If doStopOnErr determines
that an empty error message would be written to the log file then
nothing is written. In the context of the tests this means that the log
file created by the test would have no contents. Consequently there
would be nothing for the test to examine. This situation is indicated by
the boolean flag logFileExoected in the testData struct, and processed
by the logFileIsExpectedAndValid function.

Although not ideal this was deemed a reasonable compromise.
2015-02-17 02:20:00 -07:00
Anthony Fok cb9fa62743 [Docs] Minor copyediting of highlighting.md
Also add `apt-get` command for installing Pygments.
2015-02-17 01:59:40 -07:00
karland bd0de85dbc Add information to highlighting with Pygments 2015-02-17 01:49:44 -07:00
karland 1827680bea List of variables
Some variables are currently not documented and others are explained
across the document. So, I tried to pull an overview from the source.
Pls double check. I am not 100% sure, what the purpose of some variables
is or whether they are only relevant for previous versions. Thanks
2015-02-17 01:28:20 -07:00
Maxime Michel 09ed3c4b92 Fixed a typo 2015-02-17 01:16:41 -07:00
Anthony Fok 54e417681d Make "Indexes" the alias and "Taxonomies" the canonical name
... rather than the other way around.
Discovered thanks to the new `hugo config` command.
2015-02-16 13:16:17 -07:00
spf13 d33a42f1d1 Merge branch 'master' of github.com:spf13/hugo 2015-02-16 11:51:32 -05:00
Anthony Fok 159836ed2d README.me: Add linefeed that got lost in the last commit 2015-02-16 09:07:52 -07:00
Anthony Fok 63e7b9705f [Docs] Add pointers to roadmap; new tweet and article 2015-02-16 09:02:56 -07:00
bep f1fec88c30 Improve abs url replacement speed
This commit replaces the multuple `bytes.Containts` and `bytes.Replace` with a custom replacer that does one pass through the document and exploits the fact that there are two common prefixes we search for, `src=` and `href=`.

This is both faster and consumes less memory. There may be even better algos to use here, but we must leave some room for improvements for future versions.

This should also make it possible to solve #816.

```
benchmark              old ns/op     new ns/op     delta
BenchmarkAbsUrl        25795         22597         -12.40%
BenchmarkXmlAbsUrl     17187         11166         -35.03%

benchmark              old allocs     new allocs     delta
BenchmarkAbsUrl        60             33             -45.00%
BenchmarkXmlAbsUrl     30             16             -46.67%

benchmark              old bytes     new bytes     delta
BenchmarkAbsUrl        5844          4167          -28.70%
BenchmarkXmlAbsUrl     3754          2069          -44.89%
```

Fixes #894
2015-02-16 08:24:42 -05:00
bep 27c03a6dd0 Add benchmark for AbsUrlInXml
And a general test cleanup in /transform.

See #894
2015-02-16 08:24:42 -05:00
Ivan Fraixedes 366f991694 Another link in the same page 2015-02-14 18:35:37 -05:00
Ivan Fraixedes b389a92383 Fixed invalid link to partials 2015-02-14 18:35:37 -05:00
Joseph Kaptur 462e666f45 Update docs so that figure includes the class parameter. 2015-02-14 18:35:00 -05:00
bep c14e7b10d0 Add 'config' command to list site configuration
Fixes #871
2015-02-14 18:33:47 -05:00
spf13 d6f81c7346 Put back static theme conditional 2015-02-14 18:30:15 -05:00
Anthony Fok d10e05f2e3 [commands/new.go] Update theme.toml etc.
- Add copyright years and author to the top of the file

- Write the current year from time.Now() to LICENSE.md

- Correct comment regarding `os.MkdirAll(p, 0777)`

- In createConfig(), split the `map[string]string` definition into
  multiple lines to facilitate future expansion.  Also add a trailing
  slash to sample "baseurl" definition.

- Update theme.toml template to match that listed at
  https://github.com/spf13/hugoThemes/blob/master/README.md#themetoml

  See #883 for an equivalent `struct` implementation
2015-02-13 15:00:17 -07:00
bep 87975e04eb Remove nohup.out committed by accident 2015-02-12 14:32:04 +01:00
bep 4820683330 Doc Data Files: Add section about themes and expanded the example a bit 2015-02-12 09:09:35 +01:00
bep 1217632307 Remove now superfluous conditional 2015-02-12 00:09:04 +01:00
bep 8ed67169ed Fix broken data dir test 2015-02-11 21:55:11 +01:00
bep 8df59c8123 Temporarily disable broken test 2015-02-11 20:33:19 +01:00
bep ebcc1e6699 Add data files support in themes
If duplicate keys, the main data dir wins.

Fixes #892
2015-02-11 20:24:56 +01:00
Anthony Fok 664fd99135 Change "ctrl+c" to "Ctrl+C" 2015-02-11 01:11:50 -07:00
midinastasurazz dbb86679a1 Fix typo: GetJson -> GetCsv 2015-02-11 00:57:17 -07:00
Greg Restall 7e28db18f2 Add showcase entry for consequently.org
Consequently.org is a personal site for an academic, with a blog, list
of publications, classes and talks, all managed by hugo.
2015-02-11 00:31:44 -07:00
bep fa71f6c11e Make # survice Url cleaning
To enable anchors in Urls.

Fixes #888
2015-02-10 19:14:19 +01:00
spf13 e3daa359ec Update release notes for v0.13 2015-02-10 10:58:20 -05:00
bep 22d85c2a18 Avoid converting summary to []byte and back to string 2015-02-10 14:37:29 +01:00
bep 371c148c34 Fix alias for data files doc 2015-02-09 16:58:12 +01:00
bep 03fff880ec Add docs for Data Files
Fixes #887
2015-02-09 16:52:52 +01:00
bep 6afe70d5da Better error message for data-file parsing errors 2015-02-09 16:07:30 +01:00
bep 1c50f775b5 DataDir: Minor polish and add missing tests
Also, now logs an ERROR on duplicate keys, instead of returning an error and make sure sub-folders take presedence in data dir.
2015-02-09 13:19:19 +01:00
Erlend Klakegg Bergheim 773812de6f Reads data files inside data/ and makes data available in .Site.Data
Fixes #476.

Conflicts:
	hugolib/site.go
2015-02-09 13:17:13 +01:00
Anthony Fok 4c7e119ca1 [Docs] Say which directory to clone the hugoThemes
On http://gohugo.io/overview/quickstart/, explicitly state
that hugoThemes is to be cloned from within the working directory,
like it is stated on http://gohugo.io/themes/installing/.

Fixes #886
2015-02-08 19:52:27 -07:00
Anthony Fok 088d46a804 parser.FormatSanitize() MetaDataFormat for date too
So that the date would come out correctly with
variations like `MetaDataFormat = "YAML"` in addition to
the normally expected `MetaDataFormat = "yaml"`.

Fixes #865.
2015-02-08 09:55:20 -07:00
bep 08219161dd Use buffer pool in StripHTML
Allocates less memory:

benchmark              old ns/op     new ns/op     delta
BenchmarkStripHTML     6572          6695          +1.87%

benchmark              old allocs     new allocs     delta
BenchmarkStripHTML     5              4              -20.00%

benchmark              old bytes     new bytes     delta
BenchmarkStripHTML     848           737           -13.09%

Compared to 0.12:

benchmark              old ns/op     new ns/op     delta
BenchmarkStripHTML     10210         6695          -34.43%

benchmark              old allocs     new allocs     delta
BenchmarkStripHTML     6              4              -33.33%

benchmark              old bytes     new bytes     delta
BenchmarkStripHTML     1456          737           -49.38%
2015-02-06 15:35:45 +01:00
bep 5e34ae6199 Log ERROR on missing baseurl
Fixes #877
2015-02-06 10:39:54 +01:00
bep 43e48a8989 Add benchmark test for StripHTML
go test -test.run=NONE -bench=".*" -test.benchmem=true ./helpers

Old vs new impl (string.Replace vs string.Replacer):

benchmark              old ns/op     new ns/op     delta
BenchmarkStripHTML     10210         6572          -35.63%

benchmark              old allocs     new allocs     delta
BenchmarkStripHTML     6              5              -16.67%

benchmark              old bytes     new bytes     delta
BenchmarkStripHTML     1456          848           -41.76%
2015-02-06 10:00:42 +01:00
bep 48b6777ea2 Fix Truncate
TruncateWordsToWholeSentence knows if the summary is truncated, so let "him" decide.

Fixes #880
2015-02-05 14:04:48 -07:00
bep 2bee4a1570 Replace 4 strings.Replace with 1 strings.Replacer
Consumes less memory, slightly faster.
2015-02-05 18:31:11 +01:00
bep 5df85770fc Add memprofile to pprof benchmark 2015-02-05 15:48:09 +01:00
bep f8704c1bf2 Avoid calling strings.Fields multiple times with same content
This should be a relief for big sites.
2015-02-05 00:38:50 +01:00
bep 11a19e0760 Build PageMenus only once 2015-02-04 21:27:27 +01:00
Mary Anthony df734bc18a Tighten README for the sloppy reader
Tighten README for the sloppy reader

Tighten README for the sloppy reader

Fixing heads

tigheten markdown

tighten markdown

tighten markdown

tinker with headings

tinker with wording

fixing period spacing

moving the any dir stuff into the feature section

tweak overview

tweak overview

fixed option too

fix break:
2015-02-01 23:15:46 -07:00
bep 8b95cab94c Avoid panic on unknown markup
Fixes #863
2015-02-01 22:30:57 +01:00
bep dd9344816a Scratch doc: Use the special $ variable to prevent confusion 2015-02-01 20:36:43 +01:00
bep 13d9009406 Use .Site.Params.description as fallback for social partials 2015-02-01 19:56:21 +01:00
bep b984ec96bc Optimize for the common case in Blackfriday config 2015-01-31 23:45:38 +01:00
Anthony Fok c50780930e Print template parsing errors to aid troubleshooting
Added a new Template.PrintErrors() function call,
used in hugolib/site.go#Process() so it does not clutter
up `go test -v ./...` results.

Special thanks to @tatsushid for mapping out the call trace
which makes it a lot easier to find the appropriate places
to place the Template.PrintErrors() call.

Fixes #316
2015-01-31 23:27:50 +01:00
Naoya Inada d1364ffb68 Fix defaults for Blackfriday 2015-01-31 22:06:50 +01:00
bep f264076f66 Add doc for Scratch 2015-01-31 22:01:30 +01:00
bep 420c9e4d3d Add writable context to Node
The variable scope in the Go templates makes it hard, if possible at all, to write templates with counter variables or similar state.

This commit fixes that by adding a writable context to Node, backed by a map: Scratch.

This context has three methods, Get, Set and Add. The Add is tailored for counter variables, but can be used for any built-in numeric values or strings.
2015-01-31 22:01:30 +01:00
bep 47c8f32967 Prevent site config being overwritten
Fixed #867
2015-01-31 19:14:13 +01:00
Anthony Fok 659f71e617 [Docs] Fix more missing . in example partial calls 2015-01-31 07:27:42 -07:00
Dan Hatch 20bed49f52 Fixed syntax error in 404.html template code 2015-01-31 01:01:50 -07:00
spf13 f4737689bd Updating shortcode imports & site test to work with new buffer pool functions 2015-01-31 01:24:52 -05:00
spf13 e1e6aaed2f Merge branch 'master' of github.com:spf13/hugo 2015-01-31 01:04:28 -05:00
bep 4a9436c116 Some more .Date.IsZero checks in internal templates 2015-01-30 22:05:03 +01:00
bep 230e7c02c5 Remove _default prefix from SEO templates 2015-01-30 21:58:18 +01:00
spf13 8db3c0b0a6 page rendering and writing using BBP 2015-01-30 12:05:05 -08:00
Anthony Fok 3d60955e17 Use .Date.IsZero to skip unset date in embedded templates
Use `{{ if not .Date.IsZero }}` to print dates only when they are
defined.  This is to avoid things like

    <lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate>

and

    <lastmod>0001-01-01T00:00:00+00:00</lastmod>

showing up in index.xml (RSS) and sitemap.xml.

Pipe dates with ±hh:mm time zone through `safeHtml`
to prevent the `+` sign from turning into `&#43;`.

Also make some shuffling to avoid blank lines in the output.
2015-01-30 21:04:06 +01:00
Jeffrey Tolar 35684e8f6f Use strings instead of byte arrays for replaceShortcodeTokens tests 2015-01-30 20:58:25 +01:00
Jeffrey Tolar 366c557251 Use a regular expression in replaceShortcodeTokens
This fixes a bug where a shortcode needs to be expanded multiple times,
which can arise in practice when using reference links.
2015-01-30 20:58:25 +01:00
spf13 b4c507287a site's XML generation using BBP 2015-01-30 11:51:06 -08:00
spf13 77074127e0 page source creation using BBP 2015-01-30 11:42:02 -08:00
spf13 4828fee11d transform chain using BBP 2015-01-30 11:39:06 -08:00
spf13 5441fc5dfc template render with BBP 2015-01-30 11:25:54 -08:00
spf13 2f2297bdb3 shortcodes using BBP 2015-01-30 11:19:46 -08:00
spf13 66ed5c5e02 Adding BufferPool. Implementing BP in ReaderTo{Bytes,String}(). 2015-01-30 11:12:07 -08:00
bep ba53799fdb url_path => urlPath 2015-01-30 16:21:46 +01:00
Dan Hersam 523f38a9a8 Fix for issue 839 and 490 on Windows
The paths were seen as changed but not static because of the backslashes in
ev.Name. Once the backslashes were added, I discovered that the JSON
sent to livereload was invalid and failed to work because it had backslashes.

Hence the code to replace the backslashes from the path to make them work
in JSON and for the URL.

With this fix, changes to a stylesheet are shown on the page, and if it's a
single file that changed, it's reflected in the browser without reloading the whole
page.
2015-01-30 14:18:17 +01:00
Anthony Fok d397bc4f43 [Docs] Complete the transition from "indexes" to "taxonomies" (almost)
Also mention `.Site.Indexes` → `.Site.Taxonomies` as well as
the upcoming `.Site.Recent` → `.Site.Pages` transitions.
2015-01-29 12:48:14 -07:00
Anthony Fok ba44e860a3 [Docs] Copyediting
* Add meta author, description and generator tags
 * Add Hugo version beside the logo and in the footer
 * Suggest the user to run `go get -u -v` to update dependencies
 * Requires Go 1.3+ rather than Go 1.1+
 * Improve rendering/formatting in some places
 * Add trailing slash to URLs where appropriate
 * GitHub redirects all http requests to https, update accordingly
2015-01-28 18:02:40 -07:00
Anthony Fok 82d4b8ab40 [Docs] Use OptiPNG to shrink PNG images losslessly
So they load slightly faster.  :-)
2015-01-28 13:25:07 -07:00
Anthony Fok 8e6cbe82f3 Some housekeeping of the Showcase and Press pages 2015-01-28 13:25:07 -07:00
bep 831fbd5e40 Add .mailmap to get a more correct author log 2015-01-28 16:50:36 +01:00
fundon ee1045ad42 ignore root path, no need strip traling slash 2015-01-28 09:43:43 +01:00
Dan Hersam 2d8e15a565 Version uses binary name instead of hugo
On Windows the binary name is hugo.exe and running hugo version results in
this error:
    GetFileAttributesEx D:\Dev\Go\gopath\bin\hugo: The system cannot find the file specified.

This fixes that error and allows the binary name to be something other
than hugo on any OS.
2015-01-28 09:43:12 +01:00
Dan Hersam 06b1a88358 Added three videos to documentation.
Created shortcode for YouTube videos and made the videos responsive in the
stylesheet.
2015-01-27 23:44:46 +01:00
bep e52a76f559 Use runtime.GOOS to identify Windows specific path tests 2015-01-27 23:01:32 +01:00
bep 0b5f8c8cb3 [doc] Improve paginator doc 2015-01-27 21:56:45 +01:00
bep 7c74a77db6 Replace assert.Equal(true/false) with assert.True/False 2015-01-27 19:47:22 +01:00
bep 251f5e9d40 Do not panic on permission denied
Replace panic with FATAL logging and graceful shutdown.

Fixes #837
2015-01-27 16:51:24 +01:00
bep 8ad4fd05d8 Split Windows and Unix specific path tests 2015-01-27 15:09:01 +01:00
bep b155e8b4cb Temporarily comment out breaking Windows test case 2015-01-27 12:12:35 +01:00
bep bedc2d8488 Introduce FilepathPathBridge
This commit introduces the new interface FilepathPathBridge to remove some code that differs only in their use of either the path or filepath package.
2015-01-27 11:44:41 +01:00
bep 5f9596e68c Add more tests to helper 2015-01-27 10:15:57 +01:00
bep de76d4a84e Improve pagination testing
* Add missing pagination test cases
* Remove some unreachable code paths
* Fix some corner cases
2015-01-27 01:27:07 +01:00
bep 0c2297075a Linkify release notes 2015-01-26 20:42:08 +01:00
bep fb594fc6e0 Set detault for Paginate to 10
10 is a better default than 0, since no paginator pages will be created unles referenced by a `.Paginator`.

See #750
2015-01-26 15:26:19 +01:00
bep a6d22bcf7d Add documentation for pagination
See #750
2015-01-26 14:56:26 +01:00
bep c0fbe61484 Add Bootstrap-compatible pagination.html
See #750
2015-01-26 13:34:12 +01:00
bep 3628d0bbc6 Add pagination to release notes 2015-01-26 13:06:32 +01:00
bep 37445bc6aa Add pagination support for home page, sections and taxonomies
Two new configuration properties, `Paginate` (default `0`) and `PaginatePath` (default `page`) are added.

Setting `paginate` to a positive value will split the list pages for the home page, sections and taxonomies into chunks of size of the `paginate` property.

A `.Paginator` is provided to help building a pager menu.

There are two ways to configure a `.Paginator`:

1. The simplest way is just to call `.Paginator.Pages` from a template. It will contain the pages for "that page" (`.Data.Pages` will (like today) contain all the pages).
2. Select a sub-set of the pages with the available template functions and pass the slice to `.Paginate` : `{{ range (.Paginate (where .Data.Pages "Type" "post")).Pages }}`

**NOTE:** For a given Node, it's one of the options above. It's perfectly legitimate to iterate over the same pager more than once, but it's static and cannot change.

The `.Paginator` contains enough information to build a full-blown paginator interface.

The pages are built on the form (note: BLANK means no value, i.e. home page):

```
[SECTION/TAXONOMY/BLANK]/index.html
[SECTION/TAXONOMY/BLANK]/page/1/index.html => redirect to  [SECTION/TAXONOMY/BLANK]/index.html
[SECTION/TAXONOMY/BLANK]/page/2/index.html
....
```

Fixes #96
2015-01-26 12:59:37 +01:00
Naoya Inada 407e80a9ab Add site-wide/per-page [blackfriday] extensions option 2015-01-26 09:55:37 +01:00
Wade Wegner 39b2cdece0 Wrong URL for Github Pages 2015-01-25 23:00:16 -07:00
Jonathan Anderson e72ce89aaf Move s.prepUrl() before prepending BaseUrl.
When we have an absolute menu url specified in the config file
(e.g., `menu: { main: { name: "News", url: "/news" } }`),
its menu entry is generated by prefixing it with the BaseUrl.
The result is then run through prepUrl(), which uses helpers.Urlize to
convert urls such as 'My First Link' to 'my-first-link'.

The behaviour is backwards: we do not want to run helpers.Urlize on the
BaseUrl, only on the absolute component. Currently, a BaseUrl such as
'http://my.edu/ENG101' will be converted to 'http://my.edu/eng101',
resulting in broken links in all of my menus.

This commit switches the URL prep and BaseUrl prepending actions around. I
would argue that these URLs shouldn't be run through prepUrl anyway
because the site developer has specified them explicitly in a config file
and might be surprised for, e.g., URLs to change case, but that's another
commit for another time.
2015-01-26 01:03:18 +01:00
Kartik Singhal ea72f15f38 Correct wercker URL 2015-01-25 09:44:28 -07:00
Naoya Inada 57b4f3310b Fix inverse notation 2015-01-25 00:13:10 -07:00
Anthony Fok f6c0b472e9 Make Blackfriday smart fractions to really default to true
Fix my own bug in Pull Request #829,
commit eb686352b1
2015-01-24 22:06:15 +01:00
Anthony Fok eb686352b1 Add site-wide/per-page [blackfriday] fractions option
Make Blackfriday's `HTML_SMARTYPANTS_FRACTIONS` option
user-configurable.  Defaults to `true` as before.  See
discussions at:

http://discuss.gohugo.io/t/any-way-to-disable-smart-fractions/328

Thanks to @bjornerik and @spf13 for laying the groundwork
making it easy to expose Blackfriday's underlying configurable
options.
2015-01-24 20:57:40 +01:00
Anthony Fok 803865f870 Fix for page.GetParam() for JSON and TOML maps
Setting per-page Blackfriday angledQuotes did not work
with TOML or JSON front matter, but it does work with YAML.

It turns out that page.Params("blackfriday") returns
type map[interface{}]interface{} for YAML, but
type map[string]interface{} for JSON and TOML.

This patch updates page.GetParam() to catch the latter,
with an error message if page.GetParam() does not recognize
a type.  A test is also added.
2015-01-24 15:25:44 +01:00
Anthony Fok a0c6dba305 Upgrade from gopkg.in/yaml.v1 to gopkg.in/yaml.v2 2015-01-24 04:30:00 -07:00
Jonathan Anderson bd1b019f85 Handle empty front matter in archetype.
If an archetype has deliberately empty front matter (e.g., to suppress
generation of the 'draft' field or to force a particular front matter type
instead of the default TOML), we should handle it gracefully rather than
panic ("assignment to entry in nil map").
2015-01-24 10:46:52 +01:00
Anthony Fok b345ca26cb [Docs]: Add new press/blog coverage about Hugo 2015-01-23 11:46:39 -07:00
bep 1b42dc572a Fix RelPermalink() and Urls in menus vs canonifyUrls
canonifyUrls=true, RelPermalink and baseUrl with sub-path did not work.

This fixes that by adding a check for canonifyUrl=trues=true in RelPermalink().

So given

- baseUrl "http://somehost.com/sub/"
- the path "some-path/file.html"

For canonifyUrls=false RelPermalink() returns "/sub/some-path/file.html"
For canonifyUrls=true RelPermalink() returns "/some-path/file.html"

In the last case, the Url will be made absolute and clickable in a later step.

This commit also makes the menu urls defined in site config releative. To make them work with canonifying of urls, the context root is prepended if canonifying is turned off.

Fixes #519
Fixes #711
2015-01-23 14:13:00 +01:00
Anthony Fok 743998306a [Docs] Document the new (temp?) default of canonifyurls = false
Also add a **Caveat** on http://gohugo.io/tutorials/github-pages-blog/
warning the reader that a `canonifyurls = true` must be added
for Spencer's old example files to work.

Fixes #802
2015-01-22 18:04:07 -07:00
Anthony Fok 60c6faa317 Revert "Try to fix mysterious test failures on Travis"
This reverts commit 71fe85df9b.

See https://github.com/PuerkitoBio/purell/pull/5
for the cause of the mysterious `go test -v ./...` failure.
2015-01-22 17:46:47 -07:00
bep 71fe85df9b Try to fix mysterious test failures on Travis 2015-01-23 00:36:47 +01:00
bep 01ec44a6b4 Add menu tests for pages with both Yaml and Toml front matter
See #817
2015-01-22 17:23:01 +01:00
bep 020c0b863f Revert "Quick-and-dirty way to print details of template errors"
This reverts commit 42b33102cf.
2015-01-22 11:14:04 +01:00
bep 6db6d33bec Add dateFormat to release notes 2015-01-22 01:19:02 +01:00
Tatsushi Demachi 37490ee27a Add dateFormat template function
This is the implementation of the proposal at #235 and
http://discuss.gohugo.io/t/parsing-dates-in-templates/603/3
2015-01-22 00:08:30 +01:00
bep 878754c21f Protect the innerShortCodeCache by a RW lock 2015-01-21 19:13:11 +01:00
bep c8f8f48e96 Cache the page's rendering context flags
This map can potentially be used many times for a given page, and altough the cost of re-creating the map should be minimal, caching it is simple -- and could save some GC and CPU cycles.
2015-01-21 15:30:03 +01:00
Anthony Fok 19c52ab0b5 Register rstHandler to restore experimental reST support
(Experimental) reStructuredText support was working in v0.12,
but was no longer handled after some refactoring in v0.13-DEV.
That experimental support is now restored.

Furthermore, check for both rst2html and rst2html.py in the PATH,
and execute whichever is found.

See #472 for more information.
2015-01-21 06:41:19 -07:00
bep 1cc6386937 Make ref and relref respect plainIdAnchors
Fixes #813
2015-01-21 14:35:33 +01:00
Peter Krautzberger e5be592ee0 fix outdated MathJax CDN URL
The rackspace address has been retired, see http://www.mathjax.org/changes-to-the-mathjax-cdn/
2015-01-21 03:16:04 -07:00
Anthony Fok 173aa53b8a [Docs] Use of $. to access global context from anywhere
See #804, http://discuss.gohugo.io/t/templates-multiple-parameters/600/3
and http://stackoverflow.com/questions/16734503/access-out-of-loop-value-inside-golang-templates-loop
for related discussions.
2015-01-21 00:35:12 -07:00
Anthony Fok f015e9b8e0 [Docs] Recommend the use of backticks for IE conditionals
Special thanks to @tatsushid and @bjornerik for the insight!

Fixes #778.
2015-01-20 23:45:26 -07:00
Anthony Fok 02da49597d Fix string comparison for .Truncated page variable
Instead of `strings.TrimSpace()`, use `strings.Join(strings.Fields(s), " ")`
to collapse all whitespaces into single spaces, in order to match the
behaviour of helpers.TruncateWordsToWholeSentence(),
in order to detect non-truncated content correctly.
2015-01-20 15:50:32 -07:00
Anthony Fok a17c290a33 [Docs] Correct description of "Read More" links in Summaries
Also revise some paragraphs for succinctness.

Fixes #788
2015-01-20 15:45:57 -07:00
Anthony Fok edcdb6f49c Fix two errors in two internal templates
* template: _internal/_default/opengraph.html:39: unexpected EOF
 * template: _internal/_default/schema.html:15: unexpected {{end}}

Also change the DateTime inside these templates to ISO 8601 format,
and skip <meta itemprop="datePublished"> if `publishdate` is not set.

Perhaps it would be a good idea to expose `func (Time) IsZero`
to our templates?  :-)
2015-01-20 15:39:43 -07:00
bep d897b1e8a7 Add missing assertion to trim-test 2015-01-20 22:31:05 +01:00
Nikolay Kirsh 932214d725 fix --uglyUrls params 2015-01-20 13:51:15 -07:00
bep 2ec046afb1 Minor polish in path/url 2015-01-20 20:45:03 +01:00
bep 9e688507a7 Add more tests to general helper 2015-01-20 18:13:47 +01:00
bep 1b91fec0ac Add tests for IsSet 2015-01-20 17:15:12 +01:00
bep ee34a840bc Add test binaries to .gitignore 2015-01-20 16:49:28 +01:00
bep f77f2a9b40 Refactor TestGt to also include Lt, Ge, Le, Eq and Ne 2015-01-20 16:38:23 +01:00
Anthony Fok 1348caa6de [Docs] Add a note about the plan to switch to Apache License 2015-01-20 07:49:50 -07:00
bep f470cf9590 Add tests for Apply 2015-01-20 14:24:43 +01:00
bep 3f0f186b91 Add inline doc for Apply 2015-01-20 13:31:02 +01:00
bep eabe8e1a98 Rename ignoreDotFile to isDotFile (which is what it is) 2015-01-20 13:21:50 +01:00
bep 077d726b51 Replace regexp based Chomp with builtin TrimRight 2015-01-20 12:41:08 +01:00
bep 99aee30410 Add tests for Replace 2015-01-20 12:30:49 +01:00
bep 26856c3b75 Add tests for Trim 2015-01-20 12:23:27 +01:00
bep 4b1780bf69 Add test coverage files to .gitignore 2015-01-20 12:09:22 +01:00
bep a6bf6f52ce Add tests for Chomp 2015-01-20 12:07:49 +01:00
Anthony Fok 42b33102cf Quick-and-dirty way to print details of template errors
See Issue #316.
2015-01-20 02:23:28 -07:00
Anthony Fok 2342655fde [Docs] Incorporate some great ideas by @mohae into the safeUrl docs
E.g. how `#ZgotomlZ` is used to "defang" the URL
2015-01-20 00:24:47 -07:00
Anthony Fok 724cc0ddff Add safeUrl; disable safeHtmlAttr; rename safeCSS to safeCss
- Add `safeUrl` template function (Fixes #347)
- Add TestSafeUrl() fashioned after @tatsushid great examples
- Disable `safeHtmlAttr` pending further discussions on its other
  use cases because `safeUrl` is a cleaner solution to #347.
  (There are also `safeJs` and `safeJsStr` that we could implement
  if there are legitimate demands for them.)
- Rename `safeCSS` to `safeCss` (to follow the convention of `safeHtml`)
- Add/expand documentation on `safeHtml`, `safeCss` and `safeUrl`
2015-01-19 23:41:22 -07:00
Tatsushi Demachi f5946ea3dd Add SafeHtmlAttr, SafeCSS template function
This allows a template user to keep a safe HTML attribute or CSS string
as is in a template.

This is implementation of @anthonyfok great insight

Fix #784, #347
2015-01-19 19:47:37 -07:00
Anthony Fok 53b4ab4cf3 Revert "[Docs] Use <dl> for definition lists of variables"
This reverts commit 5d6dfe81b8.

The extra styling in docs/static/css/style.css has been retained.
2015-01-19 11:44:14 -07:00
Anthony Fok 4609f77a80 [Docs] New testimonials and press coverage
Found on @spf13's Twitter.  :-)

Prevent the testimonial dates from wrapping.

Also fix a few minor problems to get the home page
to validate as proper HTML5.
2015-01-19 04:16:54 -07:00
Anthony Fok 0e60c5137e [Docs] Limit .fa { display: inline } within #main-content
Otherwise the items in the side menu won't line up.
Sorry about this oversight in my recent commit.
2015-01-19 02:49:50 -07:00
Anthony Fok b56c9db6dc [Docs] Add FreeBSD logo beside the FreeBSD name
Extracted from https://www.freebsd.org/logo/logo-simple.svg
for temporary use until a future Font Awesome release adds
the `fa-freebsd` glyph (github/FortAwesome/Font-Awesome#1116)  :-)

Make .fa `display: inline` to prevent unwanted line-wrapping

Also make the menu item "Issue & Help" line up with the others.
2015-01-19 02:48:44 -07:00
bep 3c4bc653a3 Merge branch 'master' of github.com:spf13/hugo 2015-01-19 10:05:22 +01:00
bep 783c76b86e Make RSS dates valid
See #789
2015-01-19 10:04:57 +01:00
Anthony Fok 5d6dfe81b8 [Docs] Use <dl> for definition lists of variables
Hopefully making them more semantic and easier to read,
though it is raw HTML so it is slightly more work to maintain.

Also made minor revisions to some of the variable descriptions
to be more informative, e.g. `:monthname` in permalinks use
full English names ("January" etc.)
2015-01-19 01:30:38 -07:00
bep 9712d06b36 Fix the Hugo.Generator tag so it can be used 2015-01-19 08:26:06 +01:00
bep 56eead2ade Fix broken doc section 2015-01-19 08:14:57 +01:00
bep c23dfd99dd Use an init() method to create the HugoInfo instance
See #570
2015-01-19 03:06:07 +01:00
bep 7257ab6855 Update release notes with the new Hugo var 2015-01-19 02:58:27 +01:00
bep 724357a242 Make sure there are only one HugoInfo instance
See #570
2015-01-19 02:53:07 +01:00
bep 109e6f95fd Merge branch 'master' of github.com:spf13/hugo 2015-01-19 02:41:16 +01:00
bep 73d923e95d Fix HugoInfo init
See #570
2015-01-19 02:40:34 +01:00
Derek Perkins ac6b86aff8 Added top level .Hugo variable with version, commit and generator information + docs
Added Version, CommitHash and BuildDate to hugolib/hugo.go and used it in build
Removed commitHash and buildDate from commands/version.go and used hugolib vars
Removed getDateFormat function from commands/version.go

Conflicts:
	README.md
	docs/content/templates/variables.md
2015-01-19 01:22:23 +01:00
Anthony Fok 1dfd0225e3 [Docs] Minor revisions to future v0.13 Release Note
And a tiny bit of copyediting here and there.
2015-01-18 13:27:09 -07:00
Anthony Fok a2c8871533 [Docs] New "Troubleshooting Overview" page
Somewhat cheesy at the moment.
Pull requests to improve the page are very welcome!
2015-01-18 13:27:09 -07:00
bep 90afe41e49 Add trim and replace to release notes 2015-01-18 15:18:03 +01:00
bep 4f4015d751 Make all the params to Replace an interface{} 2015-01-18 15:16:48 +01:00
Tom Helmer Hansen e08cabadb6 Rewrite first argument to interface{} 2015-01-18 14:54:26 +01:00
Tom Helmer Hansen 871e811339 Add trim and replace template functions 2015-01-18 14:54:26 +01:00
Anthony Fok 32d15d91fc Change CR+LF to LF on gohugo.io front page, saving 286 bytes
Also change mode 100755 to 100644.
2015-01-17 13:24:35 -07:00
Anthony Fok af956c41a3 Update gohugo.io front page for 2015; add @popthestack's testimony :-) 2015-01-17 13:07:54 -07:00
Anthony Fok b59dd163ec [Docs] More copyediting
* Add link to https://travis-ci.org/spf13/hugo
* Correct heading levels in docs/content/community/mailing-list.md
* Mention RFC 3339 as the `date` format set by `hugo new`
* Mention that `hugo new` does not add `draft = true` when the user
  provides an archetype
* List short examples of TOML and YAML side by side
* Compact the Math template functions into a table
* Put some notes into a blockquote
2015-01-17 00:45:53 -07:00
Anthony Fok 769ab9e224 [Docs] Adjust sidebar menu width and capitalization
Make the sidebar menu slightly wider so the arrow
does not get pushed to the next line.

Also remove `text-transform: capitalize;` so we can have,
e.g., "Table of Contents" rather than "Table Of Contents".
2015-01-17 00:11:17 -07:00
Tomas Roos a4da52622c Missing . on footer partials 2015-01-16 03:39:38 -07:00
Anthony Fok 508788e694 Update TestFixUrl() to expect BaseUrl to have trailing /
See #793, #799
2015-01-16 03:16:36 -07:00
Bjørn Erik Pedersen 3a9300ddc4 Merge pull request #798 from bjornerik/fix/nestedshortcodes
Fix issue with nested shortcodes
2015-01-16 11:06:17 +01:00
Anthony Fok 1cbdd3e59d Ensure that BaseUrl used in hugo server ends with /
Fixes #793, #799
2015-01-15 18:02:19 -07:00
bep 714abd5ce0 Fix issue with nested shortcodes
Fixes #797
2015-01-15 12:21:15 +01:00
Anthony Fok 9150a98f3e Replace if with with in embedded rss.xml
... resulting in a slightly more compact template.
2015-01-14 21:05:13 -07:00
Anthony Fok 208086ebff Add ".swx" suffix to file watcher's ignore list
When a user uses Vim to open a file, it briefly creates a
".filename.md.swx" file which needlessly triggers a website rebuild.

According to a comment in Vim's src/memline.c:

    /*
     * on MS-DOS compatible filesystems (e.g. messydos) file.doc.swp
     * and file.doc are the same file. To guess if this problem is
     * present try if file.doc.swx exists. If it does, we set
     * buf->b_shortname and try file_doc.swp (dots replaced by
     * underscores for this file), and try again. If it doesn't we
     * assume that "file.doc.swp" already exists.
     */
2015-01-14 19:29:56 -07:00
bep f0b3979a9f Disable shortcode processing for html files
May be enabled later, but then it will have to do the complete "shortcode dance".

See ##674
2015-01-14 20:49:43 +01:00
bep 4f66acdce7 First take on release notes for 0.13 2015-01-14 13:54:38 +01:00
Anthony Fok fc39019ffe Add an alias to the old URL of github-pages-blog.md 2015-01-13 21:24:58 -07:00
Anthony Fok 433ce3b742 Rename github_pages_blog.md to github-pages-blog.md 2015-01-13 21:19:20 -07:00
Anthony Fok 4107fd50a8 [Docs] More random revision and copyediting
General revisions to (hopefully) make the documentation
easier to understand and more comprehensive.

Revise "Strange EOF error" troubleshooting page to say that
a fix is in place for the upcoming Hugo v0.13.

Also add more external links, and cute icons from Font Awesome.
2015-01-13 20:48:44 -07:00
Dan Hersam 6fda9012d6 Fixed error in tutorial, added site variable docs
While following the github pages tutorial I found some issues. These are
the commands I ran that worked.

Added site variables to the docs from the code.
2015-01-12 23:00:28 -07:00
Arjen Schwarz 6c5a7b7b64 Tutorial: Automated deployments
Also fixed the next/prev for the tutorials
2015-01-12 22:59:14 -07:00
Anthony Fok 700c2b8f22 Trivial fixes to get RSS 2.0 feeds to validate.
RSS 2.0 requires the email be listed in `<author>`,
and `UTC` as a timezone is not accepted, but `UT` or `GMT` are.

See #789 for more information.  Thanks to @snej for the report!
2015-01-12 22:24:37 -07:00
Anthony Fok 5bfc812dc6 [Docs] Remove references to "ATOM" feeds
Thanks to @snej for reporting!

Fixes #790
2015-01-12 14:12:08 -07:00
Anthony Fok 6ee35f654f Correct typo in hugolib/path_separators_windows_test.go 2015-01-12 13:15:04 -07:00
Anthony Fok a4eef4eb16 Correct spelling of two test files: seperators → separators 2015-01-11 02:21:51 -07:00
Tatsushi Demachi 78e9229c52 Fix "hugo new" EOF error with an archetype file without the final EOL
This rewrites `extractFrontMatterDelims` function to make it work with
an archetype file without the final EOL and adds more detailed error
messages and comments.

It also removes `matches` and `matches_quick` functions which aren't
called anywhere.
2015-01-10 19:48:35 +01:00
David Kebler b6ab661893 note in archetype.md to alert that ending carriage return may be nessary to avoid EOF errors. 2015-01-09 22:08:35 +01:00
Anthony Fok b0181e278b Some more random copyediting of Hugo docs
- Change "livereload" and "live reload" to "LiveReload";
 - Add a `$ ` prompt before example command lines
   (not exhaustive, work in progress);
 - Remove unnecessary whitespace from partials;
 - Revise the blackfriday options table in overview/configuration.md
   to make it narrower.
 - Manually set the language for highlight.js where appropriate
 - Rename "404" to "Custom 404 page", and remove incorrect reference
   to "homepage"
 - Credit the author of tutorials/github_pages_blog.md
   (Similar notes are necessary for other contributed pages where
    "I" am not spf13 to avoid reader confusion.)
 - Add CSS for `kbd` and `table` etc. to css/style.css;
 - etc.
2015-01-09 11:51:15 -07:00
Marek Stanley 49f5eb5c84 Moved a test regarding a content.go function to a new test file content_test.go.
Added some tests for general helpers, especially as a way to document the expected behavior,
and as a warm-up welcome contribution.
2015-01-09 12:42:13 +01:00
bep 2b46f3e51e Do not exit server watch on error
Before this commit any error (typically a YAML typing error in front matter) would exit server on rebuild when running `hugo server -w`.

This is very annoying as it doesn't give you any chance to fix the typo other than doing a manual restart.

This commit fixes that by just logging these errors when these rebuilds happen when changes are detected.

Fixes #781
2015-01-09 12:40:48 +01:00
Anthony Fok 190964c57b [Docs] New Troubleshooting section
With two entries of frequently encountered or obscured troubles so far:

- "Categories with accented characters" Unicode NFC/NFD mismatch
   on Mac OS X (See #739)
- `hugo new` aborts with cryptic EOF error (See #776)
2015-01-08 18:29:05 -07:00
bep cb909cde5a Google Custom Search: Open link in _parent 2015-01-08 13:42:16 +01:00
Anthony Fok eba33459dd Add basic Google Custom Search to Hugo docs
Fixes #753
2015-01-08 00:17:01 -07:00
Tatsushi Demachi d12f6cd775 Fix echoParam template function to accept string key name
This changes `echoParam` template function behavior to accept not only
an array or a slice and its index pair but also a map and its key pair.

This also changes the function that float and uint values are treated as
a valid result type of it.

Fix #771
2015-01-08 02:32:17 +01:00
Jacob Gillespie c0f54aefe3 Rename to plainIdAnchors 2015-01-05 21:00:22 +01:00
Jacob Gillespie a0e44bb71d Add Blackfriday: documentIDAnchor documentation 2015-01-05 21:00:22 +01:00
Jacob Gillespie 4adf58cce7 Group both options under Blackfriday: documentIDAnchor 2015-01-05 21:00:22 +01:00
Jacob Gillespie b7716948bc Add config options: disable footnote anchor prefix and header ID suffix
New config options:

* DisableFootnoteAnchorPrefix - bool - default: false
* DisableHeaderIDSuffix - bool - default: false
2015-01-05 21:00:22 +01:00
philgs dca6eabaca Add config file example to variables.md
Add a config file example for setting .Site.Params to variables.md. This addresses my confusion in [issue #766](https://github.com/spf13/hugo/issues/766).
2015-01-05 18:51:36 +01:00
philgs 0b7392b3db Update configuration.md
Update configuration.md to show setting variables for .Site.Params in TOML config file
2015-01-05 18:51:36 +01:00
philgs e6c27f76aa Add example code to Summaries
I was initially confused about how to use summaries. The only example code I found in the docs was on the page for list nodes, but that uses `Render "summary"`, which is for views, not an article summary. I thought a little example here might clarify the issue for future users.
2015-01-05 18:44:25 +01:00
Nathan Youngman d376314763 use fsnotify 0.9.3
This contains a few fixes (v0.9.1 through v0.9.3) but the same API and few internal changes.

https://github.com/go-fsnotify/fsnotify/blob/master/CHANGELOG.md#v093--2014-12-31

A good first step before switching to v1.
2015-01-05 18:31:51 +01:00
Dave Johnston a5f5106154 Add in-section Next/Prev content pointers
Conflicts:
	docs/content/meta/release-notes.md
	docs/content/templates/variables.md
2015-01-05 18:26:09 +01:00
bep 837922d32b Add ERROR logging on invalid date and publishdate
Having correct dates is important in Hugo. Previously date parsing errors were swallowed, leading to confusing results.

This commit adds ERROR logging when date or publishdate in front matter cannot be parsed into a time.Time.
2015-01-05 12:44:41 +01:00
Tatsushi Demachi 0d17ee7ed4 Add operator argument to where template function
It allows to use `where` template function like SQL `where` clause.
For example,

    {{ range where .Data.Pages "Type" "!=" "post" }}
        {{ .Content }}
    {{ end }}

Now these operators are implemented:

    =, ==, eq, !=, <>, ne, >=, ge, >, gt, <=, le, <, lt, in, not in

It also fixes `TestWhere` more readable
2015-01-04 12:15:17 +01:00
Austin Ziegler ae9c25afc0 Implement apply.
- apply seq fn args…
2015-01-02 11:50:22 +01:00
Austin Ziegler 6033abe1e7 Add a chomp function.
- Mostly useful in pipelines.
2015-01-02 11:50:22 +01:00
Austin Ziegler 14e93de8a1 Initialize funcMap in an init function. 2015-01-02 11:50:22 +01:00
Austin Ziegler 6a98d269b5 Hygiene: Reduce copy-pasted code. 2015-01-02 11:50:22 +01:00
Nathan Youngman c6f4b09f65 always use http scheme for localhost
fixes #758
2015-01-01 23:57:29 +01:00
Bjørn Erik Pedersen dd1001ceda Merge pull request #762 from bjornerik/fix/revert-revert-menutest
Revert "Temporarily disable failing menu test"
2015-01-01 23:53:24 +01:00
bep 076a475d16 Revert "Temporarily disable failing menu test"
This reverts commit e4a22255cc.
2015-01-01 23:40:14 +01:00
spf13 fb1b795d59 Bumping Travis to test go 1.3 & 1.4 2014-12-30 14:58:48 -05:00
Tom Helmer Hansen d3c3676161 Fix EOF 2014-12-30 12:28:19 -07:00
Tom Helmer Hansen ec2566fa95 Add www.thehome.dk to showcase 2014-12-30 12:28:19 -07:00
Tatsushi Demachi 975f4cf126 Refactor tpl codes
- Use indirect function instead of the same code copies
- Fix missing arguments of some test codes
2014-12-29 15:47:50 +01:00
Tatsushi Demachi fa8ac87d5e Make 'where' template function accepts dot chaining key argument
'where' template function used to accept only each element's struct
field name, method name and map key name as its second argument. This
extends it to accept dot chaining key like 'Params.foo.bar' as the
argument. It evaluates sub elements of each array elements and checks it
matches the third argument value.

Typical use case would be for filtering Pages by user defined front
matter value. For example, to filter pages which have 'Params.foo.bar'
and its value is 'baz', it is used like

    {{ range where .Data.Pages "Params.foo.bar" "baz" }}
        {{ .Content }}
    {{ end }}

It ignores all leading and trailing dots so it can also be used with
".Params.foo.bar"
2014-12-29 12:53:41 +01:00
Anthony Fok dd5bc0345b [Docs] Mention support for the Ace HTML Template Engine 2014-12-27 00:58:50 -07:00
Anthony Fok ddf4190114 Docs copyediting: Add more external URLs; add backticks, etc. 2014-12-27 00:50:08 -07:00
Anthony Fok 5792cc3a1a [Docs] Go 1.4+ required for building on Windows
See Issue #688 for more information.
2014-12-26 13:00:14 -07:00
bep afe5add86e Add anchor ref to Blackfriday doc 2014-12-26 18:11:05 +01:00
Austin Ziegler 5e0a16ea21 Fix a crash for ref page#anchor.
- Remove an improperly shadowed variable.
- Fixes #741.
2014-12-26 18:06:21 +01:00
Bjørn Erik Pedersen 029a3ae79e Merge pull request #742 from bjornerik/doc/blackfriday
Add doc for Blackfriday configuration
2014-12-26 16:56:06 +01:00
Ryan Martinsen 7dacc999f8 Add ability to canonify URLs in rendered XML output. 2014-12-26 16:24:28 +01:00
Anthony Fok f5a3fb149f Wrap comments helpers package to fit 80-column width
Add an initial space after `//` where appropriate.
Minor copyediting.
2014-12-26 08:07:03 -07:00
bep a0fe117002 Add doc for Blackfriday configuration
See #686
2014-12-26 16:04:49 +01:00
bep fbf8bcacc4 Add configurable support for angled quotes
The flag `HTML_SMARTYPANTS_ANGLED_QUOTES` was added to Blackfriday on Black Friday. This configures rendering of double quotes as angled left and right quotes (&laquo;
&raquo;).

Typical use cases would be either or, or combined, but never in the same
document. As an example would be a person from Norway; he has a blog in both
English and Norwegian (his native tongue); he would then configure Blackfriday
to use angled quotes for the Norwegian section, but keep them as reqular
double quotes for the English.

This commit adds configuration support for this new flag, configuration that can be set in the site configuration, but overridden in page front matter.

Fixes #605
2014-12-26 14:31:55 +01:00
bep bb37698226 Fix unicode menu URLs
Menu urls like /categories/новости-проекта would turn into /categories/d0bdd0bed0b2d0bed181d182d0b8-d0bfd180d0bed0b5d0bad182d0b0, which is illegal, while the directory under the categories/ is created with the original name. It results in 404 not found error.

This commit fixes that by make sure that SanitizeUrl() is called last.

Fixes #719
2014-12-26 13:30:46 +01:00
bep e4a22255cc Temporarily disable failing menu test 2014-12-26 13:14:06 +01:00
Anthony Fok 0cfdb2e51b Revise README.md: buildDate expects timezone; copyediting
Since commit 3a8c12418a dated 2014-12-09,
commands.buildDate expects `date +%FT%T%z` rather than `date +%FT%T`.
Update README.md accordingly.

Also did a little copyediting.
2014-12-25 21:46:43 -07:00
Anthony Fok 8042e77488 Typo fix: "simple" → "simply" in templates/views.md
Thanks to @paulsullivan for catching that typo!
2014-12-24 16:58:28 -07:00
Anthony Fok 68cea07072 Minor copyediting, no new content added. 2014-12-24 04:59:53 -07:00
Anthony Fok e3433e6afb Fix long descriptions of benchmark and serve commands 2014-12-24 04:40:48 -07:00
bep 331043b98e Remove noisy Println in test 2014-12-19 14:21:05 +01:00
Derek Perkins 717f702e2f Added delimit & sort template functions, tests and docs 2014-12-18 22:28:12 -05:00
Derek Perkins 8f6f871f53 Added AuthorList, Author, AuthorSocial, SiteSocial, Image and Video structs
Added Page.Author(s) functions
Added schema, opengraph, twitter_cards, google_news metadata templates
Added "" template
2014-12-18 22:26:10 -05:00
Austin Ziegler fd33e5d202 Documentation for ref and relref.
- Rejigged the weight of the extras/ content for the new crossreferences
  page.
- Used the new {{</*…*/>}} format for documenting highlighting and to
  prevent a warning about the missing `fig` shortcode.
2014-12-18 22:18:37 -05:00
Austin Ziegler 112c3c5c04 Provide (relative) reference funcs & shortcodes.
-   `.Ref` and `.RelRef` take a reference (the logical filename for a
    page, including extension and/or a document fragment ID) and return
    a permalink (or relative permalink) to the referenced document.

    -   If the reference is a page name (such as `about.md`), the page
        will be discovered and the permalink will be returned: `/about/`
    -   If the reference is a page name with a fragment (such as
        `about.md#who`), the page will be discovered and used to add the
        `page.UniqueID()` to the resulting fragment and permalink:
        `/about/#who:deadbeef`.
    -   If the reference is a fragment and `.*Ref` has been called from
        a `Node` or `SiteInfo`, it will be returned as is: `#who`.
    -   If the reference is a fragment and `.*Ref` has been called from
        a `Page`, it will be returned with the page’s unique ID:
        `#who:deadbeef`.

-   `.*Ref` can be called from either `Node`, `SiteInfo` (e.g.,
    `Node.Site`), `Page` objects, or `ShortcodeWithPage` objects in
    templates.

-   `.*Ref` cannot be used in content, so two shortcodes have been
    created to provide the functionality to content: `ref` and `relref`.
    These are intended to be used within markup, like `[Who]({{% ref
    about.md#who %}})` or `<a href="{{% ref about.md#who %}}">Who</a>`.

-   There are also `ref` and `relref` template functions (used to create
    the shortcodes) that expect a `Page` or `Node` object and the
    reference string (e.g., `{{ relref . "about.md" }}` or `{{
    "about.md" | ref . }}`). It actually looks for `.*Ref` as defined on
    `Node` or `Page` objects.

-   Shortcode handling had to use a *differently unique* wrapper in
    `createShortcodePlaceholder` because of the way that the `ref` and
    `relref` are intended to be used in content.
2014-12-18 22:18:36 -05:00
Ahsanul Haque 14bce119b6 Commented helpers package 2014-12-18 22:18:36 -05:00
Tatsushi Demachi 7436829b82 Use current working dir as WorkingDir instead of hugo executable's dir 2014-12-12 11:33:52 -05:00
Austin Ziegler ec4b6c03a8 Trigger an editor after hugo new.
- Trigger permanently with NewContentEditor in config.{toml,yaml,json}.
- Trigger on an individual basis with --editor.
2014-12-12 11:33:52 -05:00
Ahsanul Haque 2c8e9a7931 Commenting helpers package 2014-12-12 02:57:25 +06:00
Ahsanul Haque b11838da3f Commented commands package 2014-12-12 00:05:02 +06:00
bep 9b04c27998 Revert "Make Urls in menus respect CanonifyUrls"
This reverts commit 3ccb397902.
2014-12-11 05:33:40 +01:00
bep 3ccb397902 Make Urls in menus respect CanonifyUrls
Fixes #519
2014-12-10 20:32:39 +01:00
bep e6541c45ab ERROR-log on symbolic links
filepath.Walk does not follow symbolic links.
There's no easy fix for that outside of Go, so the best we can do for now is to give notice to the end user by ERROR log statements.

This commit also fixes a related panic situation in GenerateTemplateNameFrom when the layout dir was a symbolic link.

Fixes #283
2014-12-10 20:32:39 +01:00
bep 9f77f93071 Fix various Windows-issues
File handling was broken on Windows. This commit contains a revision of the path handling with separation of file paths and urls where needed.

There may be remaining issues and there may be better ways to do this, but it is easier to start that refactoring job with a set of passing tests.

Fixes #687
Fixes #660
2014-12-09 09:43:15 -05:00
bep 3a8c12418a Add timezone to buildDate 2014-12-09 11:42:07 +01:00
Austin Ziegler be3d563a13 Add an install target to Makefile. 2014-12-09 11:12:40 +01:00
bep 9f0f73f452 Fix front matter for 'Creating a New Theme'
There seems to be an issue with TOML and certain menu structures. Current workaround: YAML.
2014-12-08 23:08:54 +01:00
Anthony Fok a6d3862b87 Docs: Minor copyediting/proofreading
- Correct some typos
- Add backticks and commas where necessary
- Use fenced code blocks specifying "bash" as the language
  to avoid weird highlighting
- Place commas outside of quotation marks surroundingn codes
  to avoid possible confusion
- Suggest users to use the discussion forum rather than the
  mailing list
2014-12-08 22:44:30 +01:00
Anthony Fok 736dd4b521 Docs: Quote <!--more--> in <code> instead of italicizing it
Also replace "--" with "&#x2d;&#x2d;" prevent "--" from
being interpreted as en-dash.

Note: A simple `<!--more-->` does not work.
2014-12-08 22:44:30 +01:00
Anthony Fok 010f6057ff Correct URL of the favicon in the documentation
img/favicon.png does not seem to exist,
so follow the example in docs/layouts/index.html
and use /favicon.ico instead.
2014-12-08 22:34:00 +01:00
bep 11cdb81501 Remove Println that panics in test 2014-12-08 22:06:37 +01:00
Austin Ziegler 27840932a5 Always use RFC3339 for version date format.
Fixes #695 reported by @synful.

- No longer tries to load a configuration.
- Because of this the version tests are no longer necessary.
2014-12-08 21:41:30 +01:00
Tatsushi Demachi a0d956c2ad Add Ace template engine support 2014-12-03 15:38:36 +01:00
Augustin Riedinger 390c158f4e Github page strategy for username.github.io repos
The whole article should maybe be rewriten to have a better content flow (maybe adding a table of content), to introduce both possible strategies. But at least, the technical steps are there!
2014-12-03 15:03:18 +01:00
Rasmus Stougaard 1b36bda653 Fixed typo in summaries description in the documentation 2014-12-03 13:55:52 +01:00
Alex Dunn c00788d8be showcase: update ucsb entry 2014-12-03 13:53:29 +01:00
Kartik Singhal 742a064b24 Correct alias 2014-12-03 09:17:45 +01:00
bep df8e936687 Fix missing shortcode in doc
Use new syntax for example.
2014-12-03 09:17:04 +01:00
spf13 b719ba7e2b Adding Prev/Next functionality to all lists of pages (sections, taxonomies, etc) 2014-11-27 23:15:25 -05:00
spf13 78316903a2 adding appvoyer support for Windows CI integration 2014-11-25 09:01:54 -05:00
bep d616617292 Doc for markdownify
This small function feels important enough to maybe deserve more than these three lines, but this will have to do for now.

This assumes that #652 gets merged.
2014-11-24 23:18:18 -05:00
bep 53c707bb1d Add markdownify template filter
Note that this is a Markdownify filter, and is named as such; it's not a Asccidoc filter or in any way connected to a Page.

Fixes #524
2014-11-24 23:17:25 -05:00
Joel Scoble f04006978a update summary.md with info on handling of html tags 2014-11-24 23:03:10 -05:00
Austin Ziegler 8f9cea7f58 Enable descriptive header IDs.
Enable blackfriday.EXTENSION_AUTO_HEADER_IDS to generate the name of the
header ID from the text in the header. Works for prefix and underline
headers.

- TOC extraction had to be modified to look for `<li><a href="#`>
  instead of `#toc_` because of this change.
- Fixed a number of tests that depended on the presence of `toc_` with
  as an `id` or as a `href` value.
- Renames the earlier parameter `footnoteref` to `documentId` as it more
  accurately represents the nature of the parameter. The `documentId` is
  appended to all generated headers through the new HTML renderer
  parameter `HeaderIDSuffix`.
2014-11-24 18:01:57 -05:00
spf13 0282c922b4 fixing race condition in CreatePages 2014-11-24 17:51:47 -05:00
Rasmus Stougaard c5ae2a2d1d Added makefile that builds with git information
I have put the extra linker flags in a makefile to avoid having to remember the long command to get the commitHash in the version command.

See comment by tatsushid here:
https://github.com/spf13/hugo/issues/540

NB: only tested on Mac OS x 10.10.1 since that is what I have access to
2014-11-24 17:25:51 -05:00
Kartik Singhal 9b850c4adb Correct path in theme search order 2014-11-24 17:24:39 -05:00
Rasmus Stougaard 9e15298952 Added link to my blogpost about travelling with Hugo in asia 2014-11-24 17:23:38 -05:00
Rasmus Stougaard a1954c4fc6 Added stou.dk to showcases 2014-11-24 17:23:37 -05:00
Joel Scoble 0eeaa4c84e fix version command so that it will work with all supported config formats and added tests 2014-11-24 17:16:34 -05:00
Dan Connolly 6c25cd529f typo: practical 2014-11-24 17:14:11 -05:00
spf13 cdbc741cb8 fixed #656. Templates work properly when watching. 2014-11-24 17:10:38 -05:00
spf13 4a2f16f91e refactor handlers to use types instead of structs. 2014-11-20 12:43:34 -05:00
spf13 73f203ad86 Move template library into it's own package (tpl). No longer dependent on hugolib. Can be used externally. 2014-11-20 12:36:57 -05:00
spf13 92a3372a3f Added a new command hugo list drafts and hugo list future 2014-11-19 16:24:30 -05:00
bep 728d0fa32c Update shortcode doc for 0.13-DEV
Update of the doc to reflect the shortcode  implemention in HEAD.
2014-11-18 12:26:33 -05:00
bep cb3576b6de Fix broken convert
The front matter convert-feature didn't work. It placed converted content in the wrong directory.

This commit fixes this by doing the smallest and safest change possible; the path logic here should maybe
be revisited and generalized.

Fixes #643
2014-11-18 10:17:01 -05:00
ls6 bcaf33418f Update shortcodes.md
A typo resulting in a broken link.
2014-11-18 10:15:05 -05:00
bep a6a9df3955 Fix failing shortcode tests on Travis
Some newly added shortcode tests compared maps in assertions.

This failed on Travis, as iteration order isn't guaranteed for maps since Go 1.

This commit fixes that by do a sort of the keys in the shortcode String() function.
2014-11-18 10:14:12 -05:00
Kartik Singhal 596d679386 Various fixes in RSS feed generation
- Prevent `.xml` generation for root section
- Remove redundant check for DisableRSS
- Fix permalinks for rel="alternate"
- Rename generated xml file to <type>/index.xml
- Add required description element in default template
- Make default RSS template validate on w3c (timezone format is still an issue)

Conflicts:
	hugolib/site.go
2014-11-17 18:55:40 -05:00
Danillo Souza a07dd5650e fixing typo 2014-11-17 18:44:34 -05:00
Chase Adams b716dbec1d Fix template checking order in site.go
- Change order of HasPrefix to match correct order
- Remove theme concatenation to _internal in last loop of
  appendthemetemplates so it looks in the right place for internal
templates

Conflicts:
	hugolib/site.go
2014-11-17 18:42:36 -05:00
bep 55fcd2f30f Shortcode rewrite, take 2
This commit contains a restructuring and partial rewrite of the shortcode handling.

Prior to this commit rendering of the page content was mingled with handling of the shortcodes. This led to several oddities.

The new flow is:

1. Shortcodes are extracted from page and replaced with placeholders.
2. Shortcodes are processed and rendered
3. Page is processed
4. The placeholders are replaced with the rendered shortcodes

The handling of summaries is also made simpler by this.

This commit also introduces some other chenges:

1. distinction between shortcodes that need further processing and those who do not:

* `{{< >}}`: Typically raw HTML. Will not be processed.
* `{{% %}}`: Will be processed by the page's markup engine (Markdown or (infuture) Asciidoctor)

The above also involves a new shortcode-parser, with lexical scanning inspired by Rob Pike's talk called "Lexical Scanning in Go",
which should be easier to understand, give better error messages and perform better.

2. If you want to exclude a shortcode from being processed (for documentation etc.), the inner part of the shorcode must be commented out, i.e. `{{%/* movie 47238zzb */%}}`. See the updated shortcode section in the documentation for further examples.

The new parser supports nested shortcodes. This isn't new, but has two related design choices worth mentioning:

* The shortcodes will be rendered individually, so If both `{{< >}}` and `{{% %}}` are used in the nested hierarchy, one will be passed through the page's markdown processor, the other not.
* To avoid potential costly overhead of always looking far ahead for a possible closing tag, this implementation looks at the template itself, and is branded as a container with inner content if it contains a reference to `.Inner`

Fixes #565
Fixes #480
Fixes #461

And probably some others.
2014-11-17 18:32:06 -05:00
spf13 c8904756f0 Removing dependency on go-html-transform (fixing the build). 2014-11-17 18:21:31 -05:00
Tatsushi Demachi 7e692544f0 Fix GroupBy function issues
Following issues are fixed

1. Can't access fields and methods specified in GroupBy call
2. PagesGroup doesn't contain Pages. It's always empty.
3. When GroupBy is called with Section key, it doesn't work as expected
2014-11-13 22:48:58 -05:00
bep 91e03b9fbc Reinsert deleted test
This test was deleted by mistake in owenwaller's contribution to add more tests.

I haven't looked closer, there may be more missing.
2014-11-13 22:47:06 -05:00
Michael Henderson 6bf6a810ee Update creating-a-new-theme.md 2014-11-13 22:44:31 -05:00
Michael Henderson 88881de2d4 Update creating-a-new-theme.md 2014-11-13 22:44:31 -05:00
Michael Henderson e9917bfe16 Update creating-a-new-theme.md
Update heading levels to confirm to the other tutorials. Create a similar front-matter using YAML, since I couldn't figure out how to get the menu:main:parent working as TOML.
2014-11-13 22:44:30 -05:00
Joel Scoble ca4e4ce2f9 converted helpers usage of path 2 filepath 2014-11-13 22:41:59 -05:00
Joel Scoble 99463f6adf converted path 2 filepath 2014-11-13 22:39:07 -05:00
Joel Scoble 2c51bba0c3 converted path 2 filepath 2014-11-13 22:38:21 -05:00
Joel Scoble 7fd348cf79 convert path 2 filepath 2014-11-13 22:37:14 -05:00
Joel Scoble 4f2dfe7015 converted path 2 filepath 2014-11-13 22:36:28 -05:00
Joel Scoble 7badd2eb0c change path usage to filepath 2014-11-13 22:33:39 -05:00
Joel Scoble 05300fde1d add support for fsync's noTime flag 2014-11-13 22:32:27 -05:00
Joel Scoble f037ae7b4f update README.md with info on adding compile information to version 2014-11-13 22:22:15 -05:00
Ryan Kimber fc20d0b444 Fixed launchcode5.md description 2014-11-13 22:08:30 -05:00
Ryan Kimber 52ae1c750a Added launchcode-tn.jpg to docs/static/img 2014-11-13 22:08:29 -05:00
Ryan Kimber 15dae3ccde Create launchcode5.md 2014-11-13 22:08:29 -05:00
bep 8ad9c0a7dd Make Where template-method accept methodname as key
This is necessary to make constructs like `{{ range first 1 (where .Data.Pages "Type" "post") }}` -- as Type and Section is methods not fields.
2014-11-13 12:42:26 -05:00
bep fdae09070b Params map has string as key
Related to issue #540 and commit 3c22ca7c84456b19f2a017719b1533902594e672
2014-11-13 12:41:00 -05:00
Brian Payne e127a5cb7d Added better error message for poorly formed frontmatters in archtypes 2014-11-13 12:36:47 -05:00
bep 3cec04e0d2 Add Git directory deployment flow to tutorial 2014-11-13 12:33:14 -05:00
Austin Ziegler d467ec0aab Fix a bug with taxonomy rendering.
- In `layouts/_default/taxonomy.html`, the `.Data` result does not
  provide the same information that `layouts/_default/terms.html` does
  for being able to identify the plural value of the term.
- This change adds `.Data.Singular` and `.Data.Plural` to provide
  similar capabilities.
- This *may* be incompatible with templates that check for `{{ if ne
  $taxonomy "Pages" }}` if the `page.Params` has either the singular or
  plural values as keys.
2014-11-13 12:32:10 -05:00
Austin Ziegler d7e6e490c2 Allow partial without .html
`partial "header" .` means the same thing as `partial "header.html" .`.
2014-11-13 12:30:45 -05:00
bep 266511b6d3 Fix missing space before 'width'
The newly introduced width-param on figure did not work in combo with alt or caption due to space-issues.

This fixes that.
2014-11-13 12:29:06 -05:00
spf13 cafd39eb9b Fixing some tests 2014-11-04 20:28:27 -05:00
spf13 55fb02428d Updating tests to use hugofs 2014-11-04 20:28:07 -05:00
spf13 a40bd3caf1 rewriting guessSection to accurately reflect intent and usage. Update tests. 2014-11-04 20:19:45 -05:00
Owen Waller e2634752ce First stab at correcting GuessSection tests
Updated the test to correctly test for "" when a non-absolute path
is used.

But the tests still fail for multi-part paths e.g. /contents/blog/
2014-11-04 19:19:27 -05:00
Owen Waller f81f9ceb40 Fix: rewrite FileAndExt
FileAndExt has now be completely rewritten and now works as may
reasonably be expected. The test cases for:

ReplaceExtension
Filename
FileAndExt

now all pass.

The problem was the way path.Base was being used.
Firstly Base returns "." if the directory is empty, but it can also
return "." for the current directory, or ".." for the parent directory,
if these are the last elements in the path. Simply detecting the
presence of a "." in the returned string and truncating before the "."
does not therefore always result in a valid filename.
Secondly, Base strips any trailing slashes making is more difficult to
detect when the path does not end in a filename but in a directory name
i.e. a no filename case. Not detecting this incorrectly results in the
last directory name being returned as the filename.

The code has been updated to take account of of both situations so that:
1) An empty string for both the filename and extension is returned if the
path does not contain a filename (plus an optional extension). This
includes both the empty path case, and the ends in a directory case.
2) If the path represents a filename with an extension then both the
filename and the extension (minus any dots) are returned as non empty
strings.
3) If the path represents a filename without an extension then filename
will be returned as a non empty string (minus any dot) and the extension
will be returned as an empty string.
2014-11-04 19:19:19 -05:00
Owen Waller 5906c8652d Fix: remove the unnecessary dot in an extension
Oops minor typo. The new extension passed to ReplaceExtension should
not have a dot in it. The test data bas been updated to reflect this.
2014-11-04 19:19:09 -05:00
Owen Waller 3521e8b1e5 Updated TestReplaceExtensioni, TestFilename and TestFileAndExt
Updated the test cases in TestReplaceExtension to reflect the intent
of ReplaceExtension which is to accept a path and return only the file
name with a new extension. It's intentionally designed to strip out the
path and only provide the filename

Additional test cases have been added to both TestFilename and
TestFileAndExt to clarify behaviour with relative paths.
2014-11-04 19:19:01 -05:00
Owen Waller 980d0f14de WriteToDisk and SafeWriteToDisk test cleaned up
Minor cleanup to randomise the names of the temp directories used by the
tests.
2014-11-04 19:18:54 -05:00
Owen Waller bf07dc9293 WriteToDisk and SafeWriteToDisk tests now pass
This is the first time that both the WriteToDisk and SafeWriteToDisk
tests pass
2014-11-04 19:18:46 -05:00
Owen Waller a54ad2bf39 Fix: Test TestSafeWriteToDisk now works
Oops, my bad.
Despite the function intending to test SafeWriteToDisk it was actually
calling WriteToDisk. WriteToDisk does not return the file exists error
that SafeWriteToDisk does, which the test checks for.
2014-11-04 19:18:36 -05:00
Owen Waller e8bbc44ab0 Added the path modules test files
Added the new path modules test file. This replaces the old
helpers_test.go file.

The currently failing tests are:
TestReplaceExtension
TestFilename
TestFileAndExt
TestGuessSection
TestFindCWD
TestWriteToDisk

In addition the TestSafeWriteToDisk test case is currently disabled.
It will panic if enabled.

In addition there are some minor changes to path.go. They are:
Refactored MakePathToLower to simplify it.
Commented out, pending removal, Sanitize as it appears to be unused.
Fixed the resource leak in UnicodeSanitize

Conflicts:
	helpers/path.go
2014-11-04 19:18:04 -05:00
Owen Waller 6b619d2cd6 Added the url modules test files.
Added the new url module test file. This replaces the original
helpers_test.go file.

The TestUrlPrep test currently fails.

The only minor change to url.go is to add some trace printf's to
UrlPrep.
2014-11-04 19:16:07 -05:00
Owen Waller 57cd953997 Added the general modules test files
Added the new general module's test file, general_test.go. This replaces the
helpers_test.go file.

There is also a minor defect fix in general.go's StripHTML function.
The correct xhtml tag for a break is <br /> not </br>. I've also removed
the unnecessary spaces before the replacement "\n".

The new test module also reflects this change.

Conflicts:
	helpers/general.go
2014-11-04 11:13:41 -05:00
Owen Waller b87402e8cd Remove the helpers_test.go file
The helpers_test.go file has been split into three new
test files, one each for the path, url and general modules.

Conflicts:
	helpers/helpers_test.go
2014-11-04 11:10:55 -05:00
spf13 8a5dd06ad0 Use page.Markup to determine which PageHandler to use if it's set. 2014-11-04 00:44:30 -05:00
spf13 ade2ca6072 Adding an html file handler 2014-11-04 00:43:09 -05:00
spf13 7fba250023 Adding a proper css file handler (with automatic minification) 2014-11-04 00:42:36 -05:00
spf13 4dcf734acd Updating tests to use new Targets & Writers and switch to using Afero.MemMapFs for more accurate tests. 2014-11-04 00:41:47 -05:00
spf13 7b960ac121 New targets & new renderers and write methods [WIP] 2014-11-04 00:39:37 -05:00
spf13 e02dc6742a Cleanup file conversion handling 2014-11-04 00:36:05 -05:00
spf13 3616d16701 Better error messages for show_plan_test 2014-11-04 00:32:55 -05:00
spf13 07f2ef9c5e Page Group functions now work even when an uppercase field / method is provided. 2014-11-04 00:31:57 -05:00
spf13 4b9ea105c2 Setting to filesystems to the afero.fs interface so can be easily swapped out. 2014-11-04 00:30:35 -05:00
spf13 ad69374f8b Source files can provide content as String or Bytes or Reader 2014-11-04 00:28:20 -05:00
spf13 dcea0fa5ce Adding ReaderTo and ToReader helper functions 2014-11-04 00:26:56 -05:00
spf13 2cb89a523a Update menu test to work with revised source struct 2014-11-03 10:14:10 -05:00
Austin Ziegler 8cc7684a91 Change the type of .Site.Author from…
…`map[string]string` to `map[string]interface{}`.

This allows values other than `string` values to be saved to Author,
such as:

    ```toml
    # config.toml
    …
    [Author]
      name = "Austin Ziegler"
      social-site = [ "Facebook", "Twitter", "GitHub" ]
    ```

My specific use-case is that I’m trying to make something work similar
whether it’s specified in `.Params.Author` or in `.Site.Author` without
introducing `.Site.Params.Author`.
2014-11-02 00:45:33 -04:00
Kartik Singhal f3e9cbc7bd Fix #593 problem with hugo -w 2014-11-02 00:44:55 -04:00
Austin Ziegler c1942e915a Change permalink validation and substitution. 2014-11-02 00:43:01 -04:00
Austin Ziegler c07b10bba9 Output a timestamp with hugo server --watch
Per a [discussion][thread] on discuss, I have implemented one possible
way to do this.

[thread]: http://discuss.gohugo.io/t/output-a-timestamp-with-hugo-watch/213
2014-11-02 00:29:11 -04:00
Mike Dillon 2060031c1f Fix sourceLink for Hugo 2014-11-01 23:39:49 -04:00
Michael Henderson d036ddf237 Create creating-a-new-theme.md 2014-11-01 23:12:01 -04:00
Justin Calleja 11ddc308e3 Fix for issue 583 2014-11-01 23:10:52 -04:00
Kartik Singhal 6c238e140d Fix broken link 2014-11-01 23:08:48 -04:00
Kartik Singhal 649a7d2bbf Minor doc corrections 2014-11-01 23:03:29 -04:00
Tatsushi Demachi af47e5a2cf Extend template's mod and modBool functions to accept any int types
Fixes #575
2014-11-01 23:00:46 -04:00
Joel Scoble d4ed59198a added note about pygment example code and markdown processing, updated example 2014-11-01 22:58:44 -04:00
Joel Scoble 8e368e25b1 540: add support for build information output to version command 2014-11-01 22:56:48 -04:00
bep 8cb435f1f4 Fix redirect-loop for Hugo server
An extra slash was added to the path if baseUrl had a sub-directory, causing infinite redirect loop in Go's HTTP server.

Fixes #510
2014-11-01 22:49:26 -04:00
Tatsushi Demachi 5e28606b84 Add sort and grouping functions for publish date and param of Page
`GroupBy` is modified to allow it to receive a method name argument for
example `Type` as its first argument. It is only allowed to call with
a method which takes no arguments and returns a result or a pair of
a result and an error.

The functions discussed at #443 are also added

- `ByPublishDate`: Order contents by `PublishDate` front matter variable
- `GroupByPublishDate(format, order)`: Group contents by `PublishDate`
  front matter variable formatted in string like `GroupByDate`
- `GroupByParam(key, order)`: Group contents by `Param` front matter
  variable specified by `key` argument
- `GroupByParamDate(key, format, order)`: Group contents by `Param`
  front matter variable specified by `key` argument and formatted in
  string like `GroupByDate`. It's effective against `time.Time` type
  front matter variable
2014-11-01 22:41:04 -04:00
bep d013edb7f8 Implement HasMenuCurrent and IsMenuCurrent for Nodes
Prior to this commit, `HasMenuCurrent` and `IsMenuCurrent` on `Node` always returned false.

This made it hard (if possible at all) to mark the currently selected menu item/group for non-Page content (home page, category pages etc.), i.e. for menus defined in the site configuration.

This commit provides an implementation of these two methods.

Notable design choices:

* These menu items have a loose coupling to the the resources they navigate to; the `Url` is the best common identificator. To facilitate a consistent matching, and to get it in line with the menu items connected to `Page`, relative Urls (Urls starting with '/') for menu items in the site configuration are converted to permaLinks using the same rules used for others’.
* `IsMenuCurrent` only looks at the children of the current node; this is in line with the implementation on `Page`.
* Due to this loose coupling, `IsMenuCurrent` have to search downards in the tree to make sure that the node is inside the current menu. This could have been made simpler if it could answer `yes` to any match of any menu item matching the current resource.

This commit also adds a set of unit tests for the menu system.

Fixes #367
2014-11-01 22:34:49 -04:00
Marcelo Glezer 2b412d4ac7 fixed server reporting Web Server is available at https://localhost:1313 when server always serve http 2014-11-01 22:33:43 -04:00
Joel Scoble 73ec09258b update summary doc 2014-11-01 22:27:54 -04:00
Joel Scoble 9e029fe412 #463 add summary.md page 2014-11-01 22:27:47 -04:00
spf13 c5f1031e45 Handler WIP 2014-11-01 12:05:37 -04:00
spf13 141f3e19e0 Migrating Hugo to Afero for filesystem calls. 2014-11-01 11:57:29 -04:00
spf13 dfb8482569 Handlers WIP - Convert now working 2014-10-20 20:15:33 -04:00
spf13 30d4a26ba0 Handlers WIP (builds) 2014-10-20 17:51:53 -04:00
spf13 93f3d604c6 Handlers WIP 2014-10-20 17:42:16 -04:00
spf13 8bd0ffba43 Initial Handler Architecture WIP 2014-10-17 16:57:48 -04:00
spf13 20467e36b4 Improved error message when config file not found. 2014-10-16 20:20:39 -04:00
spf13 5dfc1dedb8 Big refactor of how source files are used. Also added default destination extension option. 2014-10-16 20:20:09 -04:00
bep 24bbfe7d32 Set Content-Type for livereload.js
The Content-Type was not set for livereload.js and was interpreteted by the browser as text/plain.

This commit sets it to application/javascript.

Fixes #562
2014-10-15 12:45:29 -04:00
bep 0167fb4803 Copy content from archetype
Prior to this commit only metadata were copied from archetype on content creation.

This commit includes the content if set in archetype. This is useful in situations with similar page structure.

Fixes #556
2014-10-15 12:40:12 -04:00
bep da5d98e958 Make First accept any int
TOML and YAML handles integers differently, creating issues when using integer values from configuration or front matter in the First template function.

This currently works in YAML (parses into int), but not in TOML (parses into int64).

This commit modifies First so it accepts any int.

Fixes #551
2014-10-15 12:39:09 -04:00
Jian Zhou d064139cee Fix spf13/hugo#467. RSSLink now point to index.xml 2014-10-15 12:36:06 -04:00
bep 16330cea91 Add nil-check to Intersect
The Intersect template-method would fail if one or both of the lists were nil (post vs page; post has tags, page has not).

This commit adds a nil-check and returns an empty result if any of the inputs are nil.

See #537
2014-10-15 12:31:22 -04:00
Will Stevens 1d4dde7ac3 added docs for 'intersect' and 'in' template functions 2014-10-15 12:30:10 -04:00
Anthony Fok ca7007bf26 Minor proofreading corrections to Hugo docs
- Add backticks and commas where necessary
- Remove some trailing whitespace
- Add front matter example in TOML
- Fix typo in one of the tags in Showcase
- Add 多说 (Duoshuo) as an alternative to Disqus
- Use internal links (i.e. without gohugo.io) where possible
- Use a colon to set off an example
- Change "it's" to "its" where appropriate
- Use typographical (i.e. curly) apostrophe on the front page
  where appropriate
- Capitalize "Github" as "GitHub"
2014-10-15 12:18:20 -04:00
bep 953cad6cbd Document manual breakpoint of .Summary
The use of <!--more--> to set the breakpoint for the generated page summary is mentioned in a release note, but not in the doc itself.

Very useful - and it leaves the formatting in place.
2014-10-15 12:15:59 -04:00
Raphael Estrada 3da97656ea add 'width' parameter to 'figure' shortcode 2014-10-15 12:09:26 -04:00
Mantas fb82f00f9d handle https prefixes in baseUrl 2014-10-07 17:18:45 -04:00
Oscar Bolmsten b98c2088f8 Minor fix to error message when copying static files 2014-10-07 17:17:51 -04:00
Joel Scoble 4b9e4c90d9 #462 fix, remove leading and trailing dashes from urlized slug. includes test changes 2014-10-07 17:05:11 -04:00
Joel Scoble f52e662890 Feed the titleized taxonomy key through string replace to replace '-' with ' ' for proper display of the taxonmy title 2014-10-07 17:01:39 -04:00
Will Stevens 938733f48f added In and Intersect template functions 2014-10-07 16:52:12 -04:00
Austin Ziegler 9cdd2e54c2 Use md5 against the file path for uniqueness. 2014-10-07 16:45:23 -04:00
Austin Ziegler 603b24a163 Make each generated page’s footnotes unique.
If content pages are fully rendered in a list page, footnotes that use
the same reference (`[^fn]`) will have duplicated anchors. This change
builds on #526 to put the page filename (`Page.File.Name`) as part of
the anchor for a footnote.

This would fix discussion [116](http://discuss.gohugo.io/t/footnote-references-are-duplicated-on-list-pages/116).
2014-10-07 16:44:28 -04:00
Austin Ziegler e68e7ef96f Configure footnote rendering.
- The config file can provide FootnoteAnchorPrefix, which will be used
  by blackfriday when rendering to HTML. A value of `q:` has the effect
  of making the anchor for a footnote `[^footie]` be `fn:q:footie`. The
  default is `""`.

- The config file can provide FootnoteReturnLinkContents, which will be
  used by blackfriday when rendering to HTML. A value of `^` has the
  effect of making the return link be `^` instead of `[return]`.
2014-10-07 16:43:33 -04:00
Jorin Vogel eeaf343a14 Mention .Params and .Page variables in shortcode docs. Also highlight variables. 2014-10-02 13:53:36 -04:00
Kartik Singhal 1614b82452 Correct desc for hugo new command 2014-10-02 13:47:25 -04:00
Aurelius Prochazka c739ec228c Removed text from code block. 2014-10-02 13:45:47 -04:00
Kartik Singhal 879e90dca7 Switch to new hompage 2014-10-02 13:39:59 -04:00
spf13 e3d4d40d32 better error messages for template errors 2014-10-02 13:37:38 -04:00
Nate Finch 3f59abe885 add some information to rendering errors so it's easier to tell what's failing. 2014-09-29 09:19:39 -04:00
Austin Ziegler def79376c4 Make taxonomy documentation match the example. 2014-09-24 14:56:53 -04:00
Kartik Singhal 3060307085 Make highlight.js example clearer
Provide the missing step to actually use the library. Should be helpful for a newbie.
2014-09-24 14:56:44 -04:00
spf13 b81ebf2ada Making the install on the homepage a bit more clear 2014-09-22 22:08:08 -04:00
Alex Dunn 4e4ea9583f instructions for Homebrew installation
updated installation page of documentation, and changed "Download" button on index.html to scroll to bottom where multiple installation options are featured

getting the scrolldown to work required removing the fixed positioning on #action and on the footer
2014-09-22 21:51:19 -04:00
spf13 26e44506e9 adding memstat option to server 2014-09-22 09:45:05 -04:00
Tatsushi Demachi 5d565c34e5 Extend template's basic math functions to accept float, uint and string values 2014-09-22 09:01:40 -04:00
spf13 d5308e6f6f Adding a community link to the homepage 2014-09-19 08:32:25 -04:00
spf13 bf980bc138 switching website to gohugo.io & adding links to discuss 2014-09-18 21:22:04 -04:00
rybi 1a0dc0b936 Update urls.md
Corrected the --uglyUrls flag, wouldn't work if lowercase.
2014-09-18 13:06:02 -04:00
Nate Finch b590de6917 limit the number of goroutines used in taxonomy rendering to gomaxprocs*4 2014-09-14 07:23:03 -04:00
Nate Finch 49045b1cbc limit the number of goroutines we use for page rendering to gomaxprocs*4 2014-09-14 07:01:40 -04:00
Nate Finch cf3e748bd9 remove unused field 2014-09-12 07:25:45 -04:00
Nate Finch a72ca38c07 make the value of the BuildDrafts flag available to templates.This can be useful for if you only want to show some specific information on your local machine and/or when showing drafts. 2014-09-11 17:24:10 -04:00
Nate Finch 7142374332 Sort by title if dates are the same 2014-09-11 17:23:01 -04:00
Alex Dunn 275e1c0d23 more examples and explanation of go templating
Emphasizing to people (like me) who aren't familiar with Go that just because something's not mentioned in the Hugo docs doesn't mean it's not possible
2014-09-11 17:22:08 -04:00
Joel Scoble becd4fe337 refactor handling of amber to AddTemplateFile as the TODO note stated. Used switch statement to make it easier to add other template support 2014-09-11 17:09:16 -04:00
Joel Scoble 4e9b04086a fix tags not being in lowercase, #491 2014-09-11 17:03:31 -04:00
Daniel Fairhead 012a473e27 added "eq" function to docs. 2014-09-11 17:02:20 -04:00
bep df489b4712 Enable soft livereload of CSS and images
Prior to this commit a dummy JavaScript filename was sent to LiveReload when changing a static file (CSS, image etc.), forcing a full browser reload of the page.

This commit fixes this by sending the relative file path of the changed static resource, enabling partial live reloading for CSS- and image-changes. If more than one static file happens to end up in the same changeevent-batch, it will fall back to do a full refresh. To enable this logic, the change events with names ending with ".goutputstream*" is now filtered out as temporary.

Changes in dynamic content behaves like before.

Issue #490
2014-09-11 16:58:06 -04:00
Nate Finch 0099b5a3cb Change all uses of sort.Sort to sort.Stable.Using sort.Stable ensures that even if the sort keys are the same, the order of the sort will not randomly change. Using the old sort.Sort, if you had pages with no date, the lists of those pages would randomly reorder every time you regenerate the list, causing spurious changes to the output. Now they'll always get ordered in the same way. 2014-09-09 09:22:16 -04:00
Tatsushi Demachi d9964451a5 More error messages at syncing static contents 2014-09-08 11:57:06 -04:00
Nate Finch acf9561a31 fix zero date 2014-09-08 11:55:54 -04:00
Tim Dumol b336abcf81 Fix typo in Archetypes documentation.
Archetype was spelled archtype in one of the headers.
2014-09-08 11:54:40 -04:00
Nate Finch 2ca615c551 Add Node.Site.Pages to all nodes and ensure all pages from the site exist in the list before processing shortcodes.
Node.Site.Recent is not really just recent pages, but all pages, so I figured it was better to add a new parameter with a more informative name.

I also changed the code slightly so that all pages are added to the list of pages before we start rendering shortcodes... this way you can use a shortcode to refer to another page.  Previosuly, this had been broken, because the list ofg pages would not be fully populated while the shortcodes were being processed.  The code that does this is not reading from disk or doing any rendering, so it shouldn't take any more time to do.
2014-09-08 11:50:09 -04:00
Nate Finch b97c6c7082 add Name to File, which is the filename minus the extension 2014-09-08 11:44:50 -04:00
Jakub Turski 1684579127 Go back to lowercase slugs. Also, use MakePathToLower in TestMakeToLower.
go fmt
2014-09-08 11:42:36 -04:00
Anthony Fok 5dd3eaabee More proofreading and minor revisions to Hugo docs
Among the various changes, most instances of

    {{ template "partials/FILE.html" . }}

were changed to

    {{ partial "FILE.html" . }}

Also, in main.go, change "2013" to "2013-14".
2014-09-08 11:41:10 -04:00
Anthony Fok ac78d25240 A small fix and update to the multilingual example
Enclose `{{ .Content }}` with a `{{ if .IsPage }}` test to avoid
the "Content is not a field of struct type *hugolib.Node" error.
Thanks to @spf13 for the tip!  Fixes #366.

Also update example to Hugo v0.12 conventions:
- Convert config.yaml to config.toml to follow what
  `hugo new site /path/to/site` generates
- Rename layouts/chrome to layouts/partials
- Convert `template` calls to `partial` calls
- Add .gitignore to ignore the `public` directory
- Add README.md with pointers to discussions in issues
  to help bring newcomers up to speed with this multilingual example
2014-09-08 11:38:12 -04:00
spf13 4bb5e326db Taxonomies can now be provided as a single string value if there is only one in frontmatter (tag = "val" vs tag = ["val"]) 2014-09-05 09:29:01 -04:00
spf13 1b7f18e391 Making partials context optional for compatibility with template.
If not provided, context is nil.
2014-09-03 11:30:08 -04:00
spf13 7b3df2386d Bumping Version to 0.13-DEV 2014-09-03 11:28:40 -04:00
Anthony Fok efc98a3b1f Update example blog to Hugo v0.12 conventions
- Convert config.yaml to config.toml to follow what
  "hugo new site /path/to/site" generates
- Rename layouts/chrome to layouts/partials
- Convert "template" calls to "partial" calls
- Minor revisions to the text in example content
- Upgrade Bootswatch Yeti theme (3.1.1+1 → to 3.2.0+3)
- Upgrade Font Awesome (4.0.3 → 4.2.0)
- Upgrade jQuery (1.11.0 → 1.11.1)
2014-09-02 17:18:22 -04:00
spf13 05102f1b79 Fixing typo in ordering.md fixed #401 2014-09-02 17:09:56 -04:00
spf13 1363128962 Bumping Version 2014-09-01 10:05:05 -04:00
spf13 b4d3195f65 Adding V0.12 release notes 2014-09-01 10:00:45 -04:00
spf13 f36ed446cc Adding a bunch of new quotes to the front page and switching to Owl Carousel 2014-09-01 10:00:06 -04:00
Anthony Fok d202050684 Fix loading of Lato font in style.css for docs
The "@import url()" statement for loading Lato from Google Fonts
was ignored because "@import are not allowed after any valid statement
other than @charset and @import" according to the W3C CSS Validator.

Also remove the line for importing line-icons.css which no longer
exists.
2014-09-01 08:21:42 -04:00
Anthony Fok a6022293af Minor proofreading corrections to Hugo docs 2014-09-01 08:19:40 -04:00
Dato Simó f142458c4b Use typographic quote chars in the carousel quotes section
At big font sizes, quotes really become more beautiful with them.
2014-08-30 23:19:22 -04:00
Dave Johnston 13a317b975 Enable header id blackfriday extension 2014-08-30 14:12:53 -04:00
Anthony Fok c1b9e8d54b quickstart.md: Put long options inside backticks
Also minor adjustment to blank lines.
2014-08-30 01:16:18 -04:00
spf13 242d6b4e6b Adjusting the number of go routines to build the pages in to 4*GOMAXPROCS (from 2) for faster rendering. 2014-08-30 01:15:20 -04:00
Nate Finch 47c91a4ca2 Fix CreatePages
This fixes #450.  There are two problems:

1.) We're creating a new goroutine for every page.
2.) We're calling s.Pages = append(s.Pages, page) inside each goroutine.

1 is a problem if in that if you have a ton of pages, that's a ton of goroutines.  It's not really useful to have more than a few goroutines at a time, and lots can actually make your code much slower, and, evidently, crash.

2 is a problem in that append is not thread safe. Sometimes it returns a new slice with a larger capacity, when the original slice isn't large enough.  This can cause problems if two goroutines do this at the same time.

The solution for 1 is to use a limited number of workers (I chose 2*GOMAXPROCS as a nice guess).
The solution for 2 is to serialize access to s.Pages, which I did by doing it in a single goroutine.
2014-08-30 01:02:35 -04:00
spf13 93addfcbee Adding documentation about 'where' and cleaning up docs around first. 2014-08-30 00:57:38 -04:00
spf13 0ce4ec1edb Added more examples and cleaned up the GroupBy functionality documentation 2014-08-30 00:21:47 -04:00
spf13 7e19fa40e7 Making direction optional (and setting defaults) for GroupBy Pages functionality. 2014-08-29 23:51:29 -04:00
spf13 b15eb889e8 Adding .Reverse() to PagesGroup 2014-08-29 23:50:25 -04:00
spf13 41b28462e8 Switch .Data to .Pages in the PageGroup functionality for increased consistency. 2014-08-29 23:48:24 -04:00
spf13 70dc370c08 Making the term "Term" more consistent with Taxonomy usage. 2014-08-29 23:44:39 -04:00
spf13 01caaeba7a Making the Pages Sorting methods available within a taxonomy term. 2014-08-29 23:43:38 -04:00
spf13 bb02a14b1e Adding a page listing the different methods available to Taxonomies. 2014-08-29 23:42:26 -04:00
spf13 ba8f652acc More taxonomy examples in templates. 2014-08-29 23:41:53 -04:00
spf13 6f9f93f34b Fixing the taxonomy example. Fixed #318. 2014-08-29 23:39:55 -04:00
Jakub Turski d3646aaac0 Be more specific about .Params content
I'm not sure whether this is *always* the case, but it's definitely have been my experience so far. :)
2014-08-28 13:04:00 -04:00
Jakub Turski 7de320920c Shortcodes are content files specific.
This fixes spf13/hugo#440.
2014-08-28 12:59:52 -04:00
Tatsushi Demachi 6f9db4a784 Add document about page grouping functions 2014-08-28 12:56:32 -04:00
spf13 53b7d5b8a1 Inner Shortcodes now treated as markdown. fixed #185 2014-08-28 12:48:31 -04:00
spf13 828401cbe6 More press additions 2014-08-27 11:47:12 -04:00
spf13 4b71eb16e1 Compressed showcase thumbnails further 2014-08-26 14:37:34 -04:00
spf13 954498803d Added ucsb to showcase 2014-08-26 14:37:12 -04:00
spf13 dcda66dfab More Press 2014-08-26 14:36:38 -04:00
spf13 4a91b8c7fd fixed #389 . Added alias for missing page. 2014-08-26 13:16:45 -04:00
spf13 987a82d043 small tweaks to the hover effect 2014-08-26 12:30:28 -04:00
spf13 8a44deac0f Creating a showcase archetype to make for easier showcase additions 2014-08-26 12:27:43 -04:00
spf13 1c1615d794 Adding a bunch of new sites to the showcase 2014-08-26 12:27:25 -04:00
spf13 c9a6b2b93c Adding a bunch of new press to the Press page. 2014-08-26 12:26:29 -04:00
spf13 733bff9035 Prettier link hover state 2014-08-25 15:52:43 -04:00
spf13 1143a8fa49 Bumping Travis to test Go 1.2 & tip (1.3) 2014-08-25 15:18:53 -04:00
spf13 294222ac74 Fixing a broken link in the docs 2014-08-25 14:02:39 -04:00
spf13 4281cbfa34 LiveReloadDisabled works with Watching properly. Fixed #335. 2014-08-25 13:49:53 -04:00
spf13 1b5f59b071 go fmt site.go 2014-08-25 13:13:11 -04:00
spf13 30af267b32 Fix #302. Links now have trailing slashes. 2014-08-25 12:45:47 -04:00
Nate Finch a31edb3388 Support subdir in baseurl.
Mainly this was a change to helpers.MakePermalink, but to get the local server to run correctly,
we needed to redirect the path of the request from /foo to /.  In addition, I added tests for the
server's code for fixing up the base url with different config file & CLI options.
2014-08-25 11:51:51 -04:00
Joel Scoble 4b979b17cc added functionality to check the error message returned from Cobra, if any. for uage message text. If its present, the usage message gets truncated and the resulting message is returned to be used for the rest of the error message. If the resulting error is blank, no error message is printed 2014-08-25 11:50:23 -04:00
Joel Scoble 4c735a7878 preserve alias case while lowercasing taxonomy 2014-08-25 10:16:59 -04:00
Chase Adams 348e123c9f Update 404 to be compiled to .html instead of directory 2014-08-25 09:38:08 -04:00
Tatsushi Demachi 50a8c50726 Add page grouping functions 2014-08-25 09:18:52 -04:00
Chase Adams 867683e473 Add link for learning more about static directory 2014-08-20 14:23:17 -04:00
Joel Scoble c750a95e22 support for futre/draft summary info output 2014-08-20 14:21:15 -04:00
spf13 946ad9c2c3 Making the links stand out more 2014-08-20 14:19:15 -04:00
spf13 f5157566ef Cleaning up a ton of CSS.. Removing unused selectors. Eliminated over 80% of CSS. Upgrading jQuery & FA 2014-08-20 14:10:36 -04:00
spf13 34a93fa1f3 Fixing the docs sidebar interactions 2014-08-20 13:13:51 -04:00
spf13 04d412ed16 Fixed showcase image paths 2014-08-20 11:17:38 -04:00
Joel Scoble cece27fa2e fix issue 411, /path/to/site/archetypes : is a directory error 2014-08-19 22:30:21 -04:00
spf13 e31d460909 Bringing back the showcase 2014-08-19 21:47:38 -04:00
spf13 b047e2f880 Removing redundant bootstrap 2014-08-19 21:46:27 -04:00
spf13 864f91d90e Changing the docs template partials to be able to be used to render a section 2014-08-19 21:28:37 -04:00
spf13 aae1ff3c92 Adding IsNode & IsPage functions to Page & Node 2014-08-19 21:27:13 -04:00
Joel Scoble b10dea2955 added evaluation for toml for metadataformat date handling 2014-08-18 12:01:50 -04:00
Franklin Wise 27c0ec3163 Added a note after the script adding potential issues per @franklinwise's feedback 2014-08-18 11:58:49 -04:00
Franklin Wise 5ae2832713 errors not propagating 2014-08-18 11:43:55 -04:00
Andrew Gerrand 634d7b2638 switch to new location of goyaml 2014-08-18 11:31:55 -04:00
Tatsushi Demachi 002a5b6756 Add 'where' template function 2014-08-18 11:31:17 -04:00
Rahul Bansal 6e15f652bd Added yaml menu example
Added yaml menu example, matching with existing toml example. Also added link to sitewide config page.
2014-08-18 11:30:00 -04:00
Rahul Bansal 5d8ac54f73 Config changes and Live Reload
I noticed that config file changes do not work with Live Reload feature. This may be "fixed" in future but for now adding a note might avoid confusion.
2014-08-18 11:28:42 -04:00
Roberto Dip 09115a9623 Fix #394 - Docs: add a missing link to the livereload page in the intro 2014-08-18 11:24:53 -04:00
Franklin Wise e9b47da081 hugo builds no site if there are only drafts
if you run:
hugo
and all of your posts are drafts, no site gets build.
2014-08-18 11:21:45 -04:00
spf13 3e9fc47ad2 Adding more press 2014-08-10 00:17:36 -04:00
David Kebler cbb29795c3 Docs-removed bullet and broken link for catagetories. Included category text in bullet for taxonomies 2014-08-09 23:31:28 -04:00
Roberto Dip b3130b52f3 Fix #363 - Docs: make the fixed menu on the left scrollable 2014-08-09 23:21:33 -04:00
Nate Finch 1778f28c87 remove extraneous "Because" 2014-08-06 05:39:58 -04:00
Nate Finch f556cb4414 update docs for permalinks with all fields
List all the fields and what they mean, based on hugolib/permalinks.go
2014-08-06 00:05:40 -04:00
Nate Finch 29c45dd690 make type-or-section more obvious
It took me a long time to realize that /layouts/TYPE or SECTION/LAYOUT.html  was supposed to be a single URL and not two urls (/layouts/TYPE) or (SECTION/LAYOUT.html) ... putting in the hyphens I think makes it much more clear it's all one URL, and only the middle part is an either-or.
2014-08-06 00:05:05 -04:00
Nate Finch 756be987d3 Merge pull request #388 from GraemeCaldwell/patch-2
Update press.md
2014-08-05 13:13:09 -04:00
GraemeCaldwell d8b78c3da2 Update press.md 2014-08-05 17:19:56 +01:00
Nate Finch 2850692a76 Merge pull request #370 from kevinburke/its
it's/its
2014-08-05 11:13:27 -04:00
Kevin Burke 657e4a46e8 it's/its 2014-07-26 23:43:21 -07:00
spf13 bf9595aa24 Fixed #328. Config file set appropriately. 2014-07-01 10:59:58 -04:00
spf13 8d3fa7ef49 Getting rid of bad scrollbar 2014-06-30 23:41:53 -04:00
Billie H. Cleek aa42f4309c allow site to be built with empty content
Build the site even if there isn't anything in the content directory.
2014-06-30 15:28:18 -04:00
Billie H. Cleek 73dd4f38d0 report errors
Modify CheckErr and StopOnErrErr to report the error if there aren't any
other messages.
2014-06-30 15:26:40 -04:00
Nicholas Whittier 78962a14f8 Allows 404 templates from themes/THEME directories. 2014-06-30 15:22:52 -04:00
Nicholas Whittier ac99ceccac Add shortcode template loading from themes directory. 2014-06-30 15:22:18 -04:00
Kristoffer Grönlund 35d04671d3 Add PluralizeListTitles option (default true) to allow disabling use of the inflect package 2014-06-30 15:21:09 -04:00
Gina White 3eb480a62f fix link to template primer 2014-06-30 15:20:03 -04:00
Maarten Everts b76719744d taxonomies -> Taxonomies 2014-06-30 15:19:28 -04:00
Rolando Pereira 836b1800f9 Fix minor typo in file docs/content/templates/overview.md 2014-06-30 15:18:46 -04:00
Gour 0e57e32f54 do not use angle brackets in hyperlink labels 2014-06-30 15:16:30 -04:00
Andrew Jones 5969315c8f switch back to master blackfriday; enable footnotes 2014-06-30 15:14:42 -04:00
Michael Whatcott 406233f052 Included instructions for omitting disqus comments on localhost. 2014-06-30 14:55:42 -04:00
jesper-mortensen 86c3de4be1 Fix #263, document HTML comments & IE conditionals 2014-06-30 14:51:30 -04:00
spf13 b2b7ba4243 fixing typo in docs 2014-06-30 14:49:24 -04:00
spf13 4483a6655a Centralizing the template execution logic in one place 2014-06-06 17:27:31 -04:00
spf13 c297d7451f Adding 'partial' template function to add theme / local awareness to the partials directory. 2014-06-06 16:15:19 -04:00
spf13 4e99d6b54c Adding proper error message when view is not found.. fixing #303 2014-06-04 12:33:27 -04:00
spf13 640ab3c72e fixed #303. Adding theme support to views 2014-06-03 17:53:00 -04:00
Jake Mitchell e0ea6b9955 Support embedding <script> tags in markdown pages 2014-06-03 15:14:38 -04:00
Abe Pazos 7b7ce11787 Add empty line to correctly render a list 2014-06-03 15:09:53 -04:00
spf13 ca18cfef24 Setting new version 2014-06-03 14:39:46 -04:00
spf13 05875153bc Converting front matter to YAML 2014-05-29 18:45:22 -04:00
spf13 2b90779f0f Actually bumping the version 2014-05-29 18:45:21 -04:00
spf13 a3d6e7c46f Fix docs script and css references to refer to the correct location 2014-05-29 18:45:21 -04:00
spf13 012823a32a Update menu documentation to be accurate 2014-05-29 18:45:21 -04:00
spf13 b9bba2b977 Updating Convert to handle dates properly for yaml and json
Fix bug with YAML & JSON with handling dates with 'new' and 'convert'
2014-05-29 18:45:19 -04:00
spf13 0c2544608c Add future details to documentation 2014-05-29 01:02:43 -04:00
spf13 c502f078bc Add handling for publishDates (which will be ignored if in the future). Fixed #260 2014-05-29 00:48:40 -04:00
Rinat Abdullin 4ebaec8906 Include Section Taxonomy into SiteInfo
This allows to build more complex pages, like :
http://martinfowler.com/tags/
2014-05-28 19:31:50 -04:00
spf13 35a605976e SiteInfo is now a pointer on the Node 2014-05-28 19:11:54 -04:00
spf13 7a8b754cad Fixed #301. LiveReload works on any port now. 2014-05-28 19:01:24 -04:00
spf13 4076d77029 Simplifying the siteInfo handling 2014-05-28 18:37:59 -04:00
Phil Pennock 280df4e380 Fix Viperized .Site.Params
git bisect identified 62dd1d4 as the breaking commit; when
github.com/spf13/viper was introduced, the Params field was always
empty.

Given a map in YAML in Viper, the return type is
`map[interface{}]interface{}`, _not_ `map[string]interface{}`, even if
`.SetDefault()` has been called with an item of
`map[string]interface{}{}` so the cast assertion on the `.Get("Params")`
always failed.
2014-05-28 18:15:23 -04:00
Lorenzo Bolla e98f0014f2 Allow to use filename in permalinks 2014-05-28 17:59:49 -04:00
Dan Hersam d65061dffb Adding TechMadePlain to showcase
Thanks to Hugo I get to write all my posts in Markdown.
2014-05-28 17:58:31 -04:00
Rolando Pereira 79767f5617 Fix links to GitHub repo for spencerlyon2/hugo_gh_blog
Hello,

The `github_pages_blog.md` tutorial mentioned links to the git repository of "spencerlyon2/hugo_gh_blog" however it was linking to the page itself (i.e. http://spencerlyon2.github.io/hugo_gh_blog ).

This commit replace those links with links to https://github.com/spencerlyon2/hugo_gh_blog
2014-05-28 17:58:11 -04:00
spf13 1ba63f15c8 Make the header not jump around 2014-05-28 17:54:54 -04:00
spf13 2a44ca543b More doc site improvements. Added documentation's new layout 2014-05-28 01:37:33 -04:00
spf13 79dd1d02b4 Fixing bug with Live Reload where it broadcast instead of sending the handshake 2014-05-27 18:35:12 -04:00
spf13 57ad3abe7b Pre and Post in Menu are type HTML 2014-05-27 18:34:29 -04:00
spf13 a87f171bd4 Updating / Rewriting / Adding all of the documentation in preparation for the next release 2014-05-27 18:32:57 -04:00
spf13 aeb06c7bcc Rename chrome to partials (in builder) 2014-05-27 18:30:25 -04:00
spf13 9173022ea7 Set verbose to Info level 2014-05-27 18:29:55 -04:00
spf13 e799100395 Fix bug so watch works on theme directories as well 2014-05-27 18:29:15 -04:00
spf13 6b8244ba67 new site works in an empty directory now 2014-05-19 09:16:40 -04:00
spf13 df4bbcef30 Adding instant click library to docs so even more responsive navigation 2014-05-16 17:51:10 -04:00
spf13 be1ee22032 Proper integration of live reload with automatic injection 2014-05-16 17:49:27 -04:00
spf13 60ed5bda2b Live reloading is working! Still need to incorporate cleanly. 2014-05-16 11:48:59 -04:00
spf13 296d218e67 Better handling of when the specified port is already in use 2014-05-15 17:41:03 -04:00
spf13 b520f8852d Switching docs highlighting to highlight.js .. Docs build super fast again! 2014-05-15 09:58:55 -04:00
spf13 b198cb26ba Renaming indexes to taxonomies in docs 2014-05-15 09:57:36 -04:00
spf13 a4a1e39a51 Fixing issue when two menu items have the same name. 2014-05-14 18:08:11 -04:00
spf13 4f75ec985d Homepage renders with _default/list.html or then _default/single.html when index.html is not present. 2014-05-13 17:07:50 -04:00
Dato Simó 025a37df2f Fix permalink functionality, which was broken in 62dd1d4.
Viper stores Permalinks as a map[string]interface{}, so the type assertion
to PermalinkOverrides (map[string]PathPattern) will always fail.

We can, however, get Permalinks as a map[string]string, and convert each
value to a PathPattern.
2014-05-12 15:47:52 -04:00
Dato Simó 05b76dcb6f Add a blank line after the front matter when writing back a page.
Could also be done in parser.InterfaceToFrontMatter(), but logically the
extra blank line belongs to the page, not the front matter itself.
2014-05-12 15:46:58 -04:00
Vincent Batoufflet 73cbefdbc8 Make template comparison functions handle floats 2014-05-10 15:38:18 -04:00
Vincent Batoufflet 667a047cea Fix date issue with home page in Sitemap 2014-05-10 15:33:18 -04:00
Dato Simó 0053be979a Correctly print server URL when base-url is specified in the command line
When running hugo server like:

    $ hugo server -s docs -b myhostname

the printed output now directs to http://myhostname:1313 instead of
(invariably) http://localhost:1313.

As per server(), BaseUrl is never empty, and the required value is always
found in Viper.
2014-05-09 23:27:21 -04:00
LK4D4 2194cc77de Add pygmentsstyle and pygmentsuseclasses options
Fixes #204

Conflicts:
	commands/hugo.go
2014-05-09 23:20:11 -04:00
Vincent Batoufflet 5df0cf7eca Add Sitemap documentation content 2014-05-09 23:11:48 -04:00
Vincent Batoufflet 35926dcf37 Add Sitemap testing 2014-05-09 23:11:42 -04:00
Vincent Batoufflet 6049c3a10c Update Sitemap default value syntax 2014-05-09 23:11:37 -04:00
Vincent Batoufflet 2a902bbca6 Add Sitemaps config values handling 2014-05-09 23:11:33 -04:00
Vincent Batoufflet f8e675d064 Add base Sitemap support 2014-05-09 23:11:27 -04:00
Vincent Batoufflet 179225449c Add template comparison functions (Go 1.1 compat) 2014-05-09 22:42:28 -04:00
Marc Liyanage 4e0208d448 Doc fix: replace "hugolibs" with "hugo" in "contributing" page, fixes #271. 2014-05-09 11:36:16 -04:00
Nathan LeClaire c38d694f56 Change some typography in the docs.
Two issues are addressed with this commit:

1. Some <pre> tags were inheriting the "Serif" font on Linux, causing
"code"-ish stuff to appear with proportional-width font instead of
monospaced-width font.
2. Font stack with "Helvetica Neue" ... has been changed to default to
sans-serif instead of "Serif", this produces a more consistent and
friendlier look on Windows in particular.
2014-05-09 11:33:22 -04:00
spf13 ec4b152678 Fixing broken link. Fixed #278. 2014-05-09 11:32:06 -04:00
spf13 9b192e6793 Adding more information about client side highlighting 2014-05-09 00:03:42 -04:00
Dave Cottlehuber bc9f69e7c5 Add client-side syntax highlighting example 2014-05-08 23:45:33 -04:00
spf13 6b9d4a93da Adding new commands (new site [path], new theme [name]) 2014-05-08 18:30:58 -04:00
spf13 be3e5592dc Adding an archetype file for the docs site 2014-05-02 01:06:40 -04:00
spf13 28ffb92b36 Adding the new command and the create package 2014-05-02 01:06:01 -04:00
spf13 08c30b6e44 Using new helpers in page.go 2014-05-02 01:04:48 -04:00
spf13 bff1f1e689 Adding some new methods to helpers (GuessSection, MakeTitle & Filename) 2014-05-02 01:04:14 -04:00
spf13 ef2ad4d91f More feedback where errors happen during metadata conversion 2014-05-02 01:02:49 -04:00
spf13 6d9a2d2497 adding a front matter format to lead rune method 2014-05-02 01:01:44 -04:00
spf13 fb7d45e613 permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00
spf13 3395e1cb92 Adding a command that enables converting site to a different metadata format.
Doing this revealed some bugs in the encoding functionality in some of the underlying libraries.
Please backup before using.
2014-05-01 13:23:32 -04:00
spf13 859a78e1bd Providing the ability to save (write) a content's source file. 2014-05-01 13:21:37 -04:00
spf13 1302ef9f63 Making site page initialization a bit more granular and accessible 2014-05-01 13:20:58 -04:00
spf13 cbd9506c29 moving front matter parsing (and creation) to parse package 2014-05-01 13:20:09 -04:00
spf13 58f8b43fee moving writeToDisk to helpers to make it more accessible 2014-05-01 13:13:11 -04:00
Christoph Burgdorf f271faea06 Don't process dotfiles
This commit makes it so that not only files
but also folders which start with a dot
are ignored.

Fixes #239
2014-04-26 23:17:54 -06:00
Ciaran Downey 5581e33a34 Update broken localhost link 2014-04-26 23:08:39 -06:00
William McGann 96b6ae81eb Adding example blog 2014-04-26 23:05:41 -06:00
LordFPL b52e946381 Little syntax mistake 2014-04-26 23:03:20 -06:00
tummychow 2e954d8551 Fix permalinks to subdomains
If you don't have access to the root domain of your site (eg a GitHub project
page) and you try to generate custom permalinks, they must begin with a slash.
Go's URL resolution library sees the leading slash and thinks "this URL starts
at the root", just like a filesystem - so it discards your subdomain and maps
all custom permalinks from the root of your site. Fine if you control the root
domain, not so useful if you don't.

Removing the check for a leading slash fixes this problem. You can now specify
custom permalinks that do not start with a slash, and they will map safely
regardless of what subdomain you upload the generated site under.

Tests have been updated for this commit so that they continue to function.
2014-04-26 23:01:28 -06:00
spf13 bdf7cd9f9d Creating site menu configuration and have the docs site use it 2014-04-24 16:11:08 -06:00
spf13 ac82fe32af Making active parent in nav reflect when child is active page in docs 2014-04-24 10:34:50 -06:00
spf13 ef87dffb2f Fix accidentally removed line from menu template. 2014-04-24 10:28:11 -06:00
spf13 4f813c09ea Fixing some bugs introduced in prior few commits. Tests now pass. 2014-04-24 10:18:47 -06:00
spf13 11fe227b9e Implementing new menu system in the docs site 2014-04-23 03:00:11 -04:00
spf13 9ecf58e29b new menus system including active link & nesting 2014-04-23 02:59:19 -04:00
spf13 69c1944f1f Add handling of deeply nested front matter 2014-04-23 02:55:43 -04:00
spf13 4a8de8ea46 Add Disqus support out of the box. Move template/bundle into hugolib. 2014-04-23 02:53:12 -04:00
spf13 41adafbc3e Updated to work with the latest viper 2014-04-10 14:24:18 -04:00
spf13 8afff8c7c4 Preliminary Theme Support 2014-04-10 08:10:12 -04:00
spf13 c0a046cbfb Added internal rss.xml template and config option to turn off rss creation 2014-04-09 17:45:34 -04:00
spf13 bb9bcdcf30 Add more information to the siteInfo (and configuration options) for better RSS generation. 2014-04-09 17:15:52 -04:00
spf13 93bcddebb3 Renamed Indexes to Taxonomies. Old template and config parameters still work. 2014-04-09 17:15:04 -04:00
spf13 aae6fa0b6b Fix test to not fail when order is different, but slice contents are the same. 2014-04-08 21:57:25 -04:00
spf13 be37c0b37a Adding more articles to press page. 2014-04-08 21:41:01 -04:00
spf13 bd022534bc Adding Params to node for easy template access of page.params without throwing errors. 2014-04-08 21:40:38 -04:00
spf13 c8269d6dbc Making node.Keywords the correct length 2014-04-08 21:40:03 -04:00
Michael D. Johas Teener 4161d542ce Misc doc fixes
* Pygments links and requirements for installation.
  * Fix to link to additional template functions in release notes for
v0.10
2014-04-08 11:30:11 -04:00
spf13 d1c500c124 Adding Press page to hugo docs 2014-04-07 23:47:21 -04:00
spf13 af1acfbce7 writing indexes under more configuration conditions 2014-04-07 23:29:35 -04:00
spf13 ad34be9d77 strip trailing baseurl slash. Added a new template function "sanitizeurl" which ensures no double slashes. Fixed #221 2014-04-07 22:02:08 -04:00
ojan a6170154cf add: yslow-rules showcase 2014-04-07 11:44:51 -04:00
spf13 9a83f7a01b Fixing all tests to pass with new Viper Config 2014-04-07 11:44:51 -04:00
spf13 62dd1d45c1 Hugo config abstracted into a general purpose config library called "Viper".
Hugo casting now in own library called "cast"
2014-04-05 01:40:33 -04:00
Stephen Eglen a01056b98a typos in mathjax.md
Fix some typos.
2014-03-31 14:31:39 -04:00
Spencer Lyon a7ca39ccd7 ENH: added tutorial for hosting a blog on github pages 2014-03-31 14:26:58 -04:00
Zach Chadwick 2e4158b0b4 added appliance.cloudshark.org to showcase
also cleaned up thumbnail view to not show source link if unavailable
2014-03-31 13:35:15 -04:00
spf13 e50b9d8ac1 Adding support for logging & verbose logging. Consolidation of error handling. Integration of jWalterWeatherman library. Fixed #137 2014-03-31 13:23:34 -04:00
Spencer Lyon 2fa3761ec9 DOC: added tutorial for using MathJax with Hugo 2014-03-24 15:11:54 -04:00
Nate Finch c02a02070f change golang to go 2014-03-24 14:34:41 -04:00
Tim Heaney 5ee0a3b9a1 Typo: s/executible/executable/ 2014-03-24 14:33:16 -04:00
spf13 895fe536fd Adding a few more logos and powered by/made by images. 2014-03-24 14:32:38 -04:00
spf13 f733e70e80 Adding apple touch & favicon meta links 2014-03-24 14:32:03 -04:00
spf13 51b078a703 Homepage update. New Logo. Minor site updates. 2014-03-20 21:51:14 -04:00
spf13 6205a16b6e Fixes #227 by properly scoping the variables within the go routine. 2014-03-13 20:34:47 +01:00
Alexandre Normand 85c04ca2f3 Add Tutorial With Steps to Migrate from Jekyll. 2014-03-13 12:23:33 +01:00
spf13 7135d897a2 Optimizing thumbnail & preview images 2014-03-13 12:07:22 +01:00
Alexandre Normand 17fdf7d604 Add www.heyitsalex.net to Community Showcase. 2014-03-13 12:02:14 +01:00
GuoJing 1b3525d638 fix typo of readme 2014-03-13 12:01:00 +01:00
Alex Dunn 38131837ba clearer pseudo command in quickstart doc
- previously it was ambiguous between the actual Step 1 and the "step 1" of the steps *within* Step 2 ("Clone into the hugo repository")

- also fixed a typo I guess
2014-03-13 11:59:36 +01:00
Ruben d5c58b457f Order ByTitle and ByLinkTitle added
Added documentation for new order possibilities
2014-03-13 11:39:19 +01:00
Ruben eec0e512f9 Add sort pages by Title and by LinkTitle
Sorting can now be done on Title and on LinkTitle
2014-03-13 11:39:13 +01:00
spf13 3dfb475136 Parallelizing the largest build processes (templates, pages, indexes). Seeing 300%+ improvement of total build time. 2014-03-05 23:48:42 -05:00
Joe Kopena d84f707da1 Also ignore Emacs lock & recovery files. 2014-03-04 22:07:40 -05:00
spf13 3a0ab5a3dd Bumping version to v0.11-dev 2014-03-04 22:03:31 -05:00
spf13 0447c7598b Adding the right date for the release of 0.10 2014-03-01 12:16:36 -05:00
spf13 0a775650b5 bumping version for 0.10 2014-03-01 11:55:05 -05:00
Mike Keesey 2540d884d8 Fixing issues go vet reports. 2014-03-01 09:56:17 -05:00
Ask Bjørn Hansen 2c0ded7f9f Add test for ignoring ~$ files 2014-02-28 23:24:09 -05:00
Ask Bjørn Hansen e53bc948a5 Ignore content files ending in ~
Also add *~ to .gitignore
2014-02-28 23:23:59 -05:00
Ask Bjørn Hansen 0becad727a Make error message when encountering unrecognized file extensions more helpful 2014-02-28 22:11:41 -05:00
Ask Bjørn Hansen ea8d0981d5 Make per-page url overrides take precedence over section permalink settings
This seems more reasonable to me.

I didn't understand why the pUrl comparision was on len > 2; I changed it to 0.

Closes #212.
2014-02-28 11:55:37 -05:00
Kieran Healy 732b5d42b2 Add Kieran Healy's website. 2014-02-28 11:50:19 -05:00
spf13 ae954d5165 updating the intro page 2014-02-28 11:41:47 -05:00
spf13 14227351fa Reorganization of helpers. Centralized Url/Path logic. Fixed #175. 2014-02-27 20:33:18 -05:00
spf13 64572d2d60 Shortcode cleanup. Added a ton of tests. Much more flexible with input. Doesn't crash with bad input. Fixed #193
Also added the .Get function to short codes and documentation for that function.
2014-02-25 23:57:31 -05:00
spf13 dc068ccb87 Fix imports so hugo builds on darwin 2014-02-21 18:33:46 -05:00
spf13 8fe78f6ff5 A bunch of small documentation changes 2014-02-21 09:48:37 -05:00
spf13 de05a0d942 Adding documentation on Pretty Urls 2014-02-20 19:04:29 -05:00
spf13 e74d1b8607 Adding documentation on Table of Contents functionality 2014-02-20 19:04:08 -05:00
spf13 30e804eee5 Adding an introduction to Hugo 2014-02-20 19:03:37 -05:00
Ask Bjørn Hansen 82fdfa2c72 Warn about bad shortcode parameters (and don't crash)
closes #193
2014-02-20 06:54:56 -05:00
spf13 5cff3e6219 Adding Else If example 2014-02-19 09:24:04 -05:00
Ask Bjørn Hansen ed0fe9ddf7 Make 'read a string' code understand float64 (json) and int (yaml) as well as actual strings 2014-02-18 18:44:56 -05:00
Ask Bjørn Hansen b41622bc49 Allow 1/0 for true/false in Yaml front-matter 2014-02-18 18:44:47 -05:00
Ask Bjørn Hansen e4af4f652e Support ISO8601 date/time format without timezones 2014-02-18 18:44:40 -05:00
Ask Bjørn Hansen 0bfe9276c2 Make the invalid date/time format error message more helpful 2014-02-18 18:44:32 -05:00
Ask Bjørn Hansen 1dbed5ee06 Call the json delimiter 'json_lead' instead of 'java_lead' 2014-02-18 18:44:27 -05:00
mattn 8ebb85f1f7 Fix build 2014-02-18 18:40:55 -05:00
spf13 1bead0ed7a Adding Documentation on using Syntax Highlighting 2014-02-18 18:35:45 -05:00
spf13 56dfdfe86c Adding Documentation on Hugo Template Functions 2014-02-18 18:35:27 -05:00
spf13 bf6407759b Minor Docs Tweaks 2014-02-18 18:35:03 -05:00
spf13 8008675983 Adding Go Template Tutorial 2014-02-18 18:34:51 -05:00
spf13 dca7a90181 Updating Release Notes and Roadmap 2014-02-18 18:34:29 -05:00
spf13 75c260fa1c Only change rLimit on OSX (where it is needed). Fixed #194 2014-02-06 00:12:05 -05:00
Anton Ageev 11ca84f8cb Add unicode support for aliases, indexes, urlize template filter.
Now aliases and indexes are not restricted ASCII letters and can include
any unicode letters.
2014-02-05 11:49:57 -05:00
Ant Zucaro 24ffe04360 Add Ant Zucaro's showcase.
A photography-oriented blog using Foundation 5 by Zurb. Responsive
layout with padded large and full-width small views. A sample
"polaroid" shortcode is included for image showcases, as is a
"header" image directive in the frontmatter.
2014-02-05 11:46:53 -05:00
Luke Holder 5cfb690e31 Fix docs error with json comma 2014-02-03 13:50:28 -05:00
Anton Ageev 72ba6d633d Fix permalink bug in uglyurls mode (refs #187). 2014-02-02 00:56:01 -05:00
spf13 3e87d7a86e Automatically increase the process ulimit to maximum available. fixes #168. 2014-02-01 12:51:11 -05:00
spf13 ae9cc09b04 Adding the ability to check the system limit on open files (important for watching large sites) 2014-02-01 12:50:17 -05:00
Niels Widger c1b9380dfd Add back blackfriday extensions during Markdown conversion
Modified markdownRender and markdownRenderWithTOC in hugolib/page.go to
use the same flags and extensions as were previously used when we simply
called blackfriday.MarkdownCommon to convert Markdown to HTML.  These
flags/extensions were dropped during the refactor that added the
`.TableOfContents` page variable, and caused features like Markdown
tables to no longer work.

Modified the expected output for TestTableOfContents in page_test.go,
apparently changing the flags/extensions caused an `&mdash;` to become
`&ndash;`.
2014-01-30 23:04:37 -05:00
Tibor Vass 6dd2e9a49a gofmt all go code 2014-01-29 18:03:35 -05:00
Vincent Batoufflet ff9f6e1b2a Fix panic with HTTP serve initialization problems. 2014-01-28 23:44:43 -05:00
Vincent Batoufflet 0ce6f05f59 Add text transformation template functions. 2014-01-28 23:44:23 -05:00
spf13 18b9948f1e Using table of contents within the documentation. 2014-01-28 23:29:05 -05:00
spf13 1882ffabc6 Adding support for boolean params 2014-01-28 23:24:59 -05:00
spf13 1da3fd039a Continue with TOC integration and page refactor. Updated a few tests to match new generated output. 2014-01-28 23:11:05 -05:00
spf13 f45c6bc38a Moved TOC test into page_test. Some general page_test cleanup. 2014-01-28 23:09:24 -05:00
spf13 9666f33e2f Don’t render short codes on summary twice 2014-01-27 17:32:36 -05:00
spf13 f82c645b33 fixing 178. 2014-01-27 17:20:35 -05:00
spf13 d0825a211a Big refactor of pages code. Changed TOC code to only parse when actually used 2014-01-27 17:20:20 -05:00
Niels Widger f62e3e9940 Add new TableOfContents Page variable (Markdown only)
Added TableOfContents field to hugolib.Page struct.  New function
getTableOfContents is used in convertMarkdown to set the TableOfContents
field.

Added new test file hugolib/page_toc_test.go with a simple test of the
new functionality.

Conflicts:
	hugolib/page.go
2014-01-23 17:27:08 -05:00
spf13 4f1807c7a7 Replacing hall of fame with showcase. (new type, content driven, thumbnails, etc) 2014-01-22 17:16:09 -05:00
spf13 9564e6e9d8 Adding support for some primitive template math functions 2014-01-22 17:06:23 -05:00
Andrew Codispoti 0e013b5291 add andrewcodispoti.com to hall-of-fame 2014-01-22 15:24:11 -05:00
spf13 3851117c25 renaming MinRead to ReadingTime and adding to documentation. 2014-01-21 20:08:24 -05:00
spf13 50a7f97a62 Updating page variable documentation (for templates). 2014-01-21 20:07:55 -05:00
spf13 f0634ec059 fixed #171. RSSlink is now RSSLink (and matches existing docs).
Added backwards compatibility accessor for existing templates.
2014-01-18 22:16:19 -05:00
spf13 ae15ff0968 Fixing test which erroneously checked values and order, rather than just values. 2014-01-18 21:26:34 -05:00
spf13 44186c6af1 Extending rss item limit to 50… can reduce further in template with ‘first N’ functionality. 2014-01-18 21:18:54 -05:00
spf13 fa2e58fd4a Have travis build with latest go. 2014-01-18 11:05:50 -05:00
spf13 cb04053385 RSS improvements, now limit to 15 items and provide accurate date. fixed #172 2014-01-18 11:05:50 -05:00
spf13 303be735fb Adding github button to docs homepage 2014-01-18 11:05:50 -05:00
Steve Francia c51d040e3d Adding Werker status to readme 2014-01-15 11:06:41 -05:00
Steve Francia 845d09763a Create wercker.yml 2014-01-15 11:02:24 -05:00
Brandon Philips f8243624e4 feat(docs/hall-of-fame): add ifup
Add me! Thanks for hugo, working great.
2014-01-13 10:06:32 -05:00
Phil Pennock 438c219892 Add canonifyurls config option.
Be able to inhibit AbsURL canonicalization of content, on a site
configuration basis. Advantages of being able to inhibit this include
making it easier to rendering on other hostnames, and being able to
include resources on http or https depending on how this page was
retrieved, avoiding mixed-mode client complaints without adding latency
for plain http.
2014-01-13 10:06:12 -05:00
spf13 2ff108fcb7 Add highlighting of code in documentation and clean up a bunch of the docs. 2014-01-10 21:29:58 -05:00
spf13 13b5c10dd7 Rewriting some homepage text 2014-01-10 21:29:58 -05:00
spf13 74d7ae1f8f A bunch of style updates. Switching to bootstrap carousel. 2014-01-10 21:29:58 -05:00
spf13 01da9a40e6 Report error, but don’t fatally stop if pygments has error. Return original string. (+1 squashed commit)
Squashed commits:
[849a7af] if highlighting doesn’t work, just return original string
2014-01-10 21:28:48 -05:00
spf13 3fd6c1a24e Adding some embedded short codes (including code highlighting) 2014-01-10 21:27:32 -05:00
spf13 13b067b506 Adding support for embedded templates 2014-01-10 21:27:32 -05:00
spf13 f78e2cb854 Removing Twitter js 2014-01-10 21:27:32 -05:00
spf13 a70acd110e New Icon Font for Hugo 2014-01-10 21:27:32 -05:00
Steve Francia 247db151fa Adding some analytics 2014-01-03 12:58:09 -05:00
Dana Woodman b82baa285b Adding chimeraarts.org to hall-of-fame
I've added the website for the makerspace I founded into the hall of fame list as an example of what you can do with Hugo.

It's a work in progress (like everything) but should show people another example of using Hugo in the real world.

Hugo has made it much easier to update our website content without needing to use bloated or expensive tools.

Thanks!
2013-12-31 22:45:47 -05:00
Krisztián Szabó 5550c4148e Added append-port flag 2013-12-28 22:01:36 -05:00
William King e5aa08ff0c If baseurl is set then print that on the command line, else leave as default of localhost
Conflicts:
	commands/server.go
2013-12-28 14:02:10 -05:00
Egon Elbre 8b84156f87 Example of a multilingual site. 2013-12-28 13:48:15 -05:00
spf13 8055838c70 Allowing empty files (ignored) so you can touch a new file while watching 2013-12-28 13:47:34 -05:00
Egon Elbre 1c60d5bf20 Don't shutdown hugo on an empty file. 2013-12-28 13:47:21 -05:00
Egon Elbre 8d80f9b39e Added batching behavior for page building.
Quite often file watcher gets many changes and each change triggered a
build. One build per second should be sufficient. Also added tracking for
new folders.
2013-12-28 13:46:52 -05:00
Egon Elbre 1979f7d9c7 Avoid locking the files for an extended amount of time. Sublime Text
doesn't like this and shows an error when modifying a file in rapid
succession.
2013-12-28 13:46:09 -05:00
Egon Elbre e46148f948 Fix static file change detection on Windows.
Fixed windows uses different filepath separator. The filepath.ToSlash
shouldn't be used, because it can cause errors in filepath suffix and prefix
testing since "c:\a" isn't a prefix of "c:/a/b/c".
2013-12-28 13:45:38 -05:00
spf13 065928fcf0 Adding page sorting by weight function (the default) 2013-12-28 12:56:12 -05:00
spf13 34ac562ce4 Added documentation on ordering indexes, content and content within indexes 2013-12-20 18:11:49 -05:00
spf13 70745e8cb5 Complete refactor of indexes, move (and rewrite) page sorting to page.go, add tests 2013-12-20 09:10:05 -05:00
Henry 6aa3e51228 Added PageSorter and PagesByDate 2013-12-16 17:55:37 -05:00
Ruben c7083a5d36 Section in example was wrong for happiness.md 2013-12-16 17:43:53 -05:00
Ruben 950d9f55a5 Testcases for multilevel structure were wrong 2013-12-16 17:43:53 -05:00
Ruben de670ced86 Fixes #141: Wrong section in multi level structure 2013-12-16 17:40:33 -05:00
Caleb Spare 6da23f7449 Gofmt
Command: `gofmt -l -s -w .`
2013-12-16 17:40:10 -05:00
Matt Way 1abc2f0b86 properly use non-localhost BaseUrl in server command 2013-12-16 17:39:59 -05:00
spf13 a10519643d Adding better contribution guidelines from the read me to the contribution page. 2013-12-10 22:34:13 -05:00
spf13 dd574628a0 Adding community section to the documentation 2013-12-10 22:34:13 -05:00
spf13 ceb708052a Adding selected tweets to the homepage 2013-12-10 22:34:13 -05:00
spf13 f09505a657 Adding example short codes to the documentation 2013-12-10 22:34:13 -05:00
Noah Campbell 6410965b97 Add go fmt to contribution guidelines
Also fixed up formatting.
2013-12-07 20:51:34 -08:00
Noah Campbell 357ab956ea Add Contribution Guidelines
Fixes #122
2013-12-07 20:48:17 -08:00
spf13 0e04b9a029 Moving processing short codes to the page 2013-12-06 23:57:24 -05:00
spf13 d0ef3d43bd better handling of detecting markup format 2013-12-06 23:56:51 -05:00
spf13 f432b187a0 render shortcodes prior to converting to html 2013-12-06 23:32:00 -05:00
spf13 a45de56db1 adding support for shortcodes with opening and closing tags 2013-12-06 23:14:54 -05:00
spf13 db29f57cc4 Adding (source code) Highlight template helper 2013-12-05 09:43:49 -05:00
spf13 fa29e94edb Adding Pygments helper 2013-12-05 09:42:29 -05:00
spf13 44d57fdc0c Reorganize helpers 2013-12-05 09:29:41 -05:00
David Arroyo 10c7cf2942 Create directories in publishdir with mode 0777.
The previous permissions (0764), were unusable (directories must
be executable) when generating files for use by another uid. The
Right Thing™ is to use mode 0777. The OS will subtract the process
umask (usually 022) to the for the final permissions.

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-12-02 16:06:31 -08:00
David Gay ba5dadff79 Typo fix in docs.
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-11-23 20:41:54 -08:00
Valeri Karpov 32d9345bba Fix a minor typo in types.md
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-11-23 08:49:08 -08:00
Javed Khan b351731f72 quickstart docs - fix flag needs arg error
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-11-23 08:47:25 -08:00
Tim Esselens 860f982cc4 fixed trailing dir slash when using slug
See testcase, dir + slug contained double slash when dir had a trailing
slash.

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-11-20 15:32:22 -08:00
Phil Pennock e425226a28 Documentation updates, mostly for my bits
* extras/permalinks.md added, weighted to third in the extras menu
* examples added to layout/go-templates.md, using `.Site.Params`
* mention `.Site.Params` in layout/variables.md
* update meta/release-notes.md to mention `first` and the permalinks
* update overview/configuration.md to use reserved-for-documentation
  domains and with another example, nudging towards permalinks and site
  parameters, with three different data-types shown for the latter

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-11-18 15:51:31 -08:00
Phil Pennock 07978e4a49 configurable permalinks support
A sample config.yaml for a site might contain:

```yaml
permalinks:
  post: /:year/:month/:title/
```

Then, any article in the `post` section, will have the canonical URL
formed via the permalink specification given.

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-11-18 13:32:56 -08:00
spf13 4f335f0c7f Updated release notes. 2013-11-15 23:47:53 -05:00
spf13 445b7d23fb Updating docs to include ‘first’ functionality for the homepage 2013-11-15 21:45:52 -05:00
spf13 aedfa6a2c4 Version bump 0.9 2013-11-15 21:43:46 -05:00
spf13 ad2c0b5616 Homepage now has all content available, use sorting and first to control rendering 2013-11-14 09:37:58 -05:00
spf13 13fa7cb748 lowercase template function first to be consistent with all other template functions 2013-11-14 09:32:49 -05:00
Michael D. Johas Teener 50d9046b64 remove initialization loop error from compile
copied HugoCmd to a local var, initialize that variable in the init
func, and then use the local var in the InitializeConfig func.
2013-11-12 17:36:23 -06:00
Phil Pennock 40d05f12a7 Truncated; .Site.Params; First function
* Add `.Truncated` bool to each page; will be set true if the
  `.Summary` is truncated and it's worth showing a "more" link of some
  kind.
* Add `Params` to the site config, defining `.Site.Params` accessible
  to each page; this lets the site maintainer associate arbitrary data
  with names, on a site-wide basis.
* Provide a `First` function to templates:
  * Use-case: `{{range First 5 .Site.Recent}}` or anything else which
    is a simple iterable provided by hugolib
* Tests by me for `.Truncated` and `First`

Also @noahcampbell contributed towards this:

* Add UnitTest for `.Site.Params`:
> Digging into this test case a bit more, I'm realizing that we need
> to create a param test case to ensure that for each type we render
> (page, index, homepage, rss, etc.) that the proper fields are
> represented.  This will help us refactor without fear in the
> future.

Sample config.yaml:

```yaml
title: "Test site"
params:
  Subtitle: "More tests always good"
  AuthorName: "John Doe"
  SidebarRecentLimit: 5
```

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-11-12 22:49:54 +00:00
spf13 6017599a3c restored behavior of respecting config values unless set by command flags. fixed #116 2013-11-12 09:38:43 -05:00
Noah Campbell ef595aedfc Handle schema-less urls when apply absurl
Fixes #114
2013-11-09 14:35:09 +00:00
spf13 90a902c843 fixing double slash during absurlify 2013-11-09 01:33:00 -05:00
spf13 b69694a3ae Merge branch 'master' of github.com:spf13/hugo 2013-11-09 01:17:40 -05:00
spf13 532e2e7b93 Some mobile and other fixes for docs 2013-11-09 01:16:34 -05:00
Steve Francia 0b6a11c9e3 Merge pull request #113 from oyvindsk/master
minor documentation fix
2013-11-07 16:33:06 -08:00
Øyvind Skaar adc559b09f minor documentation fix 2013-11-07 19:47:42 +01:00
Noah Campbell ad04f6c899 Adding baseline 2013-11-05 22:51:40 +00:00
Noah Campbell 86233c00a0 Remove the hugo-nav function
Remove the hugo-nav since it relied on a slow library.  The current
build reimplements the absurl functionality based on string replace.
Discovered that my prior implementation missed the requirement for
making absolute paths (/path) absolute with the host, whereas a relative
path is left untouched.  Updated the test cases to support this if this
is reimplemented.
2013-11-05 22:28:06 +00:00
Noah Campbell 1cebce12ad Adding RSS test case.
Checks to make sure the xml document starts with <?xml.  Previously, the
html translate package would write additional details into the document
that caused it to fail.
2013-11-05 07:03:02 +00:00
Noah Campbell b22364570b Fix Test Name 2013-11-05 06:39:50 +00:00
spf13 1fbcaf9279 Buffers instead of pipes 2013-11-05 00:28:08 -05:00
spf13 226bc8f59f Updated release notes 2013-11-05 00:24:04 -05:00
Noah Campbell 23a5711d26 Fix benchmark panic
Need to initialize the Config with InitializeConfig().
2013-11-01 20:36:11 -07:00
spf13 23a711a29a Hugo updated to work with latest cobra 2013-11-01 18:43:41 -04:00
Noah Campbell 9af47f07d3 Improve rendering time
50% speedup.  Fix #91

to run the benchmark:

		go test -test.run=NONE -bench=".*" -test.benchmem=true ./transform/ > new.txt

to compare the results:

		/usr/local/go/misc/benchcmp baseline.txt new.txt

Speedup and memory improvements

		benchmark             old ns/op    new ns/op    delta
		BenchmarkChain           101219        50453  -50.15%
		BenchmarkTransform        51625        45531  -11.80%

		benchmark            old allocs   new allocs    delta
		BenchmarkChain              222          103  -53.60%
		BenchmarkTransform          135          106  -21.48%

		benchmark             old bytes    new bytes    delta
		BenchmarkChain            23919        10998  -54.02%
		BenchmarkTransform        11858        10665  -10.06%
2013-11-01 09:59:57 -07:00
Noah Campbell f4cb8e1688 Adding benchmark for transformation module. 2013-11-01 09:59:57 -07:00
Noah Campbell 789aa6ad76 Removing check for directory: static, layouts
Removed these checks so a single file in content can generate a site.

For example, given a site with a content directory and an index.html,
running hugo -s dir will generate a project without any more input.
2013-10-31 16:06:24 -07:00
spf13 861472bea5 Small tweaks to Homepage and CSS 2013-10-31 09:51:42 -04:00
spf13 1d0d280e20 Addition of an indexes section to the docs. Updated most of the existing index content. 2013-10-31 09:51:13 -04:00
spf13 a7dae30a8f More work on indexes 2013-10-31 09:49:29 -04:00
spf13 bc7c9221f3 Better mobile support on docs site 2013-10-26 02:28:25 -04:00
spf13 90355eec79 Big visual overhaul of the docs. Docs now using indexes for all menu generation. 2013-10-26 02:18:14 -04:00
spf13 df0523ff7f Flipping around weight order. higher weight at the bottom. use negative to pin to top. 2013-10-26 00:20:48 -04:00
spf13 5003f7f7af Docs menu now powered by indexes.. converting some of the content to use this. 2013-10-25 18:42:46 -04:00
spf13 d20b41a2cf Big index overhaul. Now supporting ordering tokens by count or alphabetically. Also made full indexes available to the Site variable. 2013-10-25 18:40:55 -04:00
spf13 9388f23606 Adding support for linkTitles 2013-10-25 18:37:53 -04:00
spf13 b580a25d1f Better error handling when rendering error found when in watch mode
In watch mode it should continue to watch for changes, in any other mode it should exit with a -1 error code so can check for success when scripting
2013-10-25 18:03:14 -04:00
spf13 764abd2067 Update homepage 2013-10-24 16:49:17 -07:00
spf13 dde965a5cd Migrate docs to Bootstrap 3.0 2013-10-24 16:49:01 -07:00
spf13 cd71eb7389 Watching doesn't built site 2x on write (ignores rename events). Also ignores temporary files written by editors. 2013-10-24 16:45:24 -07:00
spf13 a5606b06ca Adding support for ordering content in indexes by other than date (weighted indexes) 2013-10-24 15:24:47 -07:00
spf13 471fb1ff69 Adding support for date field in front matter as date (as TOML provides) 2013-10-24 15:18:57 -07:00
spf13 f3c816eabd Adding support for more front matter types (int, float & date) 2013-10-24 14:31:04 -07:00
spf13 3558e3d6f0 Add support for weighted pages
Now pages can be sorted by other than date
2013-10-18 11:01:31 -04:00
spf13 90090175f8 Adding preliminary support for weighted indexes (for ordering by other than date) 2013-10-17 23:57:25 -04:00
spf13 678ddef46a Adding a quick start guide to hugo docs 2013-10-17 22:53:04 -04:00
spf13 4d333e81ee New Homepage for Hugo 2013-10-17 22:52:28 -04:00
spf13 4263094d75 Adding support for MinRead. Closed #106 2013-10-15 09:32:21 -04:00
spf13 be5ace1588 Wordcount restored. fixed #92 2013-10-15 09:15:52 -04:00
spf13 e58d8fe791 fixed #95, fixed #93 2013-10-09 23:38:51 -04:00
spf13 f5fda80486 simplified buildSite & better error handling around it 2013-10-09 19:14:26 -04:00
spf13 0318f7c149 Clean up server & build site logic. Fixed #94 2013-10-09 18:53:46 -04:00
spf13 e6ace71fec server command now builds prior to serving 2013-10-09 18:24:40 -04:00
Noah Campbell 4993152dda Permalink to include multiple directories levels 2013-10-08 18:44:15 +02:00
Noah Campbell 6e1268f45b Test case for permalink functionality 2013-10-08 18:44:15 +02:00
Noah Campbell 895638433e Adding back the hugo homepage.
Deleted the page accidentially
2013-10-08 18:44:15 +02:00
Noah Campbell 9500ec1b6b Refactor layout selection code
The render code path would use a fallback if there was an exception.
This change instead relies on explicit declaration of the layout to use
and includes a check to see if the layout indeed exists before
attempting to render it.
2013-10-08 18:44:15 +02:00
Noah Campbell 197aacb647 Add support for Relative Permalinks 2013-10-08 18:42:03 +02:00
Noah Campbell 06da609138 Refactor Permalink to private function
This will allow for reuse of this particular function.
2013-10-08 18:42:03 +02:00
Noah Campbell 6fa6f69a4a Change transformer order 2013-10-08 18:42:03 +02:00
Noah Campbell d712d6f331 Moving transformation on a per-page level 2013-10-08 18:42:03 +02:00
Noah Campbell 9032a228b0 Better handle missing layouts
Panic is too extreme.  Instead the library will write out a message in
verbose mode.
2013-10-08 18:42:02 +02:00
Noah Campbell 54a2790fce Use io.Pipe for chaning render tasks.
Also clean up logic for finding layouts.
2013-10-08 18:42:02 +02:00
Noah Campbell 689cda1740 Code cleanup 2013-10-08 18:40:41 +02:00
Noah Campbell 19cb6c7819 Move writing next to rendering
All render(Thing) calls have a WritePublic call directly after it.  This
refactor creates one function that makes the specific call sequence.
2013-10-08 18:40:40 +02:00
Noah Campbell 2176d2c197 Reducing scope of RenderThing* 2013-10-08 18:37:50 +02:00
Noah Campbell ff8b52758d Move in memory target into target module. 2013-10-08 18:37:50 +02:00
Noah Campbell 80009b427f Change the order of Apply to be more Unixy
Typically the destination is on the left and the src is on the right.
2013-10-08 18:37:50 +02:00
Noah Campbell 94a3184ad0 Fixing up source code formatting. 2013-10-08 18:37:50 +02:00
Noah Campbell 5a66fa3954 Chain transformers and test cases
Transformers can now be chained together, working on the output of the
previous run.
2013-10-08 18:37:50 +02:00
Noah Campbell eb117eb904 Move AbsURL into seperate file 2013-10-08 18:37:49 +02:00
Noah Campbell f0211b84a1 Rename Transform to AbsURL 2013-10-08 18:37:49 +02:00
Noah Campbell 03d1a57fea Set the name of the Nav attribute to select 2013-10-08 18:37:49 +02:00
spf13 5e14af957a Proper handling of 404 page return value 2013-10-07 09:24:13 -04:00
spf13 7468292c4e Fixing bug where RSS for site was rendered in wrong location 2013-10-07 09:23:42 -04:00
spf13 d829e05036 Fixing bug where only the first index list was created. 2013-10-07 09:07:14 -04:00
spf13 2aaf92b515 Summary can now contain short codes when using <!--more--> to define end of summary. 2013-10-04 16:07:24 -04:00
spf13 be7ba0e98f server defaults to localhost unless overridden by command line flags 2013-10-04 16:03:13 -04:00
spf13 266f583a8c Restoring former snippet behavior & adding test to ensure future behavior 2013-10-04 12:28:28 -04:00
spf13 dcfcbac589 Enabling Nitro ('--stepAnalysis') again. Fix #58 2013-10-03 09:44:45 -04:00
spf13 18f2b82658 Switching to the rjson library which is more friendly to human generated json. 2013-10-01 22:45:24 -04:00
spf13 48e1068e3e fixed #85 2013-09-30 22:40:15 -04:00
spf13 8efb90ebd5 Updating usage documentation to new interface 2013-09-30 22:39:06 -04:00
spf13 3ae8dda203 Restoring build and watch functionality 2013-09-30 22:38:32 -04:00
Kyle Mahan aa9b9d596e minor documentation cleanup.
- changed it's -> its where appropriate.
- added post/ parent directory above happy/ to the organization examples

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-09-29 19:50:25 -07:00
windch 8ce4bc7ab8 Update filesystem.go
bugfix: .Files() called twice in line 253, 256 in site.go. thus source files captured twice.

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-09-29 19:43:38 -07:00
spf13 94d7fe52f8 Change the interface to use commands and flags instead of just flags.
Better organization of main (controller style) code.
2013-09-29 02:10:29 -04:00
spf13 92cff05582 go fmt so code 2013-09-29 02:10:29 -04:00
spf13 ff2b98c9dd Better error message when no source content is found. 2013-09-29 02:10:29 -04:00
Noah Campbell f34ea6108d Add the ability to set navbar li class to active
First cut at doing post html processing.  This utility can be used to
mark pages as active.
2013-09-28 23:05:16 -07:00
Noah Campbell db50154e75 Support index.html indexes in content directory
If a file named index.html exists in a directory, or root, it will be
rendered as if ugly urls are turned on.  This allows for top level
content to not need a supporting layout file and content in content.
This change should not affect anyone who is using the perscribed way.

I also cleaned up a bunch of one off functions in site.go.
2013-09-24 21:27:25 -07:00
Noah Campbell 4250bf8e30 Fixes #80 - Homepage now renders correctly
I mistakenly make RenderHomePage a NOP.  Bad programmer.
2013-09-24 14:41:21 -07:00
Noah Campbell c9223cfd7b source: Fix failing build on windows
The +build directive was not being picked up.  Apparently needs a space
after the +build line.
2013-09-24 14:36:22 -07:00
Noah Campbell 8df88496e2 Fix breaking test cases on unix platform
Rename platform parameter file to agnostic name. Both darwin and linux
can share the same paramters.
2013-09-20 20:08:52 -07:00
Noah Campbell bffe4baf42 Create a TargetPath() method that provides OutFile
Moved the generation of the target path to the page breaking all
dependecies on Site.
2013-09-20 17:24:25 -07:00
Noah Campbell 52e8c7a0ac Section is determined by the source, not the url
This change allows for top level html content to exists.
2013-09-20 17:03:43 -07:00
Noah Campbell 784077da4d Fix fragments being AbsUrlified in final html
Found that fragments were getting the BaseURL applied creating a proper
anchor url and redirecting off the page.
2013-09-18 15:48:36 -07:00
Noah Campbell 311e102223 Allow non-markdown content in content directory
Allow content that is not markdown and does not need to be rendered to
exists in the content directory.  Currently any valid html or xml
document can exist.  Templates are applied to these documents as well.
If you need to have content that doesn't have templates or AbsUrlify
like operations, then continue to put this content in static and it will
be copied over.
2013-09-18 14:21:27 -07:00
Noah Campbell 5374242ff7 More expressive --check output 2013-09-18 11:52:30 -07:00
Noah Campbell c510140c0c Add renderer information to --check
Now reports if the page will be rendered or not and by which render
engine.
2013-09-18 10:27:56 -07:00
Noah Campbell 67b2abaf09 Add IsRenderable to Page
As pages are read from the target, they will be assessed if they should
be rendered or not.  The logic for IsRenderable is in the parser/page.go
and looks for anything exception '<'.
2013-09-18 10:17:43 -07:00
Noah Campbell d8e1834910 Fix parsing edge case of frontmatter
When the frontmatter contains a - (or other delimiter) close to the
closing frontmatter delimiter, frontmatter detection would fail.
2013-09-18 09:15:46 -07:00
Noah Campbell a82efe5bb1 Merge remote-tracking branch 'origin/parser' into mrg_praser
Also brought in parse for github.com/noahcampbell/akebia

Conflicts:
	hugolib/page.go
	hugolib/page_test.go
2013-09-17 15:52:40 -07:00
Noah Campbell 6b0752e8c0 Move AbUrlify to post content transformation
Currently the a@href and script@src elements will have BaseUrl applied
to their elements prior to being written to disk.
2013-09-17 14:16:06 -07:00
Noah Campbell c6fe87b14e Add a transform step
This allows for the manipulation of the DOM.  This is expected to be
applied after the templates are rendered.
2013-09-17 13:04:28 -07:00
Noah Campbell c75da346e1 Fix alias documentation.
Fixes #79
2013-09-13 16:06:39 -07:00
Noah Campbell 172ff5ea7a Initialize HTMLRedirectAlias before ShowPlan()
Without it, no alias information is generated when running --check
2013-09-13 15:06:37 -07:00
Noah Campbell d45fb72f67 Add /index.html to unadorned alias paths
Bring code to be better in line with documentation.
2013-09-13 14:51:28 -07:00
Noah Campbell 803a0fce1e Remove RenderedContent from page.
The output is written directly to disk after being written.  Not
entirely sure why it was split into two steps.
2013-09-13 10:30:27 -07:00
Noah Campbell 2ebfb33fe0 Move alias logic to target module
I want to move all logic to writing aliases to target so I can pave the
way for writing aliases specific to other runtimes (like .htaccess for
apache or a script for updating AWS or symlinking on a filesystem).
2013-09-12 21:20:00 -07:00
Noah Campbell 2f10da1570 Move alias rendering to target 2013-09-12 16:18:30 -07:00
Noah Campbell 74b55fc7c8 Normalize paths within hugo
filepath was used inconsistently throughout the hugolib.  With the
introduction of source and target modules, all path are normalized to
"/".  This simplifies the processing of paths.  It does mean that
contributors need to be aware of using path/filepath in any module other
than source or target is not recommended.  The current exception is
hugolib/config.go
2013-09-12 10:48:59 -07:00
Nelson Silva 998b2f73f8 Added safeHtml template function 2013-09-10 17:19:45 -04:00
Noah Campbell 6274aa0a64 Homepage "/" respects PublishDir
It wasn't taking the value of PublishDir into consideration for the
special case of the homepage "/".

Fixes #75
2013-09-05 09:57:25 -07:00
Noah Campbell 610c06e658 Introduce source.Filesystem
This provides an abstraction over how files are processed by Hugo.  This
allows for alternatives like CMS systems or Dropbox, etc.
2013-09-04 22:42:52 -07:00
Noah Campbell d4d9da9f3a Remove page module dependence on opening files
The site is responsible for reading files, page only operates on
buffers.
2013-09-04 19:36:06 -07:00
Noah Campbell cb00917af6 Expand the ShowPlan functionality 2013-09-03 20:52:50 -07:00
Noah Campbell 4004687fb2 Move to target.Filesystem
Moving the ugly urls logic to the target.  There is still UglyUrl logic
in page for the permlink but this is dealing with the generate of urls.
2013-09-03 20:01:55 -07:00
Noah Campbell 7919603fb5 Add Translate to target
Translate handles Ugly Urls.
2013-09-03 20:00:22 -07:00
Noah Campbell c6ad532b94 Add file reporting to planner 2013-09-03 20:00:22 -07:00
Noah Campbell 13d2c55206 Adding Planner 2013-09-03 20:00:21 -07:00
Noah Campbell 79d9f82e79 Code reorg, helpers.go has been decomposed.
It started with wanting to move templates in template bundles and the
rest followed.  I did my best to start grouping related functions
together, but there are some that I missed.  There is also the method
Urlize that seems to be a special function used in both worlds.  I'll
need to revisit this method.
2013-09-03 16:16:07 -07:00
Noah Campbell 207d8fb7af Date rendering unit tests in pages
Tests to ensure rendering dates in templates is working correctly.
Actually, I was running into invalid templates not giving warnings when
I was trying to render a date.
2013-09-03 14:51:06 -07:00
Noah Campbell 3ecc698f5e Remove hugolib.HTML and hugolib.URL types
These types were not be rendered correctly by the html/template package.
Removing them gets the correct behavior.

Fixes #74
2013-09-03 12:43:56 -07:00
Noah Campbell a591a10626 Include building hugo docs as part of test.
If the building of the doc fails, tarvis will fail.  This will help with
pull requests.
2013-09-03 11:29:43 -07:00
Noah Campbell d841d522f1 Include building hugo docs as part of test.
If the building of the doc fails, tarvis will fail.  This will help with
pull requests.
2013-09-01 20:03:10 -07:00
Fabrizio (Misto) Milo ba82a20321 Add support for amber files
If a layout file ends with .amber it will interpreted as a Amber file

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-09-01 19:51:32 -07:00
Fabrizio (Misto) Milo ee5865f239 Abstract html/template dependency
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-09-01 19:51:27 -07:00
Fabrizio (Misto) Milo 0a9dc705f3 Use s everywhere for consistency
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-09-01 19:51:21 -07:00
Noah Campbell b268e639ba Return an error (other than 0) when ./hugo fails
Being a good OS citizen so folks can compose hugo into their tool chain.
Also helps with git bisect run.
2013-09-01 11:39:32 -07:00
Mark Sanborn 6c8e7edbb4 The <!--more--> (summary divider) now works even if it is on the same line as content
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-09-01 07:44:29 -07:00
Noah Campbell 4349216deb Small code cleanup 2013-08-31 20:00:57 -07:00
Noah Campbell 0fdea0c2c2 Return an error with WritePublic 2013-08-30 21:24:25 -07:00
Noah Campbell 097b782a80 Removing site.Directories.
Please revert if this is used somewhere.
2013-08-30 21:13:50 -07:00
Noah Campbell b14b61af37 Externalize the writing of content to a target
Introducing the target module in hugo.  This provides the simple
interface for writing content given a label (filename) and a io.Reader
containing the content to be written.

If site.Target is not set, it defaults back to the original behavior of
writing to file system.

In hugolib/site_url_test.go I have an InMemoryTarget for testing
purposes and use it to see if the final output of a render matches.
2013-08-30 20:45:42 -07:00
Noah Campbell bc3c229002 Ensure Section is set before returning Page object. 2013-08-30 20:13:22 -07:00
Noah Campbell c32f401b15 Revert "Return errors when rendering"
This reverts commit e66ba5d2a7.

Fixed #69
2013-08-30 20:08:13 -07:00
Noah Campbell a792ec09ce Cleanup formatting - go fmt ./...
Remember to run go fmt ./... before committing.  Looks sternly in mirror
2013-08-30 14:39:12 -07:00
Mark Sanborn 4ed43e8076 Fixed bug where Url specified in front matter as pretty url wouldnt render
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-08-30 14:39:11 -07:00
Daniel Alan Miller 71678a7183 Adding .Summary to page variables
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-08-29 10:08:03 -07:00
Fabrizio (Misto) Milo 3ab5245049 clean up logic
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-08-28 20:39:58 -07:00
Ross Lawley 1bb00b8c19 Refactored added RenderThingOrDefault and tests
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>

Conflicts:
	hugolib/site.go
2013-08-27 12:40:53 -07:00
Noah Campbell 554375b2ad Using new parser. 2013-08-25 20:27:03 -07:00
Hugo Duncan 1de1992664 Return any error reported by RenderHomePage
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-08-23 16:55:40 -07:00
Ross Lawley 9930011ea2 Wordpress summaries
Allow full control of summaries which can be rendered as html rather
than text.  Using a `<!--more-->` html comment in your markdown / rst
you can indiciate where the summary should end and have the summary
converted to html.

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>

Conflicts:
	hugolib/page_test.go
2013-08-23 16:46:19 -07:00
Ross Lawley 7b1f0960e3 Add 404.html for gh-pages
Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-08-23 16:38:35 -07:00
Noah Campbell f28a8fa0c2 RenderThing test cases
Provide unit test support RenderThing.

One observation is that creating the site.Tmpl variable is a one time
event.  site.Tmpl doesn't like additional templates with the same name.
This means that updating a template while in --watch mode requires
throwing away the entire Site object and creating a new one.  Not that
this is a bad idea, but it is something I discovered while working on
these unit tests.
2013-08-23 16:21:28 -07:00
Noah Campbell 9d15262ee5 Test cases for ignoreDotFile
Meant to commit this earlier, but it's a basic unit test.
2013-08-23 14:57:21 -07:00
Noah Campbell 0fabd51ab1 Update .gitignore to ignore *.swo files
For the fellow vim user.
2013-08-23 14:57:21 -07:00
Noah Campbell 7461ed63ae Fix benchmark so the buffer is read each time.
The bytes.Buffer was exhausted after the first read.  Creating a new
reader each invocation catpures the correctly timing.
2013-08-23 14:16:37 -07:00
Noah Campbell 599e6672f7 Removing GetSection
Using GetXXX is not idiomatic to Go.  Also added a bunch of unit testing
around this method.
2013-08-23 14:14:54 -07:00
Noah Campbell ae7112977d Skip "dot" files in layout
As a vim user, .filename.swp files pop up.  This change prevents hugo
from reading those files.
2013-08-23 13:58:52 -07:00
Steve Francia eb4288e3cd Merge pull request #53 from hugoduncan/feature/print-error-on-invalid-index
Print error if index value in a page is wrong type
2013-08-20 20:56:33 -07:00
Steve Francia 00839567c7 Merge pull request #52 from rozza/StaticSync
Static changes shouldn't be destructive to existing files
2013-08-20 20:55:56 -07:00
Steve Francia 35b35a7004 Merge pull request #51 from cabello/patch-3
Remove extra quotes from meta data
2013-08-20 20:54:51 -07:00
Steve Francia 6f424175bf Merge pull request #50 from cabello/patch-2
Check .Prev and .Next pointers before using it
2013-08-20 20:54:31 -07:00
Steve Francia 3d0dc1acb1 Merge pull request #49 from cabello/patch-1
Fix broken link to Index page
2013-08-20 20:54:06 -07:00
Hugo Duncan 301d2bafcd Print error if index value in a page is wrong type
This was causing a panic with no information displayed about the
page causing the error.
2013-08-20 16:39:26 -04:00
Ross Lawley 5aa47a7b07 Static changes shouldn't be destructive to existing files
Currently changing css deletes all the site published html when it copies.
Refs #46
2013-08-20 20:32:32 +01:00
Danilo Cabello 8415c5e6c7 Remove extra quotes from meta data 2013-08-20 13:52:51 -04:00
Danilo Cabello acd5ea0e75 Check .Prev and .Next pointers before using it 2013-08-20 12:13:27 -04:00
Danilo Cabello 8058abd707 Fix broken link to Index page 2013-08-20 11:56:55 -04:00
Steve Francia eff8457ac9 Merge pull request #46 from rawfalafel/sync_static
Sync files that have changed in the static directory
2013-08-19 05:32:36 -07:00
rawfalafel 2dcdd67378 Watch StaticDir and sync to PublishDir on change
New behavior adds a special case for file changes inside the static directory to fsync PublishDir
2013-08-19 01:17:37 -04:00
Steve Francia c4bcdebc59 Merge pull request #44 from cactus/avoid-redirect-with-slugs
avoid possible redirects with non-ugly slug urls
2013-08-17 21:04:51 -07:00
Steve Francia e2744d403c Merge pull request #43 from hugoduncan/feature/allow-xhtml-aliases
Enable aliases from .xhtml paths
2013-08-17 21:04:14 -07:00
Steve Francia 2542836bbc Merge pull request #41 from rozza/skipStatic
Skip Static directory if its in your content directory
2013-08-17 20:59:07 -07:00
spf13 8f330626bc Merge branch 'noahcampbell-index_reporting' 2013-08-17 23:53:35 -04:00
Noah Campbell c713beba4d Formatting cleanup 2013-08-17 23:52:16 -04:00
Noah Campbell ec821739bc Removing the use of slash
An oversight on my behalf.  The FromSlash method is used when writing
out the public file name.  There is one place where the slashes are
required which is setting the output file.  I replaced those instances
with filepath.Join which should do the right thing depending on the OS.
2013-08-17 23:46:57 -04:00
Noah Campbell 8eca8f8aa0 Detect missed index from front matter 2013-08-17 23:45:03 -04:00
Noah Campbell e66ba5d2a7 Return errors when rendering 2013-08-17 23:45:03 -04:00
spf13 0a79edd48a Removing extra links on homepage 2013-08-17 21:54:39 -04:00
spf13 3ae8078d3a Adding "fork me on github" banner 2013-08-17 21:54:39 -04:00
spf13 8c0ab4def1 Complete overhaul of the docs 2013-08-17 21:54:39 -04:00
Steve Francia b76b80c564 Merge pull request #40 from VonC/clarify_uglyurls_flag
Clarify uglyurls flag.
2013-08-17 06:35:31 -07:00
elij b9e835b101 avoid handling a redirect from slug to slug/
because the url lacks a trailing /, many webservers will issue a
redirect to the canonical url with trailing slash for directory index
w/index.htm(l).
Append a slash to avoid this.
2013-08-16 13:14:20 -07:00
Hugo Duncan 23a98ad05c Enable aliases from .xhtml paths
When redirecting an alias from a .xhtml path, served with default content type,
a redirect only works if the html element has a xmlns attribute.  This adds the
attribute when the alias path ends in .xhtml
2013-08-16 00:29:46 -04:00
Ross Lawley 0f143dcf14 Skip Static directory if its in your content directory
Allows organisation where all source files are in one directory:

```
`config.yaml`:

contentdir: "source"
staticdir: "source/static"
...

 .
	└── source
		├── post
		|	├── firstpost.md	// <- http://site.com/post/firstpost.html
		|	└── secondpost.md	// <- http://site.com/post/secondpost.html
		└── static
			└── css
				 └── site.css	// <- http://site.com/css/site.css
```
2013-08-15 20:05:46 +01:00
VonC 9308cd6a7a Clarify uglyurls flag.
Mention more clearly that, for generating `/filename.html`, you need to
set the `uglyurls` flag to `true`.
2013-08-14 16:47:17 +02:00
spf13 3c3fc45d3c Merge branch 'master' of github.com:spf13/hugo 2013-08-14 10:19:59 -04:00
spf13 480e01eb15 Further work on path/section stuff. Tests passing now. 2013-08-14 08:57:14 -04:00
Steve Francia 7a51a8a5a3 Merge pull request #38 from noahcampbell/workflow_dotfile
Workflow dotfile
2013-08-13 20:03:18 -07:00
spf13 b4bcc591e4 Now support for nested paths. Better section detection. 2013-08-13 19:39:24 -04:00
spf13 6e27239485 Merge branch 'master' of github.com:spf13/hugo 2013-08-13 10:47:58 -04:00
Steve Francia ca5a94a988 Merge pull request #37 from noahcampbell/master
Test GetParam and the various incarnations of frontmatter.
2013-08-13 07:44:43 -07:00
Steve Francia c661d9803e Merge pull request #31 from cactus/issue-31
sanitizeRegex chopping dots
2013-08-13 07:44:00 -07:00
spf13 ec02fa4bdd Adding support for a default content type template
default template found at layouts/_default/single.html
2013-08-13 09:23:43 -04:00
spf13 8968524900 Adding support for recent content. 2013-08-13 08:43:42 -04:00
Noah Campbell 97eb9225a7 Ignore dotfiles in content directory
This supports my personal workflow of using vim which places a temporary file in the same directory as the file I'm editing.
2013-08-12 20:40:52 -07:00
Noah Campbell 5664780cca gofmt pass
Clean up test files.
2013-08-12 20:40:34 -07:00
Noah Campbell 2d11d1bd67 Test GetParam and the various incarnations of frontmatter. 2013-08-12 20:25:32 -07:00
elij 31a1ade1b4 move "dot" in regex to avoid it being part of a range 2013-08-12 19:55:52 -07:00
Steve Francia c689d46aa1 Merge pull request #32 from cactus/issue-32
indexes rss.xml has wrong permalinks with ugly urls off
2013-08-12 19:42:44 -07:00
elij b13afc4178 fix sanitizeRegex to not strip "dots"
sanitizeRegex was stripping dots in permalinks when generating
RenderIndexes (noted during feed/rss generation).

permalink was being set to `.../indexxml` instead of `.../index.xml`.

Adding "dot" to the regex whitelist fixed the issue.
2013-08-12 19:02:43 -07:00
elij 023567b05e fix bad tab/space due to paste 2013-08-12 19:01:23 -07:00
elij 2f9b582dbe fix wrong renderlist feed permalink
when not using ugly urls, the feed permalink does not end up in the
expected location, and instead always behaves as if using ugly urls.

this fixes that behavior and inserts the feed xml file into the
directory as index.xml.

fixes #32
2013-08-12 19:00:29 -07:00
Steve Francia cb39f052d1 Merge pull request #36 from noahcampbell/master
Use / for template names regardless of platform.
2013-08-12 15:36:06 -07:00
Noah Campbell 8c03141307 Use / for template names regardless of platform.
The path seperator was causing templates to not be loaded on windows.
Now all template names use / internally.
2013-08-12 15:03:06 -07:00
Steve Francia ec1a3a8db9 Merge pull request #35 from noahcampbell/master
Address the time parsing issue.
2013-08-12 14:43:56 -07:00
Noah Campbell 3fdcd0ba7c Support for non-standard formats.
Forgot to include existing formats.  Integration tests include new
format.
2013-08-12 14:35:39 -07:00
Noah Campbell 0305c82513 Move timezone tests to integration test.
Interacting with timezones will result in checks against the filesystem.
This access, by definition, is an integration test.  Creating a
*integration_test.go file will signify this change.

When interacting with Travis-ci.org, the ubuntu boxes plus go 1.1 do not
seem to support shortcode timezones, think PST.  In this case, the tests
are skipped.  This is not ideal, but the IRC #go-nuts channel has
indicated timezone support is still lacking.  We should advise users of
hugo that timezone support may be an issue and report any odd behavior.
The workaround is to use numeric timezones (-08:00 for PST, etc.)
2013-08-12 12:04:04 -07:00
Noah Campbell f610d45cd8 Add additional details to date test cases. 2013-08-12 09:14:30 -07:00
Noah Campbell dd19d0cc77 Provide better support for various date formats.
Fixes #30 as long as the date is well formatted.
2013-08-12 09:14:29 -07:00
VonC 17aafb39dd Avoid error if no content.
The homepage should still be generated.
This is useful especially in the beginning, where you start just with
the homepage.
2013-08-12 14:31:39 +02:00
Steve Francia 5b3b0f9556 Merge pull request #26 from noahcampbell/master
Add support for continuous testing.
2013-08-11 07:23:08 -07:00
spf13 0233708907 Started new release notes, added nitro step for aliases 2013-08-10 15:44:22 +01:00
spf13 ac26de205e Adding correct canonical link to alias pages 2013-08-10 15:41:10 +01:00
spf13 d5518c0966 Adding support for aliases (redirects) 2013-08-10 15:35:34 +01:00
spf13 45ce6e2b30 Merge branch 'redirect' of https://github.com/rozza/hugo into rozza-redirect
Conflicts:
	hugolib/page.go
2013-08-10 14:08:38 +01:00
Noah Campbell bb273df4cd Add support for continuous testing.
Using travis-ci.org
2013-08-09 18:34:51 -07:00
spf13 733c0207cb Merge branch 'master' of github.com:spf13/hugo
Conflicts:
	hugolib/site.go
2013-08-10 02:07:35 +01:00
Steve Francia 2bf24877a6 Merge pull request #25 from noahcampbell/master
Internal API changes and introduce testing.
2013-08-09 18:01:51 -07:00
Noah Campbell 2bbecc7bc8 Better reporting when the template is missing. 2013-08-09 17:36:32 -07:00
Noah Campbell 309db474c7 Nitro timer is encapsulated.
Remove the need for NewSite by relying on appropriate defaults.  Renamed
site.c to site.Config to allow Sites to be created outside the package.
2013-08-09 17:36:32 -07:00
Noah Campbell e26b43f6d9 Adding more test cases 2013-08-09 17:36:32 -07:00
Noah Campbell e67db666c8 Adding benchmark for parsing pages using unicode.
The resulting comparsion is not equal because NewPage reads the file each time where ReadFrom just reads a buffer in memory.
2013-08-09 17:36:32 -07:00
Noah Campbell 085ce15f7c Adding ability to read from io.Reader
This allows for testing without relying on the file system.  Parsing algorithm to not read the entire file into memory.
2013-08-09 17:36:32 -07:00
Noah Campbell 274d324c8b Introduce unit testing for page.go 2013-08-09 17:36:32 -07:00
Noah Campbell fa55cd9857 Remove unreachable code path. 2013-08-09 17:36:32 -07:00
Noah Campbell 0595f27e6d Using a composite literal to create a page.
Wonder why the need for composite structs.  Not sure if my go knowledge is lacking or if this is cruft from other programming language doctrine.
2013-08-09 17:36:32 -07:00
Noah Campbell 19538a1bd6 Support pages without folders 2013-08-09 17:36:31 -07:00
Noah Campbell fc5e92cc24 Provide better error handling
Change the method signatures to follow the check ok pattern.
2013-08-09 17:36:31 -07:00
Ross Lawley e2a28114d1 Add redirect to page parameters and redirects example 2013-08-09 21:57:22 +01:00
Steve Francia 4f17ad69a7 Merge pull request #22 from nsabine/master
Added examples to indexes.md
2013-08-09 02:16:10 -07:00
Steve Francia 7a13434dd9 Merge pull request #21 from duncanbeevers/master
Added .Content variable to docs
2013-08-09 02:15:50 -07:00
Nick Sabine a8b3e1537f Added examples to indexes.md 2013-08-09 00:10:35 -04:00
Duncan Beevers 04a0dbbf73 Added .Content variable to docs 2013-08-08 16:13:03 -07:00
Steve Francia 6a5e4b363a Merge pull request #20 from VonC/version
Make sure hugo --version prints the version and does *nothing* else.
2013-08-08 15:52:50 -07:00
VonC 49b8ac5fbc Make sure hugo --version prints the version and does *nothing* else.
Any program, when asks to print their version, only prints that, and then
stops.
hugo checks the config (and prints a warning message if not found), and
proceeds to generate the site!
Yet, the user just wanted to check the version.

This patch makes sure hugo stops after printing the version.
2013-08-08 22:21:56 +02:00
spf13 a870f4d955 Fixing missing trailing slash in baseUrl 2013-08-08 12:30:01 +01:00
Steve Francia d89c7ec7a2 Merge pull request #19 from nsabine/master
Populated page Site metadata.  Enables accessing Indexes from Page template.
2013-08-07 14:05:07 -07:00
Nick Sabine 780e2f311b Populated page Site metadata. Enables accessing Indexes from Page template. 2013-08-07 14:23:24 -04:00
Steve Francia 42de9bd8bb Merge pull request #15 from hhatto/update-doc
update document for content directory
2013-08-06 08:05:18 -07:00
spf13 0e57fcc9c2 Merge branch 'master' of github.com:spf13/hugo 2013-08-06 01:10:10 +02:00
spf13 783f0d6154 fixing badlink on homepage 2013-08-06 01:06:59 +02:00
spf13 6789b6c5ce removing erroneous debugging output 2013-08-06 01:05:50 +02:00
Hideo Hattori 78afe8d344 update document for content directory 2013-08-06 03:14:40 +09:00
Steve Francia c5715e9800 Merge pull request #12 from imrehg/docfix
Fix example in docs that wouldn't work in practice
2013-08-05 07:13:42 -07:00
Gergely Imreh f31ec3c280 Fix example in docs that wouldn't work in practice
The pflag package used in hugo has to use the "=" sign
for double dash options such as --source. Thus the original
example `--source ~/mysite` is already incorrect. Adding
the = sign though woul not fix things in this case, since
`--source=~/mysite` does not get resolved to /home/username/mysite,
but looks for the ./~/mysite directory within the current directory.

To resolve this, either the directory name has to be changed in
the docs not to use the "~" sign, or have to change to use the
single dash version of the command line flag. The latter seems
to be more in line with the rest of the example.

Leaving `--watch` as a double dash option to minimize the change,
though it could be either way, since the follow up example uses
the single dash version of both.
2013-08-05 21:45:01 +08:00
spf13 de9f9ae16e Fixing getting started link. 2013-08-05 11:12:39 +02:00
Steve Francia 57b206ca11 Merge pull request #11 from noahcampbell/master
Removing OSX files from repo.  Updating .gitignore to not track these files
2013-08-03 07:29:16 -07:00
spf13 f6e590e536 Fixing link to contributor page on github 2013-08-03 03:33:39 -04:00
spf13 6a1a038c57 Shrinking the readme to just the basics to avoid dupe with doc site 2013-08-03 03:31:25 -04:00
spf13 6efbd93a38 Updating a bunch of the docs 2013-08-03 03:30:34 -04:00
spf13 def5f10183 Including documentation on indexes 2013-08-03 03:29:49 -04:00
spf13 dff86cb22c Renaming indexes template to indexes.html 2013-08-03 03:29:24 -04:00
spf13 21a7b72535 Moved static content to /static 2013-08-03 03:10:14 -04:00
spf13 52c089ffbd Added support for indexes of indexes & ordered indexes 2013-08-03 03:09:28 -04:00
spf13 ddad1e04ac adding previous next capabilities 2013-08-02 16:30:26 -04:00
Noah Campbell 66610a65d1 Removing OSX files from repo. Updating .gitignore to not track these files. 2013-08-02 10:00:25 -07:00
Steve Francia d36d7fba6a Merge pull request #8 from SebastianM/doc-json-fix
Fix JSON syntax error in example configuration
2013-08-01 22:04:03 -07:00
Steve Francia 47783c1f03 Merge pull request #10 from noahcampbell/master
Fixed section labels causing panic on windows.
2013-08-01 22:00:58 -07:00
Noah Campbell 3e539c7126 Adding error message when no content pages exists. 2013-08-01 13:27:56 -07:00
Noah Campbell 03e804ffd2 Updating the .gitignore for windows and vim users.
Adding hugo.exe for us windows fanbois.  Also adding gvim support.
2013-08-01 13:27:56 -07:00
Noah Campbell c9a09418e7 Fixed section labels causing panic on windows.
The filename path was being split using a unix specific path seperator.  This fix uses the os.PathSeperator to ensure proper evaluation regardless of platform.
2013-08-01 13:27:56 -07:00
Sebastian Müller 4efdb90943 Fix JSON syntax error in example configuration 2013-08-01 20:52:00 +02:00
spf13 61258858af copying static content to destination 2013-07-30 01:26:02 -04:00
spf13 736677a21d Using MkdirAll instead of my own logic 2013-07-26 18:10:03 -04:00
spf13 7ab28c564f Adding support for destination dir, split out static 2013-07-26 18:06:13 -04:00
spf13 92c31bbe10 permalink now respects pretty urls 2013-07-26 09:56:00 -04:00
spf13 d5f5543061 create content at any level of nesting 2013-07-26 09:28:26 -04:00
spf13 e08d14ad49 fixing issue with some urls missing '/' 2013-07-26 09:27:22 -04:00
spf13 b7bbc28caf fixing bug with server not finding right path 2013-07-26 09:25:30 -04:00
spf13 c560a7537a adding more verbose output to server functionality 2013-07-26 09:24:35 -04:00
spf13 b2385f062a create missing directories recurisvely 2013-07-26 09:22:23 -04:00
spf13 dd9a7e6455 Fixing headers in readme 2013-07-24 11:47:58 -04:00
spf13 16b1f284ca Improving installation instructions 2013-07-24 11:43:23 -04:00
spf13 f2e4c9d709 Merge branch 'master' of github.com:spf13/hugo 2013-07-24 11:27:48 -04:00
spf13 3ad3f2f0e0 Merge branch 'doc-fix' of https://github.com/brandonblack/hugo into brandonblack-doc-fix
Conflicts:
	README.md
2013-07-24 11:27:03 -04:00
Brandon Black 580bb9bb5b minor: adding some more instructions for building from source 2013-07-22 14:40:45 -07:00
Steve Francia 2dde27f0dc Update README.md
fixing typo in readme.
2013-07-21 00:51:39 -04:00
spf13 627cf26571 Adding proper command line option parsing 2013-07-19 00:38:24 -07:00
spf13 8fae5f0dd6 Default is now pretty urls (without .html)
Adding --uglyurls option to retain previous behavior
2013-07-19 00:10:42 -07:00
spf13 dcd8ff716a Adding better source build instructions 2013-07-18 22:30:55 -07:00
spf13 f199004989 GO -> Go 2013-07-15 17:44:51 -07:00
spf13 8d50dd9160 fixing typo in config readme 2013-07-11 23:29:14 -04:00
spf13 c24112ce86 Render shortcodes before index and section rss feeds 2013-07-11 23:26:03 -04:00
spf13 649560fca2 proper BaseUrl handling (if has trailing slash or not) 2013-07-11 22:55:07 -04:00
spf13 7a521ad1a1 Fixing some RSS issues 2013-07-11 22:31:58 -04:00
spf13 b7b6f054a9 Accidentally left in debugging code 2013-07-11 22:16:29 -04:00
spf13 75a2e6d4e8 Now support for config files as yaml, json or toml 2013-07-11 22:04:57 -04:00
spf13 d9b5f9cd9e fixing incorrect import path 2013-07-10 17:58:32 -04:00
spf13 f857f4caba adding helper to create absolute url 2013-07-10 17:57:28 -04:00
spf13 d4caa8ee95 Adding total time to generated stats. 2013-07-10 09:21:41 -04:00
spf13 51e3098548 Writing relative links to absolute so they work in feeds 2013-07-10 00:14:02 -04:00
spf13 e76c3feb52 Fix bug with JSON front matter parsing. 2013-07-09 19:04:22 -04:00
spf13 a6914e9c4c Better error handling for parsing front matter 2013-07-09 18:53:08 -04:00
Steve Francia 8403dba3ee Merge pull request #3 from tychoish/rst-fix
rst: fixing rst output processing
2013-07-09 08:34:20 -07:00
tycho garen 4951ff998c rst: fixing rst output processing 2013-07-09 08:16:29 -04:00
spf13 aee48725eb Adding version number to command line options 2013-07-08 22:27:23 -04:00
spf13 d2a6267ad7 Adding support for TOML, updating documentation 2013-07-08 22:23:54 -04:00
spf13 3c80cd323c YAML support similar to jekyll (start and end with '---') 2013-07-08 17:57:01 -04:00
Steve Francia 94e577740d Merge pull request #2 from tychoish/yaml-rst-support
Switching to YAML and adding support for optional restructured text parsing
2013-07-08 12:59:44 -07:00
tycho garen d0ff31269a minor: correcting example 2013-07-07 11:59:19 -04:00
tycho garen f851c4162b fix: changing terminal yaml line, generalizing forematter splitting 2013-07-07 10:01:53 -04:00
tycho garen b024454ea9 fixes: returning json parsing, error messages, yaml header offsets 2013-07-07 01:03:12 -04:00
tycho garen 67f4da30b1 revert: adding json support 2013-07-06 23:52:14 -04:00
tycho garen 6c42d3d490 fix: parsing of yaml forematter 2013-07-06 23:37:47 -04:00
tycho garen 431fa0e2d7 changing to suport yaml rather than json and adding optional restructuredtext support 2013-07-06 22:48:12 -04:00
tycho garen a7f5f97bc2 sanity: move from json to yaml 2013-07-06 22:32:50 -04:00
Steve Francia 4d2fbfc760 Merge pull request #1 from tychoish/add-gitignore
gitignore: sanity
2013-07-06 19:08:40 -07:00
tycho garen 8aff6cc373 gitignore: sanity 2013-07-06 19:37:40 -04:00
spf13 f875577197 rendering shortcodes earlier for better performance 2013-07-05 12:03:47 -04:00
Steve Francia 77d142ba17 fixing typos 2013-07-05 00:37:59 -04:00
Steve Francia 1aa125cf68 fixing two typos 2013-07-05 00:37:26 -04:00
Steve Francia 0d63bf00c3 better install instructions and fixing usage typo 2013-07-05 00:35:11 -04:00
1328 changed files with 129894 additions and 3519 deletions
+50
View File
@@ -0,0 +1,50 @@
defaults: &defaults
working_directory: /go/src/github.com/gohugoio
docker:
- image: bepsays/ci-goreleaser:0.34.2-6
version: 2
jobs:
build:
<<: *defaults
steps:
- checkout:
path: hugo
- run:
command: |
go get -d github.com/magefile/mage/...
git clone git@github.com:gohugoio/hugoDocs.git
cd hugo
mage vendor
mage check
- persist_to_workspace:
root: .
paths: .
release:
<<: *defaults
steps:
- attach_workspace:
at: /go/src/github.com/gohugoio
- run:
command: |
cd hugo
git config --global user.email "bjorn.erik.pedersen+hugoreleaser@gmail.com"
git config --global user.name "hugoreleaser"
go run -tags release main.go release -r ${CIRCLE_BRANCH}
workflows:
version: 2
release:
jobs:
- build:
filters:
branches:
only: /release-.*/
- hold:
type: approval
requires:
- build
- release:
context: org-global
requires:
- hold
+23
View File
@@ -0,0 +1,23 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 120
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 21
# Issues with these labels will never be considered stale
exemptLabels:
- Keep
- Security
# Label to use when marking an issue as stale
staleLabel: Stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a **bug** and you can still reproduce this error on the <code>master</code> branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a **feature request**, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
+18
View File
@@ -0,0 +1,18 @@
hugo
docs/public*
/.idea
hugo.exe
*.test
*.prof
nohup.out
cover.out
*.swp
*.swo
.DS_Store
*~
vendor/*/
*.bench
coverage*.out
GoBuilds
dist
View File
+3
View File
@@ -0,0 +1,3 @@
spf13 <steve.francia@gmail.com> Steve Francia <steve.francia@gmail.com>
bep <bjorn.erik.pedersen@gmail.com> Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
+25
View File
@@ -0,0 +1,25 @@
language: go
sudo: required
dist: precise
go:
- 1.8.5
- 1.9.2
- tip
os:
- linux
- osx
matrix:
allow_failures:
- go: tip
fast_finish: true
install:
- go get github.com/magefile/mage
- mage vendor
script:
- mage hugoRace
- mage -v check
- ./hugo -s docs/
- ./hugo --renderToMemory -s docs/
before_install:
# gem install must be run with sudo on OSX
- sudo gem install asciidoctor | gem install asciidoctor
+189
View File
@@ -0,0 +1,189 @@
# Contributing to Hugo
We welcome contributions to Hugo of any kind including documentation, themes,
organization, tutorials, blog posts, bug reports, issues, feature requests,
feature implementations, pull requests, answering questions on the forum,
helping to manage issues, etc.
The Hugo community and maintainers are [very active](https://github.com/gohugoio/hugo/pulse/monthly) and helpful, and the project benefits greatly from this activity. We created a [step by step guide](https://gohugo.io/tutorials/how-to-contribute-to-hugo/) if you're unfamiliar with GitHub or contributing to open source projects in general.
*Note that this repository only contains the actual source code of Hugo. For **only** documentation-related pull requests / issues please refer to the [hugoDocs](https://github.com/gohugoio/hugoDocs) repository.*
*Pull requests that contain changes on the code base **and** related documentation, e.g. for a new feature, shall remain a single, atomic one.*
## Table of Contents
* [Asking Support Questions](#asking-support-questions)
* [Reporting Issues](#reporting-issues)
* [Submitting Patches](#submitting-patches)
* [Code Contribution Guidelines](#code-contribution-guidelines)
* [Git Commit Message Guidelines](#git-commit-message-guidelines)
* [Vendored Dependencies](#vendored-dependencies)
* [Fetching the Sources From GitHub](#fetching-the-sources-from-github)
* [Using Git Remotes](#using-git-remotes)
* [Build Hugo with Your Changes](#build-hugo-with-your-changes)
* [Updating the Hugo Sources](#updating-the-hugo-sources)
## Asking Support Questions
We have an active [discussion forum](https://discourse.gohugo.io) where users and developers can ask questions.
Please don't use the GitHub issue tracker to ask questions.
## Reporting Issues
If you believe you have found a defect in Hugo or its documentation, use
the GitHub [issue tracker](https://github.com/gohugoio/hugo/issues) to report the problem to the Hugo maintainers.
If you're not sure if it's a bug or not, start by asking in the [discussion forum](https://discourse.gohugo.io).
When reporting the issue, please provide the version of Hugo in use (`hugo version`) and your operating system.
## Submitting Patches
The Hugo project welcomes all contributors and contributions regardless of skill or experience level.
If you are interested in helping with the project, we will help you with your contribution.
Hugo is a very active project with many contributions happening daily.
Because we want to create the best possible product for our users and the best contribution experience for our developers,
we have a set of guidelines which ensure that all contributions are acceptable.
The guidelines are not intended as a filter or barrier to participation.
If you are unfamiliar with the contribution process, the Hugo team will help you and teach you how to bring your contribution in accordance with the guidelines.
### Code Contribution Guidelines
To make the contribution process as seamless as possible, we ask for the following:
* Go ahead and fork the project and make your changes. We encourage pull requests to allow for review and discussion of code changes.
* When youre ready to create a pull request, be sure to:
* Sign the [CLA](https://cla-assistant.io/gohugoio/hugo).
* Have test cases for the new code. If you have questions about how to do this, please ask in your pull request.
* Run `go fmt`.
* Add documentation if you are adding new features or changing functionality. The docs site lives in `/docs`.
* Squash your commits into a single commit. `git rebase -i`. Its okay to force update your pull request with `git push -f`.
* Ensure that `mage check` succeeds. [Travis CI](https://travis-ci.org/gohugoio/hugo) (Linux and macOS) and [AppVeyor](https://ci.appveyor.com/project/gohugoio/hugo/branch/master) (Windows) will fail the build if `mage check` fails.
* Follow the **Git Commit Message Guidelines** below.
### Git Commit Message Guidelines
This [blog article](http://chris.beams.io/posts/git-commit/) is a good resource for learning how to write good commit messages,
the most important part being that each commit message should have a title/subject in imperative mood starting with a capital letter and no trailing period:
*"Return error on wrong use of the Paginator"*, **NOT** *"returning some error."*
Also, if your commit references one or more GitHub issues, always end your commit message body with *See #1234* or *Fixes #1234*.
Replace *1234* with the GitHub issue ID. The last example will close the issue when the commit is merged into *master*.
Sometimes it makes sense to prefix the commit message with the packagename (or docs folder) all lowercased ending with a colon.
That is fine, but the rest of the rules above apply.
So it is "tpl: Add emojify template func", not "tpl: add emojify template func.", and "docs: Document emoji", not "doc: document emoji."
Please consider to use a short and descriptive branch name, e.g. **NOT** "patch-1". It's very common but creates a naming conflict each time when a submission is pulled for a review.
An example:
```text
tpl: Add custom index function
Add a custom index template function that deviates from the stdlib simply by not
returning an "index out of range" error if an array, slice or string index is
out of range. Instead, we just return nil values. This should help make the
new default function more useful for Hugo users.
Fixes #1949
```
### Fetching the Sources From GitHub
Due to the way Go handles package imports, the best approach for working on a
Hugo fork is to use Git Remotes. Here's a simple walk-through for getting
started:
1. Get the Hugo source:
```bash
go get -u -v -d github.com/gohugoio/hugo
```
1. Install Mage:
```bash
go get github.com/magefile/mage
```
1. Change to the Hugo source directory and fetch the dependencies:
```bash
cd $HOME/go/src/github.com/gohugoio/hugo
mage vendor
```
Note that Hugo uses [Go Dep](https://github.com/golang/dep) to vendor dependencies, rather than a a simple `go get`. We don't commit the vendored packages themselves to the Hugo git repository. The call to `mage vendor` takes care of all this for you.
1. Create a new branch for your changes (the branch name is arbitrary):
```bash
git checkout -b iss1234
```
1. After making your changes, commit them to your new branch:
```bash
git commit -a -v
```
1. Fork Hugo in GitHub.
1. Add your fork as a new remote (the remote name, "fork" in this example, is arbitrary):
```bash
git remote add fork git://github.com/USERNAME/hugo.git
```
1. Push the changes to your new remote:
```bash
git push --set-upstream fork iss1234
```
1. You're now ready to submit a PR based upon the new branch in your forked repository.
### Building Hugo with Your Changes
Hugo uses [mage](https://github.com/magefile/mage) to sync vendor dependencies, build Hugo, run the test suite and other things. You must run mage from the Hugo directory.
```bash
cd $HOME/go/src/github.com/gohugoio/hugo
```
To build Hugo:
```bash
mage hugo
```
To install hugo in `$HOME/go/bin`:
```bash
mage install
```
To run the tests:
```bash
mage hugoRace
mage -v check
```
To list all available commands along with descriptions:
```bash
mage -l
```
### Updating the Hugo Sources
If you want to stay in sync with the Hugo repository, you can easily pull down
the source changes, but you'll need to keep the vendored packages up-to-date as
well.
```bash
git pull
mage vendor
```
+23
View File
@@ -0,0 +1,23 @@
FROM golang:1.9.0-alpine3.6 AS build
RUN apk add --no-cache --virtual git musl-dev
RUN go get github.com/golang/dep/cmd/dep
WORKDIR /go/src/github.com/gohugoio/hugo
RUN dep ensure
ADD . /go/src/github.com/gohugoio/hugo/
RUN go install -ldflags '-s -w'
FROM alpine:3.6
RUN \
adduser -h /site -s /sbin/nologin -u 1000 -D hugo && \
apk add --no-cache \
dumb-init
COPY --from=build /go/bin/hugo /bin/hugo
USER hugo
WORKDIR /site
VOLUME /site
EXPOSE 1313
ENTRYPOINT ["/usr/bin/dumb-init", "--", "hugo"]
CMD [ "--help" ]
Generated
+371
View File
@@ -0,0 +1,371 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
branch = "master"
name = "github.com/BurntSushi/toml"
packages = ["."]
revision = "a368813c5e648fee92e5f6c30e3944ff9d5e8895"
[[projects]]
name = "github.com/PuerkitoBio/purell"
packages = ["."]
revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4"
version = "v1.1.0"
[[projects]]
branch = "master"
name = "github.com/PuerkitoBio/urlesc"
packages = ["."]
revision = "de5bf2ad457846296e2031421a34e2568e304e35"
[[projects]]
name = "github.com/alecthomas/chroma"
packages = [
".",
"formatters",
"formatters/html",
"lexers",
"styles"
]
revision = "e0f32fbcb59bc99c521910291b7ba8ecdb17ca34"
version = "v0.2.1"
[[projects]]
branch = "master"
name = "github.com/bep/gitmap"
packages = ["."]
revision = "de8030ebafb76c6e84d50ee6d143382637c00598"
[[projects]]
name = "github.com/chaseadamsio/goorgeous"
packages = ["."]
revision = "dcf1ef873b8987bf12596fe6951c48347986eb2f"
version = "v1.1.0"
[[projects]]
name = "github.com/cpuguy83/go-md2man"
packages = ["md2man"]
revision = "1d903dcb749992f3741d744c0f8376b4bd7eb3e1"
version = "v1.0.7"
[[projects]]
branch = "master"
name = "github.com/danwakefield/fnmatch"
packages = ["."]
revision = "cbb64ac3d964b81592e64f957ad53df015803288"
[[projects]]
name = "github.com/davecgh/go-spew"
packages = ["spew"]
revision = "346938d642f2ec3594ed81d874461961cd0faa76"
version = "v1.1.0"
[[projects]]
name = "github.com/disintegration/imaging"
packages = ["."]
revision = "dd50a3ee9985ccd313a2f03c398fcaedc96dc707"
version = "v1.2.4"
[[projects]]
name = "github.com/dlclark/regexp2"
packages = [
".",
"syntax"
]
revision = "487489b64fb796de2e55f4e8a4ad1e145f80e957"
version = "v1.1.6"
[[projects]]
branch = "master"
name = "github.com/eknkc/amber"
packages = [
".",
"parser"
]
revision = "cdade1c073850f4ffc70a829e31235ea6892853b"
[[projects]]
name = "github.com/fortytw2/leaktest"
packages = ["."]
revision = "7dad53304f9614c1c365755c1176a8e876fee3e8"
version = "v1.1.0"
[[projects]]
name = "github.com/fsnotify/fsnotify"
packages = ["."]
revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"
version = "v1.4.7"
[[projects]]
name = "github.com/gorilla/websocket"
packages = ["."]
revision = "ea4d1f681babbce9545c9c5f3d5194a789c89f5b"
version = "v1.2.0"
[[projects]]
branch = "master"
name = "github.com/hashicorp/go-immutable-radix"
packages = ["."]
revision = "8aac2701530899b64bdea735a1de8da899815220"
[[projects]]
branch = "master"
name = "github.com/hashicorp/golang-lru"
packages = ["simplelru"]
revision = "0a025b7e63adc15a622f29b0b2c4c3848243bbf6"
[[projects]]
branch = "master"
name = "github.com/hashicorp/hcl"
packages = [
".",
"hcl/ast",
"hcl/parser",
"hcl/scanner",
"hcl/strconv",
"hcl/token",
"json/parser",
"json/scanner",
"json/token"
]
revision = "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8"
[[projects]]
name = "github.com/inconshreveable/mousetrap"
packages = ["."]
revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
version = "v1.0"
[[projects]]
name = "github.com/jdkato/prose"
packages = [
"internal/util",
"transform"
]
revision = "20d3663d4bc9dd10d75abcde9d92e04b4861c674"
version = "v1.1.0"
[[projects]]
name = "github.com/kyokomi/emoji"
packages = ["."]
revision = "7e06b236c489543f53868841f188a294e3383eab"
version = "v1.5"
[[projects]]
name = "github.com/magefile/mage"
packages = [
"mg",
"sh"
]
revision = "2f974307b636f59c13b88704cf350a4772fef271"
version = "v1.0.2"
[[projects]]
name = "github.com/magiconair/properties"
packages = ["."]
revision = "d419a98cdbed11a922bf76f257b7c4be79b50e73"
version = "v1.7.4"
[[projects]]
branch = "master"
name = "github.com/markbates/inflect"
packages = ["."]
revision = "a12c3aec81a6a938bf584a4bac567afed9256586"
[[projects]]
name = "github.com/mattn/go-runewidth"
packages = ["."]
revision = "9e777a8366cce605130a531d2cd6363d07ad7317"
version = "v0.0.2"
[[projects]]
name = "github.com/miekg/mmark"
packages = ["."]
revision = "fd2f6c1403b37925bd7fe13af05853b8ae58ee5f"
version = "v1.3.6"
[[projects]]
branch = "master"
name = "github.com/mitchellh/mapstructure"
packages = ["."]
revision = "b4575eea38cca1123ec2dc90c26529b5c5acfcff"
[[projects]]
name = "github.com/nicksnyder/go-i18n"
packages = [
"i18n/bundle",
"i18n/language",
"i18n/translation"
]
revision = "0dc1626d56435e9d605a29875701721c54bc9bbd"
version = "v1.10.0"
[[projects]]
branch = "master"
name = "github.com/olekukonko/tablewriter"
packages = ["."]
revision = "96aac992fc8b1a4c83841a6c3e7178d20d989625"
[[projects]]
name = "github.com/pelletier/go-toml"
packages = ["."]
revision = "16398bac157da96aa88f98a2df640c7f32af1da2"
version = "v1.0.1"
[[projects]]
name = "github.com/pmezard/go-difflib"
packages = ["difflib"]
revision = "792786c7400a136282c1664665ae0a8db921c6c2"
version = "v1.0.0"
[[projects]]
name = "github.com/russross/blackfriday"
packages = ["."]
revision = "4048872b16cc0fc2c5fd9eacf0ed2c2fedaa0c8c"
version = "v1.5"
[[projects]]
branch = "master"
name = "github.com/shurcooL/sanitized_anchor_name"
packages = ["."]
revision = "86672fcb3f950f35f2e675df2240550f2a50762f"
[[projects]]
name = "github.com/spf13/afero"
packages = [
".",
"mem"
]
revision = "bb8f1927f2a9d3ab41c9340aa034f6b803f4359c"
version = "v1.0.2"
[[projects]]
name = "github.com/spf13/cast"
packages = ["."]
revision = "acbeb36b902d72a7a4c18e8f3241075e7ab763e4"
version = "v1.1.0"
[[projects]]
branch = "master"
name = "github.com/spf13/cobra"
packages = [
".",
"doc"
]
revision = "b95ab734e27d33e0d8fbabf71ca990568d4e2020"
[[projects]]
branch = "master"
name = "github.com/spf13/fsync"
packages = ["."]
revision = "12a01e648f05a938100a26858d2d59a120307a18"
[[projects]]
branch = "master"
name = "github.com/spf13/jwalterweatherman"
packages = ["."]
revision = "7c0cea34c8ece3fbeb2b27ab9b59511d360fb394"
[[projects]]
branch = "master"
name = "github.com/spf13/nitro"
packages = ["."]
revision = "24d7ef30a12da0bdc5e2eb370a79c659ddccf0e8"
[[projects]]
name = "github.com/spf13/pflag"
packages = ["."]
revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66"
version = "v1.0.0"
[[projects]]
name = "github.com/spf13/viper"
packages = ["."]
revision = "25b30aa063fc18e48662b86996252eabdcf2f0c7"
version = "v1.0.0"
[[projects]]
name = "github.com/stretchr/testify"
packages = [
"assert",
"require"
]
revision = "b91bfb9ebec76498946beb6af7c0230c7cc7ba6c"
version = "v1.2.0"
[[projects]]
name = "github.com/yosssi/ace"
packages = ["."]
revision = "ea038f4770b6746c3f8f84f14fa60d9fe1205b56"
version = "v0.0.5"
[[projects]]
branch = "master"
name = "golang.org/x/image"
packages = [
"bmp",
"riff",
"tiff",
"tiff/lzw",
"vp8",
"vp8l",
"webp"
]
revision = "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7"
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = [
"context",
"idna"
]
revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec"
[[projects]]
branch = "master"
name = "golang.org/x/sync"
packages = ["errgroup"]
revision = "fd80eb99c8f653c847d294a001bdf2a3a6f768f5"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix"]
revision = "810d7000345868fc619eb81f46307107118f4ae1"
[[projects]]
branch = "master"
name = "golang.org/x/text"
packages = [
"collate",
"collate/build",
"internal/colltab",
"internal/gen",
"internal/tag",
"internal/triegen",
"internal/ucd",
"language",
"secure/bidirule",
"transform",
"unicode/bidi",
"unicode/cldr",
"unicode/norm",
"unicode/rangetable",
"width"
]
revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3"
[[projects]]
branch = "v2"
name = "gopkg.in/yaml.v2"
packages = ["."]
revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "398d769bcbce6e8fa04f7afab14eb64d25aed5b581d7bd39294014351a459890"
solver-name = "gps-cdcl"
solver-version = 1
+133
View File
@@ -0,0 +1,133 @@
[[constraint]]
name = "github.com/BurntSushi/toml"
branch = "master"
[[constraint]]
name = "github.com/PuerkitoBio/purell"
version = "1.1.0"
[[constraint]]
name = "github.com/alecthomas/chroma"
version = "^0.2.0"
[[constraint]]
branch = "master"
name = "github.com/bep/gitmap"
[[constraint]]
name = "github.com/chaseadamsio/goorgeous"
version = "^1.1.0"
[[constraint]]
name = "github.com/disintegration/imaging"
version = "~v1.2.4"
[[constraint]]
name = "github.com/magefile/mage"
version = "v1"
[[constraint]]
branch = "master"
name = "github.com/eknkc/amber"
[[constraint]]
name = "github.com/fortytw2/leaktest"
version = "1.1.0"
[[constraint]]
name = "github.com/fsnotify/fsnotify"
version = "^1.4.0"
[[constraint]]
name = "github.com/gorilla/websocket"
version = "1.2.0"
[[constraint]]
branch = "master"
name = "github.com/hashicorp/go-immutable-radix"
[[constraint]]
name = "github.com/jdkato/prose"
version = "1.1.0"
[[constraint]]
name = "github.com/kyokomi/emoji"
version = "1.5.0"
[[constraint]]
branch = "master"
name = "github.com/markbates/inflect"
[[constraint]]
name = "github.com/miekg/mmark"
version = "^1.3.6"
[[constraint]]
branch = "master"
name = "github.com/mitchellh/mapstructure"
[[constraint]]
name = "github.com/nicksnyder/go-i18n"
version = "^1.10.0"
[[constraint]]
name = "github.com/russross/blackfriday"
version = "^1.5.0"
[[constraint]]
name = "github.com/spf13/afero"
version = "^1.0.1"
[[constraint]]
name = "github.com/spf13/cast"
version = "^1.1.0"
[[constraint]]
branch = "master"
name = "github.com/spf13/cobra"
[[constraint]]
branch = "master"
name = "github.com/spf13/fsync"
[[constraint]]
branch = "master"
name = "github.com/spf13/jwalterweatherman"
[[constraint]]
branch = "master"
name = "github.com/spf13/nitro"
[[constraint]]
name = "github.com/spf13/pflag"
version = "1.0.0"
[[constraint]]
name = "github.com/spf13/viper"
version = "1.0.0"
[[constraint]]
name = "github.com/stretchr/testify"
version = "1.1.4"
[[constraint]]
branch = "master"
name = "github.com/olekukonko/tablewriter"
[[constraint]]
name = "github.com/yosssi/ace"
version = "^0.0.5"
[[constraint]]
branch = "master"
name = "golang.org/x/image"
[[constraint]]
branch = "master"
name = "golang.org/x/text"
[[constraint]]
branch = "v2"
name = "gopkg.in/yaml.v2"
+179 -52
View File
@@ -1,67 +1,194 @@
Simple Public License (SimPL-2.0)
=================================
Apache License
==============
Preamble
--------
_Version 2.0, January 2004_
_&lt;<http://www.apache.org/licenses/>&gt;_
This Simple Public License 2.0 (SimPL-2.0 for short) is a plain language
implementation of GPL 2.0. The words are different, but the goal is the
same - to guarantee for all users the freedom to share and change
software. If anyone wonders about the meaning of the SimPL, they should
interpret it as consistent with GPL 2.0.
### Terms and Conditions for use, reproduction, and distribution
#### 1. Definitions
Simple Public License (SimPL) 2.0
=================================
“License” shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
The SimPL applies to the software's source and object code and comes
with any rights that I have in it (other than trademarks). You agree to
the SimPL by copying, distributing, or making a derivative work of the
software.
“Licensor” shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
You get the royalty free right to:
“Legal Entity” shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, “control” means **(i)** the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
outstanding shares, or **(iii)** beneficial ownership of such entity.
- Use the software for any purpose;
- Make derivative works of it (this is called a "Derived Work");
- Copy and distribute it and any Derived Work.
“You” (or “Your”) shall mean an individual or Legal Entity exercising
permissions granted by this License.
If you distribute the software or a Derived Work, you must give back to
the community by:
“Source” form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
- Prominently noting the date of any changes you make;
- Leaving other people's copyright notices, warranty disclaimers, and
license terms in place;
- Providing the source code, build scripts, installation scripts, and
interface definitions in a form that is easy to get and best to
modify;
- Licensing it to everyone under SimPL, or substantially similar terms
(such as GPL 2.0), without adding further restrictions to the rights
provided;
- Conspicuously announcing that it is available under that license.
“Object” form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
There are some things that you must shoulder:
“Work” shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
- You get NO WARRANTIES. None of any kind;
- If the software damages you in any way, you may only recover direct
damages up to the amount you paid for it (that is zero if you did
not pay anything). You may not recover any other damages, including
those called "consequential damages." (The state or country where
you live may not allow you to limit your liability in this way, so
this may not apply to you);
“Derivative Works” shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
The SimPL continues perpetually, except that your license rights end
automatically if:
“Contribution” shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
“submitted” means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as “Not a Contribution.”
- You do not abide by the "give back to the community" terms (your
licensees get to keep their rights if they abide);
- Anyone prevents you from distributing the software under the terms
of the SimPL.
“Contributor” shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
License for the License
-----------------------
#### 2. Grant of Copyright License
You may do anything that you want with the SimPL text; it's a license
form to use in any way that you find helpful. To avoid confusion,
however, if you change the terms in any way then you may not call your
license the Simple Public License or the SimPL (but feel free to
acknowledge that your license is "based on the Simple Public License").
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
#### 3. Grant of Patent License
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
#### 4. Redistribution
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
* **(a)** You must give any other recipients of the Work or Derivative Works a copy of
this License; and
* **(b)** You must cause any modified files to carry prominent notices stating that You
changed the files; and
* **(c)** You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
#### 5. Submission of Contributions
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
#### 6. Trademarks
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
#### 7. Disclaimer of Warranty
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
#### 8. Limitation of Liability
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
#### 9. Accepting Warranty or Additional Liability
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
_END OF TERMS AND CONDITIONS_
### APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets `[]` replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same “printed page” as the copyright notice for easier identification within
third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+75 -400
View File
@@ -1,438 +1,113 @@
# Hugo
![Hugo](https://raw.githubusercontent.com/gohugoio/hugoDocs/master/static/img/hugo-logo.png)
A really fast static site generator written in GoLang.
A Fast and Flexible Static Site Generator built with love by [spf13](http://spf13.com/) and [friends](https://github.com/gohugoio/hugo/graphs/contributors) in [Go][].
[Website](https://gohugo.io) |
[Forum](https://discourse.gohugo.io) |
[Developer Chat (no support)](https://gitter.im/gohugoio/hugo) |
[Documentation](https://gohugo.io/overview/introduction/) |
[Installation Guide](https://gohugo.io/overview/installing/) |
[Contribution Guide](CONTRIBUTING.md) |
[Twitter](http://twitter.com/gohugoio)
[![GoDoc](https://godoc.org/github.com/gohugoio/hugo?status.svg)](https://godoc.org/github.com/gohugoio/hugo)
[![Linux and macOS Build Status](https://api.travis-ci.org/gohugoio/hugo.svg?branch=master&label=Linux+and+macOS+build "Linux and macOS Build Status")](https://travis-ci.org/gohugoio/hugo)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/a5mr220vsd091kua?svg=true&label=Windows+build "Windows Build Status")](https://ci.appveyor.com/project/bep/hugo/branch/master)
[![Dev chat at https://gitter.im/gohugoio/hugo](https://img.shields.io/badge/gitter-developer_chat-46bc99.svg)](https://gitter.im/spf13/hugo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Go Report Card](https://goreportcard.com/badge/github.com/gohugoio/hugo)](https://goreportcard.com/report/github.com/gohugoio/hugo)
## Overview
Hugo is a static site generator written in GoLang. It is optimized for
speed, easy use and configurability. Hugo takes a directory with content and
templates and renders them into a full html website.
Hugo makes use of markdown files with front matter for meta data.
Hugo is a static HTML and CSS website generator written in [Go][].
It is optimized for speed, ease of use, and configurability.
Hugo takes a directory with content and templates and renders them into a full HTML website.
A typical website of moderate size can be
rendered in a fraction of a second. It is written to work well with any
kind of website including blogs, tumbles and docs.
# Getting Started
## Installing Hugo
Installation is very easy. Simply download the appropriate version for your
platform. Hugo is written in GoLang with support for Windows, Linux and OSX.
Please make sure that you place the executable in your path. `/usr/local/bin`
is the most probable location.
Hugo doesn't have any external dependencies, but can benefit from external
programs.
## Installing from source
Make sure you have a recent version of go installed. Hugo requires go 1.1+.
git clone https://github.com/spf13/hugo
cd hugo
go build -o hugo main.go
Hugo relies on Markdown files with front matter for metadata, and you can run Hugo from any directory.
This works well for shared hosts and other systems where you dont have a privileged account.
Hugo renders a typical website of moderate size in a fraction of a second.
A good rule of thumb is that each piece of content renders in around 1 millisecond.
## Source Directory Organization
Hugo is designed to work well for any kind of website including blogs, tumbles, and docs.
Hugo takes a single directory and uses it as the input for creating a complete website.
#### Supported Architectures
Hugo has a very small amount of configuration, while remaining highly customizable.
It accomplishes by assuming that you will only provide templates with the intent of
using them.
Currently, we provide pre-built Hugo binaries for Windows, Linux, FreeBSD, NetBSD, macOS (Darwin), and [Android](https://gist.github.com/bep/a0d8a26cf6b4f8bc992729b8e50b480b) for x64, i386 and ARM architectures.
An example directory may look like:
Hugo may also be compiled from source wherever the Go compiler tool chain can run, e.g. for other operating systems including DragonFly BSD, OpenBSD, Plan 9, and Solaris.
.
├── config.json
├── content
| ├── post
| | ├── firstpost.md
| | └── secondpost.md
| └── quote
| | ├── first.md
| | └── second.md
├── layouts
| ├── chrome
| | ├── header.html
| | └── footer.html
| ├── indexes
| | ├── category.html
| | ├── post.html
| | ├── quote.html
| | └── tag.html
| ├── post
| | ├── li.html
| | ├── single.html
| | └── summary.html
| ├── quote
| | ├── li.html
| | ├── single.html
| | └── summary.html
| ├── shortcodes
| | ├── img.html
| | ├── vimeo.html
| | └── youtube.html
| ├── index.html
| └── rss.xml
└── public
**Complete documentation is available at [Hugo Documentation][].**
This directory structure tells us a lot about this site:
## Choose How to Install
1. the website intends to have two different types of content, posts and quotes.
2. It will also apply two different indexes to that content, categories and tags.
3. It will be displaying content in 3 different views, a list, a summary and a full page view.
If you want to use Hugo as your site generator, simply install the Hugo binaries.
The Hugo binaries have no external dependencies.
Included with the repository is an example site ready to be rendered.
To contribute to the Hugo source code or documentation, you should [fork the Hugo GitHub project](https://github.com/gohugoio/hugo#fork-destination-box) and clone it to your local machine.
## Configuration
Finally, you can install the Hugo source code with `go`, build the binaries yourself, and run Hugo that way.
Building the binaries is an easy task for an experienced `go` getter.
The directory structure and templates provide the majority of the
configuration for a site. In fact a config file isn't even needed for many websites
since the defaults used follow commonly used patterns.
### Install Hugo as Your Site Generator (Binary Install)
The following is an example of a config file with the default values
Use the [installation instructions in the Hugo documentation](https://gohugo.io/overview/installing/).
{
"SourceDir" : "content",
"LayoutDir" : "layouts",
"PublishDir" : "public",
"BuildDrafts" : false,
"Tags" : { "category" : "categories", "tag" : "tags" },
"BaseUrl" : "http://yourSite.com/"
}
### Build and Install the Binaries from Source (Advanced Install)
## Usage
Make sure either hugo is in your path or provide a path to it.
Add Hugo and its package dependencies to your go `src` directory.
$ hugo --help
usage: hugo [flags] []
-b="": hostname (and path) to the root eg. http://spf13.com/
-c="config.json": config file (default is path/config.json)
-d=false: include content marked as draft
-h=false: show this help
-k=false: analyze content and provide feedback
-p="": filesystem path to read files relative from
-w=false: watch filesystem for changes and recreate as needed
-s=false: a (very) simple webserver
-p="1313": port for webserver to run on
go get -v github.com/gohugoio/hugo
The most common use is probably to run hugo with your current
directory being the input directory.
Once the `get` completes, you should find your new `hugo` (or `hugo.exe`) executable sitting inside `$GOPATH/bin/`.
To update Hugos dependencies, use `go get` with the `-u` option.
$ hugo
> X pages created
> Y indicies created
go get -u -v github.com/gohugoio/hugo
## The Hugo Documentation
The Hugo documentation now lives in its own repository, see https://github.com/gohugoio/hugoDocs. But we do keep a version of that documentation as a `git subtree` in this repository. To build the sub folder `/docs` as a Hugo site, you need to clone this repo:
If you are working on things and want to see the changes
immediately, tell Hugo to watch for changes. **It will
recreate the site faster than you can tab over to
your browser to view the changes.**
```bash
git clone git@github.com:gohugoio/hugo.git
```
## Contributing to Hugo
$ hugo -p ~/mysite -w
For a complete guide to contributing to Hugo, see the [Contribution Guide](CONTRIBUTING.md).
We welcome contributions to Hugo of any kind including documentation, themes,
organization, tutorials, blog posts, bug reports, issues, feature requests,
feature implementations, pull requests, answering questions on the forum,
helping to manage issues, etc.
# Layout
The Hugo community and maintainers are [very active](https://github.com/gohugoio/hugo/pulse/monthly) and helpful, and the project benefits greatly from this activity.
Hugo is very flexible about how you organize and structure your content.
### Asking Support Questions
## Templates
We have an active [discussion forum](https://discourse.gohugo.io) where users and developers can ask questions.
Please don't use the GitHub issue tracker to ask questions.
Hugo uses the excellent golang html/template library for it's template engine. It is an extremely
lightweight engine that provides a very small amount of logic. In our
experience that it is just the right amount of logic to be able to create a good static website
This document will not cover how to use golang templates, but the [golang docs](http://golang.org/pkg/html/template/)
provide a good introduction.
### Reporting Issues
### Template roles
If you believe you have found a defect in Hugo or its documentation, use
the GitHub issue tracker to report the problem to the Hugo maintainers.
If you're not sure if it's a bug or not, start by asking in the [discussion forum](https://discourse.gohugo.io).
When reporting the issue, please provide the version of Hugo in use (`hugo version`).
There are 5 different kinds of templates that Hugo works with.
### Submitting Patches
#### index.html
This file must exist in the layouts directory. It is the template used to render the
homepage of your site.
The Hugo project welcomes all contributors and contributions regardless of skill or experience level.
If you are interested in helping with the project, we will help you with your contribution.
Hugo is a very active project with many contributions happening daily.
#### rss.xml
This file must exist in the layouts directory. It will be used to render all rss documents.
The one provided in the example application will generate an ATOM format.
Because we want to create the best possible product for our users and the best contribution experience for our developers,
we have a set of guidelines which ensure that all contributions are acceptable.
The guidelines are not intended as a filter or barrier to participation.
If you are unfamiliar with the contribution process, the Hugo team will help you and teach you how to bring your contribution in accordance with the guidelines.
*Important: Hugo will automatically add the following header line to this file.*
For a complete guide to contributing code to Hugo, see the [Contribution Guide](CONTRIBUTING.md).
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
[![Analytics](https://ga-beacon.appspot.com/UA-7131036-6/hugo/readme)](https://github.com/igrigorik/ga-beacon)
#### Indexes
An index is a page that list multiple pieces of content. If you think of a typical blog, the tag
pages are good examples of indexes.
#### Content Type(s)
Hugo supports multiple types of content. Another way of looking at this is that Hugo has the ability
to render content in a variety of ways as determined by the type.
#### Chrome
Chrome is simply the decoration of your site. It's not a requirement to have this, but in practice
it's very convenient. Hugo doesn't know anything about Chrome, it's simply a convention that you may
likely find beneficial. As you create the rest of your templates you will include templates from the
/layout/chrome directory. I've found it helpful to include a header and footer template
in Chrome so I can include those in the other full page layouts (index.html, indexes/ type/single.html).
### Adding a new content type
Adding a type is easy.
**Step 1:**
Create a directory with the name of the type in layouts.Type is always singular. *Eg /layouts/post*.
**Step 2:**
Create a file called single.html inside your directory. *Eg /layouts/post/single.html*.
**Step 3:**
Create a file with the same name as your directory in /layouts/indexes/. *Eg /layouts/index/post.html*.
**Step 4:**
Many sites support rendering content in a few different ways, for instance a single page view and a
summary view to be used when displaying a list of contents on a single page. Hugo makes no assumptions
here about how you want to display your content, and will support as many different views of a content
type as your site requires. All that is required for these additional views is that a template
exists in each layout/type directory with the same name.
For these, reviewing the example site will be very helpful in order to understand how these types work.
## Variables
Hugo makes a set of values available to the templates. Go templates are context based. The following
are available in the context for the templates.
**.Title** The title for the content. <br>
**.Description** The description for the content.<br>
**.Keywords** The meta keywords for this content.<br>
**.Date** The date the content is published on.<br>
**.Indexes** These will use the field name of the plural form of the index (see tags and categories above)<br>
**.Permalink** The Permanent link for this page.<br>
**.FuzzyWordCount** The approximate number of words in the content.<br>
**.RSSLink** Link to the indexes' rss link <br>
Any value defined in the front matter, including indexes will be made available under `.Params`.
Take for example I'm using tags and categories as my indexes. The following would be how I would access them:
**.Params.Tags** <br>
**.Params.Categories** <br>
Also available is `.Site` which has the following:
**.Site.BaseUrl** The base URL for the site as defined in the config.json file.<br>
**.Site.Indexes** The names of the indexes of the site.<br>
**.Site.LastChange** The date of the last change of the most recent content.<br>
**.Site.Recent** Array of all content ordered by Date, newest first<br>
# Content
Hugo uses markdown files with headers commonly called the front matter. Hugo respects the organization
that you provide for your content to minimize any extra configuration, though this can be overridden
by additional configuration in the front matter.
## Organization
In Hugo the content should be arranged in the same way they are intended for the rendered website.
Without any additional configuration the following will just work.
.
└── content
├── post
| ├── firstpost.md // <- http://site.com/post/firstpost.html
| └── secondpost.md // <- http://site.com/post/secondpost.html
└── quote
├── first.md // <- http://site.com/quote/first.html
└── second.md // <- http://site.com/quote/second.html
## Front Matter
The front matter is one of the features that gives Hugo it's strength. It enables
you to include the meta data of the content right with it. Hugo supports a few
different formats. The main format supported is JSON. Here is an example:
{
"Title": "spf13-vim 3.0 release and new website",
"Description": "spf13-vim is a cross platform distribution of vim plugins and resources for Vim.",
"Tags": [ ".vimrc", "plugins", "spf13-vim", "vim" ],
"Pubdate": "2012-04-06",
"Categories": [ "Development", "VIM" ],
"Slug": "spf13-vim-3-0-release-and-new-website"
}
### Variables
There are a few predefined variables that Hugo is aware of and utilizes. The user can also create
any variable they want to. These will be placed into the `.Params` variable available to the templates.
#### Required
**Title** The title for the content. <br>
**Description** The description for the content.<br>
**Pubdate** The date the content will be sorted by.<br>
**Indexes** These will use the field name of the plural form of the index (see tags and categories above)
#### Optional
**Draft** If true the content will not be rendered unless `hugo` is called with -d<br>
**Type** The type of the content (will be derived from the directory automatically if unset).<br>
**Slug** The token to appear in the tail of the url.<br>
*or*<br>
**Url** The full path to the content from the web root.<br>
*If neither is present the filename will be used.*
## Example
Somethings are better shown than explained. The following is a very basic example of a content file:
**mysite/project/nitro.md <- http://mysite.com/project/nitro.html**
{
"Title": "Nitro : A quick and simple profiler for golang",
"Description": "",
"Keywords": [ "Development", "golang", "profiling" ],
"Tags": [ "Development", "golang", "profiling" ],
"Pubdate": "2013-06-19",
"Topics": [ "Development", "GoLang" ],
"Slug": "nitro",
"project_url": "http://github.com/spf13/nitro"
}
# Nitro
Quick and easy performance analyzer library for golang.
## Overview
Nitro is a quick and easy performance analyzer library for golang.
It is useful for comparing A/B against different drafts of functions
or different functions.
## Implementing Nitro
Using Nitro is simple. First use go get to install the latest version
of the library.
$ go get github.com/spf13/nitro
Next include nitro in your application.
# Extras
## Shortcodes
Because Hugo uses markdown for it's content format, it was clear that there's a lot of things that
markdown doesn't support well. This is good, the simple nature of markdown is exactly why we chose it.
However we cannot accept being constrained by our simple format. Also unacceptable is writing raw
html in our markdown every time we want to include unsupported content such as a video. To do
so is in complete opposition to the intent of using a bare bones format for our content and
utilizing templates to apply styling for display.
To avoid both of these limitations Hugo has full support for shortcodes.
### What is a shortcode?
A shortcode is a simple snippet inside a markdown file that Hugo will render using a template.
Short codes are designated by the opening and closing characters of '{{%' and '%}}' respectively.
Short codes are space delimited. The first word is always the name of the shortcode. Following the
name are the parameters. The author of the shortcode can choose if the short code
will use positional parameters or named parameters (but not both). A good rule of thumb is that if a
short code has a single required value in the case of the youtube example below then positional
works very well. For more complex layouts with optional parameters named parameters work best.
The format for named parameters models that of html with the format name="value"
### Example: youtube
{{% youtube 09jf3ow9jfw %}}
This would be rendered as
<div class="embed video-player">
<iframe class="youtube-player" type="text/html"
width="640" height="385"
src="http://www.youtube.com/embed/09jf3ow9jfw"
allowfullscreen frameborder="0">
</iframe>
</div>
### Example: image with caption
{{% img src="/media/spf13.jpg" title="Steve Francia" %}}
Would be rendered as:
<figure >
<img src="/media/spf13.jpg" />
<figcaption>
<h4>Steve Francia</h4>
</figcaption>
</figure>
### Creating a shortcode
All that you need to do to create a shortcode is place a template in the layouts/shortcodes directory.
The template name will be the name of the shortcode.
**Inside the template**
To access a parameter by either position or name the index method can be used.
{{ index .Params 0 }}
or
{{ index .Params "class" }}
To check if a parameter has been provided use the isset method provided by Hugo.
{{ if isset .Params "class"}} class="{{ index .Params "class"}}" {{ end }}
# Meta
## Release Notes
* **0.7.0** July 4, 2013
* Hugo now includes a simple server
* First public release
* **0.6.0** July 2, 2013
* Hugo includes an example documentation site which it builds
* **0.5.0** June 25, 2013
* Hugo is quite usable and able to build spf13.com
## Roadmap
In no particular order, here is what I'm working on:
* Pagination
* Support for top level pages (other than homepage)
* Series support
* Syntax highlighting
* Previous & Next
* Related Posts
* Support for TOML front matter
* Proper YAML support for front matter
* Support for other formats
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## Contributors
* [spf13](https://github.com/spf13)
## License
Hugo is released under the Simple Public License. See [LICENSE.md](https://github.com/spf13/hugo/blob/master/LICENSE.md).
[Go]: https://golang.org/
[Hugo Documentation]: https://gohugo.io/overview/introduction/
+18
View File
@@ -0,0 +1,18 @@
init:
- set PATH=%PATH%;C:\MinGW\bin;%GOPATH%\bin
- go version
- go env
# clones and cd's to path
clone_folder: C:\GOPATH\src\github.com\gohugoio\hugo
install:
- gem install asciidoctor
- pip install docutils
- go get github.com/magefile/mage
build_script:
- mage vendor hugoRace
- mage -v check
- hugo -s docs/
- hugo --renderToMemory -s docs/
Executable
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
# allow user to override go executable by running as GOEXE=xxx make ...
GOEXE="${GOEXE-go}"
# Convenience script to
# - For a given branch
# - Run benchmark tests for a given package
# - Do the same for master
# - then compare the two runs with benchcmp
benchFilter=".*"
if (( $# < 2 ));
then
echo "USAGE: ./bench.sh <git-branch> <package-to-bench> (and <benchmark filter> (regexp, optional))"
exit 1
fi
if [ $# -eq 3 ]; then
benchFilter=$3
fi
BRANCH=$1
PACKAGE=$2
git checkout $BRANCH
"${GOEXE}" test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-$BRANCH.txt
git checkout master
"${GOEXE}" test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-master.txt
benchcmp /tmp/bench-$PACKAGE-master.txt /tmp/bench-$PACKAGE-$BRANCH.txt
Executable
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
# allow user to override go executable by running as GOEXE=xxx make ...
GOEXE="${GOEXE-go}"
# Send in a regexp mathing the benchmarks you want to run, i.e. './benchSite.sh "YAML"'.
# Note the quotes, which will be needed for more complex expressions.
# The above will run all variations, but only for front matter YAML.
echo "Running with BenchmarkSiteBuilding/${1}"
"${GOEXE}" test -run="NONE" -bench="BenchmarkSiteBuilding/${1}" -test.benchmem=true ./hugolib -memprofile mem.prof -count 3 -cpuprofile cpu.prof
+38
View File
@@ -0,0 +1,38 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package bufferpool provides a pool of bytes buffers.
package bufferpool
import (
"bytes"
"sync"
)
var bufferPool = &sync.Pool{
New: func() interface{} {
return &bytes.Buffer{}
},
}
// GetBuffer returns a buffer from the pool.
func GetBuffer() (buf *bytes.Buffer) {
return bufferPool.Get().(*bytes.Buffer)
}
// PutBuffer returns a buffer to the pool.
// The buffer is reset before it is put back into circulation.
func PutBuffer(buf *bytes.Buffer) {
buf.Reset()
bufferPool.Put(buf)
}
+27
View File
@@ -0,0 +1,27 @@
// Copyright 2016-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package bufferpool
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestBufferPool(t *testing.T) {
buff := GetBuffer()
buff.WriteString("do be do be do")
assert.Equal(t, "do be do be do", buff.String())
PutBuffer(buff)
assert.Equal(t, 0, buff.Len())
}
+80
View File
@@ -0,0 +1,80 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cache
import (
"sync"
)
// Partition represents a cache partition where Load is the callback
// for when the partition is needed.
type Partition struct {
Key string
Load func() (map[string]interface{}, error)
}
type lazyPartition struct {
initSync sync.Once
cache map[string]interface{}
load func() (map[string]interface{}, error)
}
func (l *lazyPartition) init() error {
var err error
l.initSync.Do(func() {
var c map[string]interface{}
c, err = l.load()
l.cache = c
})
return err
}
// PartitionedLazyCache is a lazily loaded cache paritioned by a supplied string key.
type PartitionedLazyCache struct {
partitions map[string]*lazyPartition
}
// NewPartitionedLazyCache creates a new NewPartitionedLazyCache with the supplied
// partitions.
func NewPartitionedLazyCache(partitions ...Partition) *PartitionedLazyCache {
lazyPartitions := make(map[string]*lazyPartition, len(partitions))
for _, partition := range partitions {
lazyPartitions[partition.Key] = &lazyPartition{load: partition.Load}
}
cache := &PartitionedLazyCache{partitions: lazyPartitions}
return cache
}
// Get initializes the partition if not already done so, then looks up the given
// key in the given partition, returns nil if no value found.
func (c *PartitionedLazyCache) Get(partition, key string) (interface{}, error) {
p, found := c.partitions[partition]
if !found {
return nil, nil
}
if err := p.init(); err != nil {
return nil, err
}
if v, found := p.cache[key]; found {
return v, nil
}
return nil, nil
}
+138
View File
@@ -0,0 +1,138 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cache
import (
"errors"
"sync"
"testing"
"github.com/stretchr/testify/require"
)
func TestNewPartitionedLazyCache(t *testing.T) {
t.Parallel()
assert := require.New(t)
p1 := Partition{
Key: "p1",
Load: func() (map[string]interface{}, error) {
return map[string]interface{}{
"p1_1": "p1v1",
"p1_2": "p1v2",
"p1_nil": nil,
}, nil
},
}
p2 := Partition{
Key: "p2",
Load: func() (map[string]interface{}, error) {
return map[string]interface{}{
"p2_1": "p2v1",
"p2_2": "p2v2",
"p2_3": "p2v3",
}, nil
},
}
cache := NewPartitionedLazyCache(p1, p2)
v, err := cache.Get("p1", "p1_1")
assert.NoError(err)
assert.Equal("p1v1", v)
v, err = cache.Get("p1", "p2_1")
assert.NoError(err)
assert.Nil(v)
v, err = cache.Get("p1", "p1_nil")
assert.NoError(err)
assert.Nil(v)
v, err = cache.Get("p2", "p2_3")
assert.NoError(err)
assert.Equal("p2v3", v)
v, err = cache.Get("doesnotexist", "p1_1")
assert.NoError(err)
assert.Nil(v)
v, err = cache.Get("p1", "doesnotexist")
assert.NoError(err)
assert.Nil(v)
errorP := Partition{
Key: "p3",
Load: func() (map[string]interface{}, error) {
return nil, errors.New("Failed")
},
}
cache = NewPartitionedLazyCache(errorP)
v, err = cache.Get("p1", "doesnotexist")
assert.NoError(err)
assert.Nil(v)
_, err = cache.Get("p3", "doesnotexist")
assert.Error(err)
}
func TestConcurrentPartitionedLazyCache(t *testing.T) {
t.Parallel()
assert := require.New(t)
var wg sync.WaitGroup
p1 := Partition{
Key: "p1",
Load: func() (map[string]interface{}, error) {
return map[string]interface{}{
"p1_1": "p1v1",
"p1_2": "p1v2",
"p1_nil": nil,
}, nil
},
}
p2 := Partition{
Key: "p2",
Load: func() (map[string]interface{}, error) {
return map[string]interface{}{
"p2_1": "p2v1",
"p2_2": "p2v2",
"p2_3": "p2v3",
}, nil
},
}
cache := NewPartitionedLazyCache(p1, p2)
for i := 0; i < 100; i++ {
wg.Add(1)
go func() {
defer wg.Done()
for j := 0; j < 10; j++ {
v, err := cache.Get("p1", "p1_1")
assert.NoError(err)
assert.Equal("p1v1", v)
}
}()
}
wg.Wait()
}
+111
View File
@@ -0,0 +1,111 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"os"
"runtime"
"runtime/pprof"
"time"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
var (
benchmarkTimes int
cpuProfileFile string
memProfileFile string
)
var benchmarkCmd = &cobra.Command{
Use: "benchmark",
Short: "Benchmark Hugo by building a site a number of times.",
Long: `Hugo can build a site many times over and analyze the running process
creating a benchmark.`,
}
func init() {
initHugoBuilderFlags(benchmarkCmd)
initBenchmarkBuildingFlags(benchmarkCmd)
benchmarkCmd.Flags().StringVar(&cpuProfileFile, "cpuprofile", "", "path/filename for the CPU profile file")
benchmarkCmd.Flags().StringVar(&memProfileFile, "memprofile", "", "path/filename for the memory profile file")
benchmarkCmd.Flags().IntVarP(&benchmarkTimes, "count", "n", 13, "number of times to build the site")
benchmarkCmd.RunE = benchmark
}
func benchmark(cmd *cobra.Command, args []string) error {
cfgInit := func(c *commandeer) error {
c.Set("renderToMemory", renderToMemory)
return nil
}
c, err := InitializeConfig(false, cfgInit, benchmarkCmd)
if err != nil {
return err
}
var memProf *os.File
if memProfileFile != "" {
memProf, err = os.Create(memProfileFile)
if err != nil {
return err
}
}
var cpuProf *os.File
if cpuProfileFile != "" {
cpuProf, err = os.Create(cpuProfileFile)
if err != nil {
return err
}
}
var memStats runtime.MemStats
runtime.ReadMemStats(&memStats)
memAllocated := memStats.TotalAlloc
mallocs := memStats.Mallocs
if cpuProf != nil {
pprof.StartCPUProfile(cpuProf)
}
t := time.Now()
for i := 0; i < benchmarkTimes; i++ {
if err = c.resetAndBuildSites(); err != nil {
return err
}
}
totalTime := time.Since(t)
if memProf != nil {
pprof.WriteHeapProfile(memProf)
memProf.Close()
}
if cpuProf != nil {
pprof.StopCPUProfile()
cpuProf.Close()
}
runtime.ReadMemStats(&memStats)
totalMemAllocated := memStats.TotalAlloc - memAllocated
totalMallocs := memStats.Mallocs - mallocs
jww.FEEDBACK.Println()
jww.FEEDBACK.Printf("Average time per operation: %vms\n", int(1000*totalTime.Seconds()/float64(benchmarkTimes)))
jww.FEEDBACK.Printf("Average memory allocated per operation: %vkB\n", totalMemAllocated/uint64(benchmarkTimes)/1024)
jww.FEEDBACK.Printf("Average allocations per operation: %v\n", totalMallocs/uint64(benchmarkTimes))
return nil
}
+23
View File
@@ -0,0 +1,23 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"github.com/spf13/cobra"
)
var checkCmd = &cobra.Command{
Use: "check",
Short: "Contains some verification checks",
}
+80
View File
@@ -0,0 +1,80 @@
// Copyright 2017 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"github.com/gohugoio/hugo/common/types"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
src "github.com/gohugoio/hugo/source"
)
type commandeer struct {
*deps.DepsCfg
pathSpec *helpers.PathSpec
visitedURLs *types.EvictingStringQueue
staticDirsConfig []*src.Dirs
serverPorts []int
languages helpers.Languages
configured bool
}
func (c *commandeer) Set(key string, value interface{}) {
if c.configured {
panic("commandeer cannot be changed")
}
c.Cfg.Set(key, value)
}
// PathSpec lazily creates a new PathSpec, as all the paths must
// be configured before it is created.
func (c *commandeer) PathSpec() *helpers.PathSpec {
c.configured = true
return c.pathSpec
}
func (c *commandeer) initFs(fs *hugofs.Fs) error {
c.DepsCfg.Fs = fs
ps, err := helpers.NewPathSpec(fs, c.Cfg)
if err != nil {
return err
}
c.pathSpec = ps
dirsConfig, err := c.createStaticDirsConfig()
if err != nil {
return err
}
c.staticDirsConfig = dirsConfig
return nil
}
func newCommandeer(cfg *deps.DepsCfg, running bool) (*commandeer, error) {
cfg.Running = running
var languages helpers.Languages
if l, ok := cfg.Cfg.Get("languagesSorted").(helpers.Languages); ok {
languages = l
}
c := &commandeer{DepsCfg: cfg, languages: languages, visitedURLs: types.NewEvictingStringQueue(10)}
return c, nil
}
+183
View File
@@ -0,0 +1,183 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"fmt"
"time"
src "github.com/gohugoio/hugo/source"
"github.com/gohugoio/hugo/hugolib"
"path/filepath"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/cast"
"github.com/spf13/cobra"
)
var outputDir string
var unsafe bool
var convertCmd = &cobra.Command{
Use: "convert",
Short: "Convert your content to different formats",
Long: `Convert your content (e.g. front matter) to different formats.
See convert's subcommands toJSON, toTOML and toYAML for more information.`,
RunE: nil,
}
var toJSONCmd = &cobra.Command{
Use: "toJSON",
Short: "Convert front matter to JSON",
Long: `toJSON converts all front matter in the content directory
to use JSON for the front matter.`,
RunE: func(cmd *cobra.Command, args []string) error {
return convertContents(rune([]byte(parser.JSONLead)[0]))
},
}
var toTOMLCmd = &cobra.Command{
Use: "toTOML",
Short: "Convert front matter to TOML",
Long: `toTOML converts all front matter in the content directory
to use TOML for the front matter.`,
RunE: func(cmd *cobra.Command, args []string) error {
return convertContents(rune([]byte(parser.TOMLLead)[0]))
},
}
var toYAMLCmd = &cobra.Command{
Use: "toYAML",
Short: "Convert front matter to YAML",
Long: `toYAML converts all front matter in the content directory
to use YAML for the front matter.`,
RunE: func(cmd *cobra.Command, args []string) error {
return convertContents(rune([]byte(parser.YAMLLead)[0]))
},
}
func init() {
convertCmd.AddCommand(toJSONCmd)
convertCmd.AddCommand(toTOMLCmd)
convertCmd.AddCommand(toYAMLCmd)
convertCmd.PersistentFlags().StringVarP(&outputDir, "output", "o", "", "filesystem path to write files to")
convertCmd.PersistentFlags().StringVarP(&source, "source", "s", "", "filesystem path to read files relative from")
convertCmd.PersistentFlags().BoolVar(&unsafe, "unsafe", false, "enable less safe operations, please backup first")
convertCmd.PersistentFlags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{})
}
func convertContents(mark rune) error {
if outputDir == "" && !unsafe {
return newUserError("Unsafe operation not allowed, use --unsafe or set a different output path")
}
c, err := InitializeConfig(false, nil)
if err != nil {
return err
}
h, err := hugolib.NewHugoSites(*c.DepsCfg)
if err != nil {
return err
}
if err := h.Build(hugolib.BuildCfg{SkipRender: true}); err != nil {
return err
}
site := h.Sites[0]
site.Log.FEEDBACK.Println("processing", len(site.AllPages), "content files")
for _, p := range site.AllPages {
if err := convertAndSavePage(p, site, mark); err != nil {
return err
}
}
return nil
}
func convertAndSavePage(p *hugolib.Page, site *hugolib.Site, mark rune) error {
// The resources are not in .Site.AllPages.
for _, r := range p.Resources.ByType("page") {
if err := convertAndSavePage(r.(*hugolib.Page), site, mark); err != nil {
return err
}
}
if p.Filename() == "" {
// No content file.
return nil
}
site.Log.INFO.Println("Attempting to convert", p.LogicalName())
newPage, err := site.NewPage(p.LogicalName())
if err != nil {
return err
}
f, _ := p.File.(src.ReadableFile)
file, err := f.Open()
if err != nil {
site.Log.ERROR.Println("Error reading file:", p.Path())
file.Close()
return nil
}
psr, err := parser.ReadFrom(file)
if err != nil {
site.Log.ERROR.Println("Error processing file:", p.Path())
file.Close()
return err
}
file.Close()
metadata, err := psr.Metadata()
if err != nil {
site.Log.ERROR.Println("Error processing file:", p.Path())
return err
}
// better handling of dates in formats that don't have support for them
if mark == parser.FormatToLeadRune("json") || mark == parser.FormatToLeadRune("yaml") || mark == parser.FormatToLeadRune("toml") {
newMetadata := cast.ToStringMap(metadata)
for k, v := range newMetadata {
switch vv := v.(type) {
case time.Time:
newMetadata[k] = vv.Format(time.RFC3339)
}
}
metadata = newMetadata
}
newPage.SetSourceContent(psr.Content())
if err = newPage.SetSourceMetaData(metadata, mark); err != nil {
site.Log.ERROR.Printf("Failed to set source metadata for file %q: %s. For more info see For more info see https://github.com/gohugoio/hugo/issues/2458", newPage.FullFilePath(), err)
return nil
}
newFilename := p.Filename()
if outputDir != "" {
newFilename = filepath.Join(outputDir, p.Dir(), newPage.LogicalName())
}
if err = newPage.SaveSourceAs(newFilename); err != nil {
return fmt.Errorf("Failed to save file %q: %s", newFilename, err)
}
return nil
}
+35
View File
@@ -0,0 +1,35 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"runtime"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
var envCmd = &cobra.Command{
Use: "env",
Short: "Print Hugo version and environment info",
Long: `Print Hugo version and environment info. This is useful in Hugo bug reports.`,
RunE: func(cmd *cobra.Command, args []string) error {
printHugoVersion()
jww.FEEDBACK.Printf("GOOS=%q\n", runtime.GOOS)
jww.FEEDBACK.Printf("GOARCH=%q\n", runtime.GOARCH)
jww.FEEDBACK.Printf("GOVERSION=%q\n", runtime.Version())
return nil
},
}
+23
View File
@@ -0,0 +1,23 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"github.com/spf13/cobra"
)
var genCmd = &cobra.Command{
Use: "gen",
Short: "A collection of several useful generators.",
}
+70
View File
@@ -0,0 +1,70 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
var autocompleteTarget string
// bash for now (zsh and others will come)
var autocompleteType string
var genautocompleteCmd = &cobra.Command{
Use: "autocomplete",
Short: "Generate shell autocompletion script for Hugo",
Long: `Generates a shell autocompletion script for Hugo.
NOTE: The current version supports Bash only.
This should work for *nix systems with Bash installed.
By default, the file is written directly to /etc/bash_completion.d
for convenience, and the command may need superuser rights, e.g.:
$ sudo hugo gen autocomplete
Add ` + "`--completionfile=/path/to/file`" + ` flag to set alternative
file-path and name.
Logout and in again to reload the completion scripts,
or just source them in directly:
$ . /etc/bash_completion`,
RunE: func(cmd *cobra.Command, args []string) error {
if autocompleteType != "bash" {
return newUserError("Only Bash is supported for now")
}
err := cmd.Root().GenBashCompletionFile(autocompleteTarget)
if err != nil {
return err
}
jww.FEEDBACK.Println("Bash completion file for Hugo saved to", autocompleteTarget)
return nil
},
}
func init() {
genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteTarget, "completionfile", "", "/etc/bash_completion.d/hugo.sh", "autocompletion file")
genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteType, "type", "", "bash", "autocompletion type (currently only bash supported)")
// For bash-completion
genautocompleteCmd.PersistentFlags().SetAnnotation("completionfile", cobra.BashCompFilenameExt, []string{})
}
+70
View File
@@ -0,0 +1,70 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"os"
"github.com/alecthomas/chroma"
"github.com/alecthomas/chroma/formatters/html"
"github.com/alecthomas/chroma/styles"
"github.com/spf13/cobra"
)
type genChromaStyles struct {
style string
highlightStyle string
linesStyle string
cmd *cobra.Command
}
// TODO(bep) highlight
func createGenChromaStyles() *genChromaStyles {
g := &genChromaStyles{
cmd: &cobra.Command{
Use: "chromastyles",
Short: "Generate CSS stylesheet for the Chroma code highlighter",
Long: `Generate CSS stylesheet for the Chroma code highlighter for a given style. This stylesheet is needed if pygmentsUseClasses is enabled in config.
See https://help.farbox.com/pygments.html for preview of available styles`,
},
}
g.cmd.RunE = func(cmd *cobra.Command, args []string) error {
return g.generate()
}
g.cmd.PersistentFlags().StringVar(&g.style, "style", "friendly", "highlighter style (see https://help.farbox.com/pygments.html)")
g.cmd.PersistentFlags().StringVar(&g.highlightStyle, "highlightStyle", "bg:#ffffcc", "style used for highlighting lines (see https://github.com/alecthomas/chroma)")
g.cmd.PersistentFlags().StringVar(&g.linesStyle, "linesStyle", "", "style used for line numbers (see https://github.com/alecthomas/chroma)")
return g
}
func (g *genChromaStyles) generate() error {
builder := styles.Get(g.style).Builder()
if g.highlightStyle != "" {
builder.Add(chroma.LineHighlight, g.highlightStyle)
}
if g.linesStyle != "" {
builder.Add(chroma.LineNumbers, g.linesStyle)
}
style, err := builder.Build()
if err != nil {
return err
}
formatter := html.New(html.WithClasses())
formatter.WriteCSS(os.Stdout, style)
return nil
}
+86
View File
@@ -0,0 +1,86 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"fmt"
"path"
"path/filepath"
"strings"
"time"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
jww "github.com/spf13/jwalterweatherman"
)
const gendocFrontmatterTemplate = `---
date: %s
title: "%s"
slug: %s
url: %s
---
`
var gendocdir string
var gendocCmd = &cobra.Command{
Use: "doc",
Short: "Generate Markdown documentation for the Hugo CLI.",
Long: `Generate Markdown documentation for the Hugo CLI.
This command is, mostly, used to create up-to-date documentation
of Hugo's command-line interface for http://gohugo.io/.
It creates one Markdown file per command with front matter suitable
for rendering in Hugo.`,
RunE: func(cmd *cobra.Command, args []string) error {
if !strings.HasSuffix(gendocdir, helpers.FilePathSeparator) {
gendocdir += helpers.FilePathSeparator
}
if found, _ := helpers.Exists(gendocdir, hugofs.Os); !found {
jww.FEEDBACK.Println("Directory", gendocdir, "does not exist, creating...")
if err := hugofs.Os.MkdirAll(gendocdir, 0777); err != nil {
return err
}
}
now := time.Now().Format(time.RFC3339)
prepender := func(filename string) string {
name := filepath.Base(filename)
base := strings.TrimSuffix(name, path.Ext(name))
url := "/commands/" + strings.ToLower(base) + "/"
return fmt.Sprintf(gendocFrontmatterTemplate, now, strings.Replace(base, "_", " ", -1), base, url)
}
linkHandler := func(name string) string {
base := strings.TrimSuffix(name, path.Ext(name))
return "/commands/" + strings.ToLower(base) + "/"
}
jww.FEEDBACK.Println("Generating Hugo command-line documentation in", gendocdir, "...")
doc.GenMarkdownTreeCustom(cmd.Root(), gendocdir, prepender, linkHandler)
jww.FEEDBACK.Println("Done.")
return nil
},
}
func init() {
gendocCmd.PersistentFlags().StringVar(&gendocdir, "dir", "/tmp/hugodoc/", "the directory to write the doc.")
// For bash-completion
gendocCmd.PersistentFlags().SetAnnotation("dir", cobra.BashCompSubdirsInDir, []string{})
}
+70
View File
@@ -0,0 +1,70 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"github.com/gohugoio/hugo/docshelper"
"github.com/spf13/cobra"
)
type genDocsHelper struct {
target string
cmd *cobra.Command
}
func createGenDocsHelper() *genDocsHelper {
g := &genDocsHelper{
cmd: &cobra.Command{
Use: "docshelper",
Short: "Generate some data files for the Hugo docs.",
Hidden: true,
},
}
g.cmd.RunE = func(cmd *cobra.Command, args []string) error {
return g.generate()
}
g.cmd.PersistentFlags().StringVarP(&g.target, "dir", "", "docs/data", "data dir")
return g
}
func (g *genDocsHelper) generate() error {
fmt.Println("Generate docs data to", g.target)
targetFile := filepath.Join(g.target, "docs.json")
f, err := os.Create(targetFile)
if err != nil {
return err
}
defer f.Close()
enc := json.NewEncoder(f)
enc.SetIndent("", " ")
if err := enc.Encode(docshelper.DocProviders); err != nil {
return err
}
fmt.Println("Done!")
return nil
}
+66
View File
@@ -0,0 +1,66 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"fmt"
"strings"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
jww "github.com/spf13/jwalterweatherman"
)
var genmandir string
var genmanCmd = &cobra.Command{
Use: "man",
Short: "Generate man pages for the Hugo CLI",
Long: `This command automatically generates up-to-date man pages of Hugo's
command-line interface. By default, it creates the man page files
in the "man" directory under the current directory.`,
RunE: func(cmd *cobra.Command, args []string) error {
header := &doc.GenManHeader{
Section: "1",
Manual: "Hugo Manual",
Source: fmt.Sprintf("Hugo %s", helpers.CurrentHugoVersion),
}
if !strings.HasSuffix(genmandir, helpers.FilePathSeparator) {
genmandir += helpers.FilePathSeparator
}
if found, _ := helpers.Exists(genmandir, hugofs.Os); !found {
jww.FEEDBACK.Println("Directory", genmandir, "does not exist, creating...")
if err := hugofs.Os.MkdirAll(genmandir, 0777); err != nil {
return err
}
}
cmd.Root().DisableAutoGenTag = true
jww.FEEDBACK.Println("Generating Hugo man pages in", genmandir, "...")
doc.GenManTree(cmd.Root(), header, genmandir)
jww.FEEDBACK.Println("Done.")
return nil
},
}
func init() {
genmanCmd.PersistentFlags().StringVar(&genmandir, "dir", "man/", "the directory to write the man pages.")
// For bash-completion
genmanCmd.PersistentFlags().SetAnnotation("dir", cobra.BashCompSubdirsInDir, []string{})
}
+1260
View File
File diff suppressed because it is too large Load Diff
+27
View File
@@ -0,0 +1,27 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import "github.com/spf13/cobra"
func init() {
// This message to show to Windows users if Hugo is opened from explorer.exe
cobra.MousetrapHelpText = `
Hugo is a command-line tool for generating static website.
You need to open cmd.exe and run Hugo from there.
Visit http://gohugo.io/ for more information.`
}
+613
View File
@@ -0,0 +1,613 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"bytes"
"errors"
"io"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/afero"
"github.com/spf13/cast"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
func init() {
importCmd.AddCommand(importJekyllCmd)
}
var importCmd = &cobra.Command{
Use: "import",
Short: "Import your site from others.",
Long: `Import your site from other web site generators like Jekyll.
Import requires a subcommand, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`.",
RunE: nil,
}
var importJekyllCmd = &cobra.Command{
Use: "jekyll",
Short: "hugo import from Jekyll",
Long: `hugo import from Jekyll.
Import from Jekyll requires two paths, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`.",
RunE: importFromJekyll,
}
func init() {
importJekyllCmd.Flags().Bool("force", false, "allow import into non-empty target directory")
}
func importFromJekyll(cmd *cobra.Command, args []string) error {
if len(args) < 2 {
return newUserError(`Import from Jekyll requires two paths, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`.")
}
jekyllRoot, err := filepath.Abs(filepath.Clean(args[0]))
if err != nil {
return newUserError("Path error:", args[0])
}
targetDir, err := filepath.Abs(filepath.Clean(args[1]))
if err != nil {
return newUserError("Path error:", args[1])
}
jww.INFO.Println("Import Jekyll from:", jekyllRoot, "to:", targetDir)
if strings.HasPrefix(filepath.Dir(targetDir), jekyllRoot) {
return newUserError("Target path should not be inside the Jekyll root, aborting.")
}
forceImport, _ := cmd.Flags().GetBool("force")
fs := afero.NewOsFs()
jekyllPostDirs, hasAnyPost := getJekyllDirInfo(fs, jekyllRoot)
if !hasAnyPost {
return errors.New("Your Jekyll root contains neither posts nor drafts, aborting.")
}
site, err := createSiteFromJekyll(jekyllRoot, targetDir, jekyllPostDirs, forceImport)
if err != nil {
return newUserError(err)
}
jww.FEEDBACK.Println("Importing...")
fileCount := 0
callback := func(path string, fi os.FileInfo, err error) error {
if err != nil {
return err
}
if fi.IsDir() {
return nil
}
relPath, err := filepath.Rel(jekyllRoot, path)
if err != nil {
return newUserError("Get rel path error:", path)
}
relPath = filepath.ToSlash(relPath)
draft := false
switch {
case strings.Contains(relPath, "_posts/"):
relPath = filepath.Join("content/post", strings.Replace(relPath, "_posts/", "", -1))
case strings.Contains(relPath, "_drafts/"):
relPath = filepath.Join("content/draft", strings.Replace(relPath, "_drafts/", "", -1))
draft = true
default:
return nil
}
fileCount++
return convertJekyllPost(site, path, relPath, targetDir, draft)
}
for jekyllPostDir, hasAnyPostInDir := range jekyllPostDirs {
if hasAnyPostInDir {
if err = helpers.SymbolicWalk(hugofs.Os, filepath.Join(jekyllRoot, jekyllPostDir), callback); err != nil {
return err
}
}
}
jww.FEEDBACK.Println("Congratulations!", fileCount, "post(s) imported!")
jww.FEEDBACK.Println("Now, start Hugo by yourself:\n" +
"$ git clone https://github.com/spf13/herring-cove.git " + args[1] + "/themes/herring-cove")
jww.FEEDBACK.Println("$ cd " + args[1] + "\n$ hugo server --theme=herring-cove")
jww.FEEDBACK.Println("Congratulations!", fileCount, "post(s) imported!")
jww.FEEDBACK.Println("Now, start Hugo by yourself:\n" +
"$ git clone https://github.com/spf13/herring-cove.git " + args[1] + "/themes/herring-cove")
jww.FEEDBACK.Println("$ cd " + args[1] + "\n$ hugo server --theme=herring-cove")
return nil
}
func getJekyllDirInfo(fs afero.Fs, jekyllRoot string) (map[string]bool, bool) {
postDirs := make(map[string]bool)
hasAnyPost := false
if entries, err := ioutil.ReadDir(jekyllRoot); err == nil {
for _, entry := range entries {
if entry.IsDir() {
subDir := filepath.Join(jekyllRoot, entry.Name())
if isPostDir, hasAnyPostInDir := retrieveJekyllPostDir(fs, subDir); isPostDir {
postDirs[entry.Name()] = hasAnyPostInDir
if hasAnyPostInDir {
hasAnyPost = true
}
}
}
}
}
return postDirs, hasAnyPost
}
func retrieveJekyllPostDir(fs afero.Fs, dir string) (bool, bool) {
if strings.HasSuffix(dir, "_posts") || strings.HasSuffix(dir, "_drafts") {
isEmpty, _ := helpers.IsEmpty(dir, fs)
return true, !isEmpty
}
if entries, err := ioutil.ReadDir(dir); err == nil {
for _, entry := range entries {
if entry.IsDir() {
subDir := filepath.Join(dir, entry.Name())
if isPostDir, hasAnyPost := retrieveJekyllPostDir(fs, subDir); isPostDir {
return isPostDir, hasAnyPost
}
}
}
}
return false, true
}
func createSiteFromJekyll(jekyllRoot, targetDir string, jekyllPostDirs map[string]bool, force bool) (*hugolib.Site, error) {
s, err := hugolib.NewSiteDefaultLang()
if err != nil {
return nil, err
}
fs := s.Fs.Source
if exists, _ := helpers.Exists(targetDir, fs); exists {
if isDir, _ := helpers.IsDir(targetDir, fs); !isDir {
return nil, errors.New("Target path \"" + targetDir + "\" already exists but not a directory")
}
isEmpty, _ := helpers.IsEmpty(targetDir, fs)
if !isEmpty && !force {
return nil, errors.New("Target path \"" + targetDir + "\" already exists and is not empty")
}
}
jekyllConfig := loadJekyllConfig(fs, jekyllRoot)
mkdir(targetDir, "layouts")
mkdir(targetDir, "content")
mkdir(targetDir, "archetypes")
mkdir(targetDir, "static")
mkdir(targetDir, "data")
mkdir(targetDir, "themes")
createConfigFromJekyll(fs, targetDir, "yaml", jekyllConfig)
copyJekyllFilesAndFolders(jekyllRoot, filepath.Join(targetDir, "static"), jekyllPostDirs)
return s, nil
}
func loadJekyllConfig(fs afero.Fs, jekyllRoot string) map[string]interface{} {
path := filepath.Join(jekyllRoot, "_config.yml")
exists, err := helpers.Exists(path, fs)
if err != nil || !exists {
jww.WARN.Println("_config.yaml not found: Is the specified Jekyll root correct?")
return nil
}
f, err := fs.Open(path)
if err != nil {
return nil
}
defer f.Close()
b, err := ioutil.ReadAll(f)
if err != nil {
return nil
}
c, err := parser.HandleYAMLMetaData(b)
if err != nil {
return nil
}
return c.(map[string]interface{})
}
func createConfigFromJekyll(fs afero.Fs, inpath string, kind string, jekyllConfig map[string]interface{}) (err error) {
title := "My New Hugo Site"
baseURL := "http://example.org/"
for key, value := range jekyllConfig {
lowerKey := strings.ToLower(key)
switch lowerKey {
case "title":
if str, ok := value.(string); ok {
title = str
}
case "url":
if str, ok := value.(string); ok {
baseURL = str
}
}
}
in := map[string]interface{}{
"baseURL": baseURL,
"title": title,
"languageCode": "en-us",
"disablePathToLower": true,
}
kind = parser.FormatSanitize(kind)
var buf bytes.Buffer
err = parser.InterfaceToConfig(in, parser.FormatToLeadRune(kind), &buf)
if err != nil {
return err
}
return helpers.WriteToDisk(filepath.Join(inpath, "config."+kind), &buf, fs)
}
func copyFile(source string, dest string) error {
sf, err := os.Open(source)
if err != nil {
return err
}
defer sf.Close()
df, err := os.Create(dest)
if err != nil {
return err
}
defer df.Close()
_, err = io.Copy(df, sf)
if err == nil {
si, err := os.Stat(source)
if err != nil {
err = os.Chmod(dest, si.Mode())
if err != nil {
return err
}
}
}
return nil
}
func copyDir(source string, dest string) error {
fi, err := os.Stat(source)
if err != nil {
return err
}
if !fi.IsDir() {
return errors.New(source + " is not a directory")
}
err = os.MkdirAll(dest, fi.Mode())
if err != nil {
return err
}
entries, err := ioutil.ReadDir(source)
for _, entry := range entries {
sfp := filepath.Join(source, entry.Name())
dfp := filepath.Join(dest, entry.Name())
if entry.IsDir() {
err = copyDir(sfp, dfp)
if err != nil {
jww.ERROR.Println(err)
}
} else {
err = copyFile(sfp, dfp)
if err != nil {
jww.ERROR.Println(err)
}
}
}
return nil
}
func copyJekyllFilesAndFolders(jekyllRoot, dest string, jekyllPostDirs map[string]bool) (err error) {
fi, err := os.Stat(jekyllRoot)
if err != nil {
return err
}
if !fi.IsDir() {
return errors.New(jekyllRoot + " is not a directory")
}
err = os.MkdirAll(dest, fi.Mode())
if err != nil {
return err
}
entries, err := ioutil.ReadDir(jekyllRoot)
for _, entry := range entries {
sfp := filepath.Join(jekyllRoot, entry.Name())
dfp := filepath.Join(dest, entry.Name())
if entry.IsDir() {
if entry.Name()[0] != '_' && entry.Name()[0] != '.' {
if _, ok := jekyllPostDirs[entry.Name()]; !ok {
err = copyDir(sfp, dfp)
if err != nil {
jww.ERROR.Println(err)
}
}
}
} else {
lowerEntryName := strings.ToLower(entry.Name())
exceptSuffix := []string{".md", ".markdown", ".html", ".htm",
".xml", ".textile", "rakefile", "gemfile", ".lock"}
isExcept := false
for _, suffix := range exceptSuffix {
if strings.HasSuffix(lowerEntryName, suffix) {
isExcept = true
break
}
}
if !isExcept && entry.Name()[0] != '.' && entry.Name()[0] != '_' {
err = copyFile(sfp, dfp)
if err != nil {
jww.ERROR.Println(err)
}
}
}
}
return nil
}
func parseJekyllFilename(filename string) (time.Time, string, error) {
re := regexp.MustCompile(`(\d+-\d+-\d+)-(.+)\..*`)
r := re.FindAllStringSubmatch(filename, -1)
if len(r) == 0 {
return time.Now(), "", errors.New("filename not match")
}
postDate, err := time.Parse("2006-1-2", r[0][1])
if err != nil {
return time.Now(), "", err
}
postName := r[0][2]
return postDate, postName, nil
}
func convertJekyllPost(s *hugolib.Site, path, relPath, targetDir string, draft bool) error {
jww.TRACE.Println("Converting", path)
filename := filepath.Base(path)
postDate, postName, err := parseJekyllFilename(filename)
if err != nil {
jww.WARN.Printf("Failed to parse filename '%s': %s. Skipping.", filename, err)
return nil
}
jww.TRACE.Println(filename, postDate, postName)
targetFile := filepath.Join(targetDir, relPath)
targetParentDir := filepath.Dir(targetFile)
os.MkdirAll(targetParentDir, 0777)
contentBytes, err := ioutil.ReadFile(path)
if err != nil {
jww.ERROR.Println("Read file error:", path)
return err
}
psr, err := parser.ReadFrom(bytes.NewReader(contentBytes))
if err != nil {
jww.ERROR.Println("Parse file error:", path)
return err
}
metadata, err := psr.Metadata()
if err != nil {
jww.ERROR.Println("Processing file error:", path)
return err
}
newmetadata, err := convertJekyllMetaData(metadata, postName, postDate, draft)
if err != nil {
jww.ERROR.Println("Convert metadata error:", path)
return err
}
jww.TRACE.Println(newmetadata)
content := convertJekyllContent(newmetadata, string(psr.Content()))
page, err := s.NewPage(filename)
if err != nil {
jww.ERROR.Println("New page error", filename)
return err
}
page.SetSourceContent([]byte(content))
page.SetSourceMetaData(newmetadata, parser.FormatToLeadRune("yaml"))
page.SaveSourceAs(targetFile)
jww.TRACE.Println("Target file:", targetFile)
return nil
}
func convertJekyllMetaData(m interface{}, postName string, postDate time.Time, draft bool) (interface{}, error) {
url := postDate.Format("/2006/01/02/") + postName + "/"
metadata, err := cast.ToStringMapE(m)
if err != nil {
return nil, err
}
if draft {
metadata["draft"] = true
}
for key, value := range metadata {
lowerKey := strings.ToLower(key)
switch lowerKey {
case "layout":
delete(metadata, key)
case "permalink":
if str, ok := value.(string); ok {
url = str
}
delete(metadata, key)
case "category":
if str, ok := value.(string); ok {
metadata["categories"] = []string{str}
}
delete(metadata, key)
case "excerpt_separator":
if key != lowerKey {
delete(metadata, key)
metadata[lowerKey] = value
}
case "date":
if str, ok := value.(string); ok {
re := regexp.MustCompile(`(\d+):(\d+):(\d+)`)
r := re.FindAllStringSubmatch(str, -1)
if len(r) > 0 {
hour, _ := strconv.Atoi(r[0][1])
minute, _ := strconv.Atoi(r[0][2])
second, _ := strconv.Atoi(r[0][3])
postDate = time.Date(postDate.Year(), postDate.Month(), postDate.Day(), hour, minute, second, 0, time.UTC)
}
}
delete(metadata, key)
}
}
metadata["url"] = url
metadata["date"] = postDate.Format(time.RFC3339)
return metadata, nil
}
func convertJekyllContent(m interface{}, content string) string {
metadata, _ := cast.ToStringMapE(m)
lines := strings.Split(content, "\n")
var resultLines []string
for _, line := range lines {
resultLines = append(resultLines, strings.Trim(line, "\r\n"))
}
content = strings.Join(resultLines, "\n")
excerptSep := "<!--more-->"
if value, ok := metadata["excerpt_separator"]; ok {
if str, strOk := value.(string); strOk {
content = strings.Replace(content, strings.TrimSpace(str), excerptSep, -1)
}
}
replaceList := []struct {
re *regexp.Regexp
replace string
}{
{regexp.MustCompile("(?i)<!-- more -->"), "<!--more-->"},
{regexp.MustCompile(`\{%\s*raw\s*%\}\s*(.*?)\s*\{%\s*endraw\s*%\}`), "$1"},
{regexp.MustCompile(`{%\s*highlight\s*(.*?)\s*%}`), "{{< highlight $1 >}}"},
{regexp.MustCompile(`{%\s*endhighlight\s*%}`), "{{< / highlight >}}"},
}
for _, replace := range replaceList {
content = replace.re.ReplaceAllString(content, replace.replace)
}
replaceListFunc := []struct {
re *regexp.Regexp
replace func(string) string
}{
// Octopress image tag: http://octopress.org/docs/plugins/image-tag/
{regexp.MustCompile(`{%\s+img\s*(.*?)\s*%}`), replaceImageTag},
}
for _, replace := range replaceListFunc {
content = replace.re.ReplaceAllStringFunc(content, replace.replace)
}
return content
}
func replaceImageTag(match string) string {
r := regexp.MustCompile(`{%\s+img\s*(\p{L}*)\s+([\S]*/[\S]+)\s+(\d*)\s*(\d*)\s*(.*?)\s*%}`)
result := bytes.NewBufferString("{{< figure ")
parts := r.FindStringSubmatch(match)
// Index 0 is the entire string, ignore
replaceOptionalPart(result, "class", parts[1])
replaceOptionalPart(result, "src", parts[2])
replaceOptionalPart(result, "width", parts[3])
replaceOptionalPart(result, "height", parts[4])
// title + alt
part := parts[5]
if len(part) > 0 {
splits := strings.Split(part, "'")
lenSplits := len(splits)
if lenSplits == 1 {
replaceOptionalPart(result, "title", splits[0])
} else if lenSplits == 3 {
replaceOptionalPart(result, "title", splits[1])
} else if lenSplits == 5 {
replaceOptionalPart(result, "title", splits[1])
replaceOptionalPart(result, "alt", splits[3])
}
}
result.WriteString(">}}")
return result.String()
}
func replaceOptionalPart(buffer *bytes.Buffer, partName string, part string) {
if len(part) > 0 {
buffer.WriteString(partName + "=\"" + part + "\" ")
}
}
+126
View File
@@ -0,0 +1,126 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"encoding/json"
"github.com/stretchr/testify/assert"
"testing"
"time"
)
func TestParseJekyllFilename(t *testing.T) {
filenameArray := []string{
"2015-01-02-test.md",
"2012-03-15-中文.markup",
}
expectResult := []struct {
postDate time.Time
postName string
}{
{time.Date(2015, time.January, 2, 0, 0, 0, 0, time.UTC), "test"},
{time.Date(2012, time.March, 15, 0, 0, 0, 0, time.UTC), "中文"},
}
for i, filename := range filenameArray {
postDate, postName, err := parseJekyllFilename(filename)
assert.Equal(t, err, nil)
assert.Equal(t, expectResult[i].postDate.Format("2006-01-02"), postDate.Format("2006-01-02"))
assert.Equal(t, expectResult[i].postName, postName)
}
}
func TestConvertJekyllMetadata(t *testing.T) {
testDataList := []struct {
metadata interface{}
postName string
postDate time.Time
draft bool
expect string
}{
{map[interface{}]interface{}{}, "testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"date":"2015-10-01T00:00:00Z","url":"/2015/10/01/testPost/"}`},
{map[interface{}]interface{}{}, "testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), true,
`{"date":"2015-10-01T00:00:00Z","draft":true,"url":"/2015/10/01/testPost/"}`},
{map[interface{}]interface{}{"Permalink": "/permalink.html", "layout": "post"},
"testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"date":"2015-10-01T00:00:00Z","url":"/permalink.html"}`},
{map[interface{}]interface{}{"permalink": "/permalink.html"},
"testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"date":"2015-10-01T00:00:00Z","url":"/permalink.html"}`},
{map[interface{}]interface{}{"category": nil, "permalink": 123},
"testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"date":"2015-10-01T00:00:00Z","url":"/2015/10/01/testPost/"}`},
{map[interface{}]interface{}{"Excerpt_Separator": "sep"},
"testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"date":"2015-10-01T00:00:00Z","excerpt_separator":"sep","url":"/2015/10/01/testPost/"}`},
{map[interface{}]interface{}{"category": "book", "layout": "post", "Others": "Goods", "Date": "2015-10-01 12:13:11"},
"testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"Others":"Goods","categories":["book"],"date":"2015-10-01T12:13:11Z","url":"/2015/10/01/testPost/"}`},
}
for _, data := range testDataList {
result, err := convertJekyllMetaData(data.metadata, data.postName, data.postDate, data.draft)
assert.Equal(t, nil, err)
jsonResult, err := json.Marshal(result)
assert.Equal(t, nil, err)
assert.Equal(t, data.expect, string(jsonResult))
}
}
func TestConvertJekyllContent(t *testing.T) {
testDataList := []struct {
metadata interface{}
content string
expect string
}{
{map[interface{}]interface{}{},
`Test content\n<!-- more -->\npart2 content`, `Test content\n<!--more-->\npart2 content`},
{map[interface{}]interface{}{},
`Test content\n<!-- More -->\npart2 content`, `Test content\n<!--more-->\npart2 content`},
{map[interface{}]interface{}{"excerpt_separator": "<!--sep-->"},
`Test content\n<!--sep-->\npart2 content`, `Test content\n<!--more-->\npart2 content`},
{map[interface{}]interface{}{}, "{% raw %}text{% endraw %}", "text"},
{map[interface{}]interface{}{}, "{%raw%} text2 {%endraw %}", "text2"},
{map[interface{}]interface{}{},
"{% highlight go %}\nvar s int\n{% endhighlight %}",
"{{< highlight go >}}\nvar s int\n{{< / highlight >}}"},
// Octopress image tag
{map[interface{}]interface{}{},
"{% img http://placekitten.com/890/280 %}",
"{{< figure src=\"http://placekitten.com/890/280\" >}}"},
{map[interface{}]interface{}{},
"{% img left http://placekitten.com/320/250 Place Kitten #2 %}",
"{{< figure class=\"left\" src=\"http://placekitten.com/320/250\" title=\"Place Kitten #2\" >}}"},
{map[interface{}]interface{}{},
"{% img right http://placekitten.com/300/500 150 250 'Place Kitten #3' %}",
"{{< figure class=\"right\" src=\"http://placekitten.com/300/500\" width=\"150\" height=\"250\" title=\"Place Kitten #3\" >}}"},
{map[interface{}]interface{}{},
"{% img right http://placekitten.com/300/500 150 250 'Place Kitten #4' 'An image of a very cute kitten' %}",
"{{< figure class=\"right\" src=\"http://placekitten.com/300/500\" width=\"150\" height=\"250\" title=\"Place Kitten #4\" alt=\"An image of a very cute kitten\" >}}"},
{map[interface{}]interface{}{},
"{% img http://placekitten.com/300/500 150 250 'Place Kitten #4' 'An image of a very cute kitten' %}",
"{{< figure src=\"http://placekitten.com/300/500\" width=\"150\" height=\"250\" title=\"Place Kitten #4\" alt=\"An image of a very cute kitten\" >}}"},
{map[interface{}]interface{}{},
"{% img right /placekitten/300/500 'Place Kitten #4' 'An image of a very cute kitten' %}",
"{{< figure class=\"right\" src=\"/placekitten/300/500\" title=\"Place Kitten #4\" alt=\"An image of a very cute kitten\" >}}"},
}
for _, data := range testDataList {
result := convertJekyllContent(data.metadata, data.content)
assert.Equal(t, data.expect, result)
}
}
+85
View File
@@ -0,0 +1,85 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"syscall"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
func init() {
checkCmd.AddCommand(limit)
}
var limit = &cobra.Command{
Use: "ulimit",
Short: "Check system ulimit settings",
Long: `Hugo will inspect the current ulimit settings on the system.
This is primarily to ensure that Hugo can watch enough files on some OSs`,
RunE: func(cmd *cobra.Command, args []string) error {
var rLimit syscall.Rlimit
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
return newSystemError("Error Getting Rlimit ", err)
}
jww.FEEDBACK.Println("Current rLimit:", rLimit)
jww.FEEDBACK.Println("Attempting to increase limit")
rLimit.Max = 999999
rLimit.Cur = 999999
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
return newSystemError("Error Setting rLimit ", err)
}
err = syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
return newSystemError("Error Getting rLimit ", err)
}
jww.FEEDBACK.Println("rLimit after change:", rLimit)
return nil
},
}
func tweakLimit() {
var rLimit syscall.Rlimit
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
jww.ERROR.Println("Unable to obtain rLimit", err)
}
if rLimit.Cur < rLimit.Max {
rLimit.Max = 64000
rLimit.Cur = 64000
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
jww.WARN.Println("Unable to increase number of open files limit", err)
}
}
}
+32
View File
@@ -0,0 +1,32 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !darwin
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
func tweakLimit() {
// nothing to do
}
+149
View File
@@ -0,0 +1,149 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"path/filepath"
"github.com/gohugoio/hugo/hugolib"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
func init() {
listCmd.AddCommand(listDraftsCmd)
listCmd.AddCommand(listFutureCmd)
listCmd.AddCommand(listExpiredCmd)
listCmd.PersistentFlags().StringVarP(&source, "source", "s", "", "filesystem path to read files relative from")
listCmd.PersistentFlags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{})
}
var listCmd = &cobra.Command{
Use: "list",
Short: "Listing out various types of content",
Long: `Listing out various types of content.
List requires a subcommand, e.g. ` + "`hugo list drafts`.",
RunE: nil,
}
var listDraftsCmd = &cobra.Command{
Use: "drafts",
Short: "List all drafts",
Long: `List all of the drafts in your content directory.`,
RunE: func(cmd *cobra.Command, args []string) error {
cfgInit := func(c *commandeer) error {
c.Set("buildDrafts", true)
return nil
}
c, err := InitializeConfig(false, cfgInit)
if err != nil {
return err
}
sites, err := hugolib.NewHugoSites(*c.DepsCfg)
if err != nil {
return newSystemError("Error creating sites", err)
}
if err := sites.Build(hugolib.BuildCfg{SkipRender: true}); err != nil {
return newSystemError("Error Processing Source Content", err)
}
for _, p := range sites.Pages() {
if p.IsDraft() {
jww.FEEDBACK.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
}
}
return nil
},
}
var listFutureCmd = &cobra.Command{
Use: "future",
Short: "List all posts dated in the future",
Long: `List all of the posts in your content directory which will be
posted in the future.`,
RunE: func(cmd *cobra.Command, args []string) error {
cfgInit := func(c *commandeer) error {
c.Set("buildFuture", true)
return nil
}
c, err := InitializeConfig(false, cfgInit)
if err != nil {
return err
}
sites, err := hugolib.NewHugoSites(*c.DepsCfg)
if err != nil {
return newSystemError("Error creating sites", err)
}
if err := sites.Build(hugolib.BuildCfg{SkipRender: true}); err != nil {
return newSystemError("Error Processing Source Content", err)
}
for _, p := range sites.Pages() {
if p.IsFuture() {
jww.FEEDBACK.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
}
}
return nil
},
}
var listExpiredCmd = &cobra.Command{
Use: "expired",
Short: "List all posts already expired",
Long: `List all of the posts in your content directory which has already
expired.`,
RunE: func(cmd *cobra.Command, args []string) error {
cfgInit := func(c *commandeer) error {
c.Set("buildExpired", true)
return nil
}
c, err := InitializeConfig(false, cfgInit)
if err != nil {
return err
}
sites, err := hugolib.NewHugoSites(*c.DepsCfg)
if err != nil {
return newSystemError("Error creating sites", err)
}
if err := sites.Build(hugolib.BuildCfg{SkipRender: true}); err != nil {
return newSystemError("Error Processing Source Content", err)
}
for _, p := range sites.Pages() {
if p.IsExpired() {
jww.FEEDBACK.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
}
}
return nil
},
}
+66
View File
@@ -0,0 +1,66 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.Print the version number of Hug
package commands
import (
"reflect"
"sort"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
)
var configCmd = &cobra.Command{
Use: "config",
Short: "Print the site configuration",
Long: `Print the site configuration, both default and custom settings.`,
}
func init() {
configCmd.RunE = printConfig
}
func printConfig(cmd *cobra.Command, args []string) error {
cfg, err := InitializeConfig(false, nil, configCmd)
if err != nil {
return err
}
allSettings := cfg.Cfg.(*viper.Viper).AllSettings()
var separator string
if allSettings["metadataformat"] == "toml" {
separator = " = "
} else {
separator = ": "
}
var keys []string
for k := range allSettings {
keys = append(keys, k)
}
sort.Strings(keys)
for _, k := range keys {
kv := reflect.ValueOf(allSettings[k])
if kv.Kind() == reflect.String {
jww.FEEDBACK.Printf("%s%s\"%+v\"\n", k, separator, allSettings[k])
} else {
jww.FEEDBACK.Printf("%s%s%+v\n", k, separator, allSettings[k])
}
}
return nil
}
+400
View File
@@ -0,0 +1,400 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"bytes"
"errors"
"fmt"
"os"
"path/filepath"
"strings"
"time"
"github.com/gohugoio/hugo/create"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/afero"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
)
var (
configFormat string
contentEditor string
contentType string
)
func init() {
newSiteCmd.Flags().StringVarP(&configFormat, "format", "f", "toml", "config & frontmatter format")
newSiteCmd.Flags().Bool("force", false, "init inside non-empty directory")
newCmd.Flags().StringVarP(&contentType, "kind", "k", "", "content type to create")
newCmd.PersistentFlags().StringVarP(&source, "source", "s", "", "filesystem path to read files relative from")
newCmd.PersistentFlags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{})
newCmd.Flags().StringVar(&contentEditor, "editor", "", "edit new content with this editor, if provided")
newCmd.AddCommand(newSiteCmd)
newCmd.AddCommand(newThemeCmd)
}
var newCmd = &cobra.Command{
Use: "new [path]",
Short: "Create new content for your site",
Long: `Create a new content file and automatically set the date and title.
It will guess which kind of file to create based on the path provided.
You can also specify the kind with ` + "`-k KIND`" + `.
If archetypes are provided in your theme or site, they will be used.`,
RunE: NewContent,
}
var newSiteCmd = &cobra.Command{
Use: "site [path]",
Short: "Create a new site (skeleton)",
Long: `Create a new site in the provided directory.
The new site will have the correct structure, but no content or theme yet.
Use ` + "`hugo new [contentPath]`" + ` to create new content.`,
RunE: NewSite,
}
var newThemeCmd = &cobra.Command{
Use: "theme [name]",
Short: "Create a new theme",
Long: `Create a new theme (skeleton) called [name] in the current directory.
New theme is a skeleton. Please add content to the touched files. Add your
name to the copyright line in the license and adjust the theme.toml file
as you see fit.`,
RunE: NewTheme,
}
// NewContent adds new content to a Hugo site.
func NewContent(cmd *cobra.Command, args []string) error {
cfgInit := func(c *commandeer) error {
if cmd.Flags().Changed("editor") {
c.Set("newContentEditor", contentEditor)
}
return nil
}
c, err := InitializeConfig(false, cfgInit)
if err != nil {
return err
}
if len(args) < 1 {
return newUserError("path needs to be provided")
}
createPath := args[0]
var kind string
createPath, kind = newContentPathSection(createPath)
if contentType != "" {
kind = contentType
}
cfg := c.DepsCfg
ps, err := helpers.NewPathSpec(cfg.Fs, cfg.Cfg)
if err != nil {
return err
}
// If a site isn't in use in the archetype template, we can skip the build.
siteFactory := func(filename string, siteUsed bool) (*hugolib.Site, error) {
if !siteUsed {
return hugolib.NewSite(*cfg)
}
var s *hugolib.Site
if err := c.initSites(); err != nil {
return nil, err
}
if err := Hugo.Build(hugolib.BuildCfg{SkipRender: true}); err != nil {
return nil, err
}
s = Hugo.Sites[0]
if len(Hugo.Sites) > 1 {
// Find the best match.
for _, ss := range Hugo.Sites {
if strings.Contains(createPath, "."+ss.Language.Lang) {
s = ss
break
}
}
}
return s, nil
}
return create.NewContent(ps, siteFactory, kind, createPath)
}
func doNewSite(fs *hugofs.Fs, basepath string, force bool) error {
archeTypePath := filepath.Join(basepath, "archetypes")
dirs := []string{
filepath.Join(basepath, "layouts"),
filepath.Join(basepath, "content"),
archeTypePath,
filepath.Join(basepath, "static"),
filepath.Join(basepath, "data"),
filepath.Join(basepath, "themes"),
}
if exists, _ := helpers.Exists(basepath, fs.Source); exists {
if isDir, _ := helpers.IsDir(basepath, fs.Source); !isDir {
return errors.New(basepath + " already exists but not a directory")
}
isEmpty, _ := helpers.IsEmpty(basepath, fs.Source)
switch {
case !isEmpty && !force:
return errors.New(basepath + " already exists and is not empty")
case !isEmpty && force:
all := append(dirs, filepath.Join(basepath, "config."+configFormat))
for _, path := range all {
if exists, _ := helpers.Exists(path, fs.Source); exists {
return errors.New(path + " already exists")
}
}
}
}
for _, dir := range dirs {
if err := fs.Source.MkdirAll(dir, 0777); err != nil {
return fmt.Errorf("Failed to create dir: %s", err)
}
}
createConfig(fs, basepath, configFormat)
// Create a defaul archetype file.
helpers.SafeWriteToDisk(filepath.Join(archeTypePath, "default.md"),
strings.NewReader(create.ArchetypeTemplateTemplate), fs.Source)
jww.FEEDBACK.Printf("Congratulations! Your new Hugo site is created in %s.\n\n", basepath)
jww.FEEDBACK.Println(nextStepsText())
return nil
}
func nextStepsText() string {
var nextStepsText bytes.Buffer
nextStepsText.WriteString(`Just a few more steps and you're ready to go:
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/, or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new `)
nextStepsText.WriteString(filepath.Join("<SECTIONNAME>", "<FILENAME>.<FORMAT>"))
nextStepsText.WriteString(`".
3. Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.`)
return nextStepsText.String()
}
// NewSite creates a new Hugo site and initializes a structured Hugo directory.
func NewSite(cmd *cobra.Command, args []string) error {
if len(args) < 1 {
return newUserError("path needs to be provided")
}
createpath, err := filepath.Abs(filepath.Clean(args[0]))
if err != nil {
return newUserError(err)
}
forceNew, _ := cmd.Flags().GetBool("force")
return doNewSite(hugofs.NewDefault(viper.New()), createpath, forceNew)
}
// NewTheme creates a new Hugo theme.
func NewTheme(cmd *cobra.Command, args []string) error {
c, err := InitializeConfig(false, nil)
if err != nil {
return err
}
if len(args) < 1 {
return newUserError("theme name needs to be provided")
}
createpath := c.PathSpec().AbsPathify(filepath.Join(c.Cfg.GetString("themesDir"), args[0]))
jww.INFO.Println("creating theme at", createpath)
cfg := c.DepsCfg
if x, _ := helpers.Exists(createpath, cfg.Fs.Source); x {
return newUserError(createpath, "already exists")
}
mkdir(createpath, "layouts", "_default")
mkdir(createpath, "layouts", "partials")
touchFile(cfg.Fs.Source, createpath, "layouts", "index.html")
touchFile(cfg.Fs.Source, createpath, "layouts", "404.html")
touchFile(cfg.Fs.Source, createpath, "layouts", "_default", "list.html")
touchFile(cfg.Fs.Source, createpath, "layouts", "_default", "single.html")
touchFile(cfg.Fs.Source, createpath, "layouts", "partials", "header.html")
touchFile(cfg.Fs.Source, createpath, "layouts", "partials", "footer.html")
mkdir(createpath, "archetypes")
archDefault := []byte("+++\n+++\n")
err = helpers.WriteToDisk(filepath.Join(createpath, "archetypes", "default.md"), bytes.NewReader(archDefault), cfg.Fs.Source)
if err != nil {
return err
}
mkdir(createpath, "static", "js")
mkdir(createpath, "static", "css")
by := []byte(`The MIT License (MIT)
Copyright (c) ` + time.Now().Format("2006") + ` YOUR_NAME_HERE
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
`)
err = helpers.WriteToDisk(filepath.Join(createpath, "LICENSE.md"), bytes.NewReader(by), cfg.Fs.Source)
if err != nil {
return err
}
createThemeMD(cfg.Fs, createpath)
return nil
}
func mkdir(x ...string) {
p := filepath.Join(x...)
err := os.MkdirAll(p, 0777) // before umask
if err != nil {
jww.FATAL.Fatalln(err)
}
}
func touchFile(fs afero.Fs, x ...string) {
inpath := filepath.Join(x...)
mkdir(filepath.Dir(inpath))
err := helpers.WriteToDisk(inpath, bytes.NewReader([]byte{}), fs)
if err != nil {
jww.FATAL.Fatalln(err)
}
}
func createThemeMD(fs *hugofs.Fs, inpath string) (err error) {
by := []byte(`# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
name = "` + strings.Title(helpers.MakeTitle(filepath.Base(inpath))) + `"
license = "MIT"
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE.md"
description = ""
homepage = "http://example.com/"
tags = []
features = []
min_version = "0.33"
[author]
name = ""
homepage = ""
# If porting an existing theme
[original]
name = ""
homepage = ""
repo = ""
`)
err = helpers.WriteToDisk(filepath.Join(inpath, "theme.toml"), bytes.NewReader(by), fs.Source)
if err != nil {
return
}
return nil
}
func newContentPathSection(path string) (string, string) {
// Forward slashes is used in all examples. Convert if needed.
// Issue #1133
createpath := filepath.FromSlash(path)
var section string
// assume the first directory is the section (kind)
if strings.Contains(createpath[1:], helpers.FilePathSeparator) {
parts := strings.Split(strings.TrimPrefix(createpath, helpers.FilePathSeparator), helpers.FilePathSeparator)
if len(parts) > 0 {
section = parts[0]
}
}
return createpath, section
}
func createConfig(fs *hugofs.Fs, inpath string, kind string) (err error) {
in := map[string]string{
"baseURL": "http://example.org/",
"title": "My New Hugo Site",
"languageCode": "en-us",
}
kind = parser.FormatSanitize(kind)
var buf bytes.Buffer
err = parser.InterfaceToConfig(in, parser.FormatToLeadRune(kind), &buf)
if err != nil {
return err
}
return helpers.WriteToDisk(filepath.Join(inpath, "config."+kind), &buf, fs.Source)
}
+122
View File
@@ -0,0 +1,122 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"path/filepath"
"testing"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
// Issue #1133
func TestNewContentPathSectionWithForwardSlashes(t *testing.T) {
p, s := newContentPathSection("/post/new.md")
assert.Equal(t, filepath.FromSlash("/post/new.md"), p)
assert.Equal(t, "post", s)
}
func checkNewSiteInited(fs *hugofs.Fs, basepath string, t *testing.T) {
paths := []string{
filepath.Join(basepath, "layouts"),
filepath.Join(basepath, "content"),
filepath.Join(basepath, "archetypes"),
filepath.Join(basepath, "static"),
filepath.Join(basepath, "data"),
filepath.Join(basepath, "config.toml"),
}
for _, path := range paths {
_, err := fs.Source.Stat(path)
require.NoError(t, err)
}
}
func TestDoNewSite(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
require.NoError(t, doNewSite(fs, basepath, false))
checkNewSiteInited(fs, basepath, t)
}
func TestDoNewSite_noerror_base_exists_but_empty(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
require.NoError(t, fs.Source.MkdirAll(basepath, 777))
require.NoError(t, doNewSite(fs, basepath, false))
}
func TestDoNewSite_error_base_exists(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
require.NoError(t, fs.Source.MkdirAll(basepath, 777))
_, err := fs.Source.Create(filepath.Join(basepath, "foo"))
require.NoError(t, err)
// Since the directory already exists and isn't empty, expect an error
require.Error(t, doNewSite(fs, basepath, false))
}
func TestDoNewSite_force_empty_dir(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
require.NoError(t, fs.Source.MkdirAll(basepath, 777))
require.NoError(t, doNewSite(fs, basepath, true))
checkNewSiteInited(fs, basepath, t)
}
func TestDoNewSite_error_force_dir_inside_exists(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
contentPath := filepath.Join(basepath, "content")
require.NoError(t, fs.Source.MkdirAll(contentPath, 777))
require.Error(t, doNewSite(fs, basepath, true))
}
func TestDoNewSite_error_force_config_inside_exists(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
configPath := filepath.Join(basepath, "config.toml")
require.NoError(t, fs.Source.MkdirAll(basepath, 777))
_, err := fs.Source.Create(configPath)
require.NoError(t, err)
require.Error(t, doNewSite(fs, basepath, true))
}
func newTestCfg() (*viper.Viper, *hugofs.Fs) {
v := viper.New()
fs := hugofs.NewMem(v)
v.SetFs(fs.Source)
return v, fs
}
+65
View File
@@ -0,0 +1,65 @@
// +build release
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"errors"
"github.com/gohugoio/hugo/releaser"
"github.com/spf13/cobra"
)
func init() {
HugoCmd.AddCommand(createReleaser().cmd)
}
type releaseCommandeer struct {
cmd *cobra.Command
version string
skipPublish bool
try bool
}
func createReleaser() *releaseCommandeer {
// Note: This is a command only meant for internal use and must be run
// via "go run -tags release main.go release" on the actual code base that is in the release.
r := &releaseCommandeer{
cmd: &cobra.Command{
Use: "release",
Short: "Release a new version of Hugo.",
Hidden: true,
},
}
r.cmd.RunE = func(cmd *cobra.Command, args []string) error {
return r.release()
}
r.cmd.PersistentFlags().StringVarP(&r.version, "rel", "r", "", "new release version, i.e. 0.25.1")
r.cmd.PersistentFlags().BoolVarP(&r.skipPublish, "skip-publish", "", false, "skip all publishing pipes of the release")
r.cmd.PersistentFlags().BoolVarP(&r.try, "try", "", false, "simulate a release, i.e. no changes")
return r
}
func (r *releaseCommandeer) release() error {
if r.version == "" {
return errors.New("must set the --rel flag to the relevant version number")
}
return releaser.New(r.version, r.skipPublish, r.try).Run()
}
+464
View File
@@ -0,0 +1,464 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"fmt"
"net"
"net/http"
"net/url"
"os"
"os/signal"
"path/filepath"
"runtime"
"strconv"
"strings"
"syscall"
"time"
"github.com/gohugoio/hugo/livereload"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
"github.com/spf13/afero"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
var (
disableLiveReload bool
navigateToChanged bool
renderToDisk bool
serverAppend bool
serverInterface string
serverPort int
liveReloadPort int
serverWatch bool
noHTTPCache bool
disableFastRender bool
)
var serverCmd = &cobra.Command{
Use: "server",
Aliases: []string{"serve"},
Short: "A high performance webserver",
Long: `Hugo provides its own webserver which builds and serves the site.
While hugo server is high performance, it is a webserver with limited options.
Many run it in production, but the standard behavior is for people to use it
in development and use a more full featured server such as Nginx or Caddy.
'hugo server' will avoid writing the rendered and served content to disk,
preferring to store it in memory.
By default hugo will also watch your files for any changes you make and
automatically rebuild the site. It will then live reload any open browser pages
and push the latest content to them. As most Hugo sites are built in a fraction
of a second, you will be able to save and see your changes nearly instantly.`,
//RunE: server,
}
type filesOnlyFs struct {
fs http.FileSystem
}
type noDirFile struct {
http.File
}
func (fs filesOnlyFs) Open(name string) (http.File, error) {
f, err := fs.fs.Open(name)
if err != nil {
return nil, err
}
return noDirFile{f}, nil
}
func (f noDirFile) Readdir(count int) ([]os.FileInfo, error) {
return nil, nil
}
func init() {
initHugoBuilderFlags(serverCmd)
serverCmd.Flags().IntVarP(&serverPort, "port", "p", 1313, "port on which the server will listen")
serverCmd.Flags().IntVar(&liveReloadPort, "liveReloadPort", -1, "port for live reloading (i.e. 443 in HTTPS proxy situations)")
serverCmd.Flags().StringVarP(&serverInterface, "bind", "", "127.0.0.1", "interface to which the server will bind")
serverCmd.Flags().BoolVarP(&serverWatch, "watch", "w", true, "watch filesystem for changes and recreate as needed")
serverCmd.Flags().BoolVar(&noHTTPCache, "noHTTPCache", false, "prevent HTTP caching")
serverCmd.Flags().BoolVarP(&serverAppend, "appendPort", "", true, "append port to baseURL")
serverCmd.Flags().BoolVar(&disableLiveReload, "disableLiveReload", false, "watch without enabling live browser reload on rebuild")
serverCmd.Flags().BoolVar(&navigateToChanged, "navigateToChanged", false, "navigate to changed content file on live browser reload")
serverCmd.Flags().BoolVar(&renderToDisk, "renderToDisk", false, "render to Destination path (default is render to memory & serve from there)")
serverCmd.Flags().BoolVar(&disableFastRender, "disableFastRender", false, "enables full re-renders on changes")
serverCmd.Flags().String("memstats", "", "log memory usage to this file")
serverCmd.Flags().String("meminterval", "100ms", "interval to poll memory usage (requires --memstats), valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".")
serverCmd.RunE = server
}
func server(cmd *cobra.Command, args []string) error {
// If a Destination is provided via flag write to disk
if destination != "" {
renderToDisk = true
}
cfgInit := func(c *commandeer) error {
c.Set("renderToMemory", !renderToDisk)
if cmd.Flags().Changed("navigateToChanged") {
c.Set("navigateToChanged", navigateToChanged)
}
if cmd.Flags().Changed("disableLiveReload") {
c.Set("disableLiveReload", disableLiveReload)
}
if cmd.Flags().Changed("disableFastRender") {
c.Set("disableFastRender", disableFastRender)
}
if serverWatch {
c.Set("watch", true)
}
serverPorts := make([]int, 1)
if c.languages.IsMultihost() {
if !serverAppend {
return newSystemError("--appendPort=false not supported when in multihost mode")
}
serverPorts = make([]int, len(c.languages))
}
currentServerPort := serverPort
for i := 0; i < len(serverPorts); i++ {
l, err := net.Listen("tcp", net.JoinHostPort(serverInterface, strconv.Itoa(currentServerPort)))
if err == nil {
l.Close()
serverPorts[i] = currentServerPort
} else {
if i == 0 && serverCmd.Flags().Changed("port") {
// port set explicitly by user -- he/she probably meant it!
return newSystemErrorF("Server startup failed: %s", err)
}
jww.ERROR.Println("port", serverPort, "already in use, attempting to use an available port")
sp, err := helpers.FindAvailablePort()
if err != nil {
return newSystemError("Unable to find alternative port to use:", err)
}
serverPorts[i] = sp.Port
}
currentServerPort = serverPorts[i] + 1
}
c.serverPorts = serverPorts
c.Set("port", serverPort)
if liveReloadPort != -1 {
c.Set("liveReloadPort", liveReloadPort)
} else {
c.Set("liveReloadPort", serverPorts[0])
}
if c.languages.IsMultihost() {
for i, language := range c.languages {
baseURL, err := fixURL(language, baseURL, serverPorts[i])
if err != nil {
return err
}
language.Set("baseURL", baseURL)
}
} else {
baseURL, err := fixURL(c.Cfg, baseURL, serverPorts[0])
if err != nil {
return err
}
c.Set("baseURL", baseURL)
}
return nil
}
if err := memStats(); err != nil {
jww.ERROR.Println("memstats error:", err)
}
c, err := InitializeConfig(true, cfgInit, serverCmd)
if err != nil {
return err
}
if err := c.serverBuild(); err != nil {
return err
}
for _, s := range Hugo.Sites {
s.RegisterMediaTypes()
}
if serverWatch {
c.watchConfig()
}
// Watch runs its own server as part of the routine
if serverWatch {
watchDirs, err := c.getDirList()
if err != nil {
return err
}
baseWatchDir := c.Cfg.GetString("workingDir")
relWatchDirs := make([]string, len(watchDirs))
for i, dir := range watchDirs {
relWatchDirs[i], _ = helpers.GetRelativePath(dir, baseWatchDir)
}
rootWatchDirs := strings.Join(helpers.UniqueStrings(helpers.ExtractRootPaths(relWatchDirs)), ",")
jww.FEEDBACK.Printf("Watching for changes in %s%s{%s}\n", baseWatchDir, helpers.FilePathSeparator, rootWatchDirs)
watcher, err := c.newWatcher(watchDirs...)
if err != nil {
return err
}
defer watcher.Close()
}
return c.serve()
}
type fileServer struct {
baseURLs []string
roots []string
c *commandeer
}
func (f *fileServer) createEndpoint(i int) (*http.ServeMux, string, string, error) {
baseURL := f.baseURLs[i]
root := f.roots[i]
port := f.c.serverPorts[i]
publishDir := f.c.Cfg.GetString("publishDir")
if root != "" {
publishDir = filepath.Join(publishDir, root)
}
absPublishDir := f.c.PathSpec().AbsPathify(publishDir)
if i == 0 {
if renderToDisk {
jww.FEEDBACK.Println("Serving pages from " + absPublishDir)
} else {
jww.FEEDBACK.Println("Serving pages from memory")
}
}
httpFs := afero.NewHttpFs(f.c.Fs.Destination)
fs := filesOnlyFs{httpFs.Dir(absPublishDir)}
doLiveReload := !buildWatch && !f.c.Cfg.GetBool("disableLiveReload")
fastRenderMode := doLiveReload && !f.c.Cfg.GetBool("disableFastRender")
if i == 0 && fastRenderMode {
jww.FEEDBACK.Println("Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender")
}
// We're only interested in the path
u, err := url.Parse(baseURL)
if err != nil {
return nil, "", "", fmt.Errorf("Invalid baseURL: %s", err)
}
decorate := func(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if noHTTPCache {
w.Header().Set("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0")
w.Header().Set("Pragma", "no-cache")
}
if fastRenderMode {
p := r.RequestURI
if strings.HasSuffix(p, "/") || strings.HasSuffix(p, "html") || strings.HasSuffix(p, "htm") {
f.c.visitedURLs.Add(p)
}
}
h.ServeHTTP(w, r)
})
}
fileserver := decorate(http.FileServer(fs))
mu := http.NewServeMux()
if u.Path == "" || u.Path == "/" {
mu.Handle("/", fileserver)
} else {
mu.Handle(u.Path, http.StripPrefix(u.Path, fileserver))
}
endpoint := net.JoinHostPort(serverInterface, strconv.Itoa(port))
return mu, u.String(), endpoint, nil
}
func (c *commandeer) serve() error {
isMultiHost := Hugo.IsMultihost()
var (
baseURLs []string
roots []string
)
if isMultiHost {
for _, s := range Hugo.Sites {
baseURLs = append(baseURLs, s.BaseURL.String())
roots = append(roots, s.Language.Lang)
}
} else {
s := Hugo.Sites[0]
baseURLs = []string{s.BaseURL.String()}
roots = []string{""}
}
srv := &fileServer{
baseURLs: baseURLs,
roots: roots,
c: c,
}
doLiveReload := !c.Cfg.GetBool("disableLiveReload")
if doLiveReload {
livereload.Initialize()
}
var sigs = make(chan os.Signal)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
for i, _ := range baseURLs {
mu, serverURL, endpoint, err := srv.createEndpoint(i)
if doLiveReload {
mu.HandleFunc("/livereload.js", livereload.ServeJS)
mu.HandleFunc("/livereload", livereload.Handler)
}
jww.FEEDBACK.Printf("Web Server is available at %s (bind address %s)\n", serverURL, serverInterface)
go func() {
err = http.ListenAndServe(endpoint, mu)
if err != nil {
jww.ERROR.Printf("Error: %s\n", err.Error())
os.Exit(1)
}
}()
}
jww.FEEDBACK.Println("Press Ctrl+C to stop")
<-sigs
return nil
}
// fixURL massages the baseURL into a form needed for serving
// all pages correctly.
func fixURL(cfg config.Provider, s string, port int) (string, error) {
useLocalhost := false
if s == "" {
s = cfg.GetString("baseURL")
useLocalhost = true
}
if !strings.HasSuffix(s, "/") {
s = s + "/"
}
// do an initial parse of the input string
u, err := url.Parse(s)
if err != nil {
return "", err
}
// if no Host is defined, then assume that no schema or double-slash were
// present in the url. Add a double-slash and make a best effort attempt.
if u.Host == "" && s != "/" {
s = "//" + s
u, err = url.Parse(s)
if err != nil {
return "", err
}
}
if useLocalhost {
if u.Scheme == "https" {
u.Scheme = "http"
}
u.Host = "localhost"
}
if serverAppend {
if strings.Contains(u.Host, ":") {
u.Host, _, err = net.SplitHostPort(u.Host)
if err != nil {
return "", fmt.Errorf("Failed to split baseURL hostpost: %s", err)
}
}
u.Host += fmt.Sprintf(":%d", port)
}
return u.String(), nil
}
func memStats() error {
memstats := serverCmd.Flags().Lookup("memstats").Value.String()
if memstats != "" {
interval, err := time.ParseDuration(serverCmd.Flags().Lookup("meminterval").Value.String())
if err != nil {
interval, _ = time.ParseDuration("100ms")
}
fileMemStats, err := os.Create(memstats)
if err != nil {
return err
}
fileMemStats.WriteString("# Time\tHeapSys\tHeapAlloc\tHeapIdle\tHeapReleased\n")
go func() {
var stats runtime.MemStats
start := time.Now().UnixNano()
for {
runtime.ReadMemStats(&stats)
if fileMemStats != nil {
fileMemStats.WriteString(fmt.Sprintf("%d\t%d\t%d\t%d\t%d\n",
(time.Now().UnixNano()-start)/1000000, stats.HeapSys, stats.HeapAlloc, stats.HeapIdle, stats.HeapReleased))
time.Sleep(interval)
} else {
break
}
}
}()
}
return nil
}
+58
View File
@@ -0,0 +1,58 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"testing"
"github.com/spf13/viper"
)
func TestFixURL(t *testing.T) {
type data struct {
TestName string
CLIBaseURL string
CfgBaseURL string
AppendPort bool
Port int
Result string
}
tests := []data{
{"Basic http localhost", "", "http://foo.com", true, 1313, "http://localhost:1313/"},
{"Basic https production, http localhost", "", "https://foo.com", true, 1313, "http://localhost:1313/"},
{"Basic subdir", "", "http://foo.com/bar", true, 1313, "http://localhost:1313/bar/"},
{"Basic production", "http://foo.com", "http://foo.com", false, 80, "http://foo.com/"},
{"Production subdir", "http://foo.com/bar", "http://foo.com/bar", false, 80, "http://foo.com/bar/"},
{"No http", "", "foo.com", true, 1313, "//localhost:1313/"},
{"Override configured port", "", "foo.com:2020", true, 1313, "//localhost:1313/"},
{"No http production", "foo.com", "foo.com", false, 80, "//foo.com/"},
{"No http production with port", "foo.com", "foo.com", true, 2020, "//foo.com:2020/"},
{"No config", "", "", true, 1313, "//localhost:1313/"},
}
for i, test := range tests {
v := viper.New()
baseURL = test.CLIBaseURL
v.Set("baseURL", test.CfgBaseURL)
serverAppend = test.AppendPort
serverPort = test.Port
result, err := fixURL(v, baseURL, serverPort)
if err != nil {
t.Errorf("Test #%d %s: unexpected error %s", i, test.TestName, err)
}
if result != test.Result {
t.Errorf("Test #%d %s: expected %q, got %q", i, test.TestName, test.Result, result)
}
}
}
+141
View File
@@ -0,0 +1,141 @@
// Copyright 2017 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"os"
"path/filepath"
"github.com/fsnotify/fsnotify"
"github.com/gohugoio/hugo/helpers"
src "github.com/gohugoio/hugo/source"
"github.com/spf13/fsync"
)
type staticSyncer struct {
c *commandeer
d *src.Dirs
}
func newStaticSyncer(c *commandeer) (*staticSyncer, error) {
dirs, err := src.NewDirs(c.Fs, c.Cfg, c.DepsCfg.Logger)
if err != nil {
return nil, err
}
return &staticSyncer{c: c, d: dirs}, nil
}
func (s *staticSyncer) isStatic(path string) bool {
return s.d.IsStatic(path)
}
func (s *staticSyncer) syncsStaticEvents(staticEvents []fsnotify.Event) error {
c := s.c
syncFn := func(dirs *src.Dirs, publishDir string) (uint64, error) {
staticSourceFs, err := dirs.CreateStaticFs()
if err != nil {
return 0, err
}
if dirs.Language != nil {
// Multihost setup
publishDir = filepath.Join(publishDir, dirs.Language.Lang)
}
if staticSourceFs == nil {
c.Logger.WARN.Println("No static directories found to sync")
return 0, nil
}
syncer := fsync.NewSyncer()
syncer.NoTimes = c.Cfg.GetBool("noTimes")
syncer.NoChmod = c.Cfg.GetBool("noChmod")
syncer.SrcFs = staticSourceFs
syncer.DestFs = c.Fs.Destination
// prevent spamming the log on changes
logger := helpers.NewDistinctFeedbackLogger()
for _, ev := range staticEvents {
// Due to our approach of layering both directories and the content's rendered output
// into one we can't accurately remove a file not in one of the source directories.
// If a file is in the local static dir and also in the theme static dir and we remove
// it from one of those locations we expect it to still exist in the destination
//
// If Hugo generates a file (from the content dir) over a static file
// the content generated file should take precedence.
//
// Because we are now watching and handling individual events it is possible that a static
// event that occupies the same path as a content generated file will take precedence
// until a regeneration of the content takes places.
//
// Hugo assumes that these cases are very rare and will permit this bad behavior
// The alternative is to track every single file and which pipeline rendered it
// and then to handle conflict resolution on every event.
fromPath := ev.Name
// If we are here we already know the event took place in a static dir
relPath := dirs.MakeStaticPathRelative(fromPath)
if relPath == "" {
// Not member of this virtual host.
continue
}
// Remove || rename is harder and will require an assumption.
// Hugo takes the following approach:
// If the static file exists in any of the static source directories after this event
// Hugo will re-sync it.
// If it does not exist in all of the static directories Hugo will remove it.
//
// This assumes that Hugo has not generated content on top of a static file and then removed
// the source of that static file. In this case Hugo will incorrectly remove that file
// from the published directory.
if ev.Op&fsnotify.Rename == fsnotify.Rename || ev.Op&fsnotify.Remove == fsnotify.Remove {
if _, err := staticSourceFs.Stat(relPath); os.IsNotExist(err) {
// If file doesn't exist in any static dir, remove it
toRemove := filepath.Join(publishDir, relPath)
logger.Println("File no longer exists in static dir, removing", toRemove)
_ = c.Fs.Destination.RemoveAll(toRemove)
} else if err == nil {
// If file still exists, sync it
logger.Println("Syncing", relPath, "to", publishDir)
if err := syncer.Sync(filepath.Join(publishDir, relPath), relPath); err != nil {
c.Logger.ERROR.Println(err)
}
} else {
c.Logger.ERROR.Println(err)
}
continue
}
// For all other event operations Hugo will sync static.
logger.Println("Syncing", relPath, "to", publishDir)
if err := syncer.Sync(filepath.Join(publishDir, relPath), relPath); err != nil {
c.Logger.ERROR.Println(err)
}
}
return 0, nil
}
_, err := c.doWithPublishDirs(syncFn)
return err
}
+157
View File
@@ -0,0 +1,157 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"bytes"
"errors"
"os"
"time"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/cobra"
)
var undraftCmd = &cobra.Command{
Use: "undraft path/to/content",
Short: "Undraft resets the content's draft status",
Long: `Undraft resets the content's draft status
and updates the date to the current date and time.
If the content's draft status is 'False', nothing is done.`,
RunE: Undraft,
}
// Undraft publishes the specified content by setting its draft status
// to false and setting its publish date to now. If the specified content is
// not a draft, it will log an error.
func Undraft(cmd *cobra.Command, args []string) error {
c, err := InitializeConfig(false, nil)
if err != nil {
return err
}
if len(args) < 1 {
return newUserError("a piece of content needs to be specified")
}
cfg := c.DepsCfg
location := args[0]
// open the file
f, err := cfg.Fs.Source.Open(location)
if err != nil {
return err
}
// get the page from file
p, err := parser.ReadFrom(f)
f.Close()
if err != nil {
return err
}
w, err := undraftContent(p)
if err != nil {
return newSystemErrorF("an error occurred while undrafting %q: %s", location, err)
}
f, err = cfg.Fs.Source.OpenFile(location, os.O_WRONLY|os.O_TRUNC, 0644)
if err != nil {
return newSystemErrorF("%q not be undrafted due to error opening file to save changes: %q\n", location, err)
}
defer f.Close()
_, err = w.WriteTo(f)
if err != nil {
return newSystemErrorF("%q not be undrafted due to save error: %q\n", location, err)
}
return nil
}
// undraftContent: if the content is a draft, change its draft status to
// 'false' and set the date to time.Now(). If the draft status is already
// 'false', don't do anything.
func undraftContent(p parser.Page) (bytes.Buffer, error) {
var buff bytes.Buffer
// get the metadata; easiest way to see if it's a draft
meta, err := p.Metadata()
if err != nil {
return buff, err
}
// since the metadata was obtainable, we can also get the key/value separator for
// Front Matter
fm := p.FrontMatter()
if fm == nil {
return buff, errors.New("Front Matter was found, nothing was finalized")
}
var isDraft, gotDate bool
var date string
L:
for k, v := range meta.(map[string]interface{}) {
switch k {
case "draft":
if !v.(bool) {
return buff, errors.New("not a Draft: nothing was done")
}
isDraft = true
if gotDate {
break L
}
case "date":
date = v.(string) // capture the value to make replacement easier
gotDate = true
if isDraft {
break L
}
}
}
// if draft wasn't found in FrontMatter, it isn't a draft.
if !isDraft {
return buff, errors.New("not a Draft: nothing was done")
}
// get the front matter as bytes and split it into lines
var lineEnding []byte
fmLines := bytes.Split(fm, []byte("\n"))
if len(fmLines) == 1 { // if the result is only 1 element, try to split on dos line endings
fmLines = bytes.Split(fm, []byte("\r\n"))
if len(fmLines) == 1 {
return buff, errors.New("unable to split FrontMatter into lines")
}
lineEnding = append(lineEnding, []byte("\r\n")...)
} else {
lineEnding = append(lineEnding, []byte("\n")...)
}
// Write the front matter lines to the buffer, replacing as necessary
for _, v := range fmLines {
pos := bytes.Index(v, []byte("draft"))
if pos != -1 {
continue
}
pos = bytes.Index(v, []byte("date"))
if pos != -1 { // if date field wasn't found, add it
v = bytes.Replace(v, []byte(date), []byte(time.Now().Format(time.RFC3339)), 1)
}
buff.Write(v)
buff.Write(lineEnding)
}
// append the actual content
buff.Write(p.Content())
return buff, nil
}
+87
View File
@@ -0,0 +1,87 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
// TODO Support Mac Encoding (\r)
import (
"bytes"
"strings"
"testing"
"time"
"github.com/gohugoio/hugo/parser"
)
var (
jsonFM = "{\n \"date\": \"12-04-06\",\n \"title\": \"test json\"\n}"
jsonDraftFM = "{\n \"draft\": true,\n \"date\": \"12-04-06\",\n \"title\":\"test json\"\n}"
tomlFM = "+++\n date= \"12-04-06\"\n title= \"test toml\"\n+++"
tomlDraftFM = "+++\n draft= true\n date= \"12-04-06\"\n title=\"test toml\"\n+++"
yamlFM = "---\n date: \"12-04-06\"\n title: \"test yaml\"\n---"
yamlDraftFM = "---\n draft: true\n date: \"12-04-06\"\n title: \"test yaml\"\n---"
yamlYesDraftFM = "---\n draft: yes\n date: \"12-04-06\"\n title: \"test yaml\"\n---"
)
func TestUndraftContent(t *testing.T) {
tests := []struct {
fm string
expectedErr string
}{
{jsonFM, "not a Draft: nothing was done"},
{jsonDraftFM, ""},
{tomlFM, "not a Draft: nothing was done"},
{tomlDraftFM, ""},
{yamlFM, "not a Draft: nothing was done"},
{yamlDraftFM, ""},
{yamlYesDraftFM, ""},
}
for i, test := range tests {
r := bytes.NewReader([]byte(test.fm))
p, _ := parser.ReadFrom(r)
res, err := undraftContent(p)
if test.expectedErr != "" {
if err == nil {
t.Errorf("[%d] Expected error, got none", i)
continue
}
if err.Error() != test.expectedErr {
t.Errorf("[%d] Expected %q, got %q", i, test.expectedErr, err)
continue
}
} else {
r = bytes.NewReader(res.Bytes())
p, _ = parser.ReadFrom(r)
meta, err := p.Metadata()
if err != nil {
t.Errorf("[%d] unexpected error %q", i, err)
continue
}
for k, v := range meta.(map[string]interface{}) {
if k == "draft" {
if v.(bool) {
t.Errorf("[%d] Expected %q to be \"false\", got \"true\"", i, k)
continue
}
}
if k == "date" {
if !strings.HasPrefix(v.(string), time.Now().Format("2006-01-02")) {
t.Errorf("[%d] Expected %v to start with %v", i, v.(string), time.Now().Format("2006-01-02"))
}
}
}
}
}
}
+42
View File
@@ -0,0 +1,42 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"runtime"
"strings"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugolib"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of Hugo",
Long: `All software has versions. This is Hugo's.`,
RunE: func(cmd *cobra.Command, args []string) error {
printHugoVersion()
return nil
},
}
func printHugoVersion() {
if hugolib.CommitHash == "" {
jww.FEEDBACK.Printf("Hugo Static Site Generator v%s %s/%s BuildDate: %s\n", helpers.CurrentHugoVersion, runtime.GOOS, runtime.GOARCH, hugolib.BuildDate)
} else {
jww.FEEDBACK.Printf("Hugo Static Site Generator v%s-%s %s/%s BuildDate: %s\n", helpers.CurrentHugoVersion, strings.ToUpper(hugolib.CommitHash), runtime.GOOS, runtime.GOARCH, hugolib.BuildDate)
}
}
+89
View File
@@ -0,0 +1,89 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package types contains types shared between packages in Hugo.
package types
import (
"sync"
)
// EvictingStringQueue is a queue which automatically evicts elements from the head of
// the queue when attempting to add new elements onto the queue and it is full.
// This queue orders elements LIFO (last-in-first-out). It throws away duplicates.
// Note: This queue currently does not contain any remove (poll etc.) methods.
type EvictingStringQueue struct {
size int
vals []string
set map[string]bool
mu sync.Mutex
}
// NewEvictingStringQueue creates a new queue with the given size.
func NewEvictingStringQueue(size int) *EvictingStringQueue {
return &EvictingStringQueue{size: size, set: make(map[string]bool)}
}
// Add adds a new string to the tail of the queue if it's not already there.
func (q *EvictingStringQueue) Add(v string) {
q.mu.Lock()
if q.set[v] {
q.mu.Unlock()
return
}
if len(q.set) == q.size {
// Full
delete(q.set, q.vals[0])
q.vals = append(q.vals[:0], q.vals[1:]...)
}
q.set[v] = true
q.vals = append(q.vals, v)
q.mu.Unlock()
}
// Peek looks at the last element added to the queue.
func (q *EvictingStringQueue) Peek() string {
q.mu.Lock()
l := len(q.vals)
if l == 0 {
q.mu.Unlock()
return ""
}
elem := q.vals[l-1]
q.mu.Unlock()
return elem
}
// PeekAll looks at all the elements in the queue, with the newest first.
func (q *EvictingStringQueue) PeekAll() []string {
q.mu.Lock()
vals := make([]string, len(q.vals))
copy(vals, q.vals)
q.mu.Unlock()
for i, j := 0, len(vals)-1; i < j; i, j = i+1, j-1 {
vals[i], vals[j] = vals[j], vals[i]
}
return vals
}
// PeekAllSet returns PeekAll as a set.
func (q *EvictingStringQueue) PeekAllSet() map[string]bool {
all := q.PeekAll()
set := make(map[string]bool)
for _, v := range all {
set[v] = true
}
return set
}
+71
View File
@@ -0,0 +1,71 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package types
import (
"sync"
"testing"
"github.com/stretchr/testify/require"
)
func TestEvictingStringQueue(t *testing.T) {
assert := require.New(t)
queue := NewEvictingStringQueue(3)
assert.Equal("", queue.Peek())
queue.Add("a")
queue.Add("b")
queue.Add("a")
assert.Equal("b", queue.Peek())
queue.Add("b")
assert.Equal("b", queue.Peek())
queue.Add("a")
queue.Add("b")
assert.Equal([]string{"b", "a"}, queue.PeekAll())
assert.Equal("b", queue.Peek())
queue.Add("c")
queue.Add("d")
// Overflowed, a should now be removed.
assert.Equal([]string{"d", "c", "b"}, queue.PeekAll())
assert.Len(queue.PeekAllSet(), 3)
assert.True(queue.PeekAllSet()["c"])
}
func TestEvictingStringQueueConcurrent(t *testing.T) {
var wg sync.WaitGroup
val := "someval"
queue := NewEvictingStringQueue(3)
for j := 0; j < 100; j++ {
wg.Add(1)
go func() {
defer wg.Done()
queue.Add(val)
v := queue.Peek()
if v != val {
t.Error("wrong val")
}
vals := queue.PeekAll()
if len(vals) != 1 || vals[0] != val {
t.Error("wrong val")
}
}()
}
wg.Wait()
}
+44
View File
@@ -0,0 +1,44 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package types contains types shared between packages in Hugo.
package types
import (
"fmt"
"github.com/spf13/cast"
)
// KeyValues holds an key and a slice of values.
type KeyValues struct {
Key interface{}
Values []interface{}
}
// KeyString returns the key as a string, an empty string if conversion fails.
func (k KeyValues) KeyString() string {
return cast.ToString(k.Key)
}
func (k KeyValues) String() string {
return fmt.Sprintf("%v: %v", k.Key, k.Values)
}
func NewKeyValuesStrings(key string, values ...string) KeyValues {
iv := make([]interface{}, len(values))
for i := 0; i < len(values); i++ {
iv[i] = values[i]
}
return KeyValues{Key: key, Values: iv}
}
+29
View File
@@ -0,0 +1,29 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package types
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestKeyValues(t *testing.T) {
assert := require.New(t)
kv := NewKeyValuesStrings("key", "a1", "a2")
assert.Equal("key", kv.KeyString())
assert.Equal([]interface{}{"a1", "a2"}, kv.Values)
}
+21
View File
@@ -0,0 +1,21 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compare
// Eqer can be used to determine if this value is equal to the other.
// The semantics of equals is that the two value are interchangeable
// in the Hugo templates.
type Eqer interface {
Eq(other interface{}) bool
}
+26
View File
@@ -0,0 +1,26 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package config
// Provider provides the configuration settings for Hugo.
type Provider interface {
GetString(key string) string
GetInt(key string) int
GetBool(key string) bool
GetStringMap(key string) map[string]interface{}
GetStringMapString(key string) map[string]string
Get(key string) interface{}
Set(key string, value interface{})
IsSet(key string) bool
}
+129
View File
@@ -0,0 +1,129 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package create provides functions to create new content.
package create
import (
"bytes"
"os"
"os/exec"
"path/filepath"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugolib"
jww "github.com/spf13/jwalterweatherman"
)
// NewContent creates a new content file in the content directory based upon the
// given kind, which is used to lookup an archetype.
func NewContent(
ps *helpers.PathSpec,
siteFactory func(filename string, siteUsed bool) (*hugolib.Site, error), kind, targetPath string) error {
ext := helpers.Ext(targetPath)
jww.INFO.Printf("attempting to create %q of %q of ext %q", targetPath, kind, ext)
archetypeFilename := findArchetype(ps, kind, ext)
// Building the sites can be expensive, so only do it if really needed.
siteUsed := false
if archetypeFilename != "" {
f, err := ps.Fs.Source.Open(archetypeFilename)
if err != nil {
return err
}
defer f.Close()
if helpers.ReaderContains(f, []byte(".Site")) {
siteUsed = true
}
}
s, err := siteFactory(targetPath, siteUsed)
if err != nil {
return err
}
var content []byte
content, err = executeArcheTypeAsTemplate(s, kind, targetPath, archetypeFilename)
if err != nil {
return err
}
contentPath := s.PathSpec.AbsPathify(filepath.Join(s.Cfg.GetString("contentDir"), targetPath))
if err := helpers.SafeWriteToDisk(contentPath, bytes.NewReader(content), s.Fs.Source); err != nil {
return err
}
jww.FEEDBACK.Println(contentPath, "created")
editor := s.Cfg.GetString("newContentEditor")
if editor != "" {
jww.FEEDBACK.Printf("Editing %s with %q ...\n", targetPath, editor)
cmd := exec.Command(editor, contentPath)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
}
return nil
}
// FindArchetype takes a given kind/archetype of content and returns an output
// path for that archetype. If no archetype is found, an empty string is
// returned.
func findArchetype(ps *helpers.PathSpec, kind, ext string) (outpath string) {
search := []string{ps.AbsPathify(ps.Cfg.GetString("archetypeDir"))}
if ps.Cfg.GetString("theme") != "" {
themeDir := filepath.Join(ps.AbsPathify(ps.Cfg.GetString("themesDir")+"/"+ps.Cfg.GetString("theme")), "/archetypes/")
if _, err := ps.Fs.Source.Stat(themeDir); os.IsNotExist(err) {
jww.ERROR.Printf("Unable to find archetypes directory for theme %q at %q", ps.Cfg.GetString("theme"), themeDir)
} else {
search = append(search, themeDir)
}
}
for _, x := range search {
// If the new content isn't in a subdirectory, kind == "".
// Therefore it should be excluded otherwise `is a directory`
// error will occur. github.com/gohugoio/hugo/issues/411
var pathsToCheck = []string{"default"}
if ext != "" {
if kind != "" {
pathsToCheck = append([]string{kind + ext, "default" + ext}, pathsToCheck...)
} else {
pathsToCheck = append([]string{"default" + ext}, pathsToCheck...)
}
}
for _, p := range pathsToCheck {
curpath := filepath.Join(x, p)
jww.DEBUG.Println("checking", curpath, "for archetypes")
if exists, _ := helpers.Exists(curpath, ps.Fs.Source); exists {
jww.INFO.Println("curpath: " + curpath)
return curpath
}
}
}
return ""
}
+136
View File
@@ -0,0 +1,136 @@
// Copyright 2017 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package create
import (
"bytes"
"fmt"
"strings"
"time"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/source"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/tpl"
"github.com/spf13/afero"
)
// ArchetypeFileData represents the data available to an archetype template.
type ArchetypeFileData struct {
// The archetype content type, either given as --kind option or extracted
// from the target path's section, i.e. "blog/mypost.md" will resolve to
// "blog".
Type string
// The current date and time as a RFC3339 formatted string, suitable for use in front matter.
Date string
// The Site, fully equipped with all the pages etc. Note: This will only be set if it is actually
// used in the archetype template. Also, if this is a multilingual setup,
// this site is the site that best matches the target content file, based
// on the presence of language code in the filename.
Site *hugolib.Site
// The target content file. Note that the .Content will be empty, as that
// has not been created yet.
source.File
}
const (
// ArchetypeTemplateTemplate is used as initial template when adding an archetype template.
ArchetypeTemplateTemplate = `---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
draft: true
---
`
)
var (
archetypeShortcodeReplacementsPre = strings.NewReplacer(
"{{<", "{x{<",
"{{%", "{x{%",
">}}", ">}x}",
"%}}", "%}x}")
archetypeShortcodeReplacementsPost = strings.NewReplacer(
"{x{<", "{{<",
"{x{%", "{{%",
">}x}", ">}}",
"%}x}", "%}}")
)
func executeArcheTypeAsTemplate(s *hugolib.Site, kind, targetPath, archetypeFilename string) ([]byte, error) {
var (
archetypeContent []byte
archetypeTemplate []byte
err error
)
sp := source.NewSourceSpec(s.Deps.Cfg, s.Deps.Fs)
f := sp.NewFileInfo("", targetPath, nil)
data := ArchetypeFileData{
Type: kind,
Date: time.Now().Format(time.RFC3339),
File: f,
Site: s,
}
if archetypeFilename == "" {
// TODO(bep) archetype revive the issue about wrong tpl funcs arg order
archetypeTemplate = []byte(ArchetypeTemplateTemplate)
} else {
archetypeTemplate, err = afero.ReadFile(s.Fs.Source, archetypeFilename)
if err != nil {
return nil, fmt.Errorf("Failed to read archetype file %q: %s", archetypeFilename, err)
}
}
// The archetype template may contain shortcodes, and these does not play well
// with the Go templates. Need to set some temporary delimiters.
archetypeTemplate = []byte(archetypeShortcodeReplacementsPre.Replace(string(archetypeTemplate)))
// Reuse the Hugo template setup to get the template funcs properly set up.
templateHandler := s.Deps.Tmpl.(tpl.TemplateHandler)
templateName := "_text/" + helpers.Filename(archetypeFilename)
if err := templateHandler.AddTemplate(templateName, string(archetypeTemplate)); err != nil {
return nil, fmt.Errorf("Failed to parse archetype file %q: %s", archetypeFilename, err)
}
templ := templateHandler.Lookup(templateName)
var buff bytes.Buffer
if err := templ.Execute(&buff, data); err != nil {
return nil, fmt.Errorf("Failed to process archetype file %q: %s", archetypeFilename, err)
}
archetypeContent = []byte(archetypeShortcodeReplacementsPost.Replace(buff.String()))
if !bytes.Contains(archetypeContent, []byte("date")) || !bytes.Contains(archetypeContent, []byte("title")) {
// TODO(bep) remove some time in the future.
s.Log.FEEDBACK.Println(fmt.Sprintf(`WARNING: date and/or title missing from archetype file %q.
From Hugo 0.24 this must be provided in the archetype file itself, if needed. Example:
%s
`, archetypeFilename, ArchetypeTemplateTemplate))
}
return archetypeContent, nil
}
+198
View File
@@ -0,0 +1,198 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package create_test
import (
"os"
"path/filepath"
"strings"
"testing"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/hugolib"
"fmt"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/create"
"github.com/gohugoio/hugo/helpers"
"github.com/spf13/afero"
"github.com/spf13/viper"
"github.com/stretchr/testify/require"
)
func TestNewContent(t *testing.T) {
v := viper.New()
initViper(v)
cases := []struct {
kind string
path string
expected []string
}{
{"post", "post/sample-1.md", []string{`title = "Post Arch title"`, `test = "test1"`, "date = \"2015-01-12T19:20:04-07:00\""}},
{"post", "post/org-1.org", []string{`#+title: ORG-1`}},
{"emptydate", "post/sample-ed.md", []string{`title = "Empty Date Arch title"`, `test = "test1"`}},
{"stump", "stump/sample-2.md", []string{`title: "Sample 2"`}}, // no archetype file
{"", "sample-3.md", []string{`title: "Sample 3"`}}, // no archetype
{"product", "product/sample-4.md", []string{`title = "SAMPLE-4"`}}, // empty archetype front matter
{"shortcodes", "shortcodes/go.md", []string{
`title = "GO"`,
"{{< myshortcode >}}",
"{{% myshortcode %}}",
"{{</* comment */>}}\n{{%/* comment */%}}"}}, // shortcodes
}
for _, c := range cases {
cfg, fs := newTestCfg()
ps, err := helpers.NewPathSpec(fs, cfg)
require.NoError(t, err)
h, err := hugolib.NewHugoSites(deps.DepsCfg{Cfg: cfg, Fs: fs})
require.NoError(t, err)
require.NoError(t, initFs(fs))
siteFactory := func(filename string, siteUsed bool) (*hugolib.Site, error) {
return h.Sites[0], nil
}
require.NoError(t, create.NewContent(ps, siteFactory, c.kind, c.path))
fname := filepath.Join("content", filepath.FromSlash(c.path))
content := readFileFromFs(t, fs.Source, fname)
for i, v := range c.expected {
found := strings.Contains(content, v)
if !found {
t.Errorf("[%d] %q missing from output:\n%q", i, v, content)
}
}
}
}
func initViper(v *viper.Viper) {
v.Set("metaDataFormat", "toml")
v.Set("archetypeDir", "archetypes")
v.Set("contentDir", "content")
v.Set("themesDir", "themes")
v.Set("layoutDir", "layouts")
v.Set("i18nDir", "i18n")
v.Set("theme", "sample")
}
func initFs(fs *hugofs.Fs) error {
perm := os.FileMode(0755)
var err error
// create directories
dirs := []string{
"archetypes",
"content",
filepath.Join("themes", "sample", "archetypes"),
}
for _, dir := range dirs {
err = fs.Source.Mkdir(dir, perm)
if err != nil {
return err
}
}
// create files
for _, v := range []struct {
path string
content string
}{
{
path: filepath.Join("archetypes", "post.md"),
content: "+++\ndate = \"2015-01-12T19:20:04-07:00\"\ntitle = \"Post Arch title\"\ntest = \"test1\"\n+++\n",
},
{
path: filepath.Join("archetypes", "post.org"),
content: "#+title: {{ .BaseFileName | upper }}",
},
{
path: filepath.Join("archetypes", "product.md"),
content: `+++
title = "{{ .BaseFileName | upper }}"
+++`,
},
{
path: filepath.Join("archetypes", "emptydate.md"),
content: "+++\ndate =\"\"\ntitle = \"Empty Date Arch title\"\ntest = \"test1\"\n+++\n",
},
// #3623x
{
path: filepath.Join("archetypes", "shortcodes.md"),
content: `+++
title = "{{ .BaseFileName | upper }}"
+++
{{< myshortcode >}}
Some text.
{{% myshortcode %}}
{{</* comment */>}}
{{%/* comment */%}}
`,
},
} {
f, err := fs.Source.Create(v.path)
if err != nil {
return err
}
defer f.Close()
_, err = f.Write([]byte(v.content))
if err != nil {
return err
}
}
return nil
}
// TODO(bep) extract common testing package with this and some others
func readFileFromFs(t *testing.T, fs afero.Fs, filename string) string {
filename = filepath.FromSlash(filename)
b, err := afero.ReadFile(fs, filename)
if err != nil {
// Print some debug info
root := strings.Split(filename, helpers.FilePathSeparator)[0]
afero.Walk(fs, root, func(path string, info os.FileInfo, err error) error {
if info != nil && !info.IsDir() {
fmt.Println(" ", path)
}
return nil
})
t.Fatalf("Failed to read file: %s", err)
}
return string(b)
}
func newTestCfg() (*viper.Viper, *hugofs.Fs) {
v := viper.New()
fs := hugofs.NewMem(v)
v.SetFs(fs.Source)
initViper(v)
return v, fs
}
+207
View File
@@ -0,0 +1,207 @@
package deps
import (
"io/ioutil"
"log"
"os"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/metrics"
"github.com/gohugoio/hugo/output"
"github.com/gohugoio/hugo/source"
"github.com/gohugoio/hugo/tpl"
jww "github.com/spf13/jwalterweatherman"
)
// Deps holds dependencies used by many.
// There will be normally only one instance of deps in play
// at a given time, i.e. one per Site built.
type Deps struct {
// The logger to use.
Log *jww.Notepad `json:"-"`
// The templates to use. This will usually implement the full tpl.TemplateHandler.
Tmpl tpl.TemplateFinder `json:"-"`
// The file systems to use.
Fs *hugofs.Fs `json:"-"`
// The PathSpec to use
*helpers.PathSpec `json:"-"`
// The ContentSpec to use
*helpers.ContentSpec `json:"-"`
// The SourceSpec to use
SourceSpec *source.SourceSpec `json:"-"`
// The configuration to use
Cfg config.Provider `json:"-"`
// The translation func to use
Translate func(translationID string, args ...interface{}) string `json:"-"`
Language *helpers.Language
// All the output formats available for the current site.
OutputFormatsConfig output.Formats
templateProvider ResourceProvider
WithTemplate func(templ tpl.TemplateHandler) error `json:"-"`
translationProvider ResourceProvider
Metrics metrics.Provider
}
// ResourceProvider is used to create and refresh, and clone resources needed.
type ResourceProvider interface {
Update(deps *Deps) error
Clone(deps *Deps) error
}
// TemplateHandler returns the used tpl.TemplateFinder as tpl.TemplateHandler.
func (d *Deps) TemplateHandler() tpl.TemplateHandler {
return d.Tmpl.(tpl.TemplateHandler)
}
// LoadResources loads translations and templates.
func (d *Deps) LoadResources() error {
// Note that the translations need to be loaded before the templates.
if err := d.translationProvider.Update(d); err != nil {
return err
}
if err := d.templateProvider.Update(d); err != nil {
return err
}
if th, ok := d.Tmpl.(tpl.TemplateHandler); ok {
th.PrintErrors()
}
return nil
}
// New initializes a Dep struct.
// Defaults are set for nil values,
// but TemplateProvider, TranslationProvider and Language are always required.
func New(cfg DepsCfg) (*Deps, error) {
var (
logger = cfg.Logger
fs = cfg.Fs
)
if cfg.TemplateProvider == nil {
panic("Must have a TemplateProvider")
}
if cfg.TranslationProvider == nil {
panic("Must have a TranslationProvider")
}
if cfg.Language == nil {
panic("Must have a Language")
}
if logger == nil {
logger = jww.NewNotepad(jww.LevelError, jww.LevelError, os.Stdout, ioutil.Discard, "", log.Ldate|log.Ltime)
}
if fs == nil {
// Default to the production file system.
fs = hugofs.NewDefault(cfg.Language)
}
ps, err := helpers.NewPathSpec(fs, cfg.Language)
if err != nil {
return nil, err
}
contentSpec, err := helpers.NewContentSpec(cfg.Language)
if err != nil {
return nil, err
}
sp := source.NewSourceSpec(cfg.Language, fs)
d := &Deps{
Fs: fs,
Log: logger,
templateProvider: cfg.TemplateProvider,
translationProvider: cfg.TranslationProvider,
WithTemplate: cfg.WithTemplate,
PathSpec: ps,
ContentSpec: contentSpec,
SourceSpec: sp,
Cfg: cfg.Language,
Language: cfg.Language,
}
if cfg.Cfg.GetBool("templateMetrics") {
d.Metrics = metrics.NewProvider(cfg.Cfg.GetBool("templateMetricsHints"))
}
return d, nil
}
// ForLanguage creates a copy of the Deps with the language dependent
// parts switched out.
func (d Deps) ForLanguage(l *helpers.Language) (*Deps, error) {
var err error
d.PathSpec, err = helpers.NewPathSpec(d.Fs, l)
if err != nil {
return nil, err
}
d.ContentSpec, err = helpers.NewContentSpec(l)
if err != nil {
return nil, err
}
d.Cfg = l
d.Language = l
if err := d.translationProvider.Clone(&d); err != nil {
return nil, err
}
if err := d.templateProvider.Clone(&d); err != nil {
return nil, err
}
return &d, nil
}
// DepsCfg contains configuration options that can be used to configure Hugo
// on a global level, i.e. logging etc.
// Nil values will be given default values.
type DepsCfg struct {
// The Logger to use.
Logger *jww.Notepad
// The file systems to use
Fs *hugofs.Fs
// The language to use.
Language *helpers.Language
// The configuration to use.
Cfg config.Provider
// Template handling.
TemplateProvider ResourceProvider
WithTemplate func(templ tpl.TemplateHandler) error
// i18n handling.
TranslationProvider ResourceProvider
// Whether we are in running (server) mode
Running bool
}
+3
View File
@@ -0,0 +1,3 @@
/.idea
/public
nohup.out
View File
+194
View File
@@ -0,0 +1,194 @@
Apache License
==============
_Version 2.0, January 2004_
_&lt;<http://www.apache.org/licenses/>&gt;_
### Terms and Conditions for use, reproduction, and distribution
#### 1. Definitions
“License” shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
“Licensor” shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
“Legal Entity” shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, “control” means **(i)** the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
outstanding shares, or **(iii)** beneficial ownership of such entity.
“You” (or “Your”) shall mean an individual or Legal Entity exercising
permissions granted by this License.
“Source” form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
“Object” form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
“Work” shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
“Derivative Works” shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
“Contribution” shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
“submitted” means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as “Not a Contribution.”
“Contributor” shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
#### 2. Grant of Copyright License
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
#### 3. Grant of Patent License
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
#### 4. Redistribution
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
* **(a)** You must give any other recipients of the Work or Derivative Works a copy of
this License; and
* **(b)** You must cause any modified files to carry prominent notices stating that You
changed the files; and
* **(c)** You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
#### 5. Submission of Contributions
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
#### 6. Trademarks
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
#### 7. Disclaimer of Warranty
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
#### 8. Limitation of Liability
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
#### 9. Accepting Warranty or Additional Liability
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
_END OF TERMS AND CONDITIONS_
### APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets `[]` replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same “printed page” as the copyright notice for easier identification within
third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+39
View File
@@ -0,0 +1,39 @@
# Hugo Docs
Documentation site for [Hugo](https://github.com/gohugoio/hugo), the very fast and flexible static site generator built with love in GoLang.
## Contributing
We welcome contributions to Hugo of any kind including documentation, suggestions, bug reports, pull requests etc. Also check out our [contribution guide](https://gohugo.io/contribute/documentation/). We would love to hear from you.
Note that this repository contains solely the documentation for Hugo. For contributions that aren't documentation-related please refer to the [hugo](https://github.com/gohugoio/hugo) repository.
*Pull requests shall **only** contain changes to the actual documentation. However, changes on the code base of Hugo **and** the documentation shall be a single, atomic pull request in the [hugo](https://github.com/gohugoio/hugo) repository.*
## Branches
* The `master` branch is where the site is automatically built from, and is the place to put changes relevant to the current Hugo version.
* The `next` branch is where we store changes that is related to the next Hugo release. This can be previewed here: https://next--gohugoio.netlify.com/
## Build
To view the documentation site locally, you need to clone this repository:
```bash
git clone https://github.com/gohugoio/hugoDocs.git
```
Also note that the documentation version for a given version of Hugo can also be found in the `/docs` sub-folder of the [Hugo source repository](https://github.com/gohugoio/hugo).
Then to view the docs in your browser, run Hugo and open up the link:
```bash
▶ hugo server
Started building sites ...
.
.
Serving pages from memory
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
```
+11
View File
@@ -0,0 +1,11 @@
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
description: ""
categories: []
keywords: []
slug: ""
aliases: []
toc: false
draft: true
---
-4
View File
@@ -1,4 +0,0 @@
{
"Indexes" : {"tag": "tags"},
"BaseUrl" : "http://localhost"
}
+255
View File
@@ -0,0 +1,255 @@
baseURL = "https://gohugo.io/"
paginate = 100
defaultContentLanguage = "en"
enableEmoji = true
# Set the unicode character used for the "return" link in page footnotes.
footnotereturnlinkcontents = "↩"
languageCode = "en-us"
metaDataFormat = "yaml"
title = "Hugo"
theme = "gohugoioTheme"
googleAnalytics = "UA-7131036-4"
pluralizeListTitles = false
# We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below).
disableAliases = true
# Highlighting config (Pygments)
# It is (currently) not in use, but you can do ```go in a content file if you want to.
pygmentsCodeFences = true
pygmentsOptions = ""
# Use the Chroma stylesheet
pygmentsUseClasses = true
pygmentsUseClassic = false
# See https://help.farbox.com/pygments.html
pygmentsStyle = "friendly"
[outputs]
home = [ "HTML", "RSS", "REDIR", "HEADERS" ]
section = [ "HTML", "RSS"]
[mediaTypes]
[mediaTypes."text/netlify"]
suffix = ""
delimiter = ""
[outputFormats]
[outputFormats.REDIR]
mediatype = "text/netlify"
baseName = "_redirects"
isPlainText = true
notAlternative = true
[outputFormats.HEADERS]
mediatype = "text/netlify"
baseName = "_headers"
isPlainText = true
notAlternative = true
[related]
threshold = 80
includeNewer = true
toLower = false
[[related.indices]]
name = "keywords"
weight = 100
[[related.indices]]
name = "date"
weight = 10
pattern = "2006"
[social]
twitter = "GoHugoIO"
#CUSTOM PARAMS
[params]
description = "The worlds fastest framework for building websites"
## Used for views in rendered HTML (i.e., rather than using the .Hugo variable)
release = "0.33"
## Setting this to true will add a "noindex" to *EVERY* page on the site
removefromexternalsearch = false
## Gh repo for site footer (include trailing slash)
ghrepo = "https://github.com/gohugoio/hugoDocs/"
## GH Repo for filing a new issue
github_repo = "https://github.com/gohugoio/hugo/issues/new"
### Edit content repo (set to automatically enter "edit" mode; this is good for "improve this page" links)
ghdocsrepo = "https://github.com/gohugoio/hugoDocs/tree/master/docs"
## Gitter URL
gitter = "https://gitter.im/spf13/hugo"
## Discuss Forum URL
forum = "https://discourse.gohugo.io/"
## Google Tag Manager
gtmid = ""
# First one is picked as the Twitter card image if not set on page.
images = ["images/gohugoio-card.png"]
flex_box_interior_classes = "flex-auto w-100 w-40-l mr3 mb3 bg-white ba b--moon-gray nested-copy-line-height"
#sidebar_direction = "sidebar_left"
# MARKDOWN
## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
[blackfriday]
plainIDAnchors = true
hrefTargetBlank = true
angledQuotes = false
latexDashes = true
## As of v0.20, all content files include a default "categories" value that's the same as the section. This was a cheap future-proofing method and should/could be changed accordingly.
[taxonomies]
category = "categories"
# High level items
[[menu.docs]]
name = "About Hugo"
weight = 1
identifier = "about"
url = "/about/"
[[menu.docs]]
name = "Getting Started"
weight = 5
identifier = "getting-started"
url = "/getting-started/"
[[menu.docs]]
name = "Themes"
weight = 15
identifier = "themes"
post = "break"
url = "/themes/"
# Core Menus
[[menu.docs]]
name = "Content Management"
weight = 20
identifier = "content-management"
post = "expanded"
url = "/content-management/"
[[menu.docs]]
name = "Templates"
weight = 25
identifier = "templates"
url = "/templates/"
[[menu.docs]]
name = "Functions"
weight = 30
identifier = "functions"
url = "/functions/"
[[menu.docs]]
name = "Variables"
weight = 35
identifier = "variables"
url = "/variables/"
[[menu.docs]]
name = "CLI"
weight = 40
post = "break"
identifier = "commands"
url = "/commands/"
# LOW LEVEL ITEMS
[[menu.docs]]
name = "Troubleshooting"
weight = 60
identifier = "troubleshooting"
url = "/troubleshooting/"
[[menu.docs]]
name = "Tools"
weight = 70
identifier = "tools"
url = "/tools/"
[[menu.docs]]
name = "Hosting & Deployment"
weight = 80
identifier = "hosting-and-deployment"
url = "/hosting-and-deployment/"
[[menu.docs]]
name = "Contribute"
weight = 100
post = "break"
identifier = "contribute"
url = "/contribute/"
#[[menu.docs]]
# name = "Tags"
# weight = 120
# identifier = "tags"
# url = "/tags/"
# [[menu.docs]]
# name = "Categories"
# weight = 140
# identifier = "categories"
# url = "/categories/"
######## QUICKLINKS
[[menu.quicklinks]]
name = "Fundamentals"
weight = 1
identifier = "fundamentals"
url = "/tags/fundamentals/"
######## GLOBAL ITEMS TO BE SHARED WITH THE HUGO SITES
[[menu.global]]
name = "News"
weight = 1
identifier = "news"
url = "/news/"
[[menu.global]]
name = "Docs"
weight = 5
identifier = "docs"
url = "/documentation/"
[[menu.global]]
name = "Themes"
weight = 10
identifier = "themes"
url = "https://themes.gohugo.io/"
# Anything with a weight > 100 gets an external icon
[[menu.global]]
name = "Community"
weight = 150
icon = true
identifier = "community"
post = "external"
url = "https://discourse.gohugo.io/"
[[menu.global]]
name = "GitHub"
weight = 200
identifier = "github"
post = "external"
url = "https://github.com/gohugoio/hugo"
+49
View File
@@ -0,0 +1,49 @@
---
title: "A Fast and Flexible Website Generator"
date: 2017-03-02T12:00:00-05:00
features:
- heading: Blistering Speed
image_path: /images/icon-fast.svg
tagline: What's modern about waiting for your site to build?
copy: Hugo is the fastest tool of its kind. At <1 ms per page, the average site builds in less than a second.
- heading: Robust Content Management
image_path: /images/icon-content-management.svg
tagline: Flexibility rules. Hugo is a content strategist's dream.
copy: Hugo supports unlimited content types, taxonomies, menus, dynamic API-driven content, and more, all without plugins.
- heading: Shortcodes
image_path: /images/icon-shortcodes.svg
tagline: Hugo's shortcodes are Markdown's hidden superpower.
copy: We love the beautiful simplicity of markdowns syntax, but there are times when we want more flexibility. Hugo shortcodes allow for both beauty and flexibility.
- heading: Built-in Templates
image_path: /images/icon-built-in-templates.svg
tagline: Hugo has common patterns to get your work done quickly.
copy: Hugo ships with pre-made templates to make quick work of SEO, commenting, analytics and other functions. One line of code, and you're done.
- heading: Multilingual and i18n
image_path: /images/icon-multilingual2.svg
tagline: Polyglot baked in.
copy: Hugo provides full i18n support for multi-language sites with the same straightforward development experience Hugo users love in single-language sites.
- heading: Custom Outputs
image_path: /images/icon-custom-outputs.svg
tagline: HTML not enough?
copy: Hugo allows you to output your content in multiple formats, including JSON or AMP, and makes it easy to create your own.
sections:
- heading: "100s of Themes"
cta: Check out the Hugo's themes.
link: http://themes.gohugo.io/
color_classes: bg-accent-color white
image: /images/homepage-screenshot-hugo-themes.jpg
copy: "Hugo provides a robust theming system that is easy to implement but capable of producing even the most complicated websites."
- heading: "Capable Templating"
cta: Get Started.
link: templates/
color_classes: bg-primary-color-light black
image: /images/home-page-templating-example.png
copy: "Hugo's Go-based templating provides just the right amount of logic to build anything from the simple to complex. If you prefer Jade/Pug-like syntax, you can also use Amber, Ace, or any combination of the three."
---
Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.
+20
View File
@@ -0,0 +1,20 @@
---
title: About Hugo
linktitle: Overview
description: Hugo's features, roadmap, license, and motivation.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: []
keywords: []
menu:
docs:
parent: "about"
weight: 1
weight: 1
draft: false
aliases: [/about-hugo/,/docs/]
toc: false
---
Hugo is not your average static site generator.
+43
View File
@@ -0,0 +1,43 @@
---
title: The Benefits of Static Site Generators
linktitle: The Benefits of Static
description: Improved performance, security and ease of use are just a few of the reasons static site generators are so appealing.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
keywords: [ssg,static,performance,security]
menu:
docs:
parent: "about"
weight: 30
weight: 30
sections_weight: 30
draft: false
aliases: []
toc: false
---
The purpose of website generators is to render content into HTML files. Most are "dynamic site generators." That means the HTTP server---i.e., the program that sends files to the browser to be viewed---runs the generator to create a new HTML file every time an end user requests a page.
Over time, dynamic site generators were programmed to cache their HTML files to prevent unnecessary delays in delivering pages to end users. A cached page is a static version of a web page.
Hugo takes caching a step further and all HTML files are rendered on your computer. You can review the files locally before copying them to the computer hosting the HTTP server. Since the HTML files aren't generated dynamically, we say that Hugo is a *static site generator*.
This has many benefits. The most noticeable is performance. HTTP servers are *very* good at sending files---so good, in fact, that you can effectively serve the same number of pages with a fraction of the memory and CPU needed for a dynamic site.
## More on Static Site Generators
* ["An Introduction to Static Site Generators", David Walsh][]
* ["Hugo vs. Wordpress page load speed comparison: Hugo leaves WordPress in its dust", GettingThingsTech][hugovwordpress]
* ["Static Site Generators", O-Reilly][]
* [StaticGen: Top Open-Source Static Site Generators (GitHub Stars)][]
* ["Top 10 Static Website Generators", Netlify blog][]
* ["The Resurgence of Static", dotCMS][dotcms]
["An Introduction to Static Site Generators", David Walsh]: https://davidwalsh.name/introduction-static-site-generators
["Static Site Generators", O-Reilly]: /documents/oreilly-static-site-generators.pdf
["Top 10 Static Website Generators", Netlify blog]: https://www.netlify.com/blog/2016/05/02/top-ten-static-website-generators/
[hugovwordpress]: https://gettingthingstech.com/hugo-vs.-wordpress-page-load-speed-comparison-hugo-leaves-wordpress-in-its-dust/
[StaticGen: Top Open-Source Static Site Generators (GitHub Stars)]: https://www.staticgen.com/
[dotcms]: https://dotcms.com/blog/post/the-resurgence-of-static
+90
View File
@@ -0,0 +1,90 @@
---
title: Hugo Features
linktitle: Hugo Features
description: Hugo boasts blistering speed, robust content management, and a powerful templating language making it a great fit for all kinds of static websites.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
menu:
docs:
parent: "about"
weight: 20
weight: 20
sections_weight: 20
draft: false
aliases: [/about/features]
toc: true
---
## General
* [Extremely fast][] build times (&lt; 1 ms per page)
* Completely cross platform, with [easy installation][install] on macOS, Linux, Windows, and more
* Renders changes on the fly with [LiveReload][] as you develop
* [Powerful theming][]
* [Host your site anywhere][hostanywhere]
## Organization
* Straightforward [organization for your projects][], including website sections
* Customizable [URLs][]
* Support for configurable [taxonomies][], including categories and tags
* [Sort content][] as you desire through powerful template [functions][]
* Automatic [table of contents][] generation
* [Dynamic menu][] creation
* [Pretty URLs][] support
* [Permalink][] pattern support
* Redirects via [aliases][]
## Content
* Native Markdown and Emacs Org-Mode support, as well as other languages via *external helpers* (see [supported formats][])
* TOML, YAML, and JSON metadata support in [front matter][]
* Customizable [homepage][]
* Multiple [content types][]
* Automatic and user defined [content summaries][]
* [Shortcodes][] to enable rich content inside of Markdown
* ["Minutes to Read"][pagevars] functionality
* ["Wordcount"][pagevars] functionality
## Additional Features
* Integrated [Disqus][] comment support
* Integrated [Google Analytics][] support
* Automatic [RSS][] creation
* Support for [Go][], [Amber], and [Ace][] HTML templates
* [Syntax highlighting][] powered by [Pygments][]
See what's coming next in the [Hugo roadmap][].
[Ace]: /templates/alternatives/
[aliases]: /content-management/urls/#aliases
[Amber]: https://github.com/eknkc/amber
[content summaries]: /content-management/summaries/
[content types]: /content-management/types/
[Disqus]: https://disqus.com/
[Dynamic menu]: /templates/menus/
[Extremely fast]: https://github.com/bep/hugo-benchmark
[front matter]: /content-management/front-matter/
[functions]: /functions/
[Go]: http://golang.org/pkg/html/template/
[Google Analytics]: https://google-analytics.com/
[homepage]: /templates/homepage/
[hostanywhere]: /hosting-and-deployment/
[Hugo roadmap]: /about/roadmap
[install]: /getting-started/installing/
[LiveReload]: /getting-started/usage/
[organization for your projects]: /getting-started/directory-structure/
[pagevars]: /variables/page/
[Permalink]: /content-management/urls/#permalinks
[Powerful theming]: /themes/
[Pretty URLs]: /content-management/urls/
[Pygments]: http://pygments.org/
[RSS]: /templates/rss/
[Shortcodes]: /content-management/shortcodes/
[sort content]: /templates/
[supported formats]: /content-management/formats/
[Syntax highlighting]: /tools/syntax-highlighting/
[table of contents]: /content-management/toc/
[taxonomies]: /content-management/taxonomies/
[URLs]: /content-management/urls/
+165
View File
@@ -0,0 +1,165 @@
---
title: Apache License
linktitle: License
description: Hugo v0.15 and later are released under the Apache 2.0 license.
date: 2016-02-01
publishdate: 2016-02-01
lastmod: 2016-03-02
categories: ["about hugo"]
keywords: ["License","apache"]
menu:
docs:
parent: "about"
weight: 60
weight: 60
sections_weight: 60
aliases: [/meta/license]
toc: true
---
{{% note %}}
Hugo v0.15 and later are released under the Apache 2.0 license.
Earlier versions of Hugo were released under the [Simple Public License](https://opensource.org/licenses/Simple-2.0).
{{% /note %}}
_Version 2.0, January 2004_ <br>
<http://www.apache.org/licenses/LICENSE-2.0>
*Terms and Conditions for use, reproduction, and distribution*
## 1. Definitions
“License” shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
“Licensor” shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
“Legal Entity” shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, “control” means **(i)** the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
outstanding shares, or **(iii)** beneficial ownership of such entity.
“You” (or “Your”) shall mean an individual or Legal Entity exercising
permissions granted by this License.
“Source” form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
“Object” form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
“Work” shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
“Derivative Works” shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
“Contribution” shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
“submitted” means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as “Not a Contribution.”
“Contributor” shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
## 2. Grant of Copyright License
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
## 3. Grant of Patent License
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
## 4. Redistribution
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
* **(a)** You must give any other recipients of the Work or Derivative Works a copy of
this License; and
* **(b)** You must cause any modified files to carry prominent notices stating that You
changed the files; and
* **\(c)** You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
## 5. Submission of Contributions
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
## 6. Trademarks
This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
## 7. Disclaimer of Warranty
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
## 8. Limitation of Liability
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
## 9. Accepting Warranty or Additional Liability
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
_END OF TERMS AND CONDITIONS_
## APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets `[]` replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same “printed page” as the copyright notice for easier identification within third-party archives.
{{< code file="apache-notice.txt" download="apache-notice.txt" >}}
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{{< /code >}}
+209
View File
@@ -0,0 +1,209 @@
---
title: Hugo 0.32 HOWTO
description: About page bundles, image processing and more.
date: 2017-12-28
keywords: [ssg,static,performance,security]
menu:
docs:
parent: "about"
weight: 10
weight: 10
sections_weight: 10
draft: false
aliases: []
toc: true
images:
- images/blog/sunset.jpg
---
{{% note %}}
This documentation belongs in other places in this documentation site, but is put here first ... to get something up and running fast.
{{% /note %}}
Also see this demo project from [bep](https://github.com/bep/), the clever Norwegian behind these new features:
* http://hugotest.bep.is/
* https://github.com/bep/hugotest (source)
## Page Resources
### Organize Your Content
{{< figure src="/images/hugo-content-bundles.png" title="Pages with image resources" >}}
The content folder above shows a mix of content pages (`md` (i.e. markdown) files) and image resources.
{{% note %}}
You can use any file type as a content resource as long as it is a MIME type recognized by Hugo (`json` files will, as one example, work fine). If you want to get exotic, you can define your [own media type](/templates/output-formats/#media-types).
{{% /note %}}
The 3 page bundles marked in red explained from top to bottom:
1. The home page with one image resource (`1-logo.png`)
2. The blog section with two images resources and two pages resources (`content1.md`, `content2.md`). Note that the `_index.md` represents the URL for this section.
3. An article (`hugo-is-cool`) with a folder with some images and one content resource (`cats-info.md`). Note that the `index.md` represents the URL for this article.
The content files below `blog/posts` are just regular standalone pages.
{{% note %}}
Note that changes to any resource inside the `content` folder will trigger a reload when running in watch (aka server or live reload mode), it will even work with `--navigateToChanged`.
{{% /note %}}
#### Sort Order
* Pages are sorted according to standard Hugo page sorting rules.
* Images and other resources are sorted in lexicographical order.
### Handle Page Resources in Templates
#### List all Resources
```html
{{ range .Resources }}
<li><a href="{{ .RelPermalink }}">{{ .ResourceType | title }}</a></li>
{{ end }}
```
For an absolute URL, use `.Permalink`.
**Note:** The permalink will be relative to the content page, respecting permalink settings. Also, included page resources will not have a value for `RelPermalink`.
#### List All Resources by Type
```html
{{ with .Resources.ByType "image" }}
{{ end }}
```
Type here is `page` for pages, else the main type in the MIME type, so `image`, `json` etc.
#### Get a Specific Resource
```html
{{ $logo := .Resources.GetByPrefix "logo" }}
{{ with $logo }}
{{ end }}
```
#### Include Page Resource Content
```html
{{ with .Resources.ByType "page" }}
{{ range . }}
<h3>{{ .Title }}</h3>
{{ .Content }}
{{ end }}
{{ end }}
```
## Image Processing
The `image` resource implements the methods `Resize`, `Fit` and `Fill`:
Resize
: Resize to the given dimension, `{{ $logo.Resize "200x" }}` will resize to 200 pixels wide and preserve the aspect ratio. Use `{{ $logo.Resize "200x100" }}` to control both height and width.
Fit
: Scale down the image to fit the given dimensions, e.g. `{{ $logo.Fit "200x100" }}` will fit the image inside a box that is 200 pixels wide and 100 pixels high.
Fill
: Resize and crop the image given dimensions, e.g. `{{ $logo.Fill "200x100" }}` will resize and crop to width 200 and height 100
{{% note %}}
Image operations in Hugo currently **do not preserve EXIF data** as this is not supported by Go's [image package](https://github.com/golang/go/search?q=exif&type=Issues&utf8=%E2%9C%93). This will be improved on in the future.
{{% /note %}}
### Image Processing Examples
_The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_
{{< imgproc sunset Resize "300x" >}}
{{< imgproc sunset Fill "90x120 left" >}}
{{< imgproc sunset Fill "90x120 right" >}}
{{< imgproc sunset Fit "90x90" >}}
{{< imgproc sunset Resize "300x q10" >}}
This is the shortcode used in the examples above:
{{< code file="layouts/shortcodes/imgproc.html" >}}
{{< readfile file="layouts/shortcodes/imgproc.html" >}}
{{< /code >}}
And it is used like this:
```html
{{</* imgproc sunset Resize "300x" */>}}
```
### Image Processing Options
In addition to the dimensions (e.g. `200x100`) where either height or width can be omitted, Hugo supports a set of additional image options:
Anchor
: Only relevant for `Fill`. This is useful for thumbnail generation where the main motive is located in, say, the left corner. Valid are `Center`, `TopLeft`, `Top`, `TopRight`, `Left`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`. Example: `{{ $logo.Fill "200x100 BottomLeft" }}`
JPEG Quality
: Only relevant for JPEG images, values 1 to 100 inclusive, higher is better. Default is 75. `{{ $logo.Resize "200x q50" }}`
Rotate
: Rotates an image by the given angle counter-clockwise. The rotation will be performed first to get the dimensions correct. `{{ $logo.Resize "200x r90" }}`. The main use of this is to be able to manually correct for [EXIF orientation](https://github.com/golang/go/issues/4341) of JPEG images.
Resample Filter
: Filter used in resizing. Default is `Box`, a simple and fast resampling filter appropriate for downscaling. See https://github.com/disintegration/imaging for more. If you want to trade quality for faster processing, this may be a option to test.
### Performance
Processed images are stored below `<project-dir>/resources` (can be set with `resourceDir` config setting). This folder is deliberately placed in the project, as it is recommended to check these into source control as part of the project. These images are not "Hugo fast" to generate, but once generated they can be reused.
If you change your image settings (e.g. size), remove or rename images etc., you will end up with unused images taking up space and cluttering your project.
To clean up, run:
```bash
hugo --gc
```
{{% note %}}
**GC** is short for **Garbage Collection**.
{{% /note %}}
## Configuration
### Default Image Processing Config
You can configure an `imaging` section in `config.toml` with default image processing options:
```toml
[imaging]
# Default resample filter used for resizing. Default is Box,
# a simple and fast averaging filter appropriate for downscaling.
# See https://github.com/disintegration/imaging
resampleFilter = "box"
# Defatult JPEG quality setting. Default is 75.
quality = 68
```
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

+69
View File
@@ -0,0 +1,69 @@
---
title: What is Hugo
linktitle: What is Hugo
description: Hugo is a fast and modern static site generator written in Go, and designed to make website creation fun again.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
layout: single
menu:
main:
parent: "about"
weight: 10
weight: 10
sections_weight: 10
draft: false
aliases: [/overview/introduction/,/about/why-i-built-hugo/]
toc: true
---
Hugo is a general-purpose website framework. Technically speaking, Hugo is a [static site generator][]. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website's end users and an ideal writing experience for website authors.
Websites built with Hugo are extremely fast and secure. Hugo sites can be hosted anywhere, including [Netlify][], [Heroku][], [GoDaddy][], [DreamHost][], [GitHub Pages][], [Surge][], [Aerobatic][], [Firebase][], [Google Cloud Storage][], [Amazon S3][], [Rackspace][], [Azure][], and [CloudFront][] and work well with CDNs. Hugo sites run without the need for a database or dependencies on expensive runtimes like Ruby, Python, or PHP.
We think of Hugo as the ideal website creation tool with nearly instant build times, able to rebuild whenever a change is made.
## How Fast is Hugo?
{{< youtube "CdiDYZ51a2o" >}}
## What Does Hugo Do?
In technical terms, Hugo takes a source directory of files and templates and uses these as input to create a complete website.
## Who Should Use Hugo?
Hugo is for people that prefer writing in a text editor over a browser.
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
Hugo is for people building a blog, a company site, a portfolio site, documentation, a single landing page, or a website with thousands of pages.
[@spf13]: https://twitter.com/@spf13
[Aerobatic]: https://www.aerobatic.com/
[Amazon S3]: http://aws.amazon.com/s3/
[Azure]: https://blogs.msdn.microsoft.com/acoat/2016/01/28/publish-a-static-web-site-using-azure-web-apps/
[CloudFront]: http://aws.amazon.com/cloudfront/ "Amazon CloudFront"
[contributing to it]: https://github.com/gohugoio/hugo
[DreamHost]: http://www.dreamhost.com/
[Firebase]: https://firebase.google.com/docs/hosting/ "Firebase static hosting"
[GitHub Pages]: https://pages.github.com/
[GitLab]: https://about.gitlab.com
[Go language]: https://golang.org/
[GoDaddy]: https://www.godaddy.com/ "Godaddy.com Hosting"
[Google Cloud Storage]: http://cloud.google.com/storage/
[Heroku]: https://www.heroku.com/
[Jekyll]: http://jekyllrb.com/
[Jekyll]: https://jekyllrb.com/
[Middleman]: https://middlemanapp.com/
[Middleman]: https://middlemanapp.com/
[Nanoc]: http://nanoc.ws/
[Nanoc]: https://nanoc.ws/
[Netlify]: https://netlify.com
[rackspace]: https://www.rackspace.com/cloud/files
[static site generator]: /about/benefits/
[Rackspace]: https://www.rackspace.com/cloud/files
[static site generator]: /about/benefits/
[Surge]: https://surge.sh
+84
View File
@@ -0,0 +1,84 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo"
slug: hugo
url: /commands/hugo/
---
## hugo
hugo builds your site
### Synopsis
hugo is the main command, used to build your Hugo site.
Hugo is a Fast and Flexible Static Site Generator
built with love by spf13 and friends in Go.
Complete documentation is available at http://gohugo.io/.
```
hugo [flags]
```
### Options
```
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
-D, --buildDrafts include content marked as draft
-E, --buildExpired include expired content
-F, --buildFuture include content with publishdate in the future
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
--canonifyURLs if true, all relative URLs will be canonicalized using baseURL
--cleanDestinationDir remove files from destination not found in static directories
--config string config file (default is path/config.yaml|json|toml)
-c, --contentDir string filesystem path to content directory
--debug debug output
-d, --destination string filesystem path to write files to
--disable404 do not render 404 page
--disableKinds stringSlice disable different kind of pages (home, RSS etc.)
--disableRSS do not build RSS files
--disableSitemap do not build Sitemap file
--enableGitInfo add Git revision, date and author info to the pages
--forceSyncStatic copy all files when static is changed.
--gc enable to run some cleanup tasks (remove unused cache files) after the build
-h, --help help for hugo
--i18n-warnings print missing translations
--ignoreCache ignores the cache directory
-l, --layoutDir string filesystem path to layout directory
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--noChmod don't sync permission mode of files
--noTimes don't sync modification time of files
--pluralizeListTitles pluralize titles in lists using inflect (default true)
--preserveTaxonomyNames preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu")
--quiet build in quiet mode
--renderToMemory render to memory (only useful for benchmark testing)
-s, --source string filesystem path to read files relative from
--stepAnalysis display memory and timing of different steps of the program
--templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
-t, --theme string theme to use (located in /themes/THEMENAME/)
--themesDir string filesystem path to themes directory
--uglyURLs if true, use /filename.html instead of /filename/
-v, --verbose verbose output
--verboseLog verbose logging
-w, --watch watch filesystem for changes and recreate as needed
```
### SEE ALSO
* [hugo benchmark](/commands/hugo_benchmark/) - Benchmark Hugo by building a site a number of times.
* [hugo check](/commands/hugo_check/) - Contains some verification checks
* [hugo config](/commands/hugo_config/) - Print the site configuration
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
* [hugo env](/commands/hugo_env/) - Print Hugo version and environment info
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
* [hugo import](/commands/hugo_import/) - Import your site from others.
* [hugo list](/commands/hugo_list/) - Listing out various types of content
* [hugo new](/commands/hugo_new/) - Create new content for your site
* [hugo server](/commands/hugo_server/) - A high performance webserver
* [hugo undraft](/commands/hugo_undraft/) - Undraft resets the content's draft status
* [hugo version](/commands/hugo_version/) - Print the version number of Hugo
###### Auto generated by spf13/cobra on 28-Dec-2017
+76
View File
@@ -0,0 +1,76 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo benchmark"
slug: hugo_benchmark
url: /commands/hugo_benchmark/
---
## hugo benchmark
Benchmark Hugo by building a site a number of times.
### Synopsis
Hugo can build a site many times over and analyze the running process
creating a benchmark.
```
hugo benchmark [flags]
```
### Options
```
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
-D, --buildDrafts include content marked as draft
-E, --buildExpired include expired content
-F, --buildFuture include content with publishdate in the future
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
--canonifyURLs if true, all relative URLs will be canonicalized using baseURL
--cleanDestinationDir remove files from destination not found in static directories
-c, --contentDir string filesystem path to content directory
-n, --count int number of times to build the site (default 13)
--cpuprofile string path/filename for the CPU profile file
-d, --destination string filesystem path to write files to
--disable404 do not render 404 page
--disableKinds stringSlice disable different kind of pages (home, RSS etc.)
--disableRSS do not build RSS files
--disableSitemap do not build Sitemap file
--enableGitInfo add Git revision, date and author info to the pages
--forceSyncStatic copy all files when static is changed.
--gc enable to run some cleanup tasks (remove unused cache files) after the build
-h, --help help for benchmark
--i18n-warnings print missing translations
--ignoreCache ignores the cache directory
-l, --layoutDir string filesystem path to layout directory
--memprofile string path/filename for the memory profile file
--noChmod don't sync permission mode of files
--noTimes don't sync modification time of files
--pluralizeListTitles pluralize titles in lists using inflect (default true)
--preserveTaxonomyNames preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu")
--renderToMemory render to memory (only useful for benchmark testing)
-s, --source string filesystem path to read files relative from
--stepAnalysis display memory and timing of different steps of the program
--templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
-t, --theme string theme to use (located in /themes/THEMENAME/)
--themesDir string filesystem path to themes directory
--uglyURLs if true, use /filename.html instead of /filename/
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 28-Dec-2017
+38
View File
@@ -0,0 +1,38 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo check"
slug: hugo_check
url: /commands/hugo_check/
---
## hugo check
Contains some verification checks
### Synopsis
Contains some verification checks
### Options
```
-h, --help help for check
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo check ulimit](/commands/hugo_check_ulimit/) - Check system ulimit settings
###### Auto generated by spf13/cobra on 28-Dec-2017
@@ -0,0 +1,42 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo check ulimit"
slug: hugo_check_ulimit
url: /commands/hugo_check_ulimit/
---
## hugo check ulimit
Check system ulimit settings
### Synopsis
Hugo will inspect the current ulimit settings on the system.
This is primarily to ensure that Hugo can watch enough files on some OSs
```
hugo check ulimit [flags]
```
### Options
```
-h, --help help for ulimit
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo check](/commands/hugo_check/) - Contains some verification checks
###### Auto generated by spf13/cobra on 28-Dec-2017
+41
View File
@@ -0,0 +1,41 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo config"
slug: hugo_config
url: /commands/hugo_config/
---
## hugo config
Print the site configuration
### Synopsis
Print the site configuration, both default and custom settings.
```
hugo config [flags]
```
### Options
```
-h, --help help for config
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 28-Dec-2017
+45
View File
@@ -0,0 +1,45 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo convert"
slug: hugo_convert
url: /commands/hugo_convert/
---
## hugo convert
Convert your content to different formats
### Synopsis
Convert your content (e.g. front matter) to different formats.
See convert's subcommands toJSON, toTOML and toYAML for more information.
### Options
```
-h, --help help for convert
-o, --output string filesystem path to write files to
-s, --source string filesystem path to read files relative from
--unsafe enable less safe operations, please backup first
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo convert toJSON](/commands/hugo_convert_tojson/) - Convert front matter to JSON
* [hugo convert toTOML](/commands/hugo_convert_totoml/) - Convert front matter to TOML
* [hugo convert toYAML](/commands/hugo_convert_toyaml/) - Convert front matter to YAML
###### Auto generated by spf13/cobra on 28-Dec-2017
@@ -0,0 +1,45 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo convert toJSON"
slug: hugo_convert_toJSON
url: /commands/hugo_convert_tojson/
---
## hugo convert toJSON
Convert front matter to JSON
### Synopsis
toJSON converts all front matter in the content directory
to use JSON for the front matter.
```
hugo convert toJSON [flags]
```
### Options
```
-h, --help help for toJSON
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
-o, --output string filesystem path to write files to
--quiet build in quiet mode
-s, --source string filesystem path to read files relative from
--unsafe enable less safe operations, please backup first
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
###### Auto generated by spf13/cobra on 28-Dec-2017
@@ -0,0 +1,45 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo convert toTOML"
slug: hugo_convert_toTOML
url: /commands/hugo_convert_totoml/
---
## hugo convert toTOML
Convert front matter to TOML
### Synopsis
toTOML converts all front matter in the content directory
to use TOML for the front matter.
```
hugo convert toTOML [flags]
```
### Options
```
-h, --help help for toTOML
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
-o, --output string filesystem path to write files to
--quiet build in quiet mode
-s, --source string filesystem path to read files relative from
--unsafe enable less safe operations, please backup first
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
###### Auto generated by spf13/cobra on 28-Dec-2017
@@ -0,0 +1,45 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo convert toYAML"
slug: hugo_convert_toYAML
url: /commands/hugo_convert_toyaml/
---
## hugo convert toYAML
Convert front matter to YAML
### Synopsis
toYAML converts all front matter in the content directory
to use YAML for the front matter.
```
hugo convert toYAML [flags]
```
### Options
```
-h, --help help for toYAML
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
-o, --output string filesystem path to write files to
--quiet build in quiet mode
-s, --source string filesystem path to read files relative from
--unsafe enable less safe operations, please backup first
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
###### Auto generated by spf13/cobra on 28-Dec-2017
+41
View File
@@ -0,0 +1,41 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo env"
slug: hugo_env
url: /commands/hugo_env/
---
## hugo env
Print Hugo version and environment info
### Synopsis
Print Hugo version and environment info. This is useful in Hugo bug reports.
```
hugo env [flags]
```
### Options
```
-h, --help help for env
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 28-Dec-2017
+41
View File
@@ -0,0 +1,41 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo gen"
slug: hugo_gen
url: /commands/hugo_gen/
---
## hugo gen
A collection of several useful generators.
### Synopsis
A collection of several useful generators.
### Options
```
-h, --help help for gen
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo gen autocomplete](/commands/hugo_gen_autocomplete/) - Generate shell autocompletion script for Hugo
* [hugo gen chromastyles](/commands/hugo_gen_chromastyles/) - Generate CSS stylesheet for the Chroma code highlighter
* [hugo gen doc](/commands/hugo_gen_doc/) - Generate Markdown documentation for the Hugo CLI.
* [hugo gen man](/commands/hugo_gen_man/) - Generate man pages for the Hugo CLI
###### Auto generated by spf13/cobra on 28-Dec-2017
@@ -0,0 +1,59 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo gen autocomplete"
slug: hugo_gen_autocomplete
url: /commands/hugo_gen_autocomplete/
---
## hugo gen autocomplete
Generate shell autocompletion script for Hugo
### Synopsis
Generates a shell autocompletion script for Hugo.
NOTE: The current version supports Bash only.
This should work for *nix systems with Bash installed.
By default, the file is written directly to /etc/bash_completion.d
for convenience, and the command may need superuser rights, e.g.:
$ sudo hugo gen autocomplete
Add `--completionfile=/path/to/file` flag to set alternative
file-path and name.
Logout and in again to reload the completion scripts,
or just source them in directly:
$ . /etc/bash_completion
```
hugo gen autocomplete [flags]
```
### Options
```
--completionfile string autocompletion file (default "/etc/bash_completion.d/hugo.sh")
-h, --help help for autocomplete
--type string autocompletion type (currently only bash supported) (default "bash")
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 28-Dec-2017
@@ -0,0 +1,46 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo gen chromastyles"
slug: hugo_gen_chromastyles
url: /commands/hugo_gen_chromastyles/
---
## hugo gen chromastyles
Generate CSS stylesheet for the Chroma code highlighter
### Synopsis
Generate CSS stylesheet for the Chroma code highlighter for a given style. This stylesheet is needed if pygmentsUseClasses is enabled in config.
See https://help.farbox.com/pygments.html for preview of available styles
```
hugo gen chromastyles [flags]
```
### Options
```
-h, --help help for chromastyles
--highlightStyle string style used for highlighting lines (see https://github.com/alecthomas/chroma) (default "bg:#ffffcc")
--linesStyle string style used for line numbers (see https://github.com/alecthomas/chroma)
--style string highlighter style (see https://help.farbox.com/pygments.html) (default "friendly")
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 28-Dec-2017
+48
View File
@@ -0,0 +1,48 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo gen doc"
slug: hugo_gen_doc
url: /commands/hugo_gen_doc/
---
## hugo gen doc
Generate Markdown documentation for the Hugo CLI.
### Synopsis
Generate Markdown documentation for the Hugo CLI.
This command is, mostly, used to create up-to-date documentation
of Hugo's command-line interface for http://gohugo.io/.
It creates one Markdown file per command with front matter suitable
for rendering in Hugo.
```
hugo gen doc [flags]
```
### Options
```
--dir string the directory to write the doc. (default "/tmp/hugodoc/")
-h, --help help for doc
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 28-Dec-2017
+44
View File
@@ -0,0 +1,44 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo gen man"
slug: hugo_gen_man
url: /commands/hugo_gen_man/
---
## hugo gen man
Generate man pages for the Hugo CLI
### Synopsis
This command automatically generates up-to-date man pages of Hugo's
command-line interface. By default, it creates the man page files
in the "man" directory under the current directory.
```
hugo gen man [flags]
```
### Options
```
--dir string the directory to write the man pages. (default "man/")
-h, --help help for man
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 28-Dec-2017
+40
View File
@@ -0,0 +1,40 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo import"
slug: hugo_import
url: /commands/hugo_import/
---
## hugo import
Import your site from others.
### Synopsis
Import your site from other web site generators like Jekyll.
Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_path`.
### Options
```
-h, --help help for import
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo import jekyll](/commands/hugo_import_jekyll/) - hugo import from Jekyll
###### Auto generated by spf13/cobra on 28-Dec-2017
@@ -0,0 +1,44 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo import jekyll"
slug: hugo_import_jekyll
url: /commands/hugo_import_jekyll/
---
## hugo import jekyll
hugo import from Jekyll
### Synopsis
hugo import from Jekyll.
Import from Jekyll requires two paths, e.g. `hugo import jekyll jekyll_root_path target_path`.
```
hugo import jekyll [flags]
```
### Options
```
--force allow import into non-empty target directory
-h, --help help for jekyll
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo import](/commands/hugo_import/) - Import your site from others.
###### Auto generated by spf13/cobra on 28-Dec-2017
+43
View File
@@ -0,0 +1,43 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo list"
slug: hugo_list
url: /commands/hugo_list/
---
## hugo list
Listing out various types of content
### Synopsis
Listing out various types of content.
List requires a subcommand, e.g. `hugo list drafts`.
### Options
```
-h, --help help for list
-s, --source string filesystem path to read files relative from
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo list drafts](/commands/hugo_list_drafts/) - List all drafts
* [hugo list expired](/commands/hugo_list_expired/) - List all posts already expired
* [hugo list future](/commands/hugo_list_future/) - List all posts dated in the future
###### Auto generated by spf13/cobra on 28-Dec-2017
+42
View File
@@ -0,0 +1,42 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo list drafts"
slug: hugo_list_drafts
url: /commands/hugo_list_drafts/
---
## hugo list drafts
List all drafts
### Synopsis
List all of the drafts in your content directory.
```
hugo list drafts [flags]
```
### Options
```
-h, --help help for drafts
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-s, --source string filesystem path to read files relative from
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo list](/commands/hugo_list/) - Listing out various types of content
###### Auto generated by spf13/cobra on 28-Dec-2017
@@ -0,0 +1,43 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo list expired"
slug: hugo_list_expired
url: /commands/hugo_list_expired/
---
## hugo list expired
List all posts already expired
### Synopsis
List all of the posts in your content directory which has already
expired.
```
hugo list expired [flags]
```
### Options
```
-h, --help help for expired
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-s, --source string filesystem path to read files relative from
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo list](/commands/hugo_list/) - Listing out various types of content
###### Auto generated by spf13/cobra on 28-Dec-2017
+43
View File
@@ -0,0 +1,43 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo list future"
slug: hugo_list_future
url: /commands/hugo_list_future/
---
## hugo list future
List all posts dated in the future
### Synopsis
List all of the posts in your content directory which will be
posted in the future.
```
hugo list future [flags]
```
### Options
```
-h, --help help for future
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-s, --source string filesystem path to read files relative from
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo list](/commands/hugo_list/) - Listing out various types of content
###### Auto generated by spf13/cobra on 28-Dec-2017
+51
View File
@@ -0,0 +1,51 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo new"
slug: hugo_new
url: /commands/hugo_new/
---
## hugo new
Create new content for your site
### Synopsis
Create a new content file and automatically set the date and title.
It will guess which kind of file to create based on the path provided.
You can also specify the kind with `-k KIND`.
If archetypes are provided in your theme or site, they will be used.
```
hugo new [path] [flags]
```
### Options
```
--editor string edit new content with this editor, if provided
-h, --help help for new
-k, --kind string content type to create
-s, --source string filesystem path to read files relative from
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton)
* [hugo new theme](/commands/hugo_new_theme/) - Create a new theme
###### Auto generated by spf13/cobra on 28-Dec-2017
+46
View File
@@ -0,0 +1,46 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo new site"
slug: hugo_new_site
url: /commands/hugo_new_site/
---
## hugo new site
Create a new site (skeleton)
### Synopsis
Create a new site in the provided directory.
The new site will have the correct structure, but no content or theme yet.
Use `hugo new [contentPath]` to create new content.
```
hugo new site [path] [flags]
```
### Options
```
--force init inside non-empty directory
-f, --format string config & frontmatter format (default "toml")
-h, --help help for site
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-s, --source string filesystem path to read files relative from
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo new](/commands/hugo_new/) - Create new content for your site
###### Auto generated by spf13/cobra on 28-Dec-2017
+45
View File
@@ -0,0 +1,45 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo new theme"
slug: hugo_new_theme
url: /commands/hugo_new_theme/
---
## hugo new theme
Create a new theme
### Synopsis
Create a new theme (skeleton) called [name] in the current directory.
New theme is a skeleton. Please add content to the touched files. Add your
name to the copyright line in the license and adjust the theme.toml file
as you see fit.
```
hugo new theme [name] [flags]
```
### Options
```
-h, --help help for theme
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-s, --source string filesystem path to read files relative from
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo new](/commands/hugo_new/) - Create new content for your site
###### Auto generated by spf13/cobra on 28-Dec-2017
+94
View File
@@ -0,0 +1,94 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo server"
slug: hugo_server
url: /commands/hugo_server/
---
## hugo server
A high performance webserver
### Synopsis
Hugo provides its own webserver which builds and serves the site.
While hugo server is high performance, it is a webserver with limited options.
Many run it in production, but the standard behavior is for people to use it
in development and use a more full featured server such as Nginx or Caddy.
'hugo server' will avoid writing the rendered and served content to disk,
preferring to store it in memory.
By default hugo will also watch your files for any changes you make and
automatically rebuild the site. It will then live reload any open browser pages
and push the latest content to them. As most Hugo sites are built in a fraction
of a second, you will be able to save and see your changes nearly instantly.
```
hugo server [flags]
```
### Options
```
--appendPort append port to baseURL (default true)
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
--bind string interface to which the server will bind (default "127.0.0.1")
-D, --buildDrafts include content marked as draft
-E, --buildExpired include expired content
-F, --buildFuture include content with publishdate in the future
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
--canonifyURLs if true, all relative URLs will be canonicalized using baseURL
--cleanDestinationDir remove files from destination not found in static directories
-c, --contentDir string filesystem path to content directory
-d, --destination string filesystem path to write files to
--disable404 do not render 404 page
--disableFastRender enables full re-renders on changes
--disableKinds stringSlice disable different kind of pages (home, RSS etc.)
--disableLiveReload watch without enabling live browser reload on rebuild
--disableRSS do not build RSS files
--disableSitemap do not build Sitemap file
--enableGitInfo add Git revision, date and author info to the pages
--forceSyncStatic copy all files when static is changed.
--gc enable to run some cleanup tasks (remove unused cache files) after the build
-h, --help help for server
--i18n-warnings print missing translations
--ignoreCache ignores the cache directory
-l, --layoutDir string filesystem path to layout directory
--liveReloadPort int port for live reloading (i.e. 443 in HTTPS proxy situations) (default -1)
--meminterval string interval to poll memory usage (requires --memstats), valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default "100ms")
--memstats string log memory usage to this file
--navigateToChanged navigate to changed content file on live browser reload
--noChmod don't sync permission mode of files
--noHTTPCache prevent HTTP caching
--noTimes don't sync modification time of files
--pluralizeListTitles pluralize titles in lists using inflect (default true)
-p, --port int port on which the server will listen (default 1313)
--preserveTaxonomyNames preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu")
--renderToDisk render to Destination path (default is render to memory & serve from there)
-s, --source string filesystem path to read files relative from
--stepAnalysis display memory and timing of different steps of the program
--templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
-t, --theme string theme to use (located in /themes/THEMENAME/)
--themesDir string filesystem path to themes directory
--uglyURLs if true, use /filename.html instead of /filename/
-w, --watch watch filesystem for changes and recreate as needed (default true)
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 28-Dec-2017
+43
View File
@@ -0,0 +1,43 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo undraft"
slug: hugo_undraft
url: /commands/hugo_undraft/
---
## hugo undraft
Undraft resets the content's draft status
### Synopsis
Undraft resets the content's draft status
and updates the date to the current date and time.
If the content's draft status is 'False', nothing is done.
```
hugo undraft path/to/content [flags]
```
### Options
```
-h, --help help for undraft
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 28-Dec-2017
+41
View File
@@ -0,0 +1,41 @@
---
date: 2017-12-28T18:49:29+01:00
title: "hugo version"
slug: hugo_version
url: /commands/hugo_version/
---
## hugo version
Print the version number of Hugo
### Synopsis
All software has versions. This is Hugo's.
```
hugo version [flags]
```
### Options
```
-h, --help help for version
```
### Options inherited from parent commands
```
--config string config file (default is path/config.yaml|json|toml)
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
```
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 28-Dec-2017
+20
View File
@@ -0,0 +1,20 @@
---
title: Content Management
linktitle: Content Management Overview
description: Hugo makes managing large static sites easy with support for archetypes, content types, menus, cross references, summaries, and more.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
menu:
docs:
parent: "content-management"
weight: 1
keywords: [source, organization]
categories: [content management]
weight: 01 #rem
draft: false
aliases: [/content/,/content/organization]
toc: false
---
A static site generator needs to extend beyond front matter and a couple templates to be both scalable and *manageable*. Hugo was designed with not only developers in mind, but also content managers and authors.

Some files were not shown because too many files have changed in this diff Show More