Compare commits

...

186 Commits

Author SHA1 Message Date
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
820 changed files with 23389 additions and 19051 deletions
+12 -12
View File
@@ -1,15 +1,15 @@
hugo
docs/public*
/.idea
hugo.exe
*.test
*.prof
nohup.out
cover.out
*.swp
*.swo
.DS_Store
*~
hugo
docs/public*
/.idea
hugo.exe
*.test
*.prof
nohup.out
cover.out
*.swp
*.swo
.DS_Store
*~
vendor/*/
*.bench
coverage*.out
+3
View File
@@ -0,0 +1,3 @@
[submodule "themes/gohugoioTheme"]
path = docs/themes/gohugoioTheme
url = https://github.com/gohugoio/gohugoioTheme.git
+14 -10
View File
@@ -5,7 +5,11 @@ 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/spf13/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.
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
@@ -22,14 +26,14 @@ The Hugo community and maintainers are [very active](https://github.com/spf13/hu
## Asking Support Questions
We have an active [discussion forum](http://discuss.gohugo.io) where users and developers can ask 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/spf13/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](http://discuss.gohugo.io).
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
@@ -48,12 +52,12 @@ To make the contribution process as seamless as possible, we ask for the followi
* 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/spf13/hugo).
* 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 `make check` succeeds. [Travis CI](https://travis-ci.org/spf13/hugo) (Linux and macOS) and [AppVeyor](https://ci.appveyor.com/project/spf13/hugo/branch/master) (Windows) will fail the build if `make check` fails.
* Ensure that `make 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 `make check` fails.
* Follow the **Git Commit Message Guidelines** below.
### Git Commit Message Guidelines
@@ -93,8 +97,8 @@ You **must use govendor** to fetch and manage Hugo's dependencies.
### Fetch the Sources From GitHub
```
go get github.com/kardianos/govendor
govendor get github.com/spf13/hugo
go get -u github.com/kardianos/govendor
govendor get github.com/gohugoio/hugo
```
### Using Git Remotes
@@ -108,7 +112,7 @@ started:
1. Change to the Hugo source directory:
```
cd $HOME/go/src/github.com/spf13/hugo
cd $HOME/go/src/github.com/gohugoio/hugo
```
1. Create a new branch for your changes (the branch name is arbitrary):
@@ -142,7 +146,7 @@ started:
### Build Hugo with Your Changes
```bash
cd $HOME/go/src/github.com/spf13/hugo
cd $HOME/go/src/github.com/gohugoio/hugo
make hugo
# or to install in $HOME/go/bin:
make install
+29 -10
View File
@@ -1,15 +1,34 @@
FROM golang:1.8-alpine
FROM alpine:3.6
ENV GOPATH /go
ENV USER root
ENV PATH $GOPATH/bin:$PATH
RUN apk update && apk add git make
RUN \
adduser -h /site -s /sbin/nologin -u 1000 -D hugo && \
apk add --no-cache \
dumb-init && \
apk add --no-cache --virtual .build-deps \
gcc \
musl-dev \
go \
git && \
mkdir -p \
${GOPATH}/bin \
${GOPATH}/pkg \
${GOPATH}/src && \
go get github.com/kardianos/govendor && \
govendor get github.com/gohugoio/hugo && \
cd $GOPATH/src/github.com/gohugoio/hugo && \
rm -f $GOPATH/bin/hugo && \
go install -ldflags '-s -w' && \
cd $GOPATH && \
rm -rf pkg src .cache bin/govendor && \
apk del .build-deps
# pre-install known dependencies before the source, so we don't redownload them whenever the source changes
RUN go get github.com/kardianos/govendor \
&& govendor get github.com/spf13/hugo
USER hugo
WORKDIR /site
VOLUME /site
EXPOSE 1313
COPY . $GOPATH/src/github.com/spf13/hugo
RUN cd $GOPATH/src/github.com/spf13/hugo \
&& make install test
ENTRYPOINT ["/usr/bin/dumb-init", "--", "hugo"]
CMD [ "--help" ]
+12 -9
View File
@@ -1,26 +1,29 @@
# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
PACKAGE = github.com/spf13/hugo
PACKAGE = github.com/gohugoio/hugo
COMMIT_HASH = `git rev-parse --short HEAD 2>/dev/null`
BUILD_DATE = `date +%FT%T%z`
LDFLAGS = -ldflags "-X ${PACKAGE}/hugolib.CommitHash=${COMMIT_HASH} -X ${PACKAGE}/hugolib.BuildDate=${BUILD_DATE}"
NOGI_LDFLAGS = -ldflags "-X ${PACKAGE}/hugolib.BuildDate=${BUILD_DATE}"
# allow user to override go executable by running as GOEXE=xxx make ... on unix-like systems
GOEXE ?= go
.PHONY: vendor docker check fmt lint test test-race vet test-cover-html help
.DEFAULT_GOAL := help
vendor: ## Install govendor and sync Hugo's vendored dependencies
go get github.com/kardianos/govendor
${GOEXE} get github.com/kardianos/govendor
govendor sync ${PACKAGE}
hugo: vendor ## Build hugo binary
go build ${LDFLAGS} ${PACKAGE}
${GOEXE} build ${LDFLAGS} ${PACKAGE}
hugo-race: vendor ## Build hugo binary with race detector enabled
go build -race ${LDFLAGS} ${PACKAGE}
${GOEXE} build -race ${LDFLAGS} ${PACKAGE}
install: vendor ## Install hugo binary
go install ${LDFLAGS} ${PACKAGE}
${GOEXE} install ${LDFLAGS} ${PACKAGE}
hugo-no-gitinfo: LDFLAGS = ${NOGI_LDFLAGS}
hugo-no-gitinfo: vendor hugo ## Build hugo without git info
@@ -50,14 +53,14 @@ test-race: ## Run tests with race detector
govendor test -race +local
fmt: ## Run gofmt linter
@for d in `govendor list -no-status +local | sed 's/github.com.spf13.hugo/./'` ; do \
@for d in `govendor list -no-status +local | sed 's/github.com.gohugoio.hugo/./'` ; do \
if [ "`gofmt -l $$d/*.go | tee /dev/stderr`" ]; then \
echo "^ improperly formatted go files" && echo && exit 1; \
fi \
done
lint: ## Run golint linter
@for d in `govendor list -no-status +local | sed 's/github.com.spf13.hugo/./'` ; do \
@for d in `govendor list -no-status +local | sed 's/github.com.gohugoio.hugo/./'` ; do \
if [ "`golint $$d | tee /dev/stderr`" ]; then \
echo "^ golint errors!" && echo && exit 1; \
fi \
@@ -68,13 +71,13 @@ vet: ## Run go vet linter
echo "^ go vet errors!" && echo && exit 1; \
fi
test-cover-html: PACKAGES = $(shell govendor list -no-status +local | sed 's/github.com.spf13.hugo/./')
test-cover-html: PACKAGES = $(shell govendor list -no-status +local | sed 's/github.com.gohugoio.hugo/./')
test-cover-html: ## Generate test coverage report
echo "mode: count" > coverage-all.out
$(foreach pkg,$(PACKAGES),\
govendor test -coverprofile=coverage.out -covermode=count $(pkg);\
tail -n +2 coverage.out >> coverage-all.out;)
go tool cover -html=coverage-all.out
${GOEXE} tool cover -html=coverage-all.out
check-vendor: ## Verify that vendored packages match git HEAD
@git diff-index --quiet HEAD vendor/ || (echo "check-vendor target failed: vendored packages out of sync" && echo && git diff vendor/ && exit 1)
+29 -15
View File
@@ -1,20 +1,20 @@
![Hugo](https://raw.githubusercontent.com/spf13/hugo/master/docs/static/img/hugo-logo.png)
![Hugo](https://raw.githubusercontent.com/gohugoio/hugoDocs/master/static/img/hugo-logo.png)
A Fast and Flexible Static Site Generator built with love by [spf13](http://spf13.com/) and [friends](https://github.com/spf13/hugo/graphs/contributors) in [Go][].
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://discuss.gohugo.io) |
[Developer Chat (no support)](https://gitter.im/spf13/hugo) |
[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/spf13/hugo?status.svg)](https://godoc.org/github.com/spf13/hugo)
[![Linux and macOS Build Status](https://api.travis-ci.org/spf13/hugo.svg?branch=master&label=Linux+and+macOS+build "Linux and macOS Build Status")](https://travis-ci.org/spf13/hugo)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/n2mo912b8s2505e8/branch/master?svg=true&label=Windows+build "Windows Build Status")](https://ci.appveyor.com/project/spf13/hugo/branch/master)
[![Dev chat at https://gitter.im/spf13/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/spf13/hugo)](https://goreportcard.com/report/github.com/spf13/hugo)
[![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
@@ -44,7 +44,7 @@ Hugo may also be compiled from source wherever the Go compiler tool chain can ru
If you want to use Hugo as your site generator, simply install the Hugo binaries.
The Hugo binaries have no external dependencies.
To contribute to the Hugo source code or documentation, you should [fork the Hugo GitHub project](https://github.com/spf13/hugo#fork-destination-box) and clone it to your local machine.
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.
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.
@@ -57,13 +57,27 @@ Use the [installation instructions in the Hugo documentation](https://gohugo.io/
Add Hugo and its package dependencies to your go `src` directory.
go get -v github.com/spf13/hugo
go get -v github.com/gohugoio/hugo
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.
go get -u -v github.com/spf13/hugo
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 with submodules:
```bash
git clone --recursive git@github.com:gohugoio/hugo.git
```
Or after you have cloned it you can do:
```bash
git submodule update --init
```
## Contributing to Hugo
@@ -74,18 +88,18 @@ 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/spf13/hugo/pulse/monthly) and helpful, and the project benefits greatly from this activity.
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.
### Asking Support Questions
We have an active [discussion forum](http://discuss.gohugo.io) where users and developers can ask 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 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](http://discuss.gohugo.io).
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`).
### Submitting Patches
+2 -1
View File
@@ -5,9 +5,10 @@ init:
- go env
# clones and cd's to path
clone_folder: C:\GOPATH\src\github.com\spf13\hugo
clone_folder: C:\GOPATH\src\github.com\gohugoio\hugo
install:
- git submodule update --init --recursive
- gem install asciidoctor
- pip install docutils
+5 -3
View File
@@ -1,5 +1,7 @@
#!/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
@@ -26,10 +28,10 @@ BRANCH=$1
PACKAGE=$2
git checkout $BRANCH
go test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-$BRANCH.txt
"${GOEXE}" test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-$BRANCH.txt
git checkout master
go test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-master.txt
"${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
benchcmp /tmp/bench-$PACKAGE-master.txt /tmp/bench-$PACKAGE-$BRANCH.txt
+4 -1
View File
@@ -1,9 +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}"
go test -run="NONE" -bench="BenchmarkSiteBuilding/${1}$" -test.benchmem=true ./hugolib -memprofile mem.prof -cpuprofile cpu.prof
"${GOEXE}" test -run="NONE" -bench="BenchmarkSiteBuilding/${1}$" -test.benchmem=true ./hugolib -memprofile mem.prof -cpuprofile cpu.prof
+46
View File
@@ -15,6 +15,7 @@ package cache
import (
"errors"
"sync"
"testing"
"github.com/stretchr/testify/require"
@@ -90,3 +91,48 @@ func TestNewPartitionedLazyCache(t *testing.T) {
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()
}
+3 -3
View File
@@ -14,9 +14,9 @@
package commands
import (
"github.com/spf13/hugo/deps"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugofs"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
)
type commandeer struct {
+3 -3
View File
@@ -19,10 +19,10 @@ import (
"path/filepath"
"time"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/cast"
"github.com/spf13/cobra"
"github.com/spf13/hugo/hugolib"
"github.com/spf13/hugo/parser"
)
var outputDir string
@@ -136,7 +136,7 @@ func convertContents(mark rune) error {
page.SetDir(filepath.Join(contentDir, file.Dir()))
page.SetSourceContent(psr.Content())
if err = page.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/spf13/hugo/issues/2458", page.FullFilePath(), err)
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", page.FullFilePath(), err)
continue
}
+2 -2
View File
@@ -20,10 +20,10 @@ import (
"strings"
"time"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugofs"
jww "github.com/spf13/jwalterweatherman"
)
+1 -1
View File
@@ -19,8 +19,8 @@ import (
"os"
"path/filepath"
"github.com/gohugoio/hugo/docshelper"
"github.com/spf13/cobra"
"github.com/spf13/hugo/docshelper"
)
type genDocsHelper struct {
+2 -2
View File
@@ -17,10 +17,10 @@ import (
"fmt"
"strings"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugofs"
jww "github.com/spf13/jwalterweatherman"
)
+59 -13
View File
@@ -19,33 +19,34 @@ import (
"fmt"
"io/ioutil"
"github.com/spf13/hugo/hugofs"
"github.com/gohugoio/hugo/hugofs"
"log"
"net/http"
"os"
"path/filepath"
"runtime"
"strings"
"sync"
"time"
"github.com/spf13/hugo/config"
"github.com/gohugoio/hugo/config"
"github.com/spf13/hugo/parser"
"github.com/gohugoio/hugo/parser"
flag "github.com/spf13/pflag"
"regexp"
"github.com/fsnotify/fsnotify"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/livereload"
"github.com/gohugoio/hugo/utils"
"github.com/gohugoio/hugo/watcher"
"github.com/spf13/afero"
"github.com/spf13/cobra"
"github.com/spf13/fsync"
"github.com/spf13/hugo/deps"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugolib"
"github.com/spf13/hugo/livereload"
"github.com/spf13/hugo/utils"
"github.com/spf13/hugo/watcher"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/nitro"
"github.com/spf13/viper"
@@ -142,6 +143,7 @@ var (
renderToMemory bool // for benchmark testing
verbose bool
verboseLog bool
debug bool
quiet bool
)
@@ -262,6 +264,7 @@ func initBenchmarkBuildingFlags(cmd *cobra.Command) {
// init initializes flags.
func init() {
HugoCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose output")
HugoCmd.PersistentFlags().BoolVarP(&debug, "debug", "", false, "debug output")
HugoCmd.PersistentFlags().BoolVar(&logging, "log", false, "enable Logging")
HugoCmd.PersistentFlags().StringVar(&logFile, "logFile", "", "log File path (if set, logging enabled automatically)")
HugoCmd.PersistentFlags().BoolVar(&verboseLog, "verboseLog", false, "verbose logging")
@@ -431,8 +434,15 @@ func createLogger(cfg config.Provider) (*jww.Notepad, error) {
stdoutThreshold = jww.LevelInfo
}
if cfg.GetBool("debug") {
stdoutThreshold = jww.LevelDebug
}
if verboseLog {
logThreshold = jww.LevelInfo
if cfg.GetBool("debug") {
logThreshold = jww.LevelDebug
}
}
// The global logger is used in some few cases.
@@ -445,7 +455,7 @@ func createLogger(cfg config.Provider) (*jww.Notepad, error) {
}
func (c *commandeer) initializeFlags(cmd *cobra.Command) {
persFlagKeys := []string{"verbose", "logFile"}
persFlagKeys := []string{"debug", "verbose", "logFile"}
flagKeys := []string{
"cleanDestinationDir",
"buildDrafts",
@@ -655,7 +665,7 @@ func (c *commandeer) getDirList() []string {
}
// Skip .git directories.
// Related to https://github.com/spf13/hugo/issues/3468.
// Related to https://github.com/gohugoio/hugo/issues/3468.
if fi.Name() == ".git" {
return nil
}
@@ -758,6 +768,10 @@ func (c *commandeer) rebuildSites(events []fsnotify.Event) error {
// newWatcher creates a new watcher to watch filesystem events.
func (c *commandeer) newWatcher(port int) error {
if runtime.GOOS == "darwin" {
tweakLimit()
}
watcher, err := watcher.New(1 * time.Second)
var wg sync.WaitGroup
@@ -976,8 +990,28 @@ func (c *commandeer) newWatcher(port int) error {
}
if !buildWatch && !c.Cfg.GetBool("disableLiveReload") {
// Will block forever trying to write to a channel that nobody is reading if livereload isn't initialized
livereload.ForceRefresh()
navigate := c.Cfg.GetBool("navigateToChanged")
var p *hugolib.Page
if navigate {
// It is probably more confusing than useful
// to navigate to a new URL on RENAME etc.
// so for now we use the WRITE and CREATE events only.
name := pickOneWriteOrCreatePath(dynamicEvents)
if name != "" {
p = Hugo.GetContentPage(name)
}
}
if p != nil {
livereload.NavigateToPath(p.RelPermalink())
} else {
livereload.ForceRefresh()
}
}
}
case err := <-watcher.Errors:
@@ -1002,6 +1036,18 @@ func (c *commandeer) newWatcher(port int) error {
return nil
}
func pickOneWriteOrCreatePath(events []fsnotify.Event) string {
name := ""
for _, ev := range events {
if (ev.Op&fsnotify.Write == fsnotify.Write || ev.Op&fsnotify.Create == fsnotify.Create) && len(ev.Name) > len(name) {
name = ev.Name
}
}
return name
}
func (c *commandeer) isStatic(path string) bool {
return strings.HasPrefix(path, c.PathSpec().GetStaticDirPath()) || (len(c.PathSpec().GetThemesDirPath()) > 0 && strings.HasPrefix(path, c.PathSpec().GetThemesDirPath()))
}
+77 -40
View File
@@ -25,13 +25,13 @@ import (
"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"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugofs"
"github.com/spf13/hugo/hugolib"
"github.com/spf13/hugo/parser"
jww "github.com/spf13/jwalterweatherman"
)
@@ -84,9 +84,17 @@ func importFromJekyll(cmd *cobra.Command, args []string) error {
}
forceImport, _ := cmd.Flags().GetBool("force")
site, err := createSiteFromJekyll(jekyllRoot, targetDir, forceImport)
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 err
return newUserError(err)
}
jww.FEEDBACK.Println("Importing...")
@@ -110,10 +118,10 @@ func importFromJekyll(cmd *cobra.Command, args []string) error {
draft := false
switch {
case strings.HasPrefix(relPath, "_posts/"):
relPath = "content/post" + relPath[len("_posts"):]
case strings.HasPrefix(relPath, "_drafts/"):
relPath = "content/draft" + relPath[len("_drafts"):]
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
@@ -123,11 +131,19 @@ func importFromJekyll(cmd *cobra.Command, args []string) error {
return convertJekyllPost(site, path, relPath, targetDir, draft)
}
err = helpers.SymbolicWalk(hugofs.Os, jekyllRoot, callback)
if err != nil {
return err
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")
@@ -136,15 +152,52 @@ func importFromJekyll(cmd *cobra.Command, args []string) error {
return nil
}
// TODO: Consider calling doNewSite() instead?
func createSiteFromJekyll(jekyllRoot, targetDir string, force bool) (*hugolib.Site, error) {
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")
@@ -159,24 +212,6 @@ func createSiteFromJekyll(jekyllRoot, targetDir string, force bool) (*hugolib.Si
jekyllConfig := loadJekyllConfig(fs, jekyllRoot)
// Crude test to make sure at least one of _drafts/ and _posts/ exists
// and is not empty.
hasPostsOrDrafts := false
postsDir := filepath.Join(jekyllRoot, "_posts")
draftsDir := filepath.Join(jekyllRoot, "_drafts")
for _, d := range []string{postsDir, draftsDir} {
if exists, _ := helpers.Exists(d, fs); exists {
if isDir, _ := helpers.IsDir(d, fs); isDir {
if isEmpty, _ := helpers.IsEmpty(d, fs); !isEmpty {
hasPostsOrDrafts = true
}
}
}
}
if !hasPostsOrDrafts {
return nil, errors.New("Your Jekyll root contains neither posts nor drafts, aborting.")
}
mkdir(targetDir, "layouts")
mkdir(targetDir, "content")
mkdir(targetDir, "archetypes")
@@ -186,7 +221,7 @@ func createSiteFromJekyll(jekyllRoot, targetDir string, force bool) (*hugolib.Si
createConfigFromJekyll(fs, targetDir, "yaml", jekyllConfig)
copyJekyllFilesAndFolders(jekyllRoot, filepath.Join(targetDir, "static"))
copyJekyllFilesAndFolders(jekyllRoot, filepath.Join(targetDir, "static"), jekyllPostDirs)
return s, nil
}
@@ -318,7 +353,7 @@ func copyDir(source string, dest string) error {
return nil
}
func copyJekyllFilesAndFolders(jekyllRoot string, dest string) error {
func copyJekyllFilesAndFolders(jekyllRoot, dest string, jekyllPostDirs map[string]bool) (err error) {
fi, err := os.Stat(jekyllRoot)
if err != nil {
return err
@@ -336,9 +371,11 @@ func copyJekyllFilesAndFolders(jekyllRoot string, dest string) error {
dfp := filepath.Join(dest, entry.Name())
if entry.IsDir() {
if entry.Name()[0] != '_' && entry.Name()[0] != '.' {
err = copyDir(sfp, dfp)
if err != nil {
jww.ERROR.Println(err)
if _, ok := jekyllPostDirs[entry.Name()]; !ok {
err = copyDir(sfp, dfp)
if err != nil {
jww.ERROR.Println(err)
}
}
}
} else {
+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
}
+1 -1
View File
@@ -16,8 +16,8 @@ package commands
import (
"path/filepath"
"github.com/gohugoio/hugo/hugolib"
"github.com/spf13/cobra"
"github.com/spf13/hugo/hugolib"
jww "github.com/spf13/jwalterweatherman"
)
+45 -18
View File
@@ -22,13 +22,13 @@ import (
"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"
"github.com/spf13/hugo/create"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugofs"
"github.com/spf13/hugo/hugolib"
"github.com/spf13/hugo/parser"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
)
@@ -42,7 +42,6 @@ var (
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(&configFormat, "format", "f", "toml", "frontmatter format")
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{})
@@ -98,10 +97,6 @@ func NewContent(cmd *cobra.Command, args []string) error {
return err
}
if cmd.Flags().Changed("format") {
c.Set("metaDataFormat", configFormat)
}
if cmd.Flags().Changed("editor") {
c.Set("newContentEditor", contentEditor)
}
@@ -120,20 +115,48 @@ func NewContent(cmd *cobra.Command, args []string) error {
kind = contentType
}
s, err := hugolib.NewSite(*cfg)
ps, err := helpers.NewPathSpec(cfg.Fs, cfg.Cfg)
if err != nil {
return newSystemError(err)
return err
}
return create.NewContent(s, kind, createPath)
// 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, PrintStats: false}); 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"),
filepath.Join(basepath, "archetypes"),
archeTypePath,
filepath.Join(basepath, "static"),
filepath.Join(basepath, "data"),
filepath.Join(basepath, "themes"),
@@ -168,6 +191,10 @@ func doNewSite(fs *hugofs.Fs, basepath string, force bool) error {
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())
@@ -311,16 +338,16 @@ func touchFile(fs afero.Fs, x ...string) {
func createThemeMD(fs *hugofs.Fs, inpath string) (err error) {
by := []byte(`# theme.toml template for a Hugo theme
# See https://github.com/spf13/hugoThemes#themetoml for an example
# 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://siteforthistheme.com/"
homepage = "http://example.com/"
tags = []
features = []
min_version = "0.22"
min_version = "0.26"
[author]
name = ""
+1 -1
View File
@@ -17,7 +17,7 @@ import (
"path/filepath"
"testing"
"github.com/spf13/hugo/hugofs"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+11 -5
View File
@@ -16,8 +16,10 @@
package commands
import (
"errors"
"github.com/gohugoio/hugo/releaser"
"github.com/spf13/cobra"
"github.com/spf13/hugo/releaser"
)
func init() {
@@ -27,10 +29,10 @@ func init() {
type releaseCommandeer struct {
cmd *cobra.Command
// Will be zero for main releases.
patchLevel int
version string
skipPublish bool
try bool
step int
}
@@ -50,13 +52,17 @@ func createReleaser() *releaseCommandeer {
return r.release()
}
r.cmd.PersistentFlags().IntVarP(&r.patchLevel, "patch", "p", 0, "patch level, defaults to 0 for main releases")
r.cmd.PersistentFlags().StringVarP(&r.version, "rel", "r", "", "new release version, i.e. 0.25.1")
r.cmd.PersistentFlags().IntVarP(&r.step, "step", "s", -1, "release step, defaults to -1 for all steps.")
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 {
return releaser.New(r.patchLevel, r.step, r.skipPublish).Run()
if r.version == "" {
return errors.New("must set the --rel flag to the relevant version number")
}
return releaser.New(r.version, r.step, r.skipPublish, r.try).Run()
}
+8 -2
View File
@@ -24,15 +24,16 @@ import (
"strings"
"time"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
"github.com/spf13/afero"
"github.com/spf13/cobra"
"github.com/spf13/hugo/config"
"github.com/spf13/hugo/helpers"
jww "github.com/spf13/jwalterweatherman"
)
var (
disableLiveReload bool
navigateToChanged bool
renderToDisk bool
serverAppend bool
serverInterface string
@@ -87,6 +88,7 @@ func init() {
serverCmd.Flags().BoolVarP(&serverWatch, "watch", "w", true, "watch filesystem for changes and recreate as needed")
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().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\".")
@@ -110,6 +112,10 @@ func server(cmd *cobra.Command, args []string) error {
c.Set("disableLiveReload", disableLiveReload)
}
if cmd.Flags().Changed("navigateToChanged") {
c.Set("navigateToChanged", navigateToChanged)
}
if serverWatch {
c.Set("watch", true)
}
+4 -6
View File
@@ -19,14 +19,14 @@ import (
"os"
"time"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/cobra"
"github.com/spf13/hugo/parser"
)
var undraftCmd = &cobra.Command{
Use: "undraft path/to/content",
Short: "Undraft changes the content's draft status from 'True' to 'False'",
Long: `Undraft changes the content's draft status from 'True' to 'False'
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,
@@ -138,14 +138,12 @@ L:
for _, v := range fmLines {
pos := bytes.Index(v, []byte("draft"))
if pos != -1 {
v = bytes.Replace(v, []byte("true"), []byte("false"), 1)
goto write
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)
}
write:
buff.Write(v)
buff.Write(lineEnding)
}
+9 -7
View File
@@ -21,16 +21,17 @@ import (
"testing"
"time"
"github.com/spf13/hugo/parser"
"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---"
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) {
@@ -44,6 +45,7 @@ func TestUndraftContent(t *testing.T) {
{tomlDraftFM, ""},
{yamlFM, "not a Draft: nothing was done"},
{yamlDraftFM, ""},
{yamlYesDraftFM, ""},
}
for i, test := range tests {
+2 -2
View File
@@ -20,10 +20,10 @@ import (
"strings"
"time"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugolib"
"github.com/kardianos/osext"
"github.com/spf13/cobra"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugolib"
jww "github.com/spf13/jwalterweatherman"
)
+43 -96
View File
@@ -19,68 +19,61 @@ import (
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/spf13/afero"
"github.com/spf13/cast"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugolib"
"github.com/spf13/hugo/parser"
"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(s *hugolib.Site, kind, name string) (err error) {
jww.INFO.Println("attempting to create ", name, "of", kind)
func NewContent(
ps *helpers.PathSpec,
siteFactory func(filename string, siteUsed bool) (*hugolib.Site, error), kind, targetPath string) error {
ext := helpers.Ext(targetPath)
location := FindArchetype(s, kind)
jww.INFO.Printf("attempting to create %q of %q of ext %q", targetPath, kind, ext)
var by []byte
archetypeFilename := findArchetype(ps, kind, ext)
if location != "" {
by, err = afero.ReadFile(s.Fs.Source, location)
// 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 {
jww.ERROR.Println(err)
return err
}
defer f.Close()
if helpers.ReaderContains(f, []byte(".Site")) {
siteUsed = true
}
}
if location == "" || err != nil {
by = []byte("+++\ndraft = true \n+++\n")
}
psr, err := parser.ReadFrom(bytes.NewReader(by))
s, err := siteFactory(targetPath, siteUsed)
if err != nil {
return err
}
metadata, err := createMetadata(psr, name)
if err != nil {
jww.ERROR.Printf("Error processing archetype file %s: %s\n", location, err)
return err
}
var content []byte
page, err := s.NewPage(name)
content, err = executeArcheTypeAsTemplate(s, kind, targetPath, archetypeFilename)
if err != nil {
return err
}
if err = page.SetSourceMetaData(metadata, parser.FormatToLeadRune(s.Cfg.GetString("metaDataFormat"))); err != nil {
return
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
}
page.SetSourceContent(psr.Content())
contentPath := s.PathSpec.AbsPathify(filepath.Join(s.Cfg.GetString("contentDir"), name))
if err = page.SafeSaveSourceAs(contentPath); err != nil {
return
}
jww.FEEDBACK.Println(contentPath, "created")
editor := s.Cfg.GetString("newContentEditor")
if editor != "" {
jww.FEEDBACK.Printf("Editing %s with %q ...\n", name, editor)
jww.FEEDBACK.Printf("Editing %s with %q ...\n", targetPath, editor)
cmd := exec.Command(editor, contentPath)
cmd.Stdin = os.Stdin
@@ -93,65 +86,16 @@ func NewContent(s *hugolib.Site, kind, name string) (err error) {
return nil
}
// createMetadata generates Metadata for a new page based upon the metadata
// found in an archetype.
func createMetadata(archetype parser.Page, name string) (map[string]interface{}, error) {
archMetadata, err := archetype.Metadata()
if err != nil {
return nil, err
}
metadata, err := cast.ToStringMapE(archMetadata)
if err != nil {
return nil, err
}
var date time.Time
for k, v := range metadata {
if v == "" {
continue
}
lk := strings.ToLower(k)
switch lk {
case "date":
date, err = cast.ToTimeE(v)
if err != nil {
return nil, err
}
case "title":
// Use the archetype title as is
metadata[lk] = v
}
}
if metadata == nil {
metadata = make(map[string]interface{})
}
if date.IsZero() {
date = time.Now()
}
if _, ok := metadata["title"]; !ok {
metadata["title"] = helpers.MakeTitle(helpers.Filename(name))
}
metadata["date"] = date.Format(time.RFC3339)
return metadata, 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(s *hugolib.Site, kind string) (outpath string) {
search := []string{s.PathSpec.AbsPathify(s.Cfg.GetString("archetypeDir"))}
func findArchetype(ps *helpers.PathSpec, kind, ext string) (outpath string) {
search := []string{ps.AbsPathify(ps.Cfg.GetString("archetypeDir"))}
if s.Cfg.GetString("theme") != "" {
themeDir := filepath.Join(s.PathSpec.AbsPathify(s.Cfg.GetString("themesDir")+"/"+s.Cfg.GetString("theme")), "/archetypes/")
if _, err := s.Fs.Source.Stat(themeDir); os.IsNotExist(err) {
jww.ERROR.Printf("Unable to find archetypes directory for theme %q at %q", s.Cfg.GetString("theme"), themeDir)
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)
}
@@ -160,18 +104,21 @@ func FindArchetype(s *hugolib.Site, kind string) (outpath string) {
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/spf13/hugo/issues/411
var pathsToCheck []string
// error will occur. github.com/gohugoio/hugo/issues/411
var pathsToCheck = []string{"default"}
if kind == "" {
pathsToCheck = []string{"default.md", "default"}
} else {
pathsToCheck = []string{kind + ".md", kind, "default.md", "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, s.Fs.Source); exists {
if exists, _ := helpers.Exists(curpath, ps.Fs.Source); exists {
jww.INFO.Println("curpath: " + curpath)
return curpath
}
+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 inital 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.NewFile(targetPath)
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
}
+46 -12
View File
@@ -19,17 +19,17 @@ import (
"strings"
"testing"
"github.com/spf13/hugo/deps"
"github.com/gohugoio/hugo/deps"
"github.com/spf13/hugo/hugolib"
"github.com/gohugoio/hugo/hugolib"
"fmt"
"github.com/spf13/hugo/hugofs"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/create"
"github.com/gohugoio/hugo/helpers"
"github.com/spf13/afero"
"github.com/spf13/hugo/create"
"github.com/spf13/hugo/helpers"
"github.com/spf13/viper"
"github.com/stretchr/testify/require"
)
@@ -44,21 +44,31 @@ func TestNewContent(t *testing.T) {
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
{"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))
s := h.Sites[0]
siteFactory := func(filename string, siteUsed bool) (*hugolib.Site, error) {
return h.Sites[0], nil
}
require.NoError(t, create.NewContent(s, c.kind, c.path))
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)
@@ -108,13 +118,37 @@ func initFs(fs *hugofs.Fs) error {
content: "+++\ndate = \"2015-01-12T19:20:04-07:00\"\ntitle = \"Post Arch title\"\ntest = \"test1\"\n+++\n",
},
{
path: filepath.Join("archetypes", "product.md"),
content: "+++\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 {
+11 -6
View File
@@ -5,16 +5,16 @@ import (
"log"
"os"
"github.com/spf13/hugo/config"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugofs"
"github.com/spf13/hugo/output"
"github.com/spf13/hugo/tpl"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/output"
"github.com/gohugoio/hugo/tpl"
jww "github.com/spf13/jwalterweatherman"
)
// Deps holds dependencies used by many.
// There will be normally be only one instance of deps in play
// 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.
@@ -55,10 +55,12 @@ type ResourceProvider interface {
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 {
@@ -76,6 +78,9 @@ func (d *Deps) LoadResources() error {
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
+1
View File
@@ -1 +1,2 @@
/.idea
/public
+3
View File
@@ -0,0 +1,3 @@
[submodule "themes/gohugoioTheme"]
path = themes/gohugoioTheme
url = https://github.com/gohugoio/gohugoioTheme.git
@@ -1,20 +1,3 @@
---
aliases:
- /doc/license/
- /license/
- /meta/license/
lastmod: 2015-11-25
date: 2013-07-01
menu:
main:
parent: about
title: License
weight: 50
---
Hugo v0.15 and later are released under the Apache 2.0 license.
Earlier releases were under the Simple Public License.
Apache License
==============
+40
View File
@@ -0,0 +1,40 @@
# 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.*
## Build
To view the documentation site locally, you need to clone this repository with submodules:
```bash
git clone --recursive https://github.com/gohugoio/hugoDocs.git
```
Or if you already have a clone locally:
```bash
git submodule update --init
```
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 -6
View File
@@ -1,6 +1,11 @@
+++
weight = 5
[menu]
[menu.main]
parent = "x"
+++
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
description: ""
categories: []
#tags: []
slug: ""
aliases: []
toc: false
draft: true
---
-14
View File
@@ -1,14 +0,0 @@
---
date: 2013-07-01T07:32:00Z
description: ""
license: ""
licenseLink: ""
sitelink: http://spf13.com/
sourceLink: https://github.com/spf13/spf13.com
tags:
- personal
- blog
thumbnail: /img/spf13-tn.jpg
title: spf13.com
---
+225 -107
View File
@@ -1,118 +1,236 @@
title = "Hugo: A Fast and Flexible Website Generator"
baseurl = "http://gohugo.io/"
MetaDataFormat = "yaml"
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
[blackfriday]
plainIDAnchors = true
# 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
# 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
[social]
twitter = "GoHugoIO"
#CUSTOM PARAMS
[params]
description = "Documentation of Hugo, a fast and flexible static site generator built with love by spf13, bep and friends in Go"
author = "Steve Francia (spf13) and friends"
release = "0.22"
description = "The worlds fastest framework for building websites"
## Used for views in rendered HTML (i.e., rather than using the .Hugo variable)
release = "0.26"
## 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]
tag = "tags"
group = "groups"
category = "categories"
[[menu.main]]
name = "Download Hugo"
pre = "<i class='fa fa-download'></i>"
url = "https://github.com/spf13/hugo/releases"
weight = -200
[[menu.main]]
name = "Site Showcase"
pre = "<i class='fa fa-cubes'></i>"
url = "/showcase/"
weight = -180
[[menu.main]]
name = "Theme Showcase"
pre = "<i class='fa fa-puzzle-piece'></i>"
url = "http://themes.gohugo.io"
weight = -170
[[menu.main]]
name = "Press & Articles"
pre = "<i class='fa fa-bullhorn'></i>"
url = "/community/press/"
weight = -160
[[menu.main]]
name = "Discuss Hugo"
pre = "<i class='fa fa-comments'></i>"
url = "http://discuss.gohugo.io/"
weight = -150
[[menu.main]]
name = "About Hugo"
identifier = "about"
pre = "<i class='fa fa-heart'></i>"
weight = -110
[[menu.main]]
name = "Release Notes"
url = "/release-notes/"
pre = "<i class='fa fa-newspaper-o'></i>"
weight = -111
[[menu.main]]
name = "Getting Started"
identifier = "getting started"
pre = "<i class='fa fa-road'></i>"
weight = -100
[[menu.main]]
name = "Content"
identifier = "content"
pre = "<i class='fa fa-file-text'></i>"
weight = -90
[[menu.main]]
# 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"
pre = "<i class='fa fa-desktop'></i>"
weight = -85
[[menu.main]]
parent = "themes"
name = "Theme Showcase"
url = "http://themes.gohugo.io"
weight = -170
[[menu.main]]
name = "Templates"
identifier = "layout"
pre = "<i class='fa fa-columns'></i>"
weight = -80
[[menu.main]]
name = "Taxonomies"
identifier = "taxonomy"
pre = "<i class='fa fa-tags'></i>"
weight = -70
[[menu.main]]
name = "Extras"
identifier = "extras"
pre = "<i class='fa fa-gift'></i>"
weight = -60
[[menu.main]]
url = "https://themes.gohugo.io/"
# Anything with a weight > 100 gets an external icon
[[menu.global]]
name = "Community"
identifier = "community"
pre = "<i class='fa fa-group'></i>"
weight = -50
[[menu.main]]
parent = "community"
name = "Discussion Forum"
url = "http://discuss.gohugo.io"
weight = 150
[[menu.main]]
name = "Tutorials"
identifier = "tutorials"
pre = "<i class='fa fa-book'></i>"
weight = -40
[[menu.main]]
name = "Troubleshooting"
identifier = "troubleshooting"
pre = "<i class='fa fa-wrench'></i>"
weight = -30
[[menu.main]]
name = "Tools"
url = "/tools/"
pre = "<i class='fa fa-cogs'></i>"
weight = -25
[[menu.main]]
name = "Hugo Cmd Reference"
identifier = "commands"
pre = "<i class='fa fa-space-shuttle'></i>"
weight = -20
url = "/commands/"
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: []
#tags: []
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
#tags: [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"]
#tags: ["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 >}}
+51
View File
@@ -0,0 +1,51 @@
---
title: Roadmap
linktitle: Roadmap
description: Take a look at what's in the pipeline for future versions of the Hugo project.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [about hugo]
#tags: [about,contribute,roadmap]
menu:
docs:
parent: "about"
weight: 50
weight: 50
sections_weight: 50
draft: false
aliases: [/meta/roadmap]
toc: false
---
To track Hugo's progress, see our [GitHub Milestones][milestones].
In no particular order, here are some other features currently being worked on:
* Even easier deployment to S3, SSH, GitHub, rsync. Give the [hosting and deployment][] section a shot.
* Import from other website systems. There are already [existing migration tools][migrate], but they dont cover all major platforms.
* An interactive web-based editor (See the [related forum thread][])
* Additional [themes][], which are always ongoing and [contributions are welcome][themescontrib]!
* Dynamic image resizing via shortcodes ({{< gh 1014 >}})
* Native support for additional content formats (AsciiDoc {{< gh 1435>}}, reST {{< gh 1436 >}})
* And, last but not least, [***your*** best ideas!][]
## Contributions Welcome
Feel free to [contribute to Hugo's development][devcontribute], [improve Hugo's documentation][doccontribute], or [open a new issue][newissue] if you have an idea for a new feature.
[#98]: https://github.com/gohugoio/hugo/issues/98
[#1014]: https://github.com/gohugoio/hugo/issues/1014
[#1435]: https://github.com/gohugoio/hugo/issues/1435
[#1436]: https://github.com/gohugoio/hugo/issues/1436
[devcontribute]: /contribute/development/
[doccontribute]: /contribute/documentation/
[hosting and deployment]: /hosting-and-deployment/
[migrate]: /tools/migrations/
[milestones]: https://github.com/gohugoio/hugo/milestone/14
[newissue]: https://github.com/gohugoio/hugo/issues/
[related forum thread]: https://discourse.gohugo.io/t/web-based-editor/155
[themes]: /themes/
[themescontrib]: /contribute/themes/
[tutorials]: /tutorials
[***your*** best ideas!]: /contribute/
+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
+22
View File
@@ -0,0 +1,22 @@
---
title: Command Line Reference
linktitle: CLI Overview
description: Comprehensive list of Hugo templating functions, including basic and advanced usage examples.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [commands]
#tags: [cli,command line]
menu:
docs:
parent: "commands"
weight: 1
weight: 01 #rem
draft: false
aliases: [/cli/]
---
The following list contains auto-generated and up-to-date (thanks to [Cobra][]) documentation for all the CLI commands in Hugo.
[Cobra]: https://github.com/spf13/cobra
+4 -3
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo"
slug: hugo
url: /commands/hugo/
@@ -65,6 +65,7 @@ hugo [flags]
### 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
@@ -73,7 +74,7 @@ hugo [flags]
* [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 changes the content's draft status from 'True' to 'False'
* [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 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo benchmark"
slug: hugo_benchmark
url: /commands/hugo_benchmark/
@@ -69,4 +69,4 @@ hugo benchmark [flags]
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+8 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-04-26T22:40:07+02:00
date: 2017-07-16T23:23:14+02:00
title: "hugo check"
slug: hugo_check
url: /commands/hugo_check/
@@ -13,6 +13,12 @@ Contains some verification checks
Contains some verification checks
### Options
```
-h, --help help for check
```
### Options inherited from parent commands
```
@@ -28,4 +34,4 @@ Contains some verification checks
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo check ulimit](/commands/hugo_check_ulimit/) - Check system ulimit settings
###### Auto generated by spf13/cobra on 26-Apr-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+9 -3
View File
@@ -1,5 +1,5 @@
---
date: 2017-04-26T22:40:07+02:00
date: 2017-07-16T23:23:14+02:00
title: "hugo check ulimit"
slug: hugo_check_ulimit
url: /commands/hugo_check_ulimit/
@@ -15,7 +15,13 @@ 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
hugo check ulimit [flags]
```
### Options
```
-h, --help help for ulimit
```
### Options inherited from parent commands
@@ -32,4 +38,4 @@ hugo check ulimit
### SEE ALSO
* [hugo check](/commands/hugo_check/) - Contains some verification checks
###### Auto generated by spf13/cobra on 26-Apr-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo config"
slug: hugo_config
url: /commands/hugo_config/
@@ -37,4 +37,4 @@ hugo config [flags]
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo convert"
slug: hugo_convert
url: /commands/hugo_convert/
@@ -41,4 +41,4 @@ See convert's subcommands toJSON, toTOML and toYAML for more information.
* [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 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo convert toJSON"
slug: hugo_convert_toJSON
url: /commands/hugo_convert_tojson/
@@ -41,4 +41,4 @@ hugo convert toJSON [flags]
### SEE ALSO
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo convert toTOML"
slug: hugo_convert_toTOML
url: /commands/hugo_convert_totoml/
@@ -41,4 +41,4 @@ hugo convert toTOML [flags]
### SEE ALSO
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo convert toYAML"
slug: hugo_convert_toYAML
url: /commands/hugo_convert_toyaml/
@@ -41,4 +41,4 @@ hugo convert toYAML [flags]
### SEE ALSO
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo env"
slug: hugo_env
url: /commands/hugo_env/
@@ -37,4 +37,4 @@ hugo env [flags]
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo gen"
slug: hugo_gen
url: /commands/hugo_gen/
@@ -36,4 +36,4 @@ A collection of several useful generators.
* [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 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo gen autocomplete"
slug: hugo_gen_autocomplete
url: /commands/hugo_gen_autocomplete/
@@ -55,4 +55,4 @@ hugo gen autocomplete [flags]
### SEE ALSO
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo gen doc"
slug: hugo_gen_doc
url: /commands/hugo_gen_doc/
@@ -44,4 +44,4 @@ hugo gen doc [flags]
### SEE ALSO
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo gen man"
slug: hugo_gen_man
url: /commands/hugo_gen_man/
@@ -40,4 +40,4 @@ hugo gen man [flags]
### SEE ALSO
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo import"
slug: hugo_import
url: /commands/hugo_import/
@@ -36,4 +36,4 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo import jekyll](/commands/hugo_import_jekyll/) - hugo import from Jekyll
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo import jekyll"
slug: hugo_import_jekyll
url: /commands/hugo_import_jekyll/
@@ -40,4 +40,4 @@ hugo import jekyll [flags]
### SEE ALSO
* [hugo import](/commands/hugo_import/) - Import your site from others.
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo list"
slug: hugo_list
url: /commands/hugo_list/
@@ -39,4 +39,4 @@ List requires a subcommand, e.g. `hugo list 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 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo list drafts"
slug: hugo_list_drafts
url: /commands/hugo_list_drafts/
@@ -38,4 +38,4 @@ hugo list drafts [flags]
### SEE ALSO
* [hugo list](/commands/hugo_list/) - Listing out various types of content
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo list expired"
slug: hugo_list_expired
url: /commands/hugo_list_expired/
@@ -39,4 +39,4 @@ hugo list expired [flags]
### SEE ALSO
* [hugo list](/commands/hugo_list/) - Listing out various types of content
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo list future"
slug: hugo_list_future
url: /commands/hugo_list_future/
@@ -39,4 +39,4 @@ hugo list future [flags]
### SEE ALSO
* [hugo list](/commands/hugo_list/) - Listing out various types of content
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -3
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo new"
slug: hugo_new
url: /commands/hugo_new/
@@ -26,7 +26,6 @@ hugo new [path] [flags]
```
--editor string edit new content with this editor, if provided
-f, --format string frontmatter format (default "toml")
-h, --help help for new
-k, --kind string content type to create
-s, --source string filesystem path to read files relative from
@@ -48,4 +47,4 @@ hugo new [path] [flags]
* [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 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo new site"
slug: hugo_new_site
url: /commands/hugo_new_site/
@@ -42,4 +42,4 @@ hugo new site [path] [flags]
### SEE ALSO
* [hugo new](/commands/hugo_new/) - Create new content for your site
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo new theme"
slug: hugo_new_theme
url: /commands/hugo_new_theme/
@@ -41,4 +41,4 @@ hugo new theme [name] [flags]
### SEE ALSO
* [hugo new](/commands/hugo_new/) - Create new content for your site
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+3 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo server"
slug: hugo_server
url: /commands/hugo_server/
@@ -55,6 +55,7 @@ hugo server [flags]
-l, --layoutDir string filesystem path to layout directory
--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
--noTimes don't sync modification time of files
--pluralizeListTitles pluralize titles in lists using inflect (default true)
@@ -83,4 +84,4 @@ hugo server [flags]
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+4 -4
View File
@@ -1,17 +1,17 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo undraft"
slug: hugo_undraft
url: /commands/hugo_undraft/
---
## hugo undraft
Undraft changes the content's draft status from 'True' to 'False'
Undraft resets the content's draft status
### Synopsis
Undraft changes the content's draft status from 'True' to 'False'
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.
@@ -39,4 +39,4 @@ hugo undraft path/to/content [flags]
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2017-05-23T20:59:46+03:00
date: 2017-07-16T23:23:14+02:00
title: "hugo version"
slug: hugo_version
url: /commands/hugo_version/
@@ -37,4 +37,4 @@ hugo version [flags]
### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site
###### Auto generated by spf13/cobra on 23-May-2017
###### Auto generated by spf13/cobra on 16-Jul-2017
-111
View File
@@ -1,111 +0,0 @@
---
aliases:
- /doc/contributing/
- /meta/contributing/
lastmod: 2015-02-12
date: 2013-07-01
menu:
main:
parent: community
next: /tutorials/automated-deployments
prev: /community/mailing-list
title: Contributing to Hugo
weight: 30
---
All contributions to Hugo are welcome. Whether you want to scratch an itch or simply contribute to the project, feel free to pick something from the [roadmap]({{< relref "meta/roadmap.md" >}}) or contact the dev team via the [Forums](https://discuss.gohugo.io/) or [Gitter](https://gitter.im/spf13/hugo) about what may make sense to do next.
You should fork the project and make your changes. *We encourage pull requests to discuss code changes.*
When you're ready to create a pull request, be sure to:
* Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
* Run `go fmt`.
* Squash your commits into a single commit. `git rebase -i`. It's okay to force update your pull request.
* Run `make check` and ensure it succeeds. [Travis CI](https://travis-ci.org/spf13/hugo) and [Appveyor](https://ci.appveyor.com/project/spf13/hugo) will runs these checks and fail the build if `make check` fails.
## Contribution Overview
We wrote a [detailed guide]({{< relref "tutorials/how-to-contribute-to-hugo.md" >}}) for newcomers that guides you step by step to your first contribution. If you are more experienced, follow the guide below.
# Building from source
## Vendored Dependencies
Hugo uses [govendor][] to vendor dependencies, but we don't commit the vendored packages themselves to the Hugo git repository.
Therefore, a simple `go get` is not supported since `go get` is not vendor-aware.
You **must use govendor** to fetch Hugo's dependencies.
## Fetch the Sources
go get github.com/kardianos/govendor
govendor get github.com/spf13/hugo
## Running Hugo
cd $HOME/go/src/github.com/spf13/hugo
go run main.go
## Building Hugo
cd $HOME/go/src/github.com/spf13/hugo
make build
# or to install to $HOME/go/bin:
make install
# Showcase additions
You got your new website running and it's powered by Hugo? Great. You can add your website with a few steps to the [showcase](/showcase/).
First, make sure that you created a [fork](https://help.github.com/articles/fork-a-repo/) of Hugo on GitHub and cloned your fork on your local computer. Next, create a separate branch for your additions:
```
# You can choose a different descriptive branch name if you like
git checkout -b showcase-addition
```
Let's create a new document that contains some metadata of your homepage. Replace `example` in the following examples with something unique like the name of your website. Inside the terminal enter the following commands:
```
cd docs
hugo new showcase/example.md
```
You should find the new file at `content/showcase/example.md`. Open it in an editor. The file should contain a frontmatter with predefined variables like below:
```
---
date: 2016-02-12T21:01:18+01:00
description: ""
license: ""
licenseLink: ""
sitelink: http://spf13.com/
sourceLink: https://github.com/spf13/spf13.com
tags:
- personal
- blog
thumbnail: /img/spf13-tn.jpg
title: example
---
```
Add at least values for `sitelink`, `title`, `description` and a path for `thumbnail`.
Furthermore, we need to create the thumbnail of your website. **It's important that the thumbnail has the required dimensions of 600px by 400px.** Give your thumbnail a name like `example-tn.png`. Save it under `docs/static/img/`.
Check a last time that everything works as expected. Start Hugo's built-in server in order to inspect your local copy of the showcase in the browser:
hugo server
If everything looks fine, we are ready to commit your additions. For the sake of best practices, please make sure that your commit follows our [code contribution guideline](https://github.com/spf13/hugo#code-contribution-guideline).
git commit -m"docs: Add example.com to the showcase"
Last but not least, we're ready to create a [pull request](https://github.com/spf13/hugo/compare).
Don't forget to accept the contributor license agreement. Click on the yellow badge in the automatically added comment in the pull request.
[govendor]: https://github.com/kardianos/govendor
-51
View File
@@ -1,51 +0,0 @@
---
lastmod: 2015-05-25
date: 2013-07-01
menu:
main:
parent: community
next: /community/contributing
prev: /extras/urls
title: Mailing List
weight: 10
---
## Discussion Forum
Hugo has its own [discussion forum](http://discuss.gohugo.io/) powered by [Discourse](http://www.discourse.org/).
Please use this for all discussions, questions, etc.
### Twitter
Get the latest bite-sized news and themes from the Hugo community on Twitter by following [@gohugoio](http://twitter.com/gohugoio).
## Mailing List
Hugo has two mailing lists:
### Announcements
Very low traffic. Only releases will be emailed here.
https://groups.google.com/forum/#!forum/hugo-announce
### Discussion (Archive)
**This has been replaced with the [Hugo discussion forum](http://discuss.gohugo.io/).**
It is available for archival purposes.
https://groups.google.com/forum/#!forum/hugo-discuss
## Other Resources
### GoNuts
For general Go questions or discussion please refer to the Go mailing list.
https://groups.google.com/forum/#!forum/golang-nuts
### GitHub Issues
https://github.com/spf13/hugo/issues
-140
View File
@@ -1,140 +0,0 @@
---
lastmod: 2017-03-02
date: 2014-03-24T20:00:00Z
linktitle: Press
notoc: true
title: Press, Blogs and Media Coverage
weight: 20
---
### Help keep this list up to date
Know of a post, article or tutorial on Hugo? [Add it to this list](https://github.com/spf13/hugo/edit/master/docs/content/community/press.md).
## Press and Articles
Hugo has been featured in the following Blog Posts, Press and Media.
| Title | Author | Date |
| ------ | ------ | -----: |
| [Hugo Easy Gallery - Automagical PhotoSwipe image gallery with a one-line shortcode](https://www.liwen.id.au/heg/)| Li-Wen Yip | 2017-03-25 |
| [Hugo Tutorial: How to Build & Host a (Very Fast) Static E-Commerce Site](https://snipcart.com/blog/hugo-tutorial-static-site-ecommerce) | Snipcart | 2017-03-12 |
| [Automagical image gallery in Hugo with PhotoSwipe and jQuery](https://www.liwen.id.au/photoswipe/)| Li-Wen Yip | 2017-03-04 |
| [Adding Isso Comments to Hugo](https://stiobhart.net/2017-02-24-isso-comments/) | Stíobhart Matulevicz | 2017-02-24 |
| [Zero to HTTP/2 with AWS and Hugo](https://habd.as/zero-to-http-2-aws-hugo/) | Josh Habdas | 2017-02-16 |
| [How to Password Protect a Hugo Site](https://www.aerobatic.com/blog/password-protect-a-hugo-site/) | Aerobatic | 2017-02-19 |
| [Switching from Wordpress to Hugo](http://schnuddelhuddel.de/switching-from-wordpress-to-hugo/) | Mario Martelli | 2017-02-19 | ]
| [Deploy a Hugo site to Aerobatic with CircleCI ](https://www.aerobatic.com/blog/hugo-github-circleci/) | Aerobatic | 2017-02-14 |
| [NPM scripts for building and deploying Hugo site](https://www.aerobatic.com/blog/hugo-npm-buildtool-setup/) | Aerobatic | 2017-02-12 |
| [Getting started with Hugo and the plain-blog theme, on NearlyFreeSpeech.Net](https://www.penwatch.net/cms/get_started_plain_blog/) | Li-aung “Lewis” Yip | 2017-02-12 |
| [Build a Hugo site using Cloud9 IDE and host on App Engine](https://loyall.ch/lab/2017/01/build-a-static-website-with-cloud9-hugo-and-app-engine/)| Pascal Aubort | 2017-02-05 |
| [Hugo Continuous Deployment with Bitbucket Pipelines and Aerobatic](https://www.aerobatic.com/blog/hugo-bitbucket-pipelines/) | Aerobatic | 2017-02-04 |
| [How to use Firebase to host a Hugo site](https://www.m0d3rnc0ad.com/post/static-site-firebase/) | Andrew Cuga | 2017-02-04 |
| [A publishing workflow for teams using static site generators](https://www.keybits.net/post/publishing-workflow-for-teams-using-static-site-generators/) | Tom Atkins | 2017-01-02 |
| [How To Dynamically Use Google Fonts In A Hugo Website](https://stoned.io/web-development/hugo/How-To-Dynamically-Use-Google-Fonts-In-A-Hugo-Website/) | Hash Borgir | 2016-10-27 |
| [Embedding Facebook In A Hugo Template](https://stoned.io/web-development/hugo/Embedding-Facebook-In-A-Hugo-Template/) | Hash Borgir | 2016-10-22 |
| [通过 Gitlab-cl 将 Hugo blog 自动部署至 GitHub](https://zetaoyang.github.io/post/2016/10/17/gitlab-cl.html) <small>(Chinese, Continious integration)</small> | Zetao Yang | 2016-10-17 |
| [A Step-by-Step Guide: Hugo on Netlify](https://www.netlify.com/blog/2016/09/21/a-step-by-step-guide-hugo-on-netlify/) | Eli Williamson | 2016-09-21 |
| [Building our site: From Django & Wordpress to a static generator (Part I)](https://tryolabs.com/blog/2016/09/20/building-our-site-django-wordpress-to-static-part-i/) | Alan Descoins | 2016-09-20 |
| [Webseitenmaschine - Statische Websites mit Hugo erzeugen](http://www.heise.de/ct/ausgabe/2016-12-Statische-Websites-mit-Hugo-erzeugen-3211704.html) <small>(German, $)</small> | Christian Helmbold | 2016-05-27 |
| [Cómo hacer sitios web estáticos con Hugo y Go - Platzi](https://www.youtube.com/watch?v=qaXXpdiCHXE) <small>(Video tutorial)</small> | Verónica López | 2016-04-06 |
| [CDNOverview: A CDN comparison site made with Hugo](https://www.cloakfusion.com/cdnoverview-cdn-comparison-site-made-hugo/) | Thijs de Zoete | 2016-02-23 |
| [Hugo: A Modern WebSite Engine That Just Works](https://github.com/shekhargulati/52-technologies-in-2016/blob/master/07-hugo/README.md) | Shekhar Gulati | 2016-02-14 |
| [Minify Hugo Generated HTML](http://ratson.name/blog/minify-hugo-generated-html/) | Ratson | 2016-02-02 |
| [<span lang="ja">HugoのデプロイをWerckerからCircle CIに変更した</span> - log](http://log.deprode.net/logs/2016-01-17/) | Deprode | 2016-01-17 |
| [Static site generators: el futuro de las webs estáticas<br>(Hugo, Jekyll, Flask y otros)](http://sitelabs.es/static-site-generators-futuro-las-webs-estaticas/) | Eneko Sarasola | 2016-01-09 |
| [Writing a Lambda Function for Hugo](https://blog.jolexa.net/post/writing-a-lambda-function-for-hugo/) | Jeremy Olexa | 2016-01-01 |
| [Ein Blog mit Hugo erstellen - Tutorial](http://privat.albicker.org/tags/hugo.html) <small>(Deutsch/German)</small> | Bernhard Albicker | 2015-12-30 |
| [How to host Hugo static website generator on AWS Lambda](http://bezdelev.com/post/hugo-aws-lambda-static-website/) | Ilya Bezdelev | 2015-12-15 |
| [Migrating from Pelican to Hugo](http://www.softinio.com/post/migrating-from-pelican-to-hugo/) | Salar Rahmanian | 2015-11-29 |
| [Static Website Generators Reviewed: Jekyll, Middleman, Roots, Hugo](http://www.smashingmagazine.com/2015/11/static-website-generators-jekyll-middleman-roots-hugo-review/) | Mathias Biilmann Christensen | 2015-11-16 |
| [How To Deploy a Hugo Site to Production with Git Hooks on Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/how-to-deploy-a-hugo-site-to-production-with-git-hooks-on-ubuntu-14-04) | Justin Ellingwood | 2015-11-12 |
| [How To Install and Use Hugo, a Static Site Generator, on Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-hugo-a-static-site-generator-on-ubuntu-14-04) | Justin Ellingwood | 2015-11-09 |
| [Switching from Wordpress to Hugo](http://justinfx.com/2015/11/08/switching-from-wordpress-to-hugo/) | Justin Israel | 2015-11-08 |
| [Hands-on Experience with Hugo as a Static Site Generator](http://usersnap.com/blog/hands-on-experience-with-hugo-static-site-generator/) | Thomas Peham | 2015 -10-15 |
| [Statische Webseites mit Hugo erstellen/Vortrag mit Foliensatz (deutsch)](http://sfd.koelnerlinuxtreffen.de/2015/HaraldWeidner/) | Harald Weidner | 2015-09-19 |
| [Moving from WordPress to Hugo](http://abhipandey.com/2015/09/moving-to-hugo/) | Abhishek Pandey | 2015-09-15 |
| [<span lang="zh-CN">通过webhook将Hugo自动部署至GitHub Pages和GitCafe Pages</span> <small>(Automated&nbsp;deployment)</small>](http://blog.coderzh.com/2015/09/13/use-webhook-automated-deploy-hugo/) | CoderZh | 2015-09-13 |
| [<span lang="zh-CN">使用hugo搭建个人博客站点</span> <small>(Using Hugo to build a personal blog site)</small>](http://blog.coderzh.com/2015/08/29/hugo/) | CoderZh | 2015-08-29 |
| [Good-Bye Wordpress, Hello Hugo!](http://blog.arminhanisch.de/2015/08/blog-migration-zu-hugo/) <small>(German)</small> | Armin Hanisch | 2015-08-18 |
| [Générer votre site web statique avec Hugo <small>(Generate your static site with Hugo)<small>](http://www.linux-pratique.com/?p=191) | Benoît Benedetti | 2015-06-26 |
| [<span lang="ja">Hugo向けの新しいテーマを作った</span> <small>(I created a new theme for Hugo)<small>](https://yet.unresolved.xyz/blog/2016/10/03/how-to-make-of-hugo-theme/) | Daisuke Tsuji | 2015-06-20 |
| [Hugo - Gerando um site com conteúdo estático. (Portuguese Brazil)](http://blog.ffrizzo.com/posts/hugo/) | Fabiano Frizzo | 2015-06-02 |
| [An Introduction to Static Site Generators](http://davidwalsh.name/introduction-static-site-generators) | Eduardo Bouças | 2015-05-20 |
| [Hugo Still Rules](http://cheekycoder.com/2015/05/hugo-still-rules/) | Cheeky Coder | 2015-05-18 |
| [hugo - Static Site Generator](http://gscacco.github.io/post/hugo/) | G Scaccoio | 2015-05-04 |
| [<span lang="ja">WindowsでHugoを使う</span>](http://ureta.net/2015/05/hugo-on-windows/) | <span lang="ja">うれ太郎</span> | 2015-05-01 |
| [<span lang="ja">Hugoのshortcodesを用いてサイトにスライドなどを埋め込む</span>](http://blog.yucchiy.com/2015/04/29/hugo-shortcode/) | Yucchiy | 2015-04-29 |
| [<span lang="ja">HugoとCircleCIでGitHub PagesにBlogを公開してみたら超簡単だった</span>](http://hori-ryota.github.io/blog/create-blog-with-hugo-and-circleci/) | Hori Ryota | 2015-04-17 |
| [10 Best Static Site Generators](http://beebom.com/2015/04/best-static-site-generators) | Aniruddha Mysore | 2015-04-06 |
| [Goodbye WordPress; Hello Hugo](http://willwarren.com/2015/04/05/goodbye-wordpress-hello-hugo/) | Will Warren | 2015-04-05 |
| [Static Websites with Hugo on Google Cloud Storage](http://www.moxie.io/post/static-websites-with-hugo-on-google-cloud-storage/) | Moxie Input/Output | 2015-04-02 |
| [De nuevo iniciando un blog](https://alvarolizama.net/) | Alvaro Lizama | 2015-03-29 |
| [We moved our blog from Posthaven to Hugo after only three posts. Why?](http://blog.hypriot.com/post/moved-from-posthaven-to-hugo/) | Hypriot | 2015-03-27 |
| [Top Static Site Generators in 2015](http://superdevresources.com/static-site-generators-2015/) | Kanishk Kunal | 2015-03-12 |
| [Moving to Hugo](http://abiosoft.com/moving-to-hugo/) | Abiola Ibrahim | 2015-03-08 |
| [Migrating a blog (yes, this one!) from Wordpress to Hugo](http://justindunham.net/migrating-from-wordpress-to-hugo/) | Justin Dunham | 2015-02-13 |
| [<span lang="ja">blogをoctopressからHugoに乗り換えたメモ</span>](http://blog.jigyakkuma.org/2015/02/11/hugo/) | jigyakkuma | 2015-02-11 |
| [<span lang="ja">Hugoでブログをつくった</span>](http://porgy13.github.io/post/new-hugo-blog/) | porgy13 | 2015-02-07 |
| [<span lang="ja">Hugoにブログを移行した</span>](http://keichi.net/post/first/) | Keichi Takahashi | 2015-02-04 |
| [<span lang="zh-CN">Hugo静态网站生成器中文教程</span>](http://nanshu.wang/post/2015-01-31/) | Nanshu Wang | 2015-01-31 |
| [<span lang="ja">Hugo + GitHub Pages + Wercker CI = ¥0(無料)<br>でコマンド 1 発(自動化)でサイト<br>・ブログを公開・運営・分析・収益化</span>](http://qiita.com/yoheimuta/items/8a619cac356bed89a4c9) | Yohei Yoshimuta | 2015-01-31 |
| [Running Hugo websites on anynines](http://blog.anynines.com/running-hugo-websites-on-anynines/) | Julian Weber | 2015-01-30 |
| [MiddlemanからHugoへ移行した](http://re-dzine.net/2015/01/hugo/) | Haruki Konishi | 2015-01-21 |
| [WordPress から Hugo に乗り換えました](http://rakuishi.com/archives/wordpress-to-hugo/) | rakuishi | 2015-01-20 |
| [HUGOを使ってサイトを立ち上げる方法](http://qiita.com/syui/items/869538099551f24acbbf) | Syui | 2015-01-17 |
| [<span lang="ja">Jekyllが許されるのは小学生までだよね</span>](http://t32k.me/mol/log/hugo/) | Ishimoto Koji | 2015-01-16 |
| [Getting started with Hugo](http://anthonyfok.org/post/getting-started-with-hugo/) | Anthony Fok | 2015-01-12 |
| [<span lang="zh-CN">把这个博客静态化了</span> <small>(Migrate to Hugo)</small>](http://lich-eng.com/2015/01/03/migrate-to-hugo/)| Li Cheng | 2015-01-03 |
| [Porting my blog with Hugo](http://blog.srackham.com/posts/porting-my-blog-with-hugo/) | Stuart Rackham | 2014-12-30 |
| [Hugoを使ってみたときのメモ](http://machortz.github.io/posts/usinghugo/) | Machortz | 2014-12-29 |
| [OctopressからHugoへ移行した](http://deeeet.com/writing/2014/12/25/hugo/) | Taichi Nakashima | 2014-12-25 |
| [Migrating to Hugo From Octopress](http://nathanleclaire.com/blog/2014/12/22/migrating-to-hugo-from-octopress/) | Nathan LeClaire | 2014-12-22 |
| [Dynamic Pages with GoHugo.io](http://cyrillschumacher.com/2014/12/21/dynamic-pages-with-gohugo.io/) | Cyrill Schumacher | 2014-12-21 |
| [6 Static Blog Generators That Arent Jekyll](http://www.sitepoint.com/6-static-blog-generators-arent-jekyll/) | David Turnbull | 2014-12-08 |
| [Travel Blogging Setup](http://www.stou.dk/2014/11/travel-blogging-setup/) | Rasmus Stougaard | 2014-11-23 |
| [Hosting A Hugo Website Behind Nginx](http://www.bigbeeconsultants.co.uk/blog/hosting-hugo-website-behind-nginx) | Rick Beton | 2014-11-20 |
| [<span lang="zh-CN">使用Hugo搭建免费个人Blog</span> <small>(How to use Hugo)</small>](http://ulricqin.com/post/how-to-use-hugo/) | Ulric Qin <span lang="zh-CN">秦晓辉</span> | 2014-11-11 |
| [Built in Speed and Built for Speed by Hugo](http://cheekycoder.com/2014/10/built-for-speed-by-hugo/) | Cheeky Coder | 2014-10-30 |
| [Hugo para crear sitios web estáticos](http://www.webbizarro.com/noticias/1076/hugo-para-crear-sitios-web-estaticos/) | Web Bizarro | 2014-08-19 |
| [Going with hugo](http://www.markuseliasson.se/article/going-with-hugo/) | Markus Eliasson | 2014-08-18 |
| [Benchmarking Jekyll, Hugo and Wintersmith](http://fredrikloch.me/post/2014-08-12-Jekyll-and-its-alternatives-from-a-site-generation-point-of-view/) | Fredrik Loch | 2014-08-12 |
| [Goodbye Octopress, Hello Hugo!](http://andreimihu.com/blog/2014/08/11/goodbye-octopress-hello-hugo/) | Andrei Mihu | 2014-08-11 |
| [Beautiful sites for Open Source projects](http://beautifulopen.com/2014/08/09/hugo/) | Beautiful Open | 2014-08-09 |
| [Hugo: Beyond the Defaults](http://npf.io/2014/08/hugo-beyond-the-defaults/) | Nate Finch | 2014-08-08 |
| [First Impressions of Hugo](https://peteraba.com/blog/first-impressions-of-hugo/) | Peter Aba | 2014-06-06 |
| [New Site Workflow](http://vurt.co.uk/post/new_website/) | Giles Paterson | 2014-08-05 |
| [How I Learned to Stop Worrying and Love the (Static) Web](http://cognition.ca/post/about-hugo/) | Joshua McKenty | 2014-08-04 |
| [Hugo - Static Site Generator](http://kenwoo.io/blog/hugo---static-site-generator/) | Kenny Woo | 2014-08-03 |
| [Hugo Is Friggin' Awesome](http://npf.io/2014/08/hugo-is-awesome/) | Nate Finch | 2014-08-01 |
| [<span lang="zh-CN">再次搬家</span> <small>(Move from WordPress to Hugo)</small>](http://www.chingli.com/misc/move-from-wordpress-to-hugo/) | <span lang="zh-CN">青砾</span> (chingli) | 2014-07-12 |
| [Embedding Gists in Hugo](http://danmux.com/posts/embedded_gists/) | Dan Mull | 2014-07-05 |
| [An Introduction To Hugo](http://www.cirrushosting.com/web-hosting-blog/an-introduction-to-hugo/) | Dan Silber | 2014-07-01 |
| [Moving to Hugo](http://danmux.com/posts/hugo_based_blog/) | Dan Mull | 2014-05-29 |
| [<span lang="zh-CN">开源之静态站点生成器排行榜</span><br><small>(Leaderboard of open-source static website generators)</small>](http://code.csdn.net/news/2819909) | CSDN.net | 2014-05-23 |
| [Finally, a satisfying and effective blog setup](http://michaelwhatcott.com/now-powered-by-hugo/) | Michael Whatcott | 2014-05-20 |
| [Hugo from scratch](http://zackofalltrades.com/notes/2014/05/hugo-from-scratch/) | Zack Williams | 2014-05-18 |
| [Why I switched away from Jekyll](http://www.jakejanuzelli.com/why-I-switched-away-from-jekyll/) | Jake Januzelli | 2014-05-10 |
| [Welcome our new blog](http://blog.ninya.io/posts/welcome-our-new-blog/) | Ninya.io | 2014-04-11 |
| [Mission Not Accomplished](http://johnsto.co.uk/blog/mission-not-accomplished/) | Dave Johnston | 2014-04-03 |
| [Hugo - A Static Site Builder in Go](http://deepfriedcode.com/post/hugo/) | Deep Fried Code | 2014-03-30 |
| [Adventures in Angular Podcast](http://devchat.tv/adventures-in-angular/003-aia-gdes) | Matias Niemela | 2014-03-28 |
| [Hugo](http://bra.am/post/hugo/) | bra.am | 2014-03-23 |
| [Converting Blogger To Markdown](http://trishagee.github.io/project/atom-to-hugo/) | Trisha Gee | 2014-03-20 |
| [Moving to Hugo Static Web Pages](http://tepid.org/tech/hugo-web/) | Tobias Weingartner | 2014-03-16 |
| [New Blog Engine: Hugo](https://blog.afoolishmanifesto.com/posts/hugo/) | fREW Schmidt | 2014-03-15 |
| [Hugo + gulp.js = Huggle](http://ktmud.github.io/huggle/en/intro/) ([English](http://ktmud.github.io/huggle/en/intro/), [<span lang="zh-CN">中文</span>](http://ktmud.github.io/huggle/zh/intro/)) | Jesse Yang <span lang="zh-CN">杨建超</span> | 2014-03-08 |
| [Powered by Hugo](http://kieranhealy.org/blog/archives/2014/02/24/powered-by-hugo/) | Kieran Healy | 2014-02-24 |
| [<span lang="ja">静的サイトを素早く構築するために<br>GoLangで作られたジェネレータHugo</span>](http://hamasyou.com/blog/2014/02/21/hugo/)| <div lang="ja" style="line-height: 1.1;">Shogo Hamada<br>濱田章吾</div> | 2014-02-21 |
| [Latest Roundup of Useful Tools For Developers](http://codegeekz.com/latest-roundup-of-useful-tools-for-developers/) | CodeGeekz | 2014-02-13 |
| [Hugo: Static Site Generator written in Go](http://www.braveterry.com/2014/02/06/hugo-static-site-generator-written-in-go/) | Brave Terry | 2014-02-06 |
| [10 Useful HTML5 Tools for Web Designers and Developers](http://designdizzy.com/10-useful-html5-tools-for-web-designers-and-developers/) | Design Dizzy | 2014-02-04 |
| [Hugo Fast, Flexible Static Site Generator](http://cube3x.com/hugo-fast-flexible-static-site-generator/) | Joby Joseph | 2014-01-18 |
| [Hugo: A new way to build static website](http://www.w3update.com/opensource/hugo-a-new-way-to-build-static-website.html) | w3update | 2014-01-17 |
| [Xaprb now uses Hugo](http://xaprb.com/blog/2014/01/15/using-hugo/) | Baron Schwartz | 2014-01-15 |
| [New jQuery Plugins And Resources That Web Designers Need](http://www.designyourway.net/blog/resources/new-jquery-plugins-and-resources-that-web-designers-need/) | Design Your Way | 2014-01-01 |
| [On Blog Construction](http://alexla.sh/post/on-blog-construction/) | Alexander Lash | 2013-12-27 |
| [Hugo](http://onethingwell.org/post/69070926608/hugo) | One Thing Well | 2013-12-05 |
| [In Praise Of Hugo](http://sound-guru.com/blog/post/hello-world/) | sound-guru.com | 2013-10-19 |
| [Hosting a blog on S3 and Cloudfront](http://www.danesparza.net/2013/07/hosting-a-blog-on-s3-and-cloudfront/) | Dan Esparza | 2013-07-24 |
+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
#tags: [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.
@@ -0,0 +1,192 @@
---
title: Archetypes
linktitle: Archetypes
description: Archetypes allow you to create new instances of content types and set default parameters from the command line.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
#tags: [archetypes,generators,metadata,front matter]
categories: ["content management"]
menu:
docs:
parent: "content-management"
weight: 70
quicklinks:
weight: 70 #rem
draft: false
aliases: [/content/archetypes/]
toc: true
---
{{% note %}}
This section is outdated, see https://github.com/gohugoio/hugoDocs/issues/11
{{% /note %}}
{{% todo %}}
See above
{{% /todo %}}
## What are Archetypes?
**Archetypes** are content files in the [archetypes directory][] of your project that contain preconfigured [front matter][] for your website's [content types][]. Archetypes facilitate consistent metadata across your website content and allow content authors to quickly generate instances of a content type via the `hugo new` command.
{{< youtube S3Tj3UcTFz8 >}}
The `hugo new` generator for archetypes assumes your working directory is the content folder at the root of your project. Hugo is able to infer the appropriate archetype by assuming the content type from the content section passed to the CLI command:
```
hugo new <content-section>/<file-name.md>
```
We can use this pattern to create a new `.md` file in the `posts` section:
{{< code file="archetype-example.sh" >}}
hugo new posts/my-first-post.md
{{< /code >}}
{{% note "Override Content Type in a New File" %}}
To override the content type Hugo infers from `[content-section]`, add the `--kind` flag to the end of the `hugo new` command.
{{% /note %}}
Running this command in a new site that does not have default or custom archetypes will create the following file:
{{< output file="content/posts/my-first-post.md" >}}
+++
date = "2017-02-01T19:20:04-07:00"
title = "my first post"
draft = true
+++
{{< /output >}}
{{% note %}}
In this example, if you do not already have a `content/posts` directory, Hugo will create both `content/posts/` and `content/posts/my-first-post.md` for you.
{{% /note %}}
The auto-populated fields are worth examining:
* `title` is generated from the new content's filename (i.e. in this case, `my-first-post` becomes `"my first post"`)
* `date` and `title` are the variables that ship with Hugo and are therefore included in *all* content files created with the Hugo CLI. `date` is generated in [RFC 3339 format][] by way of Go's [`now()`][] function, which returns the current time.
* The third variable, `draft = true`, is *not* inherited by your default or custom archetypes but is included in Hugo's automatically scaffolded `default.md` archetype for convenience.
Three variables per content file are often not enough for effective content management of larger websites. Luckily, Hugo provides a simple mechanism for extending the number of variables through custom archetypes, as well as default archetypes to keep content creation DRY.
## Lookup Order for Archetypes
Similar to the [lookup order for templates][lookup] in your `layouts` directory, Hugo looks for a section- or type-specific archetype, then a default archetype, and finally an internal archetype that ships with Hugo. For example, Hugo will look for an archetype for `content/posts/my-first-post.md` in the following order:
1. `archetypes/posts.md`
2. `archetypes/default.md`
3. `themes/<THEME>/archetypes/posts.md`
4. `themes/<THEME>/archetypes/default.md` (Auto-generated with `hugo new site`)
{{% note "Using a Theme Archetype" %}}
If you wish to use archetypes that ship with a theme, the `theme` field must be specified in your [configuration file](/getting-started/configuration/).
{{% /note %}}
## Choose Your Archetype's Front Matter Format
By default, `hugo new` content files include front matter in the TOML format regardless of the format used in `archetypes/*.md`.
You can specify a different default format in your site [configuration file][] file using the `metaDataFormat` directive. Possible values are `toml`, `yaml`, and `json`.
## Default Archetypes
Default archetypes are convenient if your content's front matter stays consistent across multiple [content sections][sections].
### Create the Default Archetype
When you create a new Hugo project using `hugo new site`, you'll notice that Hugo has already scaffolded a file at `archetypes/default.md`.
The following examples are from a site that's using `tags` and `categories` as [taxonomies][]. If we assume that all content files will require these two key-values, we can create a `default.md` archetype that *extends* Hugo's base archetype. In this example, we are including "golang" and "hugo" as tags and "web development" as a category.
{{< code file="archetypes/default.md" >}}
+++
tags = ["golang", "hugo"]
categories = ["web development"]
+++
{{< /code >}}
{{% warning "EOL Characters in Text Editors"%}}
If you get an `EOF error` when using `hugo new`, add a carriage return after the closing `+++` or `---` for your TOML or YAML front matter, respectively. (See the [troubleshooting article on EOF errors](/troubleshooting/eof-error/) for more information.)
{{% /warning %}}
### Use the Default Archetype
With an `archetypes/default.md` in place, we can use the CLI to create a new post in the `posts` content section:
{{< code file="new-post-from-default.sh" >}}
$ hugo new posts/my-new-post.md
{{< /code >}}
Hugo then creates a new markdown file with the following front matter:
{{< output file="content/posts/my-new-post.md" >}}
+++
categories = ["web development"]
date = "2017-02-01T19:20:04-07:00"
tags = ["golang", "hugo"]
title = "my new post"
+++
{{< /output >}}
We see that the `title` and `date` key-values have been added in addition to the `tags` and `categories` key-values from `archetypes/default.md`.
{{% note "Ordering of Front Matter" %}}
You may notice that content files created with `hugo new` do not respect the order of the key-values specified in your archetype files. This is a [known issue](https://github.com/gohugoio/hugo/issues/452).
{{% /note %}}
## Custom Archetypes
Suppose your site's `posts` section requires more sophisticated front matter than what has been specified in `archetypes/default.md`. You can create a custom archetype for your posts at `archetypes/posts.md` that includes the full set of front matter to be added to the two default archetypes fields.
### Create a Custom Archetype
{{< code file="archetypes/posts.md">}}
+++
description = ""
tags = ""
categories = ""
+++
{{< /code >}}
### Use a Custom Archetype
With an `archetypes/posts.md` in place, you can use the Hugo CLI to create a new post with your preconfigured front matter in the `posts` content section:
{{< code file="new-post-from-custom.sh" >}}
$ hugo new posts/post-from-custom.md
{{< /code >}}
This time, Hugo recognizes our custom `archetypes/posts.md` archetype and uses it instead of `archetypes/default.md`. The generated file will now include the full list of front matter parameters, as well as the base archetype's `title` and `date`:
{{< output file="content/posts/post-from-custom-archetype.md" >}}
+++
categories = ""
date = 2017-02-13T17:24:43-08:00
description = ""
tags = ""
title = "post from custom archetype"
+++
{{< /output >}}
### Hugo Docs Custom Archetype
As an example of archetypes in practice, the following is the `functions` archetype from the Hugo docs:
{{< code file="archetypes/functions.md" >}}
{{< readfile file="/themes/gohugoioTheme/archetypes/functions.md" >}}
{{< /code >}}
{{% note %}}
The preceding archetype is kept up to date with every Hugo build by using Hugo's [`readFile` function](/functions/readfile/). For similar examples, see [Local File Templates](/templates/files/).
{{% /note %}}
[archetypes directory]: /getting-started/directory-structure/
[`now()`]: http://golang.org/pkg/time/#Now
[configuration file]: /getting-started/configuration/
[sections]: /content-management/sections/
[content types]: /content-management/types/
[front matter]: /content-management/front-matter/
[RFC 3339 format]: https://www.ietf.org/rfc/rfc3339.txt
[taxonomies]: /content-management/taxonomies/
[lookup]: /templates/lookup/
[templates]: /templates/
+185
View File
@@ -0,0 +1,185 @@
---
title: Authors
linktitle: Authors
description:
date: 2016-08-22
publishdate: 2017-03-12
lastmod: 2017-03-12
#tags: [authors]
categories: ["content management"]
menu:
docs:
parent: "content-management"
weight: 55
weight: 55 #rem
draft: true
aliases: [/content/archetypes/]
toc: true
comments: Before this page is published, need to also update both site- and page-level variables documentation.
---
Larger sites often have multiple content authors. Hugo provides standardized author profiles to organize relationships between content and content creators for sites operating under a distributed authorship model.
## Author Profiles
You can create a profile containing metadata for each author on your website. These profiles have to be saved under `data/_authors/`. The filename of the profile will later be used as an identifier. This way Hugo can associate content with one or multiple authors. An author's profile can be defined in the JSON, YAML, or TOML format.
### Example: Author Profile
Let's suppose Alice Allison is a blogger. A simple unique identifier would be `alice`. Now, we have to create a file called `alice.toml` in the `data/_authors/` directory. The following example is the standardized template written in TOML:
{{< code file="data/_authors/alice.toml" >}}
givenName = "Alice" # or firstName as alias
familyName = "Allison" # or lastName as alias
displayName = "Alice Allison"
thumbnail = "static/authors/alice-thumb.jpg"
image = "static/authors/alice-full.jpg"
shortBio = "My name is Alice and I'm a blogger."
bio = "My name is Alice and I'm a blogger... some other stuff"
email = "alice.allison@email.com"
weight = 10
[social]
facebook = "alice.allison"
twitter = "alice"
googleplus = "aliceallison1"
website = "www.example.com"
[params]
random = "whatever you want"
{{< /code >}}
All variables are optional but it's advised to fill all important ones (e.g. names and biography) because themes can vary in their usage.
You can store files for the `thumbnail` and `image` attributes in the `static` folder. Then add the path to the photos relative to `static`; e.g., `/static/path/to/thumbnail.jpg`.
`weight` allows you to define the order of an author in an `.Authors` list and can be accessed on list or via the `.Site.Authors` variable.
The `social` section contains all the links to the social network accounts of an author. Hugo is able to generate the account links for the most popular social networks automatically. This way, you only have to enter your username. You can find a list of all supported social networks [here](#linking-social-network-accounts-automatically). All other variables, like `website` in the example above remain untouched.
The `params` section can contain arbitrary data much like the same-named section in the config file. What it contains is up to you.
## Associate Content Through Identifiers
Earlier it was mentioned that content can be associated with an author through their corresponding identifier. In our case, blogger Alice has the identifier `alice`. In the front matter of a content file, you can create a list of identifiers and assign it to the `authors` variable. Here are examples for `alice` using YAML and TOML, respectively.
```
---
title: Why Hugo is so Awesome
date: 2016-08-22T14:27:502:00
authors: ["alice"]
---
Nothing to read here. Move along...
```
```
+++
title = Why Hugo is so Awesome
date = "2016-08-22T14:27:502:00"
authors: ["alice"]
+++
Nothing to read here. Move along...
```
Future authors who might work on this blog post can append their identifiers to the `authors` array in the front matter as well.
## Work with Templates
After a successful setup it's time to give some credit to the authors by showing them on the website. Within the templates Hugo provides a list of the author's profiles if they are listed in the `authors` variable within the front matter.
The list is accessible via the `.Authors` template variable. Printing all authors of a the blog post is straight forward:
```
{{ range .Authors }}
{{ .DisplayName }}
{{ end }}
=> Alice Allison
```
Even if there are co-authors you may only want to show the main author. For this case you can use the `.Author` template variable **(note the singular form)**. The template variable contains the profile of the author that is first listed with his identifier in the front matter.
{{% note %}}
You can find a list of all template variables to access the profile information in [Author Variables](/variables/authors/).
{{% /note %}}
### Link Social Network Accounts
As aforementioned, Hugo is able to generate links to profiles of the most popular social networks. The following social networks with their corrersponding identifiers are supported: `github`, `facebook`, `twitter`, `googleplus`, `pinterest`, `instagram`, `youtube` and `linkedin`.
This is can be done with the `.Social.URL` function. Its only parameter is the name of the social network as they are defined in the profile (e.g. `facebook`, `googleplus`). Custom variables like `website` remain as they are.
Most articles feature a small section with information about the author at the end. Let's create one containing the author's name, a thumbnail, a (summarized) biography and links to all social networks:
{{< code file="layouts/partials/author-info.html" download="author-info.html" >}}
{{ with .Author }}
<h3>{{ .DisplayName }}</h3>
<img src="{{ .Thumbnail | absURL }}" alt="{{ .DisplayName }}">
<p>{{ .ShortBio }}</p>
<ul>
{{ range $network, $username := .Social }}
<li><a href="{{ $.Author.Social.URL $network }}">{{ $network }}</a></li>
{{ end }}
</ul>
{{ end }}
{{< /code >}}
## Who Published What?
That question can be answered with a list of all authors and another list containing all articles that they each have written. Now we have to translate this idea into templates. The [taxonomy][] feature allows us to logically group content based on information that they have in common; e.g. a tag or a category. Well, many articles share the same author, so this should sound familiar, right?
In order to let Hugo know that we want to group content based on their author, we have to create a new taxonomy called `author` (the name corresponds to the variable in the front matter). Here is the snippet in a `config.yaml` and `config.toml`, respectively:
```
taxonomies:
author: authors
```
```
[taxonomies]
author = "authors"
```
### List All Authors
In the next step we can create a template to list all authors of your website. Later, the list can be accessed at `www.example.com/authors/`. Create a new template in the `layouts/taxonomy/` directory called `authors.term.html`. This template will be exclusively used for this taxonomy.
{{< code file="layouts/taxonomy/author.term.html" download="author.term.html" >}}
<ul>
{{ range $author, $v := .Data.Terms }}
{{ $profile := $.Authors.Get $author }}
<li>
<a href="{{ printf "%s/%s/" $.Data.Plural $author | absURL }}">
{{ $profile.DisplayName }} - {{ $profile.ShortBio }}
</a>
</li>
{{ end }}
</ul>
{{< /code >}}
`.Data.Terms` contains the identifiers of all authors and we can range over it to create a list with all author names. The `$profile` variable gives us access to the profile of the current author. This allows you to generate a nice info box with a thumbnail, a biography and social media links, like at the [end of a blog post](#linking-social-network-accounts-automatically).
### List Each Author's Publications
Last but not least, we have to create the second list that contains all publications of an author. Each list will be shown in its own page and can be accessed at `www.example.com/authors/<IDENTIFIER>`. Replace `<IDENTIFIER>` with a valid author identifier like `alice`.
The layout for this page can be defined in the template `layouts/taxonomy/author.html`.
{{< code file="layouts/taxonomy/author.html" download="author.html" >}}
{{ range .Data.Pages }}
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<span>written by {{ .Author.DisplayName }}</span>
{{ .Summary }}
{{ end }}
{{< /code >}}
The example above generates a simple list of all posts written by a single author. Inside the loop you've access to the complete set of [page variables][pagevars]. Therefore, you can add additional information about the current posts like the publishing date or the tags.
With a lot of content this list can quickly become very long. Consider to use the [pagination][] feature. It splits the list into smaller chunks and spreads them over multiple pages.
[pagevars]: /variables/page/
[pagination]: /templates/pagination/
@@ -0,0 +1,84 @@
---
title: Comments
linktitle: Comments
description: Hugo ships with an internal Disqus template, but this isn't the only commenting system that will work with your new Hugo website.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-03-09
#tags: [sections,content,organization]
categories: [project organization, fundamentals]
menu:
docs:
parent: "content-management"
weight: 140
weight: 140 #rem
draft: false
aliases: [/extras/comments/]
toc: true
---
Hugo ships with support for [Disqus](https://disqus.com/), a third-party service that provides comment and community capabilities to websites via JavaScript.
Your theme may already support Disqus, but if not, it is easy to add to your templates via [Hugo's built-in Disqus partial][disquspartial].
## Add Disqus
Hugo comes with all the code you need to load Disqus into your templates. Before adding Disqus to your site, you'll need to [set up an account][disqussetup].
### Configure Disqus
Disqus comments require you set a single value in your [site's configuration file][configuration]. The following show the configuration variable in a `config.toml` and `config.yml`, respectively:
```
disqusShortname = "yourdiscussshortname"
```
```
disqusShortname: "yourdiscussshortname"
```
For many websites, this is enough configuration. However, you also have the option to set the following in the [front matter][] of a single content file:
* `disqus_identifier`
* `disqus_title`
* `disqus_url`
### Render Hugo's Built-in Disqus Partial Template
See [Partial Templates][partials] to learn how to add the Disqus partial to your Hugo website's templates.
## Comments Alternatives
There are a few alternatives to commenting on static sites for those who do not want to use Disqus:
* [Static Man](https://staticman.net/)
* [txtpen](https://txtpen.com)
* [IntenseDebate](http://intensedebate.com/)
* [Graph Comment][]
* [Muut](http://muut.com/)
* [isso](http://posativ.org/isso/) (Self-hosted, Python)
* [Tutorial on Implementing Isso with Hugo][issotutorial]
<!-- I don't think this is worth including in the documentation since it seems that Steve is no longer supporting or developing this project. rdwatters - 2017-02-29.-->
<!-- * [Kaiju](https://github.com/spf13/kaiju) -->
<!-- ## Kaiju
[Kaiju](https://github.com/spf13/kaiju) is an open-source project started by [spf13](http://spf13.com/) (Hugos author) to bring easy and fast real time discussions to the web.
Written using Go, Socket.io, and [MongoDB][], Kaiju is very fast and easy to deploy.
It is in early development but shows promise. If you have interest, please help by contributing via pull request, [opening an issue in the Kaiju GitHub repository][kaijuissue], or [Tweeting about it][tweet]. Every bit helps. -->
[configuration]: /getting-started/configuration/
[disquspartial]: /templates/partials/#disqus
[disqussetup]: https://disqus.com/profile/signup/
[forum]: https://discourse.gohugo.io
[front matter]: /content-management/front-matter/
[Graph Comment]: https://graphcomment.com/
[kaijuissue]: https://github.com/spf13/kaiju/issues/new
[issotutorial]: https://stiobhart.net/2017-02-24-isso-comments/
[partials]: /templates/partials/
[MongoDB]: https://www.mongodb.com/
[tweet]: https://twitter.com/spf13
@@ -0,0 +1,123 @@
---
title: Cross References
description: Hugo makes it easy to link documents together.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-03-31
categories: [content management]
#tags: ["cross references","references", "anchors", "urls"]
menu:
docs:
parent: "content-management"
weight: 100
weight: 100 #rem
aliases: [/extras/crossreferences/]
toc: true
---
The `ref` and `relref` shortcodes link documents together, both of which are [built-in Hugo shortcodes][]. These shortcodes are also used to provide links to headings inside of your content, whether across documents or within a document. The only difference between `ref` and `relref` is whether the resulting URL is absolute (`http://1.com/about/`) or relative (`/about/`), respectively.
## Use `ref` and `relref`
```
{{</* ref "document" */>}}
{{</* ref "#anchor" */>}}
{{</* ref "document#anchor" */>}}
{{</* relref "document" */>}}
{{</* relref "#anchor" */>}}
{{</* relref "document#anchor" */>}}
```
The single parameter to `ref` is a string with a content `documentname` (e.g., `about.md`) with or without an appended in-document `anchor` (`#who`) without spaces.
### Document Names
The `documentname` is the name of a document, including the format extension; this may be just the filename, or the relative path from the `content/` directory. With a document `content/blog/post.md`, either format will produce the same result:
```
{{</* relref "blog/post.md" */>}} => `/blog/post/`
{{</* relref "post.md" */>}} => `/blog/post/`
```
If you have the same filename used across multiple sections, you should only use the relative path format; otherwise, the behavior will be `undefined`. This is best illustrated with an example `content` directory:
```
.
└── content
├── events
│   └── my-birthday.md
├── galleries
│   └── my-birthday.md
├── meta
│   └── my-article.md
└── posts
└── my-birthday.md
```
To be sure to get the correct reference in this case, use the full path:
{{< code file="content/meta/my-article.md" copy="false" >}}
{{</* relref "events/my-birthday.md" */>}} => /events/my-birthday/
{{< /code >}}
{{< todo >}}Remove this warning when https://github.com/gohugoio/hugo/issues/3703 is released.{{< /todo >}}
A relative document name must *not* begin with a slash (`/`).
```
{{</* relref "/events/my-birthday.md" */>}} => ""
```
### With Multiple Output Formats
If the page exists in multiple [output formats][], `ref` or `relref` can be used with a output format name:
```
[Neat]({{</* ref "blog/neat.md" "amp" */>}})
```
### Anchors
When an `anchor` is provided by itself, the current pages unique identifier will be appended; when an `anchor` is provided appended to `documentname`, the found page's unique identifier will be appended:
```
{{</* relref "#anchors" */>}} => #anchors:9decaf7
{{</* relref "about-hugo/hugo-features.md#content" */>}} => /blog/post/#who:badcafe
```
The above examples render as follows for this very page as well as a reference to the "Content" heading in the Hugo docs features pageyoursite
```
{{</* relref "#who" */>}} => #who:9decaf7
{{</* relref "blog/post.md#who" */>}} => /blog/post/#who:badcafe
```
More information about document unique identifiers and headings can be found [below]({{< ref "#hugo-heading-anchors" >}}).
### Examples
* `{{</* ref "blog/post.md" */>}}` => `https://example.com/blog/post/`
* `{{</* ref "post.md#tldr" */>}}` => `https://example.com/blog/post/#tldr:caffebad`
* `{{</* relref "post.md" */>}}` => `/blog/post/`
* `{{</* relref "blog/post.md#tldr" */>}}` => `/blog/post/#tldr:caffebad`
* `{{</* ref "#tldr" */>}}` => `#tldr:badcaffe`
* `{{</* relref "#tldr" */>}}` => `#tldr:badcaffe`
## Hugo Heading Anchors
When using Markdown document types, Hugo generates heading anchors automatically. The generated anchor for this section is `hugo-heading-anchors`. Because the heading anchors are generated automatically, Hugo takes some effort to ensure that heading anchors are unique both inside a document and across the entire site.
Ensuring heading uniqueness across the site is accomplished with a unique identifier for each document based on its path. Unless a document is renamed or moved between sections *in the filesystem*, the unique identifier for the document will not change: `blog/post.md` will always have a unique identifier of `81df004c333b392d34a49fd3a91ba720`.
`ref` and `relref` were added so you can make these reference links without having to know the documents unique identifier. (The links in document tables of contents are automatically up-to-date with this value.)
```
{{</* relref "content-management/cross-references.md#hugo-heading-anchors" */>}}
/content-management/cross-references/#hugo-heading-anchors:77cd9ea530577debf4ce0f28c8dca242
```
[built-in Hugo shortcodes]: /content-management/shortcodes/#using-the-built-in-shortcodes
[lists]: /templates/lists/
[output formats]: /templates/output-formats/
[shortcode]: /content-management/shortcodes/
+241
View File
@@ -0,0 +1,241 @@
---
title: Supported Content Formats
linktitle: Supported Content Formats
description: Markdown and Emacs Org-Mode have native support, and additional formats (e.g. Asciidoc) come via external helpers.
date: 2017-01-10
publishdate: 2017-01-10
lastmod: 2017-04-06
categories: [content management]
#tags: [markdown,asciidoc,mmark,content format]
menu:
docs:
parent: "content-management"
weight: 20
weight: 20 #rem
draft: false
aliases: [/content/markdown-extras/,/content/supported-formats/,/doc/supported-formats/,/tutorials/mathjax/]
toc: true
---
**Markdown is the main content format** and comes in two flavours: The excellent [Blackfriday project][blackfriday] (name your files `*.md` or set `markup = "markdown"` in front matter) or its fork [Mmark][mmark] (name your files `*.mmark` or set `markup = "mmark"` in front matter), both very fast markdown engines written in Go.
For Emacs users, [goorgeous](https://github.com/chaseadamsio/goorgeous) provides built-in native support for Org-mode (name your files `*.org` or set `markup = "org"` in front matter)
{{% note "Deeply Nested Lists" %}}
Before you begin writing your content in markdown, Blackfriday has a known issue [(#329)](https://github.com/russross/blackfriday/issues/329) with handling deeply nested lists. Luckily, there is an easy workaround. Use 4-spaces (i.e., <kbd>tab</kbd>) rather than 2-space indentations.
{{% /note %}}
## Configure BlackFriday Markdown Rendering
You can configure multiple aspects of Blackfriday as show in the following list. See the docs on [Configuration][config] for the full list of explicit directions you can give to Hugo when rendering your site.
{{< readfile file="/content/readfiles/bfconfig.md" markdown="true" >}}
## Extend Markdown
Hugo provides some convenient methods for extending markdown.
### Task Lists
Hugo supports [GitHub-styled task lists (i.e., TODO lists)][gfmtasks] for the Blackfriday markdown renderer. If you do not want to use this feature, you can disable it in your configuration.
#### Example Task List Input
{{< code file="content/my-to-do-list.md" >}}
- [ ] a task list item
- [ ] list syntax required
- [ ] incomplete
- [x] completed
{{< /code >}}
#### Example Task List Output
The preceding markdown produces the following HTML in your rendered website:
```
<ul class="task-list">
<li><input type="checkbox" disabled="" class="task-list-item"> a task list item</li>
<li><input type="checkbox" disabled="" class="task-list-item"> list syntax required</li>
<li><input type="checkbox" disabled="" class="task-list-item"> incomplete</li>
<li><input type="checkbox" checked="" disabled="" class="task-list-item"> completed</li>
</ul>
```
#### Example Task List Display
The following shows how the example task list will look to the end users of your website. Note that visual styling of lists is up to you. This list has been styled according to [the Hugo Docs stylesheet][hugocss].
- [ ] a task list item
- [ ] list syntax required
- [ ] incomplete
- [x] completed
### Emojis
To add emojis directly to content, set `enableEmoji` to `true` in your [site configuration][config]. To use emojis in templates or shortcodes, see [`emojify` function][].
For a full list of emojis, see the [Emoji cheat sheet][emojis].
### Shortcodes
If you write in Markdown and find yourself frequently embedding your content with raw HTML, Hugo provides built-in shortcodes functionality. This is one of the most powerful features in Hugo and allows you to create your own Markdown extensions very quickly.
See [Shortcodes][sc] for usage, particularly for the built-in shortcodes that ship with Hugo, and [Shortcode Templating][sct] to learn how to build your own.
### Code Blocks
Hugo supports GitHub-flavored markdown's use of triple back ticks, as well as provides a special [`highlight` nested shortcode][hlsc] to render syntax highlighting via [Pygments][]. For usage examples and a complete explanation, see the [syntax highlighting documentation][hl] in [developer tools][].
## Mmark
Mmark is a [fork of BlackFriday][mmark] and markdown superset that is well suited for writing [IETF documentation][ietf]. You can see examples of the syntax in the [Mmark GitHub repository][mmarkgh] or the full syntax on [Miek Gieben's website][].
### Use Mmark
As Hugo ships with Mmark, using the syntax is as easy as changing the extension of your content files from `.md` to `.mmark`.
In the event that you want to only use Mmark in specific files, you can also define the Mmark syntax in your content's front matter:
```
---
title: My Post
date: 2017-04-01
markup: mmark
---
```
{{% warning %}}
Thare are some features not available in Mmark; one example being that shortcodes are not translated when used in an included `.mmark` file ([#3131](https://github.com/gohugoio/hugo/issues/3137)), and `EXTENSION_ABBREVIATION` ([#1970](https://github.com/gohugoio/hugo/issues/1970)) and the aforementioned GFM todo lists ([#2270](https://github.com/gohugoio/hugo/issues/2270)) are not fully supported. Contributions are welcome.
{{% /warning %}}
## MathJax with Hugo
[MathJax](http://www.mathjax.org/) is a JavaScript library that allows the display of mathematical expressions described via a LaTeX-style syntax in the HTML (or Markdown) source of a web page. As it is a pure a JavaScript library, getting it to work within Hugo is fairly straightforward, but does have some oddities that will be discussed here.
This is not an introduction into actually using MathJax to render typeset mathematics on your website. Instead, this page is a collection of tips and hints for one way to get MathJax working on a website built with Hugo.
### Enable MathJax
The first step is to enable MathJax on pages that you would like to have typeset math. There are multiple ways to do this (adventurous readers can consult the [Loading and Configuring](http://docs.mathjax.org/en/latest/configuration.html) section of the MathJax documentation for additional methods of including MathJax), but the easiest way is to use the secure MathJax CDN by include a `<script>` tag for the officially recommended secure CDN ([cdn.js.com](https://cdnjs.com)):
{{< code file="add-mathjax-to-page.html" >}}
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
{{< /code >}}
One way to ensure that this code is included in all pages is to put it in one of the templates that live in the `layouts/partials/` directory. For example, I have included this in the bottom of my template `footer.html` because I know that the footer will be included in every page of my website.
### Options and Features
MathJax is a stable open-source library with many features. I encourage the interested reader to view the [MathJax Documentation](http://docs.mathjax.org/en/latest/index.html), specifically the sections on [Basic Usage](http://docs.mathjax.org/en/latest/index.html#basic-usage) and [MathJax Configuration Options](http://docs.mathjax.org/en/latest/index.html#mathjax-configuration-options).
### Issues with Markdown
{{% note %}}
The following issues with Markdown assume you are using `.md` for content and BlackFriday for parsing. Using [Mmark](#mmark) as your content format will obviate the need for the following workarounds.
When using Mmark with MathJax, use `displayMath: [['$$','$$'], ['\\[','\\]']]`. See the [Mmark `README.md`](https://github.com/miekg/mmark/wiki/Syntax#math-blocks) for more information. In addition to MathJax, Mmark has been shown to work well with [KaTeX](https://github.com/Khan/KaTeX). See this [related blog post from a Hugo user](http://nosubstance.me/post/a-great-toolset-for-static-blogging/).
{{% /note %}}
After enabling MathJax, any math entered between proper markers (see the [MathJax documentation][mathjaxdocs]) will be processed and typeset in the web page. One issue that comes up, however, with Markdown is that the underscore character (`_`) is interpreted by Markdown as a way to wrap text in `emph` blocks while LaTeX (MathJax) interprets the underscore as a way to create a subscript. This "double speak" of the underscore can result in some unexpected and unwanted behavior.
### Solution
There are multiple ways to remedy this problem. One solution is to simply escape each underscore in your math code by entering `\_` instead of `_`. This can become quite tedious if the equations you are entering are full of subscripts.
Another option is to tell Markdown to treat the MathJax code as verbatim code and not process it. One way to do this is to wrap the math expression inside a `<div>` `</div>` block. Markdown would ignore these sections and they would get passed directly on to MathJax and processed correctly. This works great for display style mathematics, but for inline math expressions the line break induced by the `<div>` is not acceptable. The syntax for instructing Markdown to treat inline text as verbatim is by wrapping it in backticks (`` ` ``). You might have noticed, however, that the text included in between backticks is rendered differently than standard text (on this site these are items highlighted in red). To get around this problem, we could create a new CSS entry that would apply standard styling to all inline verbatim text that includes MathJax code. Below I will show the HTML and CSS source that would accomplish this (note this solution was adapted from [this blog post](http://doswa.com/2011/07/20/mathjax-in-markdown.html)---all credit goes to the original author).
{{< code file="mathjax-markdown-solution.html" >}}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [['$$','$$'], ['\[','\]']],
processEscapes: true,
processEnvironments: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
TeX: { equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js"] }
}
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Queue(function() {
// Fix <code> tags after MathJax finishes running. This is a
// hack to overcome a shortcoming of Markdown. Discussion at
// https://github.com/mojombo/jekyll/issues/199
var all = MathJax.Hub.getAllJax(), i;
for(i = 0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
{{< /code >}}
As before, this content should be included in the HTML source of each page that will be using MathJax. The next code snippet contains the CSS that is used to have verbatim MathJax blocks render with the same font style as the body of the page.
{{< code file="mathjax-style.css" >}}
code.has-jax {
font: inherit;
font-size: 100%;
background: inherit;
border: inherit;
color: #515151;
}
{{< /code >}}
In the CSS snippet, notice the line `color: #515151;`. `#515151` is the value assigned to the `color` attribute of the `body` class in my CSS. In order for the equations to fit in with the body of a web page, this value should be the same as the color of the body.
### Usage
With this setup, everything is in place for a natural usage of MathJax on pages generated using Hugo. In order to include inline mathematics, just put LaTeX code in between `` `$ TeX Code $` `` or `` `\( TeX Code \)` ``. To include display style mathematics, just put LaTeX code in between `<div>$$TeX Code$$</div>`. All the math will be properly typeset and displayed within your Hugo generated web page!
## Additional Formats Through External Helpers
Hugo has new concept called _external helpers_. It means that you can write your content using [Asciidoc][ascii], [reStructuredText][rest]. If you have files with associated extensions, Hugo will call external commands to generate the content. ([See the Hugo source code for external helpers][helperssource].)
For example, for Asciidoc files, Hugo will try to call the `asciidoctor` or `asciidoc` command. This means that you will have to install the associated tool on your machine to be able to use these formats. ([See the Asciidoctor docs for installation instructions](http://asciidoctor.org/docs/install-toolchain/)).
To use these formats, just use the standard extension and the front matter exactly as you would do with natively supported `.md` files.
{{% warning "Performance of External Helpers" %}}
Because additional formats are external commands generation performance will rely heavily on the performance of the external tool you are using. As this feature is still in its infancy, feedback is welcome.
{{% /warning %}}
## Learn Markdown
Markdown syntax is simple enough to learn in a single sitting. The following are excellent resources to get you up and running:
* [Daring Fireball: Markdown, John Gruber (Creator of Markdown)][fireball]
* [Markdown Cheatsheet, Adam Pritchard][mdcheatsheet]
* [Markdown Tutorial (Interactive), Garen Torikian][mdtutorial]
[`emojify` function]: /functions/emojify/
[ascii]: http://asciidoc.org/
[bfconfig]: /getting-started/configuration/#configuring-blackfriday-rendering
[blackfriday]: https://github.com/russross/blackfriday
[mmark]: https://github.com/miekg/mmark
[config]: /getting-started/configuration/
[developer tools]: /tools/
[emojis]: https://www.webpagefx.com/tools/emoji-cheat-sheet/
[fireball]: https://daringfireball.net/projects/markdown/
[gfmtasks]: https://guides.github.com/features/mastering-markdown/#syntax
[helperssource]: https://github.com/gohugoio/hugo/blob/77c60a3440806067109347d04eb5368b65ea0fe8/helpers/general.go#L65
[hl]: /tools/syntax-highlighting/
[hlsc]: /content-management/shortcodes/#highlight
[hugocss]: /css/style.css
[ietf]: https://tools.ietf.org/html/
[mathjaxdocs]: https://docs.mathjax.org/en/latest/
[mdcheatsheet]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
[mdtutorial]: http://www.markdowntutorial.com/
[Miek Gieben's website]: https://miek.nl/2016/March/05/mmark-syntax-document/
[mmark]: https://github.com/miekg/mmark
[mmarkgh]: https://github.com/miekg/mmark/wiki/Syntax
[org]: http://orgmode.org/
[Pygments]: http://pygments.org/
[rest]: http://docutils.sourceforge.net/rst.html
[sc]: /content-management/shortcodes/
[sct]: /templates/shortcode-templates/
@@ -0,0 +1,198 @@
---
title: Front Matter
linktitle:
description: Hugo allows you to add front matter in yaml, toml, or json to your content files.
date: 2017-01-09
publishdate: 2017-01-09
lastmod: 2017-02-24
categories: [content management]
#tags: ["front matter", "yaml", "toml", "json", "metadata", "archetypes"]
menu:
docs:
parent: "content-management"
weight: 30
weight: 30 #rem
draft: false
aliases: [/content/front-matter/]
toc: true
---
**Front matter** allows you to keep metadata attached to an instance of a [content type][]---i.e., embedded inside a content file---and is one of the many features that gives Hugo its strength.
## Front Matter Formats
Hugo supports three formats for front matter, each with their own identifying tokens.
TOML
: identified by opening and closing `+++`.
YAML
: identified by opening and closing `---`.
JSON
: a single JSON object surrounded by '`{`' and '`}`', followed by a new line.
### TOML 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" ]
date = "2012-04-06"
categories = [
"Development",
"VIM"
]
slug = "spf13-vim-3-0-release-and-new-website"
+++
```
### YAML 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" ]
lastmod: 2015-12-23
date: "2012-04-06"
categories:
- "Development"
- "VIM"
slug: "spf13-vim-3-0-release-and-new-website"
---
```
### JSON 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" ],
"date": "2012-04-06",
"categories": [
"Development",
"VIM"
],
"slug": "spf13-vim-3-0-release-and-new-website"
}
```
## Front Matter Variables
### Predefined
There are a few predefined variables that Hugo is aware of. See [Page Variables][pagevars] for how to call many of these predefined variables in your templates.
`aliases`
: an array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details.
`date`
: the datetime at which the content was created; note this value is auto-populated according to Hugo's built-in [archetype][].
`description`
: the description for the content.
`draft`
: if `true`, the content will not be rendered unless the `--buildDrafts` flag is passed to the `hugo` command.
`expiryDate`
: the datetime at which the content should no longer be published by Hugo; expired content will not be rendered unless the `--buildExpired` flag is passed to the `hugo` command.
`isCJKLanguage`
: if `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages.
`keywords`
: the meta keywords for the content.
`layout`
: the layout Hugo should select from the [lookup order][lookup] when rendering the content. If a `type` is not specified in the front matter, Hugo will look for the layout of the same name in the layout directory that corresponds with a content's section. See ["Defining a Content Type"][definetype]
`lastmod`
: the datetime at which the content was last modified.
`linkTitle`
: used for creating links to content; if set, Hugo defaults to using the `linktitle` before the `title`. Hugo can also [order lists of content by `linktitle`][bylinktitle].
`markup`
: **experimental**; specify `"rst"` for reStructuredText (requires`rst2html`) or `"md"` (default) for Markdown.
`outputs`
: allows you to specify output formats specific to the content. See [output formats][outputs].
`publishDate`
: if in the future, content will not be rendered unless the `--buildFuture` flag is passed to `hugo`.
`slug`
: appears as the tail of the output URL. A value specified in front matter will override the segment of the URL based on the filename.
`taxonomies`
: these will use the field name of the plural form of the index; see the `tags` and `categories` in the above front matter examples.
`title`
: the title for the content.
`type`
: the type of the content; this value will be automatically derived from the directory (i.e., the [section][]) if not specified in front matter.
`url`
: the full path to the content from the web root. It makes no assumptions about the path of the content file. It also ignores any language prefixes of
the multilingual feature.
`weight`
: used for [ordering your content in lists][ordering].
{{% note "Hugo's Default URL Destinations" %}}
If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site `config` file](/content-management/urls/#permalinks), Hugo will use the filename of your content to create the output URL. See [Content Organization](/content-management/organization) for an explanation of paths in Hugo and [URL Management](/content-management/urls/) for ways to customize Hugo's default behaviors.
{{% /note %}}
### User-Defined
You can add fields to your front matter arbitrarily to meet your needs. These user-defined key-values are placed into a single `.Params` variable for use in your templates.
The following fields can be accessed via `.Params.include_toc` and `.Params.show_comments`, respectively. The [Variables][] section provides more information on using Hugo's page- and site-level variables in your templates.
```
include_toc: true
show_comments: false
```
These two user-defined fields can then be accessed via `.Params.include_toc` and `.Params.show_comments`, respectively. The [Variables][variables] section provides more information on using Hugo's page- and site-level variables in your templates.
## Order Content Through Front Matter
You can assign content-specific `weight` in the front matter of your content. These values are especially useful for [ordering][ordering] in list views. You can use `weight` for ordering of content and the convention of [`<TAXONOMY>_weight`][taxweight] for ordering content within a taxonomy. See [Ordering and Grouping Hugo Lists][lists] to see how `weight` can be used to organize your content in list views.
## Override Global Markdown Configuration
It's possible to set some options for Markdown rendering in a content's front matter as an override to the [BlackFriday rendering options set in your project configuration][config].
## Front Matter Format Specs
* [TOML Spec][toml]
* [YAML Spec][yaml]
* [JSON Spec][json]
[variables]: /variables/
[aliases]: /content-management/urls/#aliases/
[archetype]: /content-management/archetypes/
[bylinktitle]: /templates/lists/#by-link-title
[config]: /getting-started/configuration/ "Hugo documentation for site configuration"
[content type]: /content-management/types/
[contentorg]: /content-management/organization/
[definetype]: /content-management/types/#defining-a-content-type "Learn how to specify a type and a layout in a content's front matter"
[json]: /documents/ecma-404-json-spec.pdf "Specification for JSON, JavaScript Object Notation"
[lists]: /templates/lists/#ordering-content "See how to order content in list pages; for example, templates that look to specific _index.md for content and front matter."
[lookup]: /templates/lookup-order/ "Hugo traverses your templates in a specific order when rendering content to allow for DRYer templating."
[ordering]: /templates/lists/ "Hugo provides multiple ways to sort and order your content in list templates"
[outputs]: /templates/output-formats/ "With the release of v22, you can output your content to any text format using Hugo's familiar templating"
[pagevars]: /variables/page/
[section]: /content-management/sections/
[taxweight]: /content-management/taxonomies/
[toml]: https://github.com/toml-lang/toml "Specification for TOML, Tom's Obvious Minimal Language"
[urls]: /content-management/urls/
[variables]: /variables/
[yaml]: http://yaml.org/spec/ "Specification for YAML, YAML Ain't Markup Language"
+179
View File
@@ -0,0 +1,179 @@
---
title: Menus
linktitle: Menus
description: Hugo has a simple yet powerful menu system.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-03-31
categories: [content management]
#tags: [menus]
draft: false
menu:
docs:
parent: "content-management"
weight: 120
weight: 120 #rem
aliases: [/extras/menus/]
toc: true
---
{{% note "Lazy Blogger"%}}
If all you want is a simple menu for your sections, see the ["Section Menu for Lazy Bloggers" in Menu Templates](/templates/menu-templates/#section-menu-for-lazy-blogger).
{{% /note %}}
You can do this:
* Place content in one or many menus
* Handle nested menus with unlimited depth
* Create menu entries without being attached to any content
* Distinguish active element (and active branch)
## What is a Menu in Hugo?
A **menu** is a named array of menu entries accessible by name via the [`.Site.Menus` site variable][sitevars]. For example, you can access your site's `main` menu via `.Site.Menus.main`.
{{% note "Menus on Multilingual Sites" %}}
If you make use of the [multilingual feature](/content-management/multilingual/), you can define language-independent menus.
{{% /note %}}
A menu entry has the following properties (i.e., variables) available to it:
`.URL`
: string
`.Name`
: string
`.Menu`
: string
`.Identifier`
: string
`.Pre`
: template.HTML
`.Post`
: template.HTML
`.Weight`
: int
`.Parent`
: string
`.Children`
: Menu
Note that menus also have the following functions available as well:
`.HasChildren`
: boolean
Additionally, there are some relevant functions available to menus on a page:
`.IsMenuCurrent`
: (menu string, menuEntry *MenuEntry ) boolean
`.HasMenuCurrent`
: (menu string, menuEntry *MenuEntry) boolean
## Add content to menus
Hugo allows you to add content to a menu via the content's [front matter](/content-management/front-matter/).
### Simple
If all you need to do is add an entry to a menu, the simple form works well.
#### A Single Menu
```
---
menu: "main"
---
```
#### Multiple Menus
```
---
menu: ["main", "footer"]
---
```
#### Advanced
```
---
menu:
docs:
parent: 'extras'
weight: 20
---
```
## Add Non-content Entries to a Menu
You can also add entries to menus that arent attached to a piece of content. This takes place in your Hugo project's [`config` file][config].
Heres an example snippet pulled from a `config.toml`:
{{< code file="config.toml" >}}
[[menu.main]]
name = "about hugo"
pre = "<i class='fa fa-heart'></i>"
weight = -110
identifier = "about"
url = "/about/"
[[menu.main]]
name = "getting started"
pre = "<i class='fa fa-road'></i>"
weight = -100
url = "/getting-started/"
{{< /code >}}
Here's the equivalent snippet in a `config.yaml`:
{{< code file="config.yml" >}}
---
menu:
docs:
- Name: "about hugo"
Pre: "<i class='fa fa-heart'></i>"
Weight: -110
Identifier: "about"
URL: "/about/"
- Name: "getting started"
Pre: "<i class='fa fa-road'></i>"
Weight: -100
URL: "/getting-started/"
---
{{< /code >}}
{{% note %}}
The URLs must be relative to the context root. If the `baseURL` is `https://example.com/mysite/`, then the URLs in the menu must not include the context root `mysite`. Using an absolute URL will overide the baseURL. If the value used for `URL` in the above example is `https://subdomain.example.com/`, the output will be `https://subdomain.example.com`.
{{% /note %}}
## Nesting
All nesting of content is done via the `parent` field.
The parent of an entry should be the identifier of another entry. The identifier should be unique (within a menu).
The following order is used to determine an Identifier:
`.Name > .LinkTitle > .Title`
This means that `.Title` will be used unless `.LinkTitle` is present, etc. In practice, `.Name` and `.Identifier` are only used to structure relationships and therefore never displayed.
In this example, the top level of the menu is defined in your [site `config` file][config]). All content entries are attached to one of these entries via the `.Parent` field.
## Render Menus
See [Menu Templates](/templates/menu-templates/) for information on how to render your site menus within your templates.
[config]: /getting-started/configuration/
[multilingual]: /content-management/multilingual/
[sitevars]: /variables/
@@ -0,0 +1,294 @@
---
title: Multilingual Mode
linktitle: Multilingual and i18n
description: Hugo supports the creation of websites with multiple languages side by side.
date: 2017-01-10
publishdate: 2017-01-10
lastmod: 2017-01-10
categories: [content management]
#tags: [multilingual,i18n, internationalization]
menu:
docs:
parent: "content-management"
weight: 150
weight: 150 #rem
draft: false
aliases: [/content/multilingual/,/content-management/multilingual/]
toc: true
---
You should define the available languages in a `Languages` section in your site configuration.
## Configure Languages
The following is an example of a TOML site configuration for a multilingual Hugo project:
{{< code file="config.toml" download="config.toml" >}}
DefaultContentLanguage = "en"
copyright = "Everything is mine"
[params.navigation]
help = "Help"
[Languages]
[Languages.en]
title = "My blog"
weight = 1
[Languages.en.params]
linkedin = "english-link"
[Languages.fr]
copyright = "Tout est à moi"
title = "Mon blog"
weight = 2
[Languages.fr.params]
linkedin = "lien-francais"
[Languages.fr.navigation]
help = "Aide"
{{< /code >}}
Anything not defined in a `[Languages]` block will fall back to the global
value for that key (e.g., `copyright` for the English [`en`] language).
With the configuration above, all content, sitemap, RSS feeds, paginations,
and taxonomy pages will be rendered below `/` in English (your default content language) and then below `/fr` in French.
When working with front matter `Params` in [single page templates][singles], omit the `params` in the key for the translation.
If you want all of the languages to be put below their respective language code, enable `defaultContentLanguageInSubdir: true`.
Only the obvious non-global options can be overridden per language. Examples of global options are `baseURL`, `buildDrafts`, etc.
## Taxonomies and Blackfriday
Taxonomies and [Blackfriday configuration][config] can also be set per language:
{{< code file="bf-config.toml" >}}
[Taxonomies]
tag = "tags"
[blackfriday]
angledQuotes = true
hrefTargetBlank = true
[Languages]
[Languages.en]
weight = 1
title = "English"
[Languages.en.blackfriday]
angledQuotes = false
[Languages.fr]
weight = 2
title = "Français"
[Languages.fr.Taxonomies]
plaque = "plaques"
{{< /code >}}
## Translate Your Content
Translated articles are identified by the name of the content file.
### Examples of Translated Articles
1. `/content/about.en.md`
2. `/content/about.fr.md`
In this example, the `about.md` will be assigned the configured `defaultContentLanguage`.
1. `/content/about.md`
2. `/content/about.fr.md`
This way, you can slowly start to translate your current content without having to rename everything. If left unspecified, the default value for `defaultContentLanguage` is `en`.
By having the same *base filename*, the content pieces are linked together as translated pieces.
If you need distinct URLs per language, you can set the slug in the non-default language file. For example, you can define a custom slug for a French translation in the front matter of `content/about.fr.md` as follows:
```
slug: "a-propos"
```
At render, Hugo will build both `/about/` and `/a-propos/` as properly linked translated pages.
{{%note %}}
Hugo currently uses the base filename as the translation key, which can be an issue with identical filenames in different sections.
We will fix this in https://github.com/gohugoio/hugo/issues/2699
{{% /note %}}
{{< todo >}}Rewrite/remove the above one issue is fixed.{{< /todo >}}
## Link to Translated Content
To create a list of links to translated content, use a template similar to the following:
{{< code file="layouts/partials/i18nlist.html" >}}
{{ if .IsTranslated }}
<h4>{{ i18n "translations" }}</h4>
<ul>
{{ range .Translations }}
<li>
<a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
</li>
{{ end}}
</ul>
{{ end }}
{{< /code >}}
The above can be put in a `partial` (i.e., inside `layouts/partials/`) and included in any template, be it for a [single content page][contenttemplate] or the [homepage][]. It will not print anything if there are no translations for a given page, or if there are translations---in the case of the homepage, section listing, etc.---a site with only render one language.
The above also uses the [`i18n` function][i18func] described in the next section.
## Translation of Strings
Hugo uses [go-i18n][] to support string translations. [See the project's source repository][go-i18n-source] to find tools that will help you manage your translation workflows.
Translations are collected from the `themes/<THEME>/i18n/` folder (built into the theme), as well as translations present in `i18n/` at the root of your project. In the `i18n`, the translations will be merged and take precedence over what is in the theme folder. Language files should be named according to [RFC 5646][] with names such as `en-US.toml`, `fr.toml`, etc.
From within your templates, use the `i18n` function like this:
```
{{ i18n "home" }}
```
This uses a definition like this one in `i18n/en-US.toml`:
```
[home]
other = "Home"
```
Often you will want to use to the page variables in the translations strings. To do that, pass on the "." context when calling `i18n`:
```
{{ i18n "wordCount" . }}
```
This uses a definition like this one in `i18n/en-US.toml`:
```
[wordCount]
other = "This article has {{ .WordCount }} words."
```
An example of singular and plural form:
```
[readingTime]
one = "One minute read"
other = "{{.Count}} minutes read"
```
And then in the template:
```
{{ i18n "readingTime" .ReadingTime }}
```
To track down missing translation strings, run Hugo with the `--i18n-warnings` flag:
```
hugo --i18n-warnings | grep i18n
i18n|MISSING_TRANSLATION|en|wordCount
```
## Customize Dates
At the time of this writing, Golang does not yet have support for internationalized locales, but if you do some work, you can simulate it. For example, if you want to use French month names, you can add a data file like ``data/mois.yaml`` with this content:
~~~yaml
1: "janvier"
2: "février"
3: "mars"
4: "avril"
5: "mai"
6: "juin"
7: "juillet"
8: "août"
9: "septembre"
10: "octobre"
11: "novembre"
12: "décembre"
~~~
... then index the non-English date names in your templates like so:
~~~html
<time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
Article publié le {{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }} (dernière modification le {{ .Lastmod.Day }} {{ index $.Site.Data.mois (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Year }})
</time>
~~~
This technique extracts the day, month and year by specifying ``.Date.Day``, ``.Date.Month``, and ``.Date.Year``, and uses the month number as a key, when indexing the month name data file.
## Menus
You can define your menus for each language independently. The [creation of a menu][menus] works analogous to earlier versions of Hugo, except that they have to be defined in their language-specific block in the configuration file:
```
defaultContentLanguage = "en"
[languages.en]
weight = 0
languageName = "English"
[[languages.en.menu.main]]
url = "/"
name = "Home"
weight = 0
[languages.de]
weight = 10
languageName = "Deutsch"
[[languages.de.menu.main]]
url = "/"
name = "Startseite"
weight = 0
```
The rendering of the main navigation works as usual. `.Site.Menus` will just contain the menu of the current language. Pay attention to the generation of the menu links. `absLangURL` takes care that you link to the correct locale of your website. Otherwise, both menu entries would link to the English version as the default content language that resides in the root directory.
```
<ul>
{{- $currentPage := . -}}
{{ range .Site.Menus.main -}}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
<a href="{{ .URL | absLangURL }}">{{ .Name }}</a>
</li>
{{- end }}
</ul>
```
## Missing translations
If a string does not have a translation for the current language, Hugo will use the value from the default language. If no default value is set, an empty string will be shown.
While translating a Hugo website, it can be handy to have a visual indicator of missing translations. The [`enableMissingTranslationPlaceholders` configuration option][config] will flag all untranslated strings with the placeholder `[i18n] identifier`, where `identifier` is the id of the missing translation.
{{% note %}}
Hugo will generate your website with these missing translation placeholders. It might not be suited for production environments.
{{% /note %}}
## Multilingual Themes support
To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there is more than one language, URLs must meet the following criteria:
* Come from the built-in `.Permalink` or `.URL`
* Be constructed with
* The [`relLangURL` template function][rellangurl] or the [`absLangURL` template function][abslangurl] **OR**
* Prefixed with `{{ .LanguagePrefix }}`
If there is more than one language defined, the `LanguagePrefix` variable will equal `/en` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string and is therefore harmless for single-language Hugo websites.
[abslangurl]: /functions/abslangurl
[config]: /getting-started/configuration/
[contenttemplate]: /templates/single-page-templates/
[go-i18n-source]: https://github.com/nicksnyder/go-i18n
[go-i18n]: https://github.com/nicksnyder/go-i18n
[homepage]: /templates/homepage/
[i18func]: /functions/i18n/
[menus]: /content-management/menus/
[rellangurl]: /functions/rellangurl
[RFC 5646]: https://tools.ietf.org/html/rfc5646
[singles]: /templates/single-page-templates/
@@ -0,0 +1,241 @@
---
title: Content Organization
linktitle: Organization
description: Hugo assumes that the same structure that works to organize your source content is used to organize the rendered site.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [content management,fundamentals]
#tags: [sections,content,organization]
menu:
docs:
parent: "content-management"
weight: 10
weight: 10 #rem
draft: false
aliases: [/content/sections/]
toc: true
---
{{% note %}}
This section is not updated with the new nested sections support in Hugo 0.24, see https://github.com/gohugoio/hugoDocs/issues/36
{{% /note %}}
{{% todo %}}
See above
{{% /todo %}}
## Organization of Content Source
In Hugo, your content should be organized in a manner that reflects the rendered website.
While Hugo supports content nested at any level, the top levels (i.e. `content/<DIRECTORIES>`) are special in Hugo and are considered the content [sections][]. Without any additional configuration, the following will just work:
```
.
└── content
└── about
| └── _index.md // <- https://example.com/about/
├── post
| ├── firstpost.md // <- https://example.com/post/firstpost/
| ├── happy
| | └── ness.md // <- https://example.com/post/happy/ness/
| └── secondpost.md // <- https://example.com/post/secondpost/
└── quote
├── first.md // <- https://example.com/quote/first/
└── second.md // <- https://example.com/quote/second/
```
## Path Breakdown in Hugo
The following demonstrates the relationships between your content organization and the output URL structure for your Hugo website when it renders. These examples assume you are [using pretty URLs][pretty], which is the default behavior for Hugo. The examples also assume a key-value of `baseurl = "https://example.com"` in your [site's configuration file][config].
### Index Pages: `_index.md`
`_index.md` has a special role in Hugo. It allows you to add front matter and content to your [list templates][lists] as of v0.18. These templates include those for [section templates][], [taxonomy templates][], [taxonomy terms templates][], and your [homepage template][]. In your templates, you can grab information from `_index.md` using the [`.Site.GetPage` function][getpage].
You can keep one `_index.md` for your homepage and one in each of your content sections, taxonomies, and taxonomy terms. The following shows typical placement of an `_index.md` that would contain content and front matter for a `posts` section list page on a Hugo website:
```
. url
. ⊢--^-⊣
. path slug
. ⊢--^-⊣⊢---^---⊣
. filepath
. ⊢------^------⊣
content/posts/_index.md
```
At build, this will output to the following destination with the associated values:
```
url ("/posts/")
⊢-^-⊣
baseurl section ("posts")
⊢--------^---------⊣⊢-^-⊣
permalink
⊢----------^-------------⊣
https://example.com/posts/index.html
```
### Single Pages in Sections
Single content files in each of your sections are going to be rendered as [single page templates][singles]. Here is an example of a single `post` within `posts`:
```
path ("posts/my-first-hugo-post.md")
. ⊢-----------^------------⊣
. section slug
. ⊢-^-⊣⊢--------^----------⊣
content/posts/my-first-hugo-post.md
```
At the time Hugo builds your site, the content will be output to the following destination:
```
url ("/posts/my-first-hugo-post/")
⊢------------^----------⊣
baseurl section slug
⊢--------^--------⊣⊢-^--⊣⊢-------^---------⊣
permalink
⊢--------------------^---------------------⊣
https://example.com/posts/my-first-hugo-post/index.html
```
### Section with Nested Directories
To continue the example, the following demonstrates destination paths for a file located at `content/events/chicago/lollapalooza.md` in the same site:
```
section
⊢--^--⊣
url
⊢-------------^------------⊣
baseURL path slug
⊢--------^--------⊣ ⊢------^-----⊣⊢----^------⊣
permalink
⊢----------------------^-----------------------⊣
https://example.com/events/chicago/lollapalooza/
```
{{% note %}}
As of v0.20, Hugo does not recognize nested sections. While you can nest as many content *directories* as you'd like, any child directory of a section will still be considered the same section as that of its parents. Therefore, in the above example, `{{.Section}}` for `lollapalooza.md` is `events` and *not* `chicago`. See the [related issue on GitHub](https://github.com/gohugoio/hugo/issues/465).
{{% /note %}}
## Paths Explained
The following concepts will provide more insight into the relationship between your project's organization and the default behaviors of Hugo when building the output website.
### `section`
A default content type is determined by a piece of content's section. `section` is determined by the location within the project's `content` directory. `section` *cannot* be specified or overridden in front matter.
### `slug`
A content's `slug` is either `name.extension` or `name/`. The value for `slug` is determined by
* the name of the content file (e.g., `lollapalooza.md`) OR
* front matter overrides
### `path`
A content's `path` is determined by the section's path to the file. The file `path`
* is based on the path to the content's location AND
* does not include the slug
### `url`
The `url` is the relative URL for the piece of content. The `url`
* is based on the content's location within the directory structure OR
* is defined in front matter and *overrides all the above*
## Override Destination Paths via Front Matter
Hugo believes that you organize your content with a purpose. The same structure that works to organize your source content is used to organize the rendered site. As displayed above, the organization of the source content will be mirrored in the destination.
There are times where you may need more control over your content. In these cases, there are fields that can be specified in the front matter to determine the destination of a specific piece of content.
The following items are defined in this order for a specific reason: items explained further down in the list will override earlier items, and not all of these items can be defined in front matter:
### `filename`
This isn't in the front matter, but is the actual name of the file minus the extension. This will be the name of the file in the destination (e.g., `content/posts/my-post.md` becomes `example.com/posts/my-post/`).
### `slug`
When defined in the front matter, the `slug` can take the place of the filename for the destination.
{{< code file="content/posts/old-post.md" >}}
---
title: New Post
slug: "new-post"
---
{{< /code >}}
This will render to the following destination according to Hugo's default behavior:
```
example.com/posts/new-post/
```
### `section`
`section` is determined by a content's location on disk and *cannot* be specified in the front matter. See [sections][] for more information.
### `type`
A content's `type` is also determined by its location on disk but, unlike `section`, it *can* be specified in the front matter. See [types][]. This can come in especially handy when you want a piece of content to render using a different layout. In the following example, you can create a layout at `layouts/new/mylayout.html` that Hugo will use to render this piece of content, even in the midst of many other posts.
{{< code file="content/posts/my-post.md" >}}
---
title: My Post
type: new
layout: mylayout
---
{{< /code >}}
<!-- See https://discourse.gohugo.io/t/path-not-works/6387 -->
<!-- ### `path`-->
<!--`path` can be provided in the front matter. This will replace the actual path to the file on disk. Destination will create the destination with the same path, including the section. -->
### `url`
A complete URL can be provided. This will override all the above as it pertains to the end destination. This must be the path from the baseURL (starting with a `/`). `url` will be used exactly as it provided in the front matter and will ignore the `--uglyURLs` setting in your site configuration:
{{< code file="content/posts/old-url.md" >}}
---
title: Old URL
url: /blog/new-url/
---
{{< /code >}}
Assuming your `baseURL` is [configured][config] to `https://example.com`, the addition of `url` to the front matter will make `old-url.md` render to the following destination:
```
https://example.com/blog/new-url/
```
You can see more information on how to control output paths in [URL Management][urls].
[config]: /getting-started/configuration/
[formats]: /content-management/formats/
[front matter]: /content-management/front-matter/
[getpage]: /functions/getpage/
[homepage template]: /templates/homepage/
[homepage]: /templates/homepage/
[lists]: /templates/lists/
[pretty]: /content-management/urls/#pretty-urls
[section templates]: /templates/section-templates/
[sections]: /content-management/sections/
[singles]: /templates/single-page-templates/
[taxonomy templates]: /templates/taxonomy-templates/
[taxonomy terms templates]: /templates/taxonomy-templates/
[types]: /content-management/types/
[urls]: /content-management/urls/
@@ -0,0 +1,73 @@
---
title: Content Sections
linktitle: Sections
description: Hugo supports content sections, which according to Hugo's default behavior, will reflect the structure of the rendered website.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [content management]
#tags: [lists,sections,content types,organization]
menu:
docs:
parent: "content-management"
weight: 50
weight: 50 #rem
draft: false
aliases: [/content/sections/]
toc: true
---
{{% note %}}
This section is not updated with the new nested sections support in Hugo 0.24, see https://github.com/gohugoio/hugoDocs/issues/36
{{% /note %}}
{{% todo %}}
See above
{{% /todo %}}
Hugo believes that you organize your content with a purpose. The same structure that works to organize your source content is used to organize the rendered site (see [directory structure][]).
Following this pattern, Hugo uses the top level of your content organization as the content **section**.
The following example shows a content directory structure for a website that has three sections: "authors," "events," and "posts":
```
.
└── content
├── authors
| ├── _index.md // <- example.com/authors/
| ├── john-doe.md // <- example.com/authors/john-doe/
| └── jane-doe.md // <- example.com/authors/jane-doe/
└── events
| ├── _index.md // <- example.com/events/
| ├── event-1.md // <- example.com/events/event-1/
| ├── event-2.md // <- example.com/events/event-2/
| └── event-3.md // <- example.com/events/event-3/
└── posts
| ├── _index.md // <- example.com/posts/
| ├── event-1.md // <- example.com/posts/event-1/
| ├── event-2.md // <- example.com/posts/event-2/
| ├── event-3.md // <- example.com/posts/event-3/
| ├── event-4.md // <- example.com/posts/event-4/
| └── event-5.md // <- example.com/posts/event-5/
```
## Content Section Lists
Hugo will automatically create pages for each section root that list all of the content in that section. See the documentation on [section templates][] for details on customizing the way these pages are rendered.
As of Hugo v0.18, section pages can also have a content file and front matter. These section content files must be placed in their corresponding section folder and named `_index.md` in order for Hugo to correctly render the front matter and content.
{{% warning "`index.md` vs `_index.md`" %}}
Hugo themes developed before v0.18 often used an `index.md`(i.e., without the leading underscore [`_`]) in a content section as a hack to emulate the behavior of `_index.md`. The hack may work...*sometimes*; however, the order of page rendering can be unpredictable in Hugo. What works now may fail to render appropriately as your site grows. It is **strongly advised** to use `_index.md` as content for your section index pages. **Note:** `_index.md`'s layout, as representative of a section, is a [list page template](/templates/section-templates/) and *not* a [single page template](/templates/single-page-templates/). If you want to alter the new default behavior for `_index.md`, configure `disableKinds` accordingly in your [site's configuration](/getting-started/configuration/).
{{% /warning %}}
## Content *Section* vs Content *Type*
By default, everything created within a section will use the [content type][] that matches the section name. For example, Hugo will assume that `posts/post-1.md` has a `posts` content type. If you are using an [archetype][] for your posts section, Hugo will generate front matter according to what it finds in `archetypes/posts.md`.
[archetype]: /content-management/archetypes/
[content type]: /content-management/types/
[directory structure]: /getting-started/directory-structure/
[section templates]: /templates/section-templates/
@@ -0,0 +1,395 @@
---
title: Shortcodes
linktitle:
description: Shortcodes are simple snippets inside your content files calling built-in or custom templates.
godocref:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-03-31
menu:
docs:
parent: "content-management"
weight: 35
weight: 35 #rem
categories: [content management]
#tags: [markdown,content,shortcodes]
draft: false
aliases: [/extras/shortcodes/]
toc: true
---
## What a Shortcode is
Hugo loves Markdown because of its simple content format, but there are times when Markdown falls short. Often, content authors are forced to add raw HTML (e.g., video `<iframes>`) to Markdown content. We think this contradicts the beautiful simplicity of Markdown's syntax.
Hugo created **shortcodes** to circumvent these limitations.
A shortcode is a simple snippet inside a content file that Hugo will render using a predefined template. Note that shortcodes will not work in template files. If you need the type of drop-in functionality that shortcodes provide but in a template, you most likely want a [partial template][partials] instead.
In addition to cleaner Markdown, shortcodes can be updated any time to reflect new classes, techniques, or standards. At the point of site generation, Hugo shortcodes will easily merge in your changes. You avoid a possibly complicated search and replace operation.
## Use Shortcodes
In your content files, a shortcode can be called by calling `{{%/* shortcodename parameters */%}}`. Shortcode parameters are space delimited, and parameters with internal spaces can be quoted.
The first word in the shortcode declaration is always the name of the shortcode. Parameters follow the name. Depending upon how the shortcode is defined, the parameters may be named, positional, or both, although you can't mix parameter types in a single call. The format for named parameters models that of HTML with the format `name="value"`.
Some shortcodes use or require closing shortcodes. Again like HTML, the opening and closing shortcodes match (name only) with the closing declaration, which is prepended with a slash.
Here are two examples of paired shortcodes:
```
{{%/* mdshortcode */%}}Stuff to `process` in the *center*.{{%/* /mdshortcode */%}}
```
```
{{</* highlight go */>}} A bunch of code here {{</* /highlight */>}}
```
The examples above use two different delimiters, the difference being the `%` character in the first and the `<>` characters in the second.
### Shortcodes with Markdown
The `%` character indicates that the shortcode's inner content---called in the [shortcode template][sctemps] with the [`.Inner` variable][scvars]---needs further processing by the page's rendering processor (i.e. markdown via Blackfriday). In the following example, Blackfriday would convert `**World**` to `<strong>World</strong>`:
```
{{%/* myshortcode */%}}Hello **World!**{{%/* /myshortcode */%}}
```
### Shortcodes Without Markdown
The `<` character indicates that the shortcode's inner content does *not* need further rendering. Often shortcodes without markdown include internal HTML:
```
{{</* myshortcode */>}}<p>Hello <strong>World!</strong></p>{{</* /myshortcode */>}}
```
### Nested Shortcodes
You can call shortcodes within other shortcodes by creating your own templates that leverage the `.Parent` variable. `.Parent` allows you to check the context in which the shortcode is being called. See [Shortcode templates][sctemps].
## Use Hugo's Built-in Shortcodes
Hugo ships with a set of predefined shortcodes that represent very common usage. These shortcodes are provided for author convenience and to keep your markdown content clean.
### `figure`
`figure` is an extension of the image syntax in markdown, which does not provide a shorthand for the more semantic [HTML5 `<figure>` element][figureelement].
The `figure` shortcode can use the following named parameters:
* `src`
* `link`
* `title`
* `caption`
* `class`
* `attr` (i.e., attribution)
* `attrlink`
* `alt`
#### Example `figure` Input
{{< code file="figure-input-example.md" >}}
{{</* figure src="/media/spf13.jpg" title="Steve Francia" */>}}
{{< /code >}}
#### Example `figure` Output
{{< output file="figure-output-example.html" >}}
<figure>
<img src="/media/spf13.jpg" />
<figcaption>
<h4>Steve Francia</h4>
</figcaption>
</figure>
{{< /output >}}
### `gist`
Bloggers often want to include GitHub gists when writing posts. Let's suppose we want to use the [gist at the following url][examplegist]:
```
https://gist.github.com/spf13/7896402
```
We can embed the gist in our content via username and gist ID pulled from the URL:
```
{{</* gist spf13 7896402 */>}}
```
#### Example `gist` Input
If the gist contains several files and you want to quote just one of them, you can pass the filename (quoted) as an optional third argument:
{{< code file="gist-input.md" >}}
{{</* gist spf13 7896402 "img.html" */>}}
{{< /code >}}
#### Example `gist` Output
{{< output file="gist-output.html" >}}
{{< gist spf13 7896402 >}}
{{< /output >}}
#### Example `gist` Display
To demonstrate the remarkably efficiency of Hugo's shortcode feature, we have embedded the `spf13` `gist` example in this page. The following simulates the experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup.
{{< gist spf13 7896402 >}}
### `highlight`
This shortcode will convert the source code provided into syntax-highlighted HTML. Read more on [highlighting](/tools/syntax-highlighting/). `highlight` takes exactly one required `language` parameter and requires a closing shortcode.
#### Example `highlight` Input
{{< code file="content/tutorials/learn-html.md" >}}
{{</* highlight html */>}}
<section id="main">
<div>
<h1 id="title">{{ .Title }}</h1>
{{ range .Data.Pages }}
{{ .Render "summary"}}
{{ end }}
</div>
</section>
{{</* /highlight */>}}
{{< /code >}}
#### Example `highlight` Output
The `highlight` shortcode example above would produce the following HTML when the site is rendered:
{{< output file="tutorials/learn-html/index.html" >}}
<span style="color: #f92672">&lt;section</span> <span style="color: #a6e22e">id=</span><span style="color: #e6db74">&quot;main&quot;</span><span style="color: #f92672">&gt;</span>
<span style="color: #f92672">&lt;div&gt;</span>
<span style="color: #f92672">&lt;h1</span> <span style="color: #a6e22e">id=</span><span style="color: #e6db74">&quot;title&quot;</span><span style="color: #f92672">&gt;</span>{{ .Title }}<span style="color: #f92672">&lt;/h1&gt;</span>
{{ range .Data.Pages }}
{{ .Render &quot;summary&quot;}}
{{ end }}
<span style="color: #f92672">&lt;/div&gt;</span>
<span style="color: #f92672">&lt;/section&gt;</span>
{{< /output >}}
{{% note "More on Syntax Highlighting" %}}
To see even more options for adding syntax-highlighted code blocks to your website, see [Syntax Highlighting in Developer Tools](/tools/syntax-highlighting/).
{{% /note %}}
### `instagram`
If you'd like to embed a photo from [Instagram][], you only need the photo's ID. You can discern an Instagram photo ID from the URL:
```
https://www.instagram.com/p/BWNjjyYFxVx/
```
#### Example `instagram` Input
{{< code file="instagram-input.md" >}}
{{</* instagram BWNjjyYFxVx */>}}
{{< /code >}}
You also have the option to hide the caption:
{{< code file="instagram-input-hide-caption.md" >}}
{{</* instagram BWNjjyYFxVx hidecaption */>}}
{{< /code >}}
#### Example `instagram` Output
By adding the preceding `hidecaption` example, the following HTML will be added to your rendered website's markup:
{{< output file="instagram-hide-caption-output.html" >}}
{{< instagram BWNjjyYFxVx hidecaption >}}
{{< /output >}}
#### Example `instagram` Display
Using the preceding `instagram` with hidecaption` example above, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup.
{{< instagram BWNjjyYFxVx hidecaption >}}
### `ref` and `relref`
These shortcodes will look up the pages by their relative path (e.g., `blog/post.md`) or their logical name (`post.md`) and return the permalink (`ref`) or relative permalink (`relref`) for the found page.
`ref` and `relref` also make it possible to make fragmentary links that work for the header links generated by Hugo.
{{% note "More on Cross References" %}}
Read a more extensive description of `ref` and `relref` in the [cross references](/content-management/cross-references/) documentation.
{{% /note %}}
`ref` and `relref` take exactly one required parameter of _reference_, quoted and in position `0`.
#### Example `ref` and `relref` Input
```
[Neat]({{</* ref "blog/neat.md" */>}})
[Who]({{</* relref "about.md#who" */>}})
```
#### Example `ref` and `relref` Output
Assuming that standard Hugo pretty URLs are turned on.
```
<a href="/blog/neat">Neat</a>
<a href="/about/#who:c28654c202e73453784cfd2c5ab356c0">Who</a>
```
### `speakerdeck`
To embed slides from [Speaker Deck][], click on "&lt;&#8239;/&gt;&nbsp;Embed" (under Share right next to the template on Speaker Deck) and copy the URL:
```
<script async class="speakerdeck-embed" data-id="4e8126e72d853c0060001f97" data-ratio="1.33333333333333" src="//speakerdeck.com/assets/embed.js"></script>
```
#### `speakerdeck` Example Input
Extract the value from the field `data-id` and pass it to the shortcode:
{{< code file="speakerdeck-example-input.md" >}}
{{</* speakerdeck 4e8126e72d853c0060001f97 */>}}
{{< /code >}}
#### `speakerdeck` Example Output
{{< output file="speakerdeck-example-input.md" >}}
{{< speakerdeck 4e8126e72d853c0060001f97 >}}
{{< /output >}}
#### `speakerdeck` Example Display
For the preceding `speakerdeck` example, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup.
{{< speakerdeck 4e8126e72d853c0060001f97 >}}
### `tweet`
You want to include a single tweet into your blog post? Everything you need is the URL of the tweet:
```
https://twitter.com/spf13/status/877500564405444608
```
#### Example `tweet` Input
Pass the tweet's ID from the URL as a parameter to the `tweet` shortcode:
{{< code file="example-tweet-input.md" >}}
{{</* tweet 877500564405444608 */>}}
{{< /code >}}
#### Example `tweet` Output
Using the preceding `tweet` example, the following HTML will be added to your rendered website's markup:
{{< output file="example-tweet-output.html" >}}
{{< tweet 877500564405444608 >}}
{{< /output >}}
#### Example `tweet` Display
Using the preceding `tweet` example, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup.
{{< tweet 877500564405444608 >}}
### `vimeo`
Adding a video from [Vimeo][] is equivalent to the YouTube shortcode above.
```
https://vimeo.com/channels/staffpicks/146022717
```
#### Example `vimeo` Input
Extract the ID from the video's URL and pass it to the `vimeo` shortcode:
{{< code file="example-vimeo-input.md" >}}
{{</* vimeo 146022717 */>}}
{{< /code >}}
#### Example `vimeo` Output
Using the preceding `vimeo` example, the following HTML will be added to your rendered website's markup:
{{< output file="example-vimeo-output.html" >}}
{{< vimeo 146022717 >}}
{{< /output >}}
{{% tip %}}
If you want to further customize the visual styling of the YouTube or Vimeo output, add a `class` named parameter when calling the shortcode. The new `class` will be added to the `<div>` that wraps the `<iframe>` *and* will remove the inline styles. Note that you will need to call the `id` as a named parameter as well.
```
{{</* vimeo id="146022717" class="my-vimeo-wrapper-class" */>}}
```
{{% /tip %}}
#### Example `vimeo` Display
Using the preceding `vimeo` example, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup.
{{< vimeo 146022717 >}}
### `youtube`
The `youtube` shortcode embeds a responsive video player for [YouTube videos][]. Only the ID of the video is required, e.g.:
```
https://www.youtube.com/watch?v=w7Ft2ymGmfc
```
#### Example `youtube` Input
Copy the YouTube video ID that follows `v=` in the video's URL and pass it to the `youtube` shortcode:
{{< code file="example-youtube-input.md" >}}
{{</* youtube w7Ft2ymGmfc */>}}
{{< /code >}}
Furthermore, you can automatically start playback of the embedded video by setting the `autoplay` parameter to `true`. Remember that you can't mix named an unnamed parameters, so you'll need to assign the yet unnamed video id to the parameter `id`:
{{< code file="example-youtube-input-with-autoplay.md" >}}
{{</* youtube id="w7Ft2ymGmfc" autoplay="true" */>}}
{{< /code >}}
#### Example `youtube` Output
Using the preceding `youtube` example, the following HTML will be added to your rendered website's markup:
{{< code file="example-youtube-output.html" >}}
{{< youtube id="w7Ft2ymGmfc" autoplay="true" >}}
{{< /code >}}
#### Example `youtube` Display
Using the preceding `youtube` example (without `autoplay="true"`), the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup. The video is also include in the [Quick Start of the Hugo documentation][quickstart].
{{< youtube w7Ft2ymGmfc >}}
## Create Custom Shortcodes
To learn more about creating custom shortcodes, see the [shortcode template documentation][].
[`figure` shortcode]: #figure
[contentmanagementsection]: /content-management/formats/
[examplegist]: https://gist.github.com/spf13/7896402
[figureelement]: http://html5doctor.com/the-figure-figcaption-elements/ "An article from HTML5 doctor discussing the fig and figcaption elements."
[Instagram]: https://www.instagram.com/
[pagevariables]: /variables/page/
[partials]: /templates/partials/
[Pygments]: http://pygments.org/
[quickstart]: /getting-started/quick-start/
[sctemps]: /templates/shortcode-templates/
[scvars]: /variables/shortcodes/
[shortcode template documentation]: /templates/shortcode-templates/
[Speaker Deck]: https://speakerdeck.com/
[templatessection]: /templates/
[Vimeo]: https://vimeo.com/
[YouTube Videos]: https://www.youtube.com/
@@ -0,0 +1,81 @@
---
title: Content Summaries
linktitle: Summaries
description: Hugo generates summaries of your content.
date: 2017-01-10
publishdate: 2017-01-10
lastmod: 2017-01-10
categories: [content management]
#tags: [summaries,abstracts,read more]
menu:
docs:
parent: "content-management"
weight: 90
weight: 90 #rem
draft: false
aliases: [/content/summaries/,/content-management/content-summaries/]
toc: true
---
With the use of the `.Summary` [page variable][pagevariables], Hugo generates summaries of content to use as a short version in summary views.
## Summary Splitting Options
* Hugo-defined Summary Split
* User-defined Summary Split
It is natural to accompany the summary with links to the original content, and a common design pattern is to see this link in the form of a "Read More ..." button. See the `.RelPermalink`, `.Permalink`, and `.Truncated` [page variables][pagevariables].
### Hugo-defined: Automatic Summary Splitting
By default, Hugo automatically takes the first 70 words of your content as its summary and stores it into the `.Summary` page variable for use in your templates. Taking the Hugo-defined approach to summaries may save time, but it has pros and cons:
* **Pros:** Automatic, no additional work on your part.
* **Cons:** All HTML tags are stripped from the summary, and the first 70 words, whether they belong to a heading or to different paragraphs, are all put into one paragraph.
{{% note %}}
The Hugo-defined summaries are set to use word count calculated by splitting the text by one or more consecutive white space characters. If you are creating content in a `CJK` language and want to use Hugo's automatic summary splitting, set `hasCJKLanguage` to `true` in you [site configuration](/getting-started/configuration/).
{{% /note %}}
### User-defined: Manual Summary Splitting
Alternatively, you may add the <code>&#60;&#33;&#45;&#45;more&#45;&#45;&#62;</code> summary divider where you want to split the article. For [org content][org], use `# more` where you want to split the article. Content that comes before the summary divider will be used as that content's summary and stored in the `.Summary` page variable with all HTML formatting intact.
{{% note "Summary Divider"%}}
The concept of a *summary divider* is not unique to Hugo. It is also called the "more tag" or "excerpt separator" in other literature.
{{% /note %}}
* Pros: Freedom, precision, and improved rendering. All HTML tags and formatting are preserved.
* Cons: Extra work for content authors, since they need to remember to type <code>&#60;&#33;&#45;&#45;more&#45;&#45;&#62;</code> (or `# more` for [org content][org]) in each content file. This can be automated by adding the summary divider below the front matter of an [archetype](/content-management/archetypes/).
{{% warning "Be Precise with the Summary Divider" %}}
Be careful to enter <code>&#60;&#33;&#45;&#45;more&#45;&#45;&#62;</code> exactly; i.e., all lowercase and with no whitespace.
{{% /warning %}}
## Example: First 10 Articles with Summaries
You can show content summaries with the following code. You could use the following snippet, for example, in a [section template][].
{{< code file="page-list-with-summaries.html" >}}
{{ range first 10 .Data.Pages }}
<article>
<!-- this <div> includes the title summary -->
<div>
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ .Summary }}
</div>
{{ if .Truncated }}
<!-- This <div> includes a read more link, but only if the summary is truncated... -->
<div>
<a href="{{ .RelPermalink }}">Read More…</a>
</div>
{{ end }}
</article>
{{ end }}
{{< /code >}}
Note how the `.Truncated` boolean valuable may be used to hide the "Read More..." link when the content is not truncated; i.e., when the summary contains the entire article.
[org]: /content-management/formats/
[pagevariables]: /variables/page/
[section template]: /templates/section-templates/
@@ -0,0 +1,240 @@
---
title: Taxonomies
linktitle:
description: Hugo includes support for user-defined taxonomies to help you demonstrate logical relationships between content for the end users of your website.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
#tags: [taxonomies,metadata,front matter,terms]
categories: [content management]
menu:
docs:
parent: "content-management"
weight: 80
weight: 80 #rem
draft: false
aliases: [/taxonomies/overview/,/taxonomies/usage/,/indexes/overview/,/doc/indexes/,/extras/indexes]
toc: true
---
## What is a Taxonomy?
Hugo includes support for user-defined groupings of content called **taxonomies**. Taxonomies are classifications of logical relationships between content.
### Definitions
Taxonomy
: a categorization that can be used to classify content
Term
: a key within the taxonomy
Value
: a piece of content assigned to a term
{{< youtube "-np9GX6cL38" >}}
## Example Taxonomy: Movie Website
Let's assume you are making a website about movies. You may want to include the following taxonomies:
* Actors
* Directors
* Studios
* Genre
* Year
* Awards
Then, in each of the movies, you would specify terms for each of these taxonomies (i.e., in the [front matter][] of each of your movie content files). From these terms, Hugo would automatically create pages for each Actor, Director, Studio, Genre, Year, and Award, with each listing all of the Movies that matched that specific Actor, Director, Studio, Genre, Year, and Award.
### Movie Taxonomy Organization
To continue with the example of a movie site, the following demonstrates content relationships from the perspective of the taxonomy:
```
Actor <- Taxonomy
Bruce Willis <- Term
The Sixth Sense <- Content
Unbreakable <- Content
Moonrise Kingdom <- Content
Samuel L. Jackson <- Term
Unbreakable <- Content
The Avengers <- Content
xXx <- Content
```
From the perspective of the content, the relationships would appear differently, although the data and labels used are the same:
```
Unbreakable <- Content
Actors <- Taxonomy
Bruce Willis <- Term
Samuel L. Jackson <- Term
Director <- Taxonomy
M. Night Shyamalan <- Term
...
Moonrise Kingdom <- Content
Actors <- Taxonomy
Bruce Willis <- Term
Bill Murray <- Term
Director <- Taxonomy
Wes Anderson <- Term
...
```
## Hugo Taxonomy Defaults
Hugo natively supports taxonomies.
Without adding a single line to your site's configuration file, Hugo will automatically create taxonomies for `tags` and `categories`. If you do not want Hugo to create any taxonomies, set `disableKinds` in your site's configuration to the following:
```
disableKinds = ["taxonomy","taxonomyTerm"]
```
### Default Destinations
When taxonomies are used---and [taxonomy templates][] are provided---Hugo will automatically create both a page listing all the taxonomy's terms and individual pages with lists of content associated with each term. For example, a `categories` taxonomy declared in your configuration and used in your content front matter will create the following pages:
* A single page at `example.com/categories/` that lists all the [terms within the taxonomy][]
* [Individual taxonomy list pages][taxonomy templates] (e.g., `/categories/development/`) for each of the terms that shows a listing of all pages marked as part of that taxonomy within any content file's [front matter][]
## Configure Taxonomies
Taxonomies must be defined in your [website configuration][config] before they can be used throughout the site. You need to provide both the plural and singular labels for each taxonomy. For example, `singular key = "plural value"` for TOML and `singular key: "plural value"` for YAML.
### Example: TOML Taxonomy Configuration
```
[taxonomies]
tag = "tags"
category = "categories"
series = "series"
```
### Example: YAML Taxonomy Configuration
```
taxonomies:
tag: "tags"
category: "categories"
series: "series"
```
### Preserve Taxonomy Values
By default, taxonomy names are normalized.
Therefore, if you want to have a taxonomy term with special characters such as `Gérard Depardieu` instead of `Gerard Depardieu`, set the value for `preserveTaxonomyNames` to `true` in your [site configuration][config]. Hugo will then preserve special characters in taxonomy values but will still title-ize the values for titles and normalize them in URLs.
Note that if you use `preserveTaxonomyNames` and intend to manually construct URLs to the archive pages, you will need to pass the taxonomy values through the [`urlize` template function][].
{{% note %}}
You can add content and front matter to your taxonomy list and taxonomy terms pages. See [Content Organization](/content-management/organization/) for more information on how to add an `_index.md` for this purpose.
Note also that taxonomy [permalinks](/content-management/urls/) are *not* configurable.
{{% /note %}}
## Add Taxonomies to Content
Once a taxonomy is defined at the site level, any piece of content can be assigned to it, regardless of [content type][] or [content section][].
Assigning content to a taxonomy is done in the [front matter][]. Simply create a variable with the *plural* name of the taxonomy and assign all terms you want to apply to the instance of the content type.
{{% note %}}
If you would like the ability to quickly generate content files with preconfigured taxonomies or terms, read the docs on [Hugo archetypes](/content-management/archetypes/).
{{% /note %}}
### Example: TOML Front Matter with Taxonomies
```
+++
title = "Hugo: A fast and flexible static site generator"
tags = [ "Development", "Go", "fast", "Blogging" ]
categories = [ "Development" ]
series = [ "Go Web Dev" ]
slug = "hugo"
project_url = "https://github.com/gohugoio/hugo"
+++
```
### Example: YAML Front Matter with Taxonomies
```
---
title: "Hugo: A fast and flexible static site generator"
tags: ["Development", "Go", "fast", "Blogging"]
categories: ["Development"]
series: ["Go Web Dev"]
slug: "hugo"
project_url: "https://github.com/gohugoio/hugo"
---
```
### Example: JSON Front Matter with Taxonomies
```
{
"title": "Hugo: A fast and flexible static site generator",
"tags": [
"Development",
"Go",
"fast",
"Blogging"
],
"categories" : [
"Development"
],
"series" : [
"Go Web Dev"
],
"slug": "hugo",
"project_url": "https://github.com/gohugoio/hugo"
}
```
## Order Taxonomies
A content file can assign weight for each of its associate taxonomies. Taxonomic weight can be used for sorting or ordering content in [taxonomy list templates][] and is declared in a content file's [front matter][]. The convention for declaring taxonomic weight is `taxonomyname_weight`.
The following TOML and YAML examples show a piece of content that has a weight of 22, which can be used for ordering purposes when rendering the pages assigned to the "a", "b" and "c" values of the `tags` taxonomy. It has also been assigned the weight of 44 when rendering the "d" category page.
### Example: TOML Taxonomic `weight`
```
+++
title = "foo"
tags = [ "a", "b", "c" ]
tags_weight = 22
categories = ["d"]
categories_weight = 44
+++
```
### Example: YAML Taxonomic `weight`
```
---
title: foo
tags: [ "a", "b", "c" ]
tags_weight: 22
categories: ["d"]
categories_weight: 44
---
```
By using taxonomic weight, the same piece of content can appear in different positions in different taxonomies.
{{% note "Limits to Ordering Taxonomies" %}}
Currently taxonomies only support the [default `weight => date` ordering of list content](/templates/lists/#default-weight-date). For more information, see the documentation on [taxonomy templates](/templates/taxonomy-templates/).
{{% /note %}}
[`urlize` template function]: /functions/urlize/
[content section]: /content-management/sections/
[content type]: /content-management/types/
[documentation on archetypes]: /content-management/archetypes/
[front matter]: /content-management/front-matter/
[taxonomy list templates]: /templates/taxonomy-templates/#taxonomy-page-templates
[taxonomy templates]: /templates/taxonomy-templates/
[terms within the taxonomy]: /templates/taxonomy-templates/#taxonomy-terms-templates "See how to order terms associated with a taxonomy"
[config]: /getting-started/configuration/
+91
View File
@@ -0,0 +1,91 @@
---
title: Table of Contents
linktitle:
description: Hugo can automatically parse Markdown content and create a Table of Contents you can use in your templates.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [content management]
#tags: [table of contents, toc]
menu:
docs:
parent: "content-management"
weight: 130
weight: 130 #rem
draft: false
aliases: [/extras/toc/,/content-management/toc/]
toc: true
---
{{% note "TOC Heading Levels are Fixed" %}}
Currently, the `{{.TableOfContents}}` [page variable](/variables/page/) does not allow you to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `<nav id="TableOfContents"><ul></ul></nav>` is going to start at `<h1>` when pulling from `{{.Content}}`.
{{% /note %}}
## Usage
Create your markdown the way you normally would with the appropriate headings. Here is some example content:
```
<!-- Your front matter up here -->
## Introduction
One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin.
## My Heading
He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment.
### My Subheading
A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame. It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. Drops
```
Hugo will take this Markdown and create a table of contents from `## Introduction`, `## My Heading`, and `### My Subheading` and then store it in the [page variable][pagevars]`.TableOfContents`.
The built-in `.TableOfContents` variables outputs a `<nav id="TableOfContents">` element with a child `<ul>`, whose child `<li>` elements begin with any `<h1>`'s (i.e., `#` in markdown) inside your content.'
## Template Example: Basic TOC
The following is an example of a very basic [single page template][]:
{{< code file="layout/_default/single.html" download="single.html" >}}
{{ define "main" }}
<main>
<article>
<header>
<h1>{{ .Title }}</h1>
</header>
{{ .Content }}
</article>
<aside>
{{ .TableOfContents }}
</aside>
</main>
{{ end }}
{{< /code >}}
## Template Example: TOC Partial
The following is a [partial template][partials] that adds slightly more logic for page-level control over your table of contents. It assumes you are using a `toc` field in your content's [front matter][] that, unless specifically set to `false`, will add a TOC to any page with a `.WordCount` (see [Page Variables][pagevars]) greater than 400. This example also demonstrates how to use [conditionals][] in your templating:
{{< code file="layouts/partials/toc.html" download="toc.html" >}}
{{ if and (gt .WordCount 400 ) (ne .Params.toc "false") }}
<aside>
<header>
<h2>{{.Title}}</h2>
</header>
{{.TableOfContents}}
</aside>
{{ end }}
{{< /code >}}
{{% note %}}
With the preceding example, even pages with > 400 words *and* `toc` not set to `false` will not render a table of contents if there are no headings in the page for the `{{.TableOfContents}}` variable to pull from.
{{% /note %}}
[conditionals]: /templates/introduction/#conditionals
[front matter]: /content-management/table-of-contents/
[pagevars]: /variables/page/
[partials]: /templates/partials/
[single page template]: /templates/single-page-templates/
+99
View File
@@ -0,0 +1,99 @@
---
title: Content Types
linktitle: Types
description: Hugo supports sites with multiple content types and assumes your site will be organized into sections, where each section represents the corresponding type.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [content management]
#tags: [lists,sections,content types,types,organization]
menu:
docs:
parent: "content-management"
weight: 60
weight: 60 #rem
draft: false
aliases: [/content/types]
toc: true
---
A **content type** can have a unique set of metadata (i.e., [front matter][]) or customized [template][] and can be created by the `hugo new` command via [archetypes][].
## What is a Content Type
[Tumblr][] is a good example of a website with multiple content types. A piece of "content" could be a photo, quote, or a post, each with different sets of metadata and different visual rendering.
## Assign a Content Type
Hugo assumes that your site will be organized into [sections][] and each section represents a corresponding type. This is to reduce the amount of configuration necessary for new Hugo projects.
If you are taking advantage of this default behavior, each new piece of content you place into a section will automatically inherit the type. Therefore a new file created at `content/posts/new-post.md` will automatically be assigned the type `posts`. Alternatively, you can set the content type in a content file's [front matter][] in the field "`type`".
## Create New Content of a Specific Type
You can manually add files to your content directories, but Hugo can create and populate a new content file with preconfigured front matter via [archetypes][].
## Define a Content Type
Creating a new content type is easy. You simply define the templates and archetype unique to your new content type, or Hugo will use defaults.
{{% note "Declaring Content Types" %}}
Remember, all of the following are *optional*. If you do not specifically declare content types in your front matter or develop specific layouts for content types, Hugo is smart enough to assume the content type from the file path and section. (See [Content Sections](/content-management/sections/) for more information.)
{{% /note %}}
The following examples take you stepwise through creating a new type layout for a content file that contains the following front matter:
{{< code file="content/events/my-first-event.md" copy="false" >}}
+++
title = My First Event
date = "2016-06-24T19:20:04-07:00"
description = "Today is my 36th birthday. How time flies."
type = "event"
layout = "birthday"
+++
{{< /code >}}
By default, Hugo assumes `*.md` under `events` is of the `events` content type. However, we have specified that this particular file at `content/events/ my-first-event.md` is of type `event` and should render using the `birthday` layout.
### Create a Type Layout Directory
Create a directory with the name of the type in `/layouts`. For creating these custom layouts, **type is always singular**; e.g., `events => event` and `posts => post`.
For this example, you need to create `layouts/event/birthday.html`.
{{% note %}}
If you have multiple content files in your `events` directory that are of the `special` type and you don't want to define the `layout` specifically for each piece of content, you can create a layout at `layouts/special/single.html` to observe the [single page template lookup order](/templates/single-page-templates/).
{{% /note %}}
{{% warning %}}
With the "everything is a page" data model introduced in v0.18 (see [Content Organization](/content-management/organization/)), you can use `_index.md` in content directories to add both content and front matter to [list pages](/templates/lists/). However, `type` and `layout` declared in the front matter of `_index.md` are *not* currently respected at build time as of v0.19. This is a known issue [(#3005)](https://github.com/gohugoio/hugo/issues/3005).
{{% /warning %}}
### Create Views
Many sites support rendering content in a few different ways; e.g., a single page view and a summary view to be used when displaying a [list of section contents][sectiontemplates].
Hugo limits assumptions about how you want to display your content to an intuitive set of sane defaults 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 `/layouts/<TYPE>` directory with the same name.
### Custom Content Type Template Lookup Order
The lookup order for the `content/events/my-first-event.md` templates would be as follows:
* `layouts/event/birthday.html`
* `layouts/event/single.html`
* `layouts/events/single.html`
* `layouts/_default/single.html`
### Create a Corresponding Archetype
We can then create a custom archetype with preconfigured front matter at `event.md` in the `/archetypes` directory; i.e. `archetypes/event.md`.
Read [Archetypes][archetypes] for more information on archetype usage with `hugo new`.
[archetypes]: /content-management/archetypes/
[front matter]: /content-management/front-matter/
[sectiontemplates]: /templates/section-templates/
[sections]: /content-management/sections/
[template]: /templates/
[Tumblr]: https://www.tumblr.com/
+277
View File
@@ -0,0 +1,277 @@
---
title: URL Management
linktitle: URL Management
description: Hugo supports permalinks, aliases, link canonicalization, and multiple options for handling relative vs absolute URLs.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-03-09
#tags: [aliases,redirects,permalinks,urls]
categories: [content management]
menu:
docs:
parent: "content-management"
weight: 110
weight: 110 #rem
draft: false
aliases: [/extras/permalinks/,/extras/aliases/,/extras/urls/,/doc/redirects/,/doc/alias/,/doc/aliases/]
toc: true
---
## Permalinks
The default Hugo target directory for your built website is `public/`. However, you can change this value by specifying a different `publishDir` in your [site configuration][config]. The directories created at build time for a section reflect the position of the content's directory within the `content` folder and namespace matching its layout within the `contentdir` hierarchy.
The `permalinks` option in your [site configuration][config] allows you to adjust the directory paths (i.e., the URLs) on a per-section basis. This will change where the files are written to and will change the page's internal "canonical" location, such that template references to `.RelPermalink` will honor the adjustments made as a result of the mappings in this option.
{{% note "Default Publish and Content Folders" %}}
These examples use the default values for `publishDir` and `contentDir`; i.e., `publish` and `content`, respectively. You can override the default values in your [site's `config` file](/getting-started/configuration/).
{{% /note %}}
For example, if one of your [sections][] is called `post` and you want to adjust the canonical path to be hierarchical based on the year, month, and post title, you could set up the following configurations in YAML and TOML, respectively.
### YAML Permalinks Configuration Example
{{< code file="config.yml" copy="false" >}}
permalinks:
post: /:year/:month/:title/
{{< /code >}}
### TOML Permalinks Configuration Example
{{< code file="config.toml" copy="false" >}}
[permalinks]
post = "/:year/:month/:title/"
{{< /code >}}
Only the content under `post/` will have the new URL structure. For example, the file `content/post/sample-entry.md` with `date: 2017-02-27T19:20:00-05:00` in its front matter will render to `public/2017/02/sample-entry/index.html` at build time and therefore be reachable at `https://example.com/2013/11/sample-entry/`.
### Permalink Configuration Values
The following is a list of values that can be used in a `permalink` definition in your site `config` file. All references to time are dependent on the content's date.
`:year`
: the 4-digit year
`:month`
: the 2-digit month
`:monthname`
: the name of the month
`:day`
: the 2-digit day
`:weekday`
: the 1-digit day of the week (Sunday = 0)
`:weekdayname`
: the name of the day of the week
`:yearday`
: the 1- to 3-digit day of the year
`:section`
: the content's section
`:title`
: the content's title
`:slug`
: the content's slug (or title if no slug is provided in the front matter)
`:filename`
: the content's filename (without extension)
## Aliases
For people migrating existing published content to Hugo, there's a good chance you need a mechanism to handle redirecting old URLs.
Luckily, redirects can be handled easily with **aliases** in Hugo.
### Example: Aliases
Let's assume you create a new piece of content at `content/posts/my-awesome-blog-post.md`. The content is a revision of your previous post at `content/posts/my-original-url.md`. You can create an `aliases` field in the front matter of your new `my-awesome-blog-post.md` where you can add previous paths. The following examples show how to create this filed in TOML and YAML front matter, respectively.
#### TOML Front Matter
{{< code file="content/posts/my-awesome-post.md" copy="false" >}}
+++
aliases = [
"/posts/my-original-url/",
"/2010/01/01/even-earlier-url.html"
]
+++
{{< /code >}}
#### YAML Front Matter
{{< code file="content/posts/my-awesome-post.md" copy="false" >}}
---
aliases:
- /posts/my-original-url/
- /2010/01/01/even-earlier-url.html
---
{{< /code >}}
Now when you visit any of the locations specified in aliases---i.e., *assuming the same site domain*---you'll be redirected to the page they are specified on. For example, a visitor to `example.com/posts/my-original-url/` will be immediately redirected to `example.com/posts/my-awesome-blog-post/`.
### Example: Aliases in Multilingual
On [multilingual sites][multilingual], each translation of a post can have unique aliases. To use the same alias across multiple languages, prefix it with the language code.
In `/posts/my-new-post.es.md`:
```
---
aliases:
- /es/posts/my-original-post/
---
```
### How Hugo Aliases Work
When aliases are specified, Hugo creates a directory to match the alias entry. Inside the directory, Hugo creates an `.html` file specifying the canonical URL for the page and the new redirect target.
For example, a content file at `posts/my-intended-url.md` with the following in the front matter:
```
---
title: My New post
aliases: [/posts/my-old-url/]
---
```
Assuming a `baseURL` of `example.com`, the contents of the auto-generated alias `.html` found at `https://example.com/posts/my-old-url/ will contain the following:`
```
<!DOCTYPE html>
<html>
<head>
<title>https://example.com/posts/my-intended-url</title>
<link rel="canonical" href="https://example.com/posts/my-intended-url"/>
<meta name=\"robots\" content=\"noindex\">
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="refresh" content="0; url=https://example.com/posts/my-intended-url"/>
</head>
</html>
```
The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case. If an end user of your website goes to `https://example.com/posts/my-old-url`, they will now be automatically redirected to the newer, correct URL. The addition of `<meta name=\"robots\" content=\"noindex\">` lets search engine bots know they they should not crawl and index your new alias page.
### Customize
You may customize this alias page by creating an `alias.html` template in the
layouts folder of your site (i.e., `layouts/alias.html`). In this case, the data passed to the template is
`Permalink`
: the link to the page being aliased
`Page`
: the Page data for the page being aliased
### Important Behaviors of Aliases
1. Hugo makes no assumptions about aliases. They also do not change based
on your UglyURLs setting. You need to provide absolute paths to your web root
and the complete filename or directory.
2. Aliases are rendered *before* any content are rendered and therefore will be overwritten by any content with the same location.
## Pretty URLs
Hugo's default behavior is to render your content with "pretty" URLs. No non-standard server-side configuration is required for these pretty URLs to work.
The following demonstrates the concept:
```
content/posts/_index.md
=> example.com/posts/index.html
content/posts/post-1.md
=> example.com/posts/post-1/
```
## Ugly URLs
If you would like to have what are often referred to as "ugly URLs" (e.g., example.com/urls.html), set `uglyurls = true` or `uglyurls: true` in your site's `config.toml` or `config.yaml`, respectively. You can also use the `--uglyURLs=true` [flag from the command line][usage] with `hugo` or `hugo server`..
If you want a specific piece of content to have an exact URL, you can specify this in the [front matter][] under the `url` key. The following are examples of the same content directory and what the eventual URL structure will be when Hugo runs with its default behavior.
See [Content Organization][contentorg] for more details on paths.
```
.
└── content
└── about
| └── _index.md // <- https://example.com/about/
├── post
| ├── firstpost.md // <- https://example.com/post/firstpost/
| ├── happy
| | └── ness.md // <- https://example.com/post/happy/ness/
| └── secondpost.md // <- https://example.com/post/secondpost/
└── quote
├── first.md // <- https://example.com/quote/first/
└── second.md // <- https://example.com/quote/second/
```
Here's the same organization run with `hugo --uglyURLs`:
```
.
└── content
└── about
| └── _index.md // <- https://example.com/about/index.html
├── post
| ├── firstpost.md // <- https://example.com/post/firstpost.html
| ├── happy
| | └── ness.md // <- https://example.com/post/happy/ness.html
| └── secondpost.md // <- https://example.com/post/secondpost.html
└── quote
├── first.md // <- https://example.com/quote/first.html
└── second.md // <- https://example.com/quote/second.html
```
## Canonicalization
By default, all relative URLs encountered in the input are left unmodified, e.g. `/css/foo.css` would stay as `/css/foo.css`. The `canonifyURLs` field in your site `config` has a default value of `false`.
By setting `canonifyURLs` to `true`, all relative URLs would instead be *canonicalized* using `baseURL`. For example, assuming you have `baseURL = https://example.com/`, the relative URL `/css/foo.css` would be turned into the absolute URL `https://example.com/css/foo.css`.
Benefits of canonicalization include fixing all URLs to be absolute, which may aid with some parsing tasks. Note, however, that all modern browsers handle this on the client without issue.
Benefits of non-canonicalization include being able to have scheme-relative resource inclusion; e.g., so that `http` vs `https` can be decided according to how the page was retrieved.
{{% note "`canonifyURLs` default change" %}}
In the May 2014 release of Hugo v0.11, the default value of `canonifyURLs` was switched from `true` to `false`, which we think is the better default and should continue to be the case going forward. Please verify and adjust your website accordingly if you are upgrading from v0.10 or older versions.
{{% /note %}}
To find out the current value of `canonifyURLs` for your website, you may use the handy `hugo config` command added in v0.13.
```
hugo config | grep -i canon
```
Or, if you are on Windows and do not have `grep` installed:
```
hugo config | FINDSTR /I canon
```
## Override URLS with Front Matter
In addition to specifying permalink values in your site configuration for different content sections, Hugo provides even more granular control for individual pieces of content.
Both `slug` and `url` can be defined in individual front matter. For more information on content destinations at build time, see [Content Organization][contentorg].
## Relative URLs
By default, all relative URLs are left unchanged by Hugo, which can be problematic when you want to make your site browsable from a local file system.
Setting `relativeURLs` to `true` in your [site configuration][config] will cause Hugo to rewrite all relative URLs to be relative to the current content.
For example, if your `/post/first/` page contains a link to `/about/`, Hugo will rewrite the URL to `../../about/`.
[config]: /getting-started/configuration/
[contentorg]: /content-management/organization/
[front matter]: /content-management/front-matter/
[multilingual]: /content-management/multilingual/
[sections]: /content-management/sections/
[usage]: /getting-started/usage/
-330
View File
@@ -1,330 +0,0 @@
---
lastmod: 2016-10-01
date: 2014-05-14T02:13:50Z
menu:
main:
parent: content
next: /content/ordering
prev: /content/types
title: Archetypes
weight: 50
toc: true
---
Typically, each piece of content you create within a Hugo project will have [front matter](/content/front-matter/) that follows a consistent structure. If you write blog posts, for instance, you might use the following front matter for the vast majority of those posts:
```toml
+++
title = ""
date = ""
slug = ""
tags = [
""
]
categories = [
""
]
draft = true
+++
```
You can always add non-typical front matter to any piece of content, but since it takes extra work to develop a theme that handles unique metadata, consistency is simpler.
With this in mind, Hugo has a convenient feature known as *archetypes* that allows users to define default front matter for new pieces of content.
By using archetypes, we can:
1. **Save time**. Stop writing the same front matter over and over again.
2. **Avoid errors**. Reduce the odds of typos, improperly formatted syntax, and other simple mistakes.
3. **Focus on more important things**. Avoid having to remember all of the fields that need to be associated with each piece of content. (This is particularly important for larger projects with complex front matter and a variety of content types.)
Let's explore how they work.
## Built-in Archetypes
If you've been using Hugo for a while, there's a decent chance you've come across archetypes without even realizing it. This is because Hugo includes a basic, built-in archetype that is used by default whenever it generates a content file.
To see this in action, open the command line, navigate into your project's directory, and run the following command:
```bash
hugo new hello-world.md
```
This `hugo new` command creates a new content file inside the project's `content` directory — in this case, a file named `hello-world.md` — and if you open this file, you'll notice it contains the following front matter:
```toml
+++
date = "2017-05-31T15:18:11+10:00"
draft = true
title = "hello world"
+++
```
Here, we can see that three fields have been added to the document: a `title` field that is based on the file name we defined, a `draft` field that ensures this content won't be published by default, and a `date` field that is auto-populated with the current date and time in the [RFC 3339](https://stackoverflow.com/questions/522251/whats-the-difference-between-iso-8601-and-rfc-3339-date-formats) format.
This, in its most basic form, is an example of an archetype. To understand how useful they can be though, it's best if we create our own.
## Creating Archetypes
In this section, we're going to create an archetype that will override the built-in archetype, allowing us to define custom front matter that will be included in any content files that we generate with the `hugo new` command.
To achieve this, create a file named `default.md` inside the `archetypes` folder of a Hugo project. (If the folder doesn't exist, create it.)
Then, inside this file, define the following front matter:
```toml
+++
slug = ""
tags = []
categories = []
draft = true
+++
```
You'll notice that we haven't defined a `title` or `date` field. This is because Hugo will automatically add these fields to the beginning of the front matter. We do, however, need to define the `draft` field if we want it to exist in our front matter.
You'll also notice that we're writing the front matter in the TOML format. It's possible to define archetype front matter in other formats, but a setting needs to be changed in the configuration file for this to be possible. See the "[Archetype Formats](#archetype-formats)" section of this article for more details.
Next, run the following command:
```bash
hugo new my-archetype-example.md
```
This command will generate a file named `my-archetype-example.md` inside the `content` directory, and this file will contain the following output:
```toml
+++
categories = []
date = "2017-05-31T15:21:13+10:00"
draft = true
slug = ""
tags = []
title = "my archetype example"
+++
```
As we can see, the file contains the `title` and `date` property that Hugo created for us, along with the front matter that we defined in the `archetypes/default.md` file.
You'll also notice that the fields have been sorted into alphabetical order. This is an unintentional side-effect that stems from the underlying code libraries that Hugo relies upon. It is, however, [a known issue that is actively being discussed](https://github.com/spf13/hugo/issues/452).
## Section Archetypes
By creating the `archetypes/default.md` file, we've created a default archetype that is more useful than the built-in archetype, but since Hugo encourages us to [organize our content into sections](/content/sections/), each of which will likely have different front matter requirements, a "one-size-fits-all" archetype isn't necessarily the best approach.
To accommodate for this, Hugo allows us to create archetypes for each section of our project. This means, whenever we generate content for a certain section, the appropriate front matter for that section will be automatically included in the generated file.
To see this in action, create a "photo" section by creating a directory named "photo" inside the `content` directory.
Then create a file named `photo.md` inside the `archetypes` directory and include the following front matter inside this file:
```toml
+++
image_url = ""
camera = ""
lens = ""
aperture = ""
iso = ""
draft = true
+++
```
Here, the critical detail is that the `photo.md` file in the `archetypes` directory is named after the `photo` section that we just created. By sharing a name, Hugo can understand that there's a relationship between them.
Next, run the following command:
```bash
hugo new photo/my-pretty-cat.md
```
This command will generate a file named `my-pretty-cat.md` inside the `content/photo` directory, and this file will contain the following output:
```toml
+++
aperture = ""
camera = ""
date = "2017-05-31T15:25:18+10:00"
draft = true
image_url = ""
iso = ""
lens = ""
title = "my pretty cat"
+++
```
As we can see, the `title` and `date` fields are still included by Hugo, but the rest of the front matter is being generated from the `photo.md` archetype instead of the `default.md` archetype.
### Tip: Default Values
To make archetypes more useful, define default values for any fields that will always be set to a range of limited options. In the case of the `photo.md` archetype, for instance, you could include lists of the various cameras and lenses that you own:
```toml
+++
image_url = ""
camera = [
"Sony RX100 Mark IV",
"Canon 5D Mark III",
"iPhone 6S"
]
lens = [
"Canon EF 50mm f/1.8",
"Rokinon 14mm f/2.8"
]
aperture = ""
iso = ""
draft = true
+++
```
Then, after generating a content file, simply remove the values that aren't relevant. This saves you from typing out the same options over and over again while ensuring consistency in how they're written.
## Scaffolding Content
Archetypes aren't limited to defining default front matter. They can also be used to define a default structure for the body of Markdown documents.
For example, imagine creating a `review.md` archetype for the purpose of writing camera reviews. This is what the front matter for such an archetype might look like:
```toml
+++
manufacturer = ""
model = ""
price = ""
releaseDate = ""
rating = ""
+++
```
But reviews tend to follow strict formats and need to answer specific questions, and it's with these expectations of precise structure that archetypes can prove to be even more useful.
For the sake of writing reviews, for instance, we could define the structure of a review beneath the front matter of the `review.md` file:
```markdown
+++
manufacturer = ""
model = ""
price = ""
releaseDate = ""
rating = ""
+++
## Introduction
## Sample Photos
## Conclusion
```
Then, whenever we use the `hugo new` command to create a new review, not only will the default front matter be copied into the newly created Markdown document, but the body of the `review.md` archetype will also be copied.
To take this further though — and to ensure authors on multi-author websites are on the same page about how content should be written — we could include notes and reminders within the archetype:
```markdown
+++
manufacturer = ""
model = ""
price = ""
releaseDate = ""
rating = ""
+++
## Introduction
<!--
What is the selling point of the camera?
What has changed since last year's model?
Include a bullet-point list of key features.
-->
## Sample Photos
<!-- TODO: Take at least 12 photos in a variety of situations. -->
## Conclusion
<!--
Is this camera worth the money?
Does it accomplish what it set out to achieve?
Are there any specific groups of people who should/shouldn't buy it?
Would you recommend it to a friend?
Are there alternatives on the horizon?
-->
```
That way, each time we generate a new content file, we have a series of handy notes to push us closer to a piece of writing that's suitable for publishing.
(If you're wondering why the notes are wrapped in the HTML comment syntax, it's to ensure they won't appear inside the preview window of whatever Markdown editor the author happens to be using. They're not strictly necessary though.)
This is still a fairly simple example, but if your content usually contains a variety of components — headings, bullet-points, images, [short-codes](/extras/shortcodes/), etc — it's not hard to see the time-saving benefits of placing these components in the body of an archetype file.
## Theme Archetypes
Whenever you generate a content file with the `hugo new` command, Hugo will start by searching for archetypes in the `archetypes` directory, initially looking for an archetype that matches the content's section and falling-back on the `default.md` archetype (if one is present). If no archetypes are found in this directory, Hugo will continue its search in the `archetypes` directory of the currently active theme. In other words, it's possible for themes to come packaged with their own archetypes, ensuring that users of that theme format their content files with correctly structured front matter.
To allow Hugo to use archetypes from a theme, [that theme must be activated via the project's configuration file](/themes/usage/):
```toml
theme = "ThemeNameGoesHere"
```
If an archetype doesn't exist in the `archetypes` directory at the top-level of a project or inside the `archetypes` directory of an active theme, the built-in archetype will be used.
{{< figure src="/img/content/archetypes/archetype-hierarchy.png" alt="How Hugo Decides Which Archetype To Use" >}}
## Archetype Formats
By default, the `hugo new` command will generate front matter in the TOML format. This means, even if we define the front matter in our archetype files as YAML or JSON, it will be converted to the TOML format before it ends up in our content files.
Fortunately, this functionality can be overwritten.
Inside the project's configuration file, simply define a `metaDataFormat` property:
```toml
metaDataFormat = ""
```
Then set this property to any of the following values:
* toml
* yaml
* json
By defining this option, any front matter will be generated in your preferred format.
It's worth noting, however, that when generating front matter in the TOML format, you might encounter the following error:
```bash
Error: cannot convert type <nil> to TomlTree
```
This is because, to generate TOML, all of the fields in the front matter need to have a default value, even if that default value is just an empty string.
For example, this YAML would *not* successfully compile into the TOML format:
```yaml
---
slug:
tags:
categories:
draft:
---
```
But this YAML *would* successfully compile:
```yaml
---
slug: ""
tags:
-
categories:
-
draft: true
---
```
It's a subtle yet important detail to remember.
## Notes
* Prior to Hugo v0.13, some users received [an "EOF" error when using archetypes](https://github.com/spf13/hugo/issues/776), related to what text editor they used to create the archetype. As of Hugo v0.13, this error has been [resolved](https://github.com/spf13/hugo/pull/785).
-91
View File
@@ -1,91 +0,0 @@
---
aliases:
- /doc/example/
lastmod: 2015-12-23
date: 2013-07-01
linktitle: Example
menu:
main:
parent: content
prev: /content/multilingual
next: /content/using-index-md
notoc: true
title: Example Content File
weight: 70
---
Some things are better shown than explained. The following is a very basic example of a content file written in [Markdown](https://help.github.com/articles/github-flavored-markdown/):
**mysite/content/project/nitro.md → http://mysite.com/project/nitro.html**
With TOML front matter:
<pre><code class="language-toml">+++
date = "2013-06-21T11:27:27-04:00"
title = "Nitro: A quick and simple profiler for Go"
description = "Nitro is a simple profiler for your Golang applications"
tags = [ "Development", "Go", "profiling" ]
topics = [ "Development", "Go" ]
slug = "nitro"
project_url = "https://github.com/spf13/nitro"
+++
</code><code class="language-markdown"># Nitro
Quick and easy performance analyzer library for [Go](http://golang.org/).
## Overview
Nitro is a quick and easy performance analyzer library for Go.
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.
</code></pre>
You may also use the equivalent YAML front matter:
```yaml
---
lastmod: 2015-12-23
date: "2013-06-21T11:27:27-04:00"
title: "Nitro: A quick and simple profiler for Go"
description: "Nitro is a simple profiler for your Go lang applications"
tags: [ "Development", "Go", "profiling" ]
topics: [ "Development", "Go" ]
slug: "nitro"
project_url: "https://github.com/spf13/nitro"
---
```
`nitro.md` would be rendered as follows:
> # Nitro
>
> Quick and easy performance analyzer library for [Go](http://golang.org/).
>
> ## Overview
>
> Nitro is a quick and easy performance analyzer library for Go.
> 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.
The source `nitro.md` file is converted to HTML by the excellent
[Blackfriday](https://github.com/russross/blackfriday) Markdown processor,
which supports extended features found in the popular
[GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/).
-119
View File
@@ -1,119 +0,0 @@
---
aliases:
- /doc/front-matter/
lastmod: 2015-12-23
date: 2013-07-01
menu:
main:
parent: content
next: /content/sections
prev: /content/organization
title: Front Matter
weight: 20
toc: true
---
The **front matter** is one of the features that gives Hugo its strength. It enables
you to include the meta data of the content right with it. Hugo supports a few
different formats, each with their own identifying tokens.
Supported formats:
* **[TOML][]**, identified by '`+++`'.
* **[YAML][]**, identified by '`---`'.
* **[JSON][]**, a single JSON object which is surrounded by '`{`' and '`}`', followed by a newline.
[TOML]: https://github.com/toml-lang/toml "Tom's Obvious, Minimal Language"
[YAML]: http://www.yaml.org/ "YAML Ain't Markup Language"
[JSON]: http://www.json.org/ "JavaScript Object Notation"
## TOML Example
<pre><code class="language-toml">+++
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" ]
date = "2012-04-06"
categories = [
"Development",
"VIM"
]
slug = "spf13-vim-3-0-release-and-new-website"
+++
</code><code class="language-markdown">Content of the file goes Here
</code></pre>
## YAML Example
```yaml
---
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" ]
lastmod: 2015-12-23
date: "2012-04-06"
categories:
- "Development"
- "VIM"
slug: "spf13-vim-3-0-release-and-new-website"
---
Content of the file goes Here
```
## JSON Example
```json
{
"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" ],
"date": "2012-04-06",
"categories": [
"Development",
"VIM"
],
"slug": "spf13-vim-3-0-release-and-new-website"
}
Content of the file goes Here
```
## Variables
There are a few predefined variables that Hugo is aware of and utilizes. The user can also create
any variable they want. These will be placed into the `.Params` variable available to the templates.
Field names are always normalized to lowercase (e.g. `camelCase: true` is available as `.Params.camelcase`).
### Required variables
* **title** The title for the content
* **description** The description for the content
* **date** The date the content will be sorted by
* **taxonomies** These will use the field name of the plural form of the index (see tags and categories above)
### Optional variables
* **aliases** An array of one or more aliases
(e.g. old published path of a renamed content)
that would be created to redirect to this content.
See [Aliases]({{< relref "extras/aliases.md" >}}) for details.
* **draft** If true, the content will not be rendered unless `hugo` is called with `--buildDrafts`
* **publishdate** If in the future, content will not be rendered unless `hugo` is called with `--buildFuture`
* **expirydate** Content already expired will not be rendered unless `hugo` is called with `--buildExpired`
* **type** The type of the content (will be derived from the directory automatically if unset)
* **isCJKLanguage** If true, explicitly treat the content as CJKLanguage (`.Summary` and `.WordCount` can work properly in CJKLanguage)
* **weight** Used for sorting
* **markup** *(Experimental)* Specify `"rst"` for reStructuredText (requires
`rst2html`) or `"md"` (default) for Markdown
* **slug** appears as tail of the url. It can be used to change the part of the url that is based on the filename.
* **url** The full path to the content from the web root. It makes no assumptions about the path of the content file. It also ignores any language prefixes of the multilingual feature.
*If neither `slug` or `url` is present, the filename will be used.*
## Configure Blackfriday rendering
It's possible to set some options for Markdown rendering in the page's front matter as an override to the site wide configuration.
See [Configuration]({{< ref "overview/configuration.md#configure-blackfriday-rendering" >}}) for more.
-49
View File
@@ -1,49 +0,0 @@
---
aliases:
- /doc/supported-formats/
lastmod: 2016-07-22
date: 2016-07-22
menu:
main:
parent: content
prev: /content/summaries
next: /content/multilingual
title: Markdown Extras
weight: 66
toc: false
---
Hugo provides some convenient markdown extensions.
## Task lists
Hugo supports GitHub styled task lists (TODO lists) for the Blackfriday renderer (md-files). See [Blackfriday config](/overview/configuration/#configure-blackfriday-rendering) for how to turn it off.
Example:
```markdown
- [ ] a task list item
- [ ] list syntax required
- [ ] incomplete
- [x] completed
```
Renders as:
- [ ] a task list item
- [ ] list syntax required
- [ ] incomplete
- [x] completed
And produces this HTML:
```html
<ul class="task-list">
<li><input type="checkbox" disabled="" class="task-list-item"> a task list item</li>
<li><input type="checkbox" disabled="" class="task-list-item"> list syntax required</li>
<li><input type="checkbox" disabled="" class="task-list-item"> incomplete</li>
<li><input type="checkbox" checked="" disabled="" class="task-list-item"> completed</li>
</ul>
```
-232
View File
@@ -1,232 +0,0 @@
---
date: 2016-01-02T21:21:00Z
menu:
main:
parent: content
prev: /content/markdown-extras
next: /content/example
title: Multilingual Mode
weight: 68
toc: true
---
Hugo supports multiple languages side-by-side (added in `Hugo 0.17`). Define the available languages in a `Languages` section in your top-level `config.toml` (or equivalent).
Example:
```
DefaultContentLanguage = "en"
copyright = "Everything is mine"
[params.navigation]
help = "Help"
[Languages]
[Languages.en]
title = "My blog"
weight = 1
[Languages.en.params]
linkedin = "english-link"
[Languages.fr]
copyright = "Tout est à moi"
title = "Mon blog"
weight = 2
[Languages.fr.params]
linkedin = "lien-francais"
[Languages.fr.navigation]
help = "Aide"
```
Anything not defined in a `[Languages]` block will fall back to the global
value for that key (like `copyright` for the English (`en`) language in this example).
With the config above, all content, sitemap, RSS feeds, paginations
and taxonomy pages will be rendered below `/` in English (your default content language), and below `/fr` in French.
When working with params in frontmatter pages, omit the `params` in the key for the translation.
If you want all of the languages to be put below their respective language code, enable `defaultContentLanguageInSubdir: true` in your configuration.
Only the obvious non-global options can be overridden per language. Examples of global options are `BaseURL`, `BuildDrafts`, etc.
Taxonomies and Blackfriday configuration can also be set per language, example:
```
[Taxonomies]
tag = "tags"
[blackfriday]
angledQuotes = true
hrefTargetBlank = true
[Languages]
[Languages.en]
weight = 1
title = "English"
[Languages.en.blackfriday]
angledQuotes = false
[Languages.fr]
weight = 2
title = "Français"
[Languages.fr.Taxonomies]
plaque = "plaques"
```
### Translating your content
Translated articles are identified by the name of the content file.
Example of translated articles:
1. `/content/about.en.md`
2. `/content/about.fr.md`
You can also have:
1. `/content/about.md`
2. `/content/about.fr.md`
In which case the config variable `defaultContentLanguage` will be used to affect the default language `about.md`. This way, you can
slowly start to translate your current content without having to rename everything.
If left unspecified, the value for `defaultContentLanguage` defaults to `en`.
By having the same _base file name_, the content pieces are linked together as translated pieces.
If you need distinct URLs per language you can set the slug in the non-default language file. Just define the custom slug for the french translation in your `/content/about.fr.md` file:
```
---
slug: "a-propos"
---
```
You will get both `/about/` and `/a-propos/` URLs in your build, properly linked as translated pieces.
### Link to translated content
To create a list of links to translated content, use a template similar to this:
```
{{ if .IsTranslated }}
<h4>{{ i18n "translations" }}</h4>
<ul>
{{ range .Translations }}
<li>
<a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
</li>
{{ end}}
</ul>
{{ end }}
```
The above can be put in a `partial` and included in any template, be it for a content page or the home page. It will not print anything if there are no translations for a given page, or if it is -- in the case of the home page, section listing etc. -- a site with only one language.
The above also uses the `i18n` func, see [Translation of strings](#translation-of-strings).
### Translation of strings
Hugo uses [go-i18n](https://github.com/nicksnyder/go-i18n) to support string translations. Follow the link to find tools to manage your translation workflows.
Translations are collected from the `themes/[name]/i18n/` folder (built into the theme), as well as translations present in `i18n/` at the root of your project. In the `i18n`, the translations will be merged and take precedence over what is in the theme folder. Language files should be named according to RFC 5646 with names such as `en-US.toml`, `fr.toml`, etc.
From within your templates, use the `i18n` function like this:
```
{{ i18n "home" }}
```
This uses a definition like this one in `i18n/en-US.toml`:
```
[home]
other = "Home"
```
Often you will want to use to the page variables in the translations strings. To do that, pass on the "." context when calling `i18n`:
```
{{ i18n "wordCount" . }}
```
This uses a definition like this one in `i18n/en-US.toml`:
```
[wordCount]
other = "This article has {{ .WordCount }} words."
```
An example of singular and plural form:
```
[readingTime]
one = "One minute read"
other = "{{.Count}} minutes read"
```
And then in the template:
```
{{ i18n "readingTime" .ReadingTime }}
```
To track down missing translation strings, run Hugo with the `--i18n-warnings` flag:
```bash
hugo --i18n-warnings | grep i18n
i18n|MISSING_TRANSLATION|en|wordCount
```
### Menus
You can define your menus for each language independently. The [creation of a menu]({{< relref "extras/menus.md" >}}) works analogous to earlier versions of Hugo, except that they have to be defined in their language-specific block in the configuration file:
```toml
defaultContentLanguage = "en"
[languages.en]
weight = 0
languageName = "English"
[[languages.en.menu.main]]
url = "/"
name = "Home"
weight = 0
[languages.de]
weight = 10
languageName = "Deutsch"
[[languages.de.menu.main]]
url = "/"
name = "Startseite"
weight = 0
```
The rendering of the main navigation works as usual. `.Site.Menus` will just contain the menu of the current language. Pay attention to the generation of the menu links. `absLangURL` takes care that you link to the correct locale of your website. Otherwise, both menu entries would link to the English version because it's the default content language that resides in the root directory.
```html
<ul>
{{- $currentPage := . -}}
{{ range .Site.Menus.main -}}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
<a href="{{ .URL | absLangURL }}">{{ .Name }}</a>
</li>
{{- end }}
</ul>
```
### Missing translations
If a string does not have a translation for the current language, Hugo will use the value from the default language. If no default value is set, an empty string will be shown.
While translating a Hugo site, it can be handy to have a visual indicator of missing translations. The `EnableMissingTranslationPlaceholders` config option will flag all untranslated strings with the placeholder `[i18n] identifier`, where `identifier` is the id of the missing translation.
**Remember: Hugo will generate your website with these placeholders. It might not be suited for production environments.**
### Multilingual Themes support
To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there are more than one language, URLs must either come from the built-in `.Permalink` or `.URL`, be constructed with `relLangURL` or `absLangURL` template funcs -- or prefixed with `{{.LanguagePrefix }}`.
If there are more than one language defined, the`LanguagePrefix` variable will equal `"/en"` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string, so it is harmless for single-language sites.
-41
View File
@@ -1,41 +0,0 @@
---
lastmod: 2015-12-23
date: 2014-03-06
linktitle: Ordering
menu:
main:
parent: content
next: /content/summaries
prev: /content/archetypes
title: Ordering Content
weight: 60
---
Hugo provides you with all the flexibility you need to organize how your content is ordered.
By default, content is ordered by weight, then by date with the most
recent date first, but alternative sorting (by `title` and `linktitle`) is
also available. The order the content would appear is specified in
the [list template](/templates/list/).
_Both the `date` and `weight` fields are optional._
Unweighted pages appear at the end of the list. If no weights are provided (or
if weights are the same), `date` will be used to sort. If neither is provided,
content will be ordered based on how it's read off the disk, and no order is
guaranteed.
## Assigning weight to content
```toml
+++
weight = 4
title = "Three"
date = "2012-04-06"
+++
Front Matter with Ordered Pages 3
```
## Ordering Content Within Taxonomies
Please see the [Taxonomy Ordering Documentation](/taxonomies/ordering/).
-175
View File
@@ -1,175 +0,0 @@
---
aliases:
- /doc/organization/
lastmod: 2015-09-27
date: 2013-07-01
linktitle: Organization
menu:
main:
parent: content
next: /content/supported-formats
prev: /overview/source-directory
title: Content Organization
weight: 10
toc: true
---
Hugo uses files (see [supported formats](/content/supported-formats/)) 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. Hugo supports content nested at any level. The top level is special
in Hugo and is used as the [section](/content/sections/).
.
└── content
└── about
| └── _index.md // <- http://1.com/about/
├── post
| ├── firstpost.md // <- http://1.com/post/firstpost/
| ├── happy
| | └── ness.md // <- http://1.com/post/happy/ness/
| └── secondpost.md // <- http://1.com/post/secondpost/
└── quote
├── first.md // <- http://1.com/quote/first/
└── second.md // <- http://1.com/quote/second/
**Here's the same organization run with `hugo --uglyURLs`**
.
└── content
└── about
| └── _index.md // <- http://1.com/about/
├── post
| ├── firstpost.md // <- http://1.com/post/firstpost.html
| ├── happy
| | └── ness.md // <- http://1.com/post/happy/ness.html
| └── secondpost.md // <- http://1.com/post/secondpost.html
└── quote
├── first.md // <- http://1.com/quote/first.html
└── second.md // <- http://1.com/quote/second.html
## Destinations
Hugo believes that you organize your content with a purpose. The same structure
that works to organize your source content is used to organize the rendered
site. As displayed above, the organization of the source content will be
mirrored in the destination.
Notice that the first level `about/` page URL was created using a directory
named "about" with a single `_index.md` file inside. Find out more about `_index.md` specifically in [content for the homepage and other list pages](https://gohugo.io/overview/source-directory#content-for-home-page-and-other-list-pages).
There are times when one would need more control over their content. In these
cases, there are a variety of things that can be specified in the front matter
to determine the destination of a specific piece of content.
The following items are defined in order; latter items in the list will override
earlier settings.
### filename
This isn't in the front matter, but is the actual name of the file minus the
extension. This will be the name of the file in the destination.
### slug
Defined in the front matter, the `slug` can take the place of the filename for the
destination.
### filepath
The actual path to the file on disk. Destination will create the destination
with the same path. Includes [section](/content/sections/).
### section
`section` is determined by its location on disk and *cannot* be specified in the front matter. See [section](/content/sections/).
### type
`type` is also determined by its location on disk but, unlike `section`, it *can* be specified in the front matter. See [type](/content/types/).
### path
`path` can be provided in the front matter. This will replace the actual
path to the file on disk. Destination will create the destination with the same
path. Includes [section](/content/sections/).
### url
A complete URL can be provided. This will override all the above as it pertains
to the end destination. This must be the path from the baseURL (starting with a "/").
When a `url` is provided, it will be used exactly. Using `url` will ignore the
`--uglyURLs` setting.
## Path breakdown in Hugo
### Content
. path slug
. ⊢-------^----⊣ ⊢------^-------⊣
content/extras/indexes/category-example/index.html
. section slug
. ⊢--^--⊣ ⊢------^-------⊣
content/extras/indexes/category-example/index.html
. section slug
. ⊢--^--⊣⊢--^--⊣
content/extras/indexes/index.html
### Destination
permalink
⊢--------------^-------------⊣
http://spf13.com/projects/hugo
baseURL section slug
⊢-----^--------⊣ ⊢--^---⊣ ⊢-^⊣
http://spf13.com/projects/hugo
baseURL section slug
⊢-----^--------⊣ ⊢--^--⊣ ⊢--^--⊣
http://spf13.com/extras/indexes/example
baseURL path slug
⊢-----^--------⊣ ⊢------^-----⊣ ⊢--^--⊣
http://spf13.com/extras/indexes/example
baseURL url
⊢-----^--------⊣ ⊢-----^-----⊣
http://spf13.com/projects/hugo
baseURL url
⊢-----^--------⊣ ⊢--------^-----------⊣
http://spf13.com/extras/indexes/example
**section** = which type the content is by default
* based on content location
* front matter overrides
**slug** = name.ext or name/
* based on content-name.md
* front matter overrides
**path** = section + path to file excluding slug
* based on path to content location
**url** = relative URL
* defined in front matter
* overrides all the above
-54
View File
@@ -1,54 +0,0 @@
---
lastmod: 2015-12-23
date: 2013-07-01
menu:
main:
parent: content
next: /content/types
notoc: true
prev: /content/front-matter
title: Sections
weight: 30
---
Hugo believes that you organize your content with a purpose. The same structure
that works to organize your source content is used to organize the rendered
site (see [Organization](/content/organization/)). Following this pattern Hugo
uses the top level of your content organization as **the Section**.
The following example site uses two sections, "post" and "quote".
{{< nohighlight >}}.
└── content
├── post
| ├── firstpost.md // <- http://1.com/post/firstpost/
| ├── happy
| | └── ness.md // <- http://1.com/post/happy/ness/
| └── secondpost.md // <- http://1.com/post/secondpost/
└── quote
├── first.md // <- http://1.com/quote/first/
└── second.md // <- http://1.com/quote/second/
{{< /nohighlight >}}
## Section Lists
Hugo will automatically create pages for each section root that list all
of the content in that section. See [List Templates](/templates/list/)
for details on customizing the way they appear.
Section pages can also have a content file and frontmatter, see [Source Organization]({{< relref "overview/source-directory.md#content-for-home-page-and-other-list-pages" >}}).
## Sections and Types
By default everything created within a section will use the content type
that matches the section name.
Section defined in the front matter have the same impact.
To change the type of a given piece of content, simply define the type
in the front matter.
If a layout for a given type hasn't been provided, a default type template will
be used instead provided it exists.

Some files were not shown because too many files have changed in this diff Show More