diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index a09c56df5..000000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/.idea diff --git a/docs/archetypes/default.md b/docs/archetypes/default.md deleted file mode 100644 index 6d6497c4d..000000000 --- a/docs/archetypes/default.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -weight = 5 -[menu] - [menu.main] - parent = "x" -+++ diff --git a/docs/archetypes/showcase.md b/docs/archetypes/showcase.md deleted file mode 100644 index ebe87035a..000000000 --- a/docs/archetypes/showcase.md +++ /dev/null @@ -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 ---- - diff --git a/docs/config.toml b/docs/config.toml deleted file mode 100644 index c3cf3794b..000000000 --- a/docs/config.toml +++ /dev/null @@ -1,118 +0,0 @@ -title = "Hugo: A Fast and Flexible Website Generator" -baseurl = "http://gohugo.io/" -MetaDataFormat = "yaml" -pluralizeListTitles = false - -[blackfriday] - plainIDAnchors = true - -[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.23-DEV" - -[taxonomies] - tag = "tags" - group = "groups" - -[[menu.main]] - name = "Download Hugo" - pre = "" - url = "https://github.com/gohugoio/hugo/releases" - weight = -200 -[[menu.main]] - name = "Site Showcase" - pre = "" - url = "/showcase/" - weight = -180 -[[menu.main]] - name = "Theme Showcase" - pre = "" - url = "http://themes.gohugo.io" - weight = -170 -[[menu.main]] - name = "Press & Articles" - pre = "" - url = "/community/press/" - weight = -160 -[[menu.main]] - name = "Discuss Hugo" - pre = "" - url = "http://discuss.gohugo.io/" - weight = -150 -[[menu.main]] - name = "About Hugo" - identifier = "about" - pre = "" - weight = -110 -[[menu.main]] - name = "Release Notes" - url = "/release-notes/" - pre = "" - weight = -111 -[[menu.main]] - name = "Getting Started" - identifier = "getting started" - pre = "" - weight = -100 -[[menu.main]] - name = "Content" - identifier = "content" - pre = "" - weight = -90 -[[menu.main]] - name = "Themes" - identifier = "themes" - pre = "" - weight = -85 -[[menu.main]] - parent = "themes" - name = "Theme Showcase" - url = "http://themes.gohugo.io" - weight = -170 -[[menu.main]] - name = "Templates" - identifier = "layout" - pre = "" - weight = -80 -[[menu.main]] - name = "Taxonomies" - identifier = "taxonomy" - pre = "" - weight = -70 -[[menu.main]] - name = "Extras" - identifier = "extras" - pre = "" - weight = -60 -[[menu.main]] - name = "Community" - identifier = "community" - pre = "" - weight = -50 -[[menu.main]] - parent = "community" - name = "Discussion Forum" - url = "http://discuss.gohugo.io" - weight = 150 -[[menu.main]] - name = "Tutorials" - identifier = "tutorials" - pre = "" - weight = -40 -[[menu.main]] - name = "Troubleshooting" - identifier = "troubleshooting" - pre = "" - weight = -30 -[[menu.main]] - name = "Tools" - url = "/tools/" - pre = "" - weight = -25 -[[menu.main]] - name = "Hugo Cmd Reference" - identifier = "commands" - pre = "" - weight = -20 - url = "/commands/" diff --git a/docs/content/commands/hugo.md b/docs/content/commands/hugo.md deleted file mode 100644 index f50fa1d87..000000000 --- a/docs/content/commands/hugo.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo" -slug: hugo -url: /commands/hugo/ ---- -## hugo - -hugo builds your site - -### Synopsis - - -hugo is the main command, used to build your Hugo site. - -Hugo is a Fast and Flexible Static Site Generator -built with love by spf13 and friends in Go. - -Complete documentation is available at http://gohugo.io/. - -``` -hugo [flags] -``` - -### Options - -``` - -b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/ - -D, --buildDrafts include content marked as draft - -E, --buildExpired include expired content - -F, --buildFuture include content with publishdate in the future - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ - --canonifyURLs if true, all relative URLs will be canonicalized using baseURL - --cleanDestinationDir remove files from destination not found in static directories - --config string config file (default is path/config.yaml|json|toml) - -c, --contentDir string filesystem path to content directory - -d, --destination string filesystem path to write files to - --disable404 do not render 404 page - --disableKinds stringSlice disable different kind of pages (home, RSS etc.) - --disableRSS do not build RSS files - --disableSitemap do not build Sitemap file - --enableGitInfo add Git revision, date and author info to the pages - --forceSyncStatic copy all files when static is changed. - -h, --help help for hugo - --i18n-warnings print missing translations - --ignoreCache ignores the cache directory - -l, --layoutDir string filesystem path to layout directory - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --noChmod don't sync permission mode of files - --noTimes don't sync modification time of files - --pluralizeListTitles pluralize titles in lists using inflect (default true) - --preserveTaxonomyNames preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu") - --quiet build in quiet mode - --renderToMemory render to memory (only useful for benchmark testing) - -s, --source string filesystem path to read files relative from - --stepAnalysis display memory and timing of different steps of the program - -t, --theme string theme to use (located in /themes/THEMENAME/) - --themesDir string filesystem path to themes directory - --uglyURLs if true, use /filename.html instead of /filename/ - -v, --verbose verbose output - --verboseLog verbose logging - -w, --watch watch filesystem for changes and recreate as needed -``` - -### SEE ALSO -* [hugo benchmark](/commands/hugo_benchmark/) - Benchmark Hugo by building a site a number of times. -* [hugo config](/commands/hugo_config/) - Print the site configuration -* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats -* [hugo env](/commands/hugo_env/) - Print Hugo version and environment info -* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. -* [hugo import](/commands/hugo_import/) - Import your site from others. -* [hugo list](/commands/hugo_list/) - Listing out various types of content -* [hugo new](/commands/hugo_new/) - Create new content for your site -* [hugo server](/commands/hugo_server/) - A high performance webserver -* [hugo undraft](/commands/hugo_undraft/) - Undraft changes the content's draft status from 'True' to 'False' -* [hugo version](/commands/hugo_version/) - Print the version number of Hugo - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_benchmark.md b/docs/content/commands/hugo_benchmark.md deleted file mode 100644 index df7c0e24d..000000000 --- a/docs/content/commands/hugo_benchmark.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo benchmark" -slug: hugo_benchmark -url: /commands/hugo_benchmark/ ---- -## hugo benchmark - -Benchmark Hugo by building a site a number of times. - -### Synopsis - - -Hugo can build a site many times over and analyze the running process -creating a benchmark. - -``` -hugo benchmark [flags] -``` - -### Options - -``` - -b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/ - -D, --buildDrafts include content marked as draft - -E, --buildExpired include expired content - -F, --buildFuture include content with publishdate in the future - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ - --canonifyURLs if true, all relative URLs will be canonicalized using baseURL - --cleanDestinationDir remove files from destination not found in static directories - -c, --contentDir string filesystem path to content directory - -n, --count int number of times to build the site (default 13) - --cpuprofile string path/filename for the CPU profile file - -d, --destination string filesystem path to write files to - --disable404 do not render 404 page - --disableKinds stringSlice disable different kind of pages (home, RSS etc.) - --disableRSS do not build RSS files - --disableSitemap do not build Sitemap file - --enableGitInfo add Git revision, date and author info to the pages - --forceSyncStatic copy all files when static is changed. - -h, --help help for benchmark - --i18n-warnings print missing translations - --ignoreCache ignores the cache directory - -l, --layoutDir string filesystem path to layout directory - --memprofile string path/filename for the memory profile file - --noChmod don't sync permission mode of files - --noTimes don't sync modification time of files - --pluralizeListTitles pluralize titles in lists using inflect (default true) - --preserveTaxonomyNames preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu") - --renderToMemory render to memory (only useful for benchmark testing) - -s, --source string filesystem path to read files relative from - --stepAnalysis display memory and timing of different steps of the program - -t, --theme string theme to use (located in /themes/THEMENAME/) - --themesDir string filesystem path to themes directory - --uglyURLs if true, use /filename.html instead of /filename/ -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_check.md b/docs/content/commands/hugo_check.md deleted file mode 100644 index 19c99f7ca..000000000 --- a/docs/content/commands/hugo_check.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -date: 2017-04-26T22:40:07+02:00 -title: "hugo check" -slug: hugo_check -url: /commands/hugo_check/ ---- -## hugo check - -Contains some verification checks - -### Synopsis - - -Contains some verification checks - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site -* [hugo check ulimit](/commands/hugo_check_ulimit/) - Check system ulimit settings - -###### Auto generated by spf13/cobra on 26-Apr-2017 diff --git a/docs/content/commands/hugo_check_ulimit.md b/docs/content/commands/hugo_check_ulimit.md deleted file mode 100644 index 550e07a1f..000000000 --- a/docs/content/commands/hugo_check_ulimit.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -date: 2017-04-26T22:40:07+02:00 -title: "hugo check ulimit" -slug: hugo_check_ulimit -url: /commands/hugo_check_ulimit/ ---- -## hugo check ulimit - -Check system ulimit settings - -### Synopsis - - -Hugo will inspect the current ulimit settings on the system. -This is primarily to ensure that Hugo can watch enough files on some OSs - -``` -hugo check ulimit -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo check](/commands/hugo_check/) - Contains some verification checks - -###### Auto generated by spf13/cobra on 26-Apr-2017 diff --git a/docs/content/commands/hugo_config.md b/docs/content/commands/hugo_config.md deleted file mode 100644 index 3429f302e..000000000 --- a/docs/content/commands/hugo_config.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo config" -slug: hugo_config -url: /commands/hugo_config/ ---- -## hugo config - -Print the site configuration - -### Synopsis - - -Print the site configuration, both default and custom settings. - -``` -hugo config [flags] -``` - -### Options - -``` - -h, --help help for config -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_convert.md b/docs/content/commands/hugo_convert.md deleted file mode 100644 index 9d5429311..000000000 --- a/docs/content/commands/hugo_convert.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo convert" -slug: hugo_convert -url: /commands/hugo_convert/ ---- -## hugo convert - -Convert your content to different formats - -### Synopsis - - -Convert your content (e.g. front matter) to different formats. - -See convert's subcommands toJSON, toTOML and toYAML for more information. - -### Options - -``` - -h, --help help for convert - -o, --output string filesystem path to write files to - -s, --source string filesystem path to read files relative from - --unsafe enable less safe operations, please backup first -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site -* [hugo convert toJSON](/commands/hugo_convert_tojson/) - Convert front matter to JSON -* [hugo convert toTOML](/commands/hugo_convert_totoml/) - Convert front matter to TOML -* [hugo convert toYAML](/commands/hugo_convert_toyaml/) - Convert front matter to YAML - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_convert_toJSON.md b/docs/content/commands/hugo_convert_toJSON.md deleted file mode 100644 index 4d0c19957..000000000 --- a/docs/content/commands/hugo_convert_toJSON.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo convert toJSON" -slug: hugo_convert_toJSON -url: /commands/hugo_convert_tojson/ ---- -## hugo convert toJSON - -Convert front matter to JSON - -### Synopsis - - -toJSON converts all front matter in the content directory -to use JSON for the front matter. - -``` -hugo convert toJSON [flags] -``` - -### Options - -``` - -h, --help help for toJSON -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - -o, --output string filesystem path to write files to - --quiet build in quiet mode - -s, --source string filesystem path to read files relative from - --unsafe enable less safe operations, please backup first - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_convert_toTOML.md b/docs/content/commands/hugo_convert_toTOML.md deleted file mode 100644 index c72a0513b..000000000 --- a/docs/content/commands/hugo_convert_toTOML.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo convert toTOML" -slug: hugo_convert_toTOML -url: /commands/hugo_convert_totoml/ ---- -## hugo convert toTOML - -Convert front matter to TOML - -### Synopsis - - -toTOML converts all front matter in the content directory -to use TOML for the front matter. - -``` -hugo convert toTOML [flags] -``` - -### Options - -``` - -h, --help help for toTOML -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - -o, --output string filesystem path to write files to - --quiet build in quiet mode - -s, --source string filesystem path to read files relative from - --unsafe enable less safe operations, please backup first - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_convert_toYAML.md b/docs/content/commands/hugo_convert_toYAML.md deleted file mode 100644 index 8e8943ba8..000000000 --- a/docs/content/commands/hugo_convert_toYAML.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo convert toYAML" -slug: hugo_convert_toYAML -url: /commands/hugo_convert_toyaml/ ---- -## hugo convert toYAML - -Convert front matter to YAML - -### Synopsis - - -toYAML converts all front matter in the content directory -to use YAML for the front matter. - -``` -hugo convert toYAML [flags] -``` - -### Options - -``` - -h, --help help for toYAML -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - -o, --output string filesystem path to write files to - --quiet build in quiet mode - -s, --source string filesystem path to read files relative from - --unsafe enable less safe operations, please backup first - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_env.md b/docs/content/commands/hugo_env.md deleted file mode 100644 index d58467d81..000000000 --- a/docs/content/commands/hugo_env.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo env" -slug: hugo_env -url: /commands/hugo_env/ ---- -## hugo env - -Print Hugo version and environment info - -### Synopsis - - -Print Hugo version and environment info. This is useful in Hugo bug reports. - -``` -hugo env [flags] -``` - -### Options - -``` - -h, --help help for env -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_gen.md b/docs/content/commands/hugo_gen.md deleted file mode 100644 index 693029de7..000000000 --- a/docs/content/commands/hugo_gen.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo gen" -slug: hugo_gen -url: /commands/hugo_gen/ ---- -## hugo gen - -A collection of several useful generators. - -### Synopsis - - -A collection of several useful generators. - -### Options - -``` - -h, --help help for gen -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site -* [hugo gen autocomplete](/commands/hugo_gen_autocomplete/) - Generate shell autocompletion script for Hugo -* [hugo gen 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 diff --git a/docs/content/commands/hugo_gen_autocomplete.md b/docs/content/commands/hugo_gen_autocomplete.md deleted file mode 100644 index 6ea504dc7..000000000 --- a/docs/content/commands/hugo_gen_autocomplete.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo gen autocomplete" -slug: hugo_gen_autocomplete -url: /commands/hugo_gen_autocomplete/ ---- -## hugo gen autocomplete - -Generate shell autocompletion script for Hugo - -### Synopsis - - -Generates a shell autocompletion script for Hugo. - -NOTE: The current version supports Bash only. - This should work for *nix systems with Bash installed. - -By default, the file is written directly to /etc/bash_completion.d -for convenience, and the command may need superuser rights, e.g.: - - $ sudo hugo gen autocomplete - -Add `--completionfile=/path/to/file` flag to set alternative -file-path and name. - -Logout and in again to reload the completion scripts, -or just source them in directly: - - $ . /etc/bash_completion - -``` -hugo gen autocomplete [flags] -``` - -### Options - -``` - --completionfile string autocompletion file (default "/etc/bash_completion.d/hugo.sh") - -h, --help help for autocomplete - --type string autocompletion type (currently only bash supported) (default "bash") -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_gen_doc.md b/docs/content/commands/hugo_gen_doc.md deleted file mode 100644 index 2ca15e2e4..000000000 --- a/docs/content/commands/hugo_gen_doc.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo gen doc" -slug: hugo_gen_doc -url: /commands/hugo_gen_doc/ ---- -## hugo gen doc - -Generate Markdown documentation for the Hugo CLI. - -### Synopsis - - -Generate Markdown documentation for the Hugo CLI. - -This command is, mostly, used to create up-to-date documentation -of Hugo's command-line interface for http://gohugo.io/. - -It creates one Markdown file per command with front matter suitable -for rendering in Hugo. - -``` -hugo gen doc [flags] -``` - -### Options - -``` - --dir string the directory to write the doc. (default "/tmp/hugodoc/") - -h, --help help for doc -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_gen_man.md b/docs/content/commands/hugo_gen_man.md deleted file mode 100644 index 3d69cda54..000000000 --- a/docs/content/commands/hugo_gen_man.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo gen man" -slug: hugo_gen_man -url: /commands/hugo_gen_man/ ---- -## hugo gen man - -Generate man pages for the Hugo CLI - -### Synopsis - - -This command automatically generates up-to-date man pages of Hugo's -command-line interface. By default, it creates the man page files -in the "man" directory under the current directory. - -``` -hugo gen man [flags] -``` - -### Options - -``` - --dir string the directory to write the man pages. (default "man/") - -h, --help help for man -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_import.md b/docs/content/commands/hugo_import.md deleted file mode 100644 index 0e0b70e20..000000000 --- a/docs/content/commands/hugo_import.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo import" -slug: hugo_import -url: /commands/hugo_import/ ---- -## hugo import - -Import your site from others. - -### Synopsis - - -Import your site from other web site generators like Jekyll. - -Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_path`. - -### Options - -``` - -h, --help help for import -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site -* [hugo import jekyll](/commands/hugo_import_jekyll/) - hugo import from Jekyll - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_import_jekyll.md b/docs/content/commands/hugo_import_jekyll.md deleted file mode 100644 index ae9ace841..000000000 --- a/docs/content/commands/hugo_import_jekyll.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo import jekyll" -slug: hugo_import_jekyll -url: /commands/hugo_import_jekyll/ ---- -## hugo import jekyll - -hugo import from Jekyll - -### Synopsis - - -hugo import from Jekyll. - -Import from Jekyll requires two paths, e.g. `hugo import jekyll jekyll_root_path target_path`. - -``` -hugo import jekyll [flags] -``` - -### Options - -``` - --force allow import into non-empty target directory - -h, --help help for jekyll -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo import](/commands/hugo_import/) - Import your site from others. - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_list.md b/docs/content/commands/hugo_list.md deleted file mode 100644 index e9d983144..000000000 --- a/docs/content/commands/hugo_list.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo list" -slug: hugo_list -url: /commands/hugo_list/ ---- -## hugo list - -Listing out various types of content - -### Synopsis - - -Listing out various types of content. - -List requires a subcommand, e.g. `hugo list drafts`. - -### Options - -``` - -h, --help help for list - -s, --source string filesystem path to read files relative from -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site -* [hugo list drafts](/commands/hugo_list_drafts/) - List all drafts -* [hugo list expired](/commands/hugo_list_expired/) - List all posts already expired -* [hugo list future](/commands/hugo_list_future/) - List all posts dated in the future - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_list_drafts.md b/docs/content/commands/hugo_list_drafts.md deleted file mode 100644 index 0d921f6e0..000000000 --- a/docs/content/commands/hugo_list_drafts.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo list drafts" -slug: hugo_list_drafts -url: /commands/hugo_list_drafts/ ---- -## hugo list drafts - -List all drafts - -### Synopsis - - -List all of the drafts in your content directory. - -``` -hugo list drafts [flags] -``` - -### Options - -``` - -h, --help help for drafts -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -s, --source string filesystem path to read files relative from - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo list](/commands/hugo_list/) - Listing out various types of content - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_list_expired.md b/docs/content/commands/hugo_list_expired.md deleted file mode 100644 index 75bc39aed..000000000 --- a/docs/content/commands/hugo_list_expired.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo list expired" -slug: hugo_list_expired -url: /commands/hugo_list_expired/ ---- -## hugo list expired - -List all posts already expired - -### Synopsis - - -List all of the posts in your content directory which has already -expired. - -``` -hugo list expired [flags] -``` - -### Options - -``` - -h, --help help for expired -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -s, --source string filesystem path to read files relative from - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo list](/commands/hugo_list/) - Listing out various types of content - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_list_future.md b/docs/content/commands/hugo_list_future.md deleted file mode 100644 index e6fb917bb..000000000 --- a/docs/content/commands/hugo_list_future.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo list future" -slug: hugo_list_future -url: /commands/hugo_list_future/ ---- -## hugo list future - -List all posts dated in the future - -### Synopsis - - -List all of the posts in your content directory which will be -posted in the future. - -``` -hugo list future [flags] -``` - -### Options - -``` - -h, --help help for future -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -s, --source string filesystem path to read files relative from - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo list](/commands/hugo_list/) - Listing out various types of content - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_new.md b/docs/content/commands/hugo_new.md deleted file mode 100644 index f3ef722e9..000000000 --- a/docs/content/commands/hugo_new.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo new" -slug: hugo_new -url: /commands/hugo_new/ ---- -## hugo new - -Create new content for your site - -### Synopsis - - -Create a new content file and automatically set the date and title. -It will guess which kind of file to create based on the path provided. - -You can also specify the kind with `-k KIND`. - -If archetypes are provided in your theme or site, they will be used. - -``` -hugo new [path] [flags] -``` - -### Options - -``` - --editor string edit new content with this editor, if provided - -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 -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site -* [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton) -* [hugo new theme](/commands/hugo_new_theme/) - Create a new theme - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_new_site.md b/docs/content/commands/hugo_new_site.md deleted file mode 100644 index eefc0a41d..000000000 --- a/docs/content/commands/hugo_new_site.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo new site" -slug: hugo_new_site -url: /commands/hugo_new_site/ ---- -## hugo new site - -Create a new site (skeleton) - -### Synopsis - - -Create a new site in the provided directory. -The new site will have the correct structure, but no content or theme yet. -Use `hugo new [contentPath]` to create new content. - -``` -hugo new site [path] [flags] -``` - -### Options - -``` - --force init inside non-empty directory - -f, --format string config & frontmatter format (default "toml") - -h, --help help for site -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -s, --source string filesystem path to read files relative from - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo new](/commands/hugo_new/) - Create new content for your site - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_new_theme.md b/docs/content/commands/hugo_new_theme.md deleted file mode 100644 index a4c589ede..000000000 --- a/docs/content/commands/hugo_new_theme.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo new theme" -slug: hugo_new_theme -url: /commands/hugo_new_theme/ ---- -## hugo new theme - -Create a new theme - -### Synopsis - - -Create a new theme (skeleton) called [name] in the current directory. -New theme is a skeleton. Please add content to the touched files. Add your -name to the copyright line in the license and adjust the theme.toml file -as you see fit. - -``` -hugo new theme [name] [flags] -``` - -### Options - -``` - -h, --help help for theme -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -s, --source string filesystem path to read files relative from - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo new](/commands/hugo_new/) - Create new content for your site - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_server.md b/docs/content/commands/hugo_server.md deleted file mode 100644 index 7593ed42e..000000000 --- a/docs/content/commands/hugo_server.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo server" -slug: hugo_server -url: /commands/hugo_server/ ---- -## hugo server - -A high performance webserver - -### Synopsis - - -Hugo provides its own webserver which builds and serves the site. -While hugo server is high performance, it is a webserver with limited options. -Many run it in production, but the standard behavior is for people to use it -in development and use a more full featured server such as Nginx or Caddy. - -'hugo server' will avoid writing the rendered and served content to disk, -preferring to store it in memory. - -By default hugo will also watch your files for any changes you make and -automatically rebuild the site. It will then live reload any open browser pages -and push the latest content to them. As most Hugo sites are built in a fraction -of a second, you will be able to save and see your changes nearly instantly. - -``` -hugo server [flags] -``` - -### Options - -``` - --appendPort append port to baseURL (default true) - -b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/ - --bind string interface to which the server will bind (default "127.0.0.1") - -D, --buildDrafts include content marked as draft - -E, --buildExpired include expired content - -F, --buildFuture include content with publishdate in the future - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ - --canonifyURLs if true, all relative URLs will be canonicalized using baseURL - --cleanDestinationDir remove files from destination not found in static directories - -c, --contentDir string filesystem path to content directory - -d, --destination string filesystem path to write files to - --disable404 do not render 404 page - --disableKinds stringSlice disable different kind of pages (home, RSS etc.) - --disableLiveReload watch without enabling live browser reload on rebuild - --disableRSS do not build RSS files - --disableSitemap do not build Sitemap file - --enableGitInfo add Git revision, date and author info to the pages - --forceSyncStatic copy all files when static is changed. - -h, --help help for server - --i18n-warnings print missing translations - --ignoreCache ignores the cache directory - -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 - --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) - -p, --port int port on which the server will listen (default 1313) - --preserveTaxonomyNames preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu") - --renderToDisk render to Destination path (default is render to memory & serve from there) - -s, --source string filesystem path to read files relative from - --stepAnalysis display memory and timing of different steps of the program - -t, --theme string theme to use (located in /themes/THEMENAME/) - --themesDir string filesystem path to themes directory - --uglyURLs if true, use /filename.html instead of /filename/ - -w, --watch watch filesystem for changes and recreate as needed (default true) -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_undraft.md b/docs/content/commands/hugo_undraft.md deleted file mode 100644 index a71cb8791..000000000 --- a/docs/content/commands/hugo_undraft.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo undraft" -slug: hugo_undraft -url: /commands/hugo_undraft/ ---- -## hugo undraft - -Undraft changes the content's draft status from 'True' to 'False' - -### Synopsis - - -Undraft changes the content's draft status from 'True' to 'False' -and updates the date to the current date and time. -If the content's draft status is 'False', nothing is done. - -``` -hugo undraft path/to/content [flags] -``` - -### Options - -``` - -h, --help help for undraft -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/commands/hugo_version.md b/docs/content/commands/hugo_version.md deleted file mode 100644 index 5b88fbe8d..000000000 --- a/docs/content/commands/hugo_version.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -date: 2017-05-23T20:59:46+03:00 -title: "hugo version" -slug: hugo_version -url: /commands/hugo_version/ ---- -## hugo version - -Print the version number of Hugo - -### Synopsis - - -All software has versions. This is Hugo's. - -``` -hugo version [flags] -``` - -### Options - -``` - -h, --help help for version -``` - -### Options inherited from parent commands - -``` - --config string config file (default is path/config.yaml|json|toml) - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging -``` - -### SEE ALSO -* [hugo](/commands/hugo/) - hugo builds your site - -###### Auto generated by spf13/cobra on 23-May-2017 diff --git a/docs/content/community/contributing.md b/docs/content/community/contributing.md deleted file mode 100644 index 44518d70f..000000000 --- a/docs/content/community/contributing.md +++ /dev/null @@ -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/gohugoio/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/gohugoio/hugo) and [Appveyor](https://ci.appveyor.com/project/gohugoio/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/gohugoio/hugo - -## Running Hugo - - cd $HOME/go/src/github.com/gohugoio/hugo - go run main.go - -## Building Hugo - - cd $HOME/go/src/github.com/gohugoio/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/gohugoio/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/gohugoio/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 diff --git a/docs/content/community/mailing-list.md b/docs/content/community/mailing-list.md deleted file mode 100644 index 60c680089..000000000 --- a/docs/content/community/mailing-list.md +++ /dev/null @@ -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/gohugoio/hugo/issues diff --git a/docs/content/community/press.md b/docs/content/community/press.md deleted file mode 100644 index 89000cf8b..000000000 --- a/docs/content/community/press.md +++ /dev/null @@ -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/gohugoio/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) (Chinese, Continious integration) | 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) (German, $) | Christian Helmbold | 2016-05-27 | -| [Cómo hacer sitios web estáticos con Hugo y Go - Platzi](https://www.youtube.com/watch?v=qaXXpdiCHXE) (Video tutorial) | 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 | -| [HugoのデプロイをWerckerからCircle CIに変更した - log](http://log.deprode.net/logs/2016-01-17/) | Deprode | 2016-01-17 | -| [Static site generators: el futuro de las webs estáticas
(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) (Deutsch/German) | 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 | -| [通过webhook将Hugo自动部署至GitHub Pages和GitCafe Pages (Automated deployment)](http://blog.coderzh.com/2015/09/13/use-webhook-automated-deploy-hugo/) | CoderZh | 2015-09-13 | -| [使用hugo搭建个人博客站点 (Using Hugo to build a personal blog site)](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/) (German) | Armin Hanisch | 2015-08-18 | -| [Générer votre site web statique avec Hugo (Generate your static site with Hugo)](http://www.linux-pratique.com/?p=191) | Benoît Benedetti | 2015-06-26 | -| [Hugo向けの新しいテーマを作った (I created a new theme for Hugo)](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 | -| [WindowsでHugoを使う](http://ureta.net/2015/05/hugo-on-windows/) | うれ太郎 | 2015-05-01 | -| [Hugoのshortcodesを用いてサイトにスライドなどを埋め込む](http://blog.yucchiy.com/2015/04/29/hugo-shortcode/) | Yucchiy | 2015-04-29 | -| [HugoとCircleCIでGitHub PagesにBlogを公開してみたら超簡単だった](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 | -| [blogをoctopressからHugoに乗り換えたメモ](http://blog.jigyakkuma.org/2015/02/11/hugo/) | jigyakkuma | 2015-02-11 | -| [Hugoでブログをつくった](http://porgy13.github.io/post/new-hugo-blog/) | porgy13 | 2015-02-07 | -| [Hugoにブログを移行した](http://keichi.net/post/first/) | Keichi Takahashi | 2015-02-04 | -| [Hugo静态网站生成器中文教程](http://nanshu.wang/post/2015-01-31/) | Nanshu Wang | 2015-01-31 | -| [Hugo + GitHub Pages + Wercker CI = ¥0(無料)
でコマンド 1 発(自動化)でサイト
・ブログを公開・運営・分析・収益化
](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 | -| [Jekyllが許されるのは小学生までだよね](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 | -| [把这个博客静态化了 (Migrate to Hugo)](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 Aren’t 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 | -| [使用Hugo搭建免费个人Blog (How to use Hugo)](http://ulricqin.com/post/how-to-use-hugo/) | Ulric Qin 秦晓辉 | 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 | -| [再次搬家 (Move from WordPress to Hugo)](http://www.chingli.com/misc/move-from-wordpress-to-hugo/) | 青砾 (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 | -| [开源之静态站点生成器排行榜
(Leaderboard of open-source static website generators)](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/), [中文](http://ktmud.github.io/huggle/zh/intro/)) | Jesse Yang 杨建超 | 2014-03-08 | -| [Powered by Hugo](http://kieranhealy.org/blog/archives/2014/02/24/powered-by-hugo/) | Kieran Healy | 2014-02-24 | -| [静的サイトを素早く構築するために
GoLangで作られたジェネレータHugo
](http://hamasyou.com/blog/2014/02/21/hugo/)|
Shogo Hamada
濱田章吾
| 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 | diff --git a/docs/content/content/archetypes.md b/docs/content/content/archetypes.md deleted file mode 100644 index 88efdbd0f..000000000 --- a/docs/content/content/archetypes.md +++ /dev/null @@ -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/gohugoio/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 - - - -## Sample Photos - - - -## Conclusion - - - -``` - -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 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/gohugoio/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/gohugoio/hugo/pull/785). diff --git a/docs/content/content/example.md b/docs/content/content/example.md deleted file mode 100644 index 022764994..000000000 --- a/docs/content/content/example.md +++ /dev/null @@ -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: - -
+++
-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"
-+++
-# 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.
-
- -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/). diff --git a/docs/content/content/front-matter.md b/docs/content/content/front-matter.md deleted file mode 100644 index e61a48f55..000000000 --- a/docs/content/content/front-matter.md +++ /dev/null @@ -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 - -
+++
-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
-
- -## 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. - diff --git a/docs/content/content/markdown-extras.md b/docs/content/content/markdown-extras.md deleted file mode 100644 index 7673c53da..000000000 --- a/docs/content/content/markdown-extras.md +++ /dev/null @@ -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 - -
    -
  • a task list item
  • -
  • list syntax required
  • -
  • incomplete
  • -
  • completed
  • -
-``` diff --git a/docs/content/content/multilingual.md b/docs/content/content/multilingual.md deleted file mode 100644 index 5e09bc539..000000000 --- a/docs/content/content/multilingual.md +++ /dev/null @@ -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 }} -

{{ i18n "translations" }}

- -{{ 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 -
    - {{- $currentPage := . -}} - {{ range .Site.Menus.main -}} -
  • - {{ .Name }} -
  • - {{- end }} -
- -``` - -### 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. diff --git a/docs/content/content/ordering.md b/docs/content/content/ordering.md deleted file mode 100644 index d0933a608..000000000 --- a/docs/content/content/ordering.md +++ /dev/null @@ -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/). diff --git a/docs/content/content/organization.md b/docs/content/content/organization.md deleted file mode 100644 index bd83fbf04..000000000 --- a/docs/content/content/organization.md +++ /dev/null @@ -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 - diff --git a/docs/content/content/sections.md b/docs/content/content/sections.md deleted file mode 100644 index c603c0872..000000000 --- a/docs/content/content/sections.md +++ /dev/null @@ -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. - - diff --git a/docs/content/content/summaries.md b/docs/content/content/summaries.md deleted file mode 100644 index 1f65d431d..000000000 --- a/docs/content/content/summaries.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2013-07-01 -menu: - main: - parent: content -notoc: true -prev: /content/ordering -next: /content/markdown-extras -title: Summaries -weight: 65 ---- - -With the use of the `.Summary` [page variable](/templates/variables/), Hugo can generate summaries of content to show snippets in summary views. The summary view snippets are automatically generated by Hugo. Where a piece of content is split for the content summary depends on whether the split is Hugo-defined or user-defined. - -Content summaries may also provide links to the original content, usually in the form of a "Read More..." link, with the help of the `.RelPermalink` or `.Permalink` variable, as well as the `.Truncated` boolean variable to determine whether such "Read More..." link is necessary. - -## Hugo-defined: automatic summary split - -By default, Hugo automatically takes the first 70 words of your content as its summary and stores it into the `.Summary` variable, which you may use in your templates. - -* 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 lumped into one paragraph. Some people like it, but some people don't. - -## User-defined: manual summary split: - -Alternatively, you may add the <!--more--> summary divider[^1] (for org content, use # more) where you want to split the article. Content prior to the summary divider will be used as that content's summary, and stored into the `.Summary` variable with all HTML formatting intact. - -[^1]: The **summary divider** is also called "more tag", "excerpt separator", etc. in other literature. - -* Pros: Freedom, precision, and improved rendering. All formatting is preserved. -* Cons: Need to remember to type <!--more--> (or # more for org content) in your content file. :-) - -Be careful to enter <!--more--> (or # more for org content) exactly, i.e. all lowercase with no whitespace, otherwise it would be treated as regular comment and ignored. - -If there is nothing but spaces and newlines after the summary divider then `.Truncated` will be false. - -## Showing Summaries - -You can show content summaries with the following code. You could do this, for example, on a [list](/templates/list/) page. - - {{ range first 10 .Data.Pages }} -
-

{{ .Title }}

- {{ .Summary }} -
- {{ if .Truncated }} - - {{ end }} - {{ end }} - -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. diff --git a/docs/content/content/supported-formats.md b/docs/content/content/supported-formats.md deleted file mode 100644 index 3fc905d6d..000000000 --- a/docs/content/content/supported-formats.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -aliases: -- /doc/supported-formats/ -lastmod: 2015-08-01 -date: 2015-08-01 -menu: - main: - parent: content -next: /content/front-matter -prev: /content/organization -title: Supported Formats -weight: 15 -toc: true ---- - - Since 0.14, Hugo has defined a new concept called _external helpers_. It means that you can write your content using Asciidoc[tor], reStructuredText or Org-Mode. If you have files with associated extensions ([details](https://github.com/gohugoio/hugo/blob/77c60a3440806067109347d04eb5368b65ea0fe8/helpers/general.go#L65)), then Hugo will call external commands to generate the content (the exception being Org-Mode content, which is parsed natively). - - This means that you will have to install the associated tool on your machine to be able to use those formats. - - For example, for Asciidoc files, Hugo will try to call __asciidoctor__ or __asciidoc__ command. - - To use those formats, just use the standard extension and the front matter exactly as you would do with natively supported _.md_ files. - - Notes: - - * as these are external commands, generation performance for that content will heavily depend on the performance of those external tools. - * this feature is still in early stage, hence feedback is even more welcome. diff --git a/docs/content/content/types.md b/docs/content/content/types.md deleted file mode 100644 index 277294881..000000000 --- a/docs/content/content/types.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -lastmod: 2015-09-28 -date: 2013-07-01 -linktitle: Types -menu: - main: - parent: content -next: /content/archetypes -prev: /content/sections -title: Content Types -weight: 40 -toc: true ---- - -Hugo has full support for different types of content. A content type can have a -unique set of meta data, template and can be automatically created by the `hugo new` -command through using content [archetypes](/content/archetypes/). - -A good example of when multiple types are needed is to look at [Tumblr](https://www.tumblr.com/). A piece -of content could be a photo, quote or post, each with different meta data and -rendered differently. - -## Assigning a content type - -Hugo assumes that your site will be organized into [sections](/content/sections/) -and each section will use the corresponding type. If you are taking advantage of -this, then each new piece of content you place into a section will automatically -inherit the type. - -Alternatively, you can set the type in the meta data under the key "`type`". - - -## Creating new content of a specific type - -Hugo has the ability to create a new content file and populate the front matter -with the data set corresponding to that type. Hugo does this by utilizing -[archetypes](/content/archetypes/). - -To create a new piece of content, use: - - hugo new relative/path/to/content.md - -For example, if I wanted to create a new post inside the post section, I would type: - - hugo new post/my-newest-post.md - - -## Defining a content type - -Creating a new content type is easy in Hugo. You simply provide the templates and archetype -that the new type will use. You only need to define the templates, archetypes and/or views -unique to that content type. Hugo will fall back to using the general templates and default archetype -whenever a specific file is not present. - -*Remember, all of the following are optional:* - -### Create Type Directory -Create a directory with the name of the type in `/layouts`. Type is always singular. *E.g. `/layouts/post`*. - -### Create single template -Create a file called `single.html` inside your directory. *E.g. `/layouts/post/single.html`*. - -### Create list template -Create a file called `post.html` inside the section lists template directory, `/layouts/section`. *E.g. `/layouts/section/post.html`*. - -### Create views -Many sites support rendering content in a few different ways, for -instance, a single page view and a summary view to be used when -displaying a [list of contents on a single page](/templates/list). -Hugo makes no assumptions here about how you want to display your -content, and will support as many different views of a content type -as your site requires. All that is required for these additional -views is that a template exists in each `/layouts/TYPE` directory -with the same name. - -### Create a corresponding archetype - -Create a file called type.md in the `/archetypes` directory. *E.g. `/archetypes/post.md`*. - -More details about archetypes can be found at the [archetypes docs](/content/archetypes/). diff --git a/docs/content/content/using-index-md.md b/docs/content/content/using-index-md.md deleted file mode 100644 index 1f1298f67..000000000 --- a/docs/content/content/using-index-md.md +++ /dev/null @@ -1,118 +0,0 @@ ---- -aliases: -- /doc/using-index-md/ -lastmod: 2017-02-22 -date: 2017-02-22 -linktitle: Using _index.md -menu: - main: - parent: content -prev: /content/example -next: /themes/overview -notoc: true -title: Using _index.md -weight: 70 ---- -# \_index.md and 'Everything is a Page' - -As of version v0.18 Hugo now treats '[everything as a page](http://bepsays.com/en/2016/12/19/hugo-018/)'. This allows you to add content and frontmatter to any page - including List pages like [Sections](/content/sections/), [Taxonomies](/taxonomies/overview/), [Taxonomy Terms pages](/templates/terms/) and even to potential 'special case' pages like the [Home page](/templates/homepage/). - -In order to take advantage of this behaviour you need to do a few things. - -1. Create an \_index.md file that contains the frontmatter and content you would like to apply. - -2. Place the \_index.md file in the correct place in the directory structure. - -3. Ensure that the respective template is configured to display `{{ .Content }}` if you wish for the content of the \_index.md file to be rendered on the respective page. - -## How \_index.md pages work - -Before continuing it's important to know that this page must reference certain templates to describe how the \_index.md page will be rendered. Hugo has a multitude of possible templates that can be used and placed in various places (think theme templates for instance). For simplicity/brevity the default/top level template location will be used to refer to the entire range of places the template can be placed. - -If this is confusing or you are unfamiliar with Hugo's template hierarchy, visit the various template pages listed below. You may need to find the 'active' template responsible for any particular page on your own site by going through the template hierarchy and matching it to your particular setup/theme you are using. - -- [Home page template](/templates/homepage/) -- [Content List templates](/templates/list/) -- [Single Content templates](/templates/content/) -- [Taxonomy Terms templates](/templates/terms/) - -Now that you've got a handle on templates lets recap some Hugo basics to understand how to use an \_index.md file with a List page. - -1. Sections and Taxonomies are 'List' pages, NOT single pages. -2. List pages are rendered using the template hierarchy found in the [Content - List Template](/templates/list/) docs. -3. The Home page, though technically a List page, can have [its own template](/templates/homepage/) at layouts/index.html rather than \_default/list.html. Many themes exploit this behaviour so you are likely to encounter this specific use case. -4. Taxonomy terms pages are 'lists of metadata' not lists of content, so [have their own templates](/templates/terms/). - -Let's put all this information together: - -> **\_index.md files used in List pages, Terms pages or the Home page are NOT rendered as single pages or with Single Content templates.** - -> **All pages, including List pages, can have frontmatter and frontmatter can have markdown content - meaning \_index.md files are the way to _provide_ frontmatter and content to the respective List/Terms/Home page.** - -Here are a couple of examples to make it clearer... - -| \_index.md location | Page affected | Rendered by | -| ------------------- | ------------ | ----------- | -| /content/post/\_index.md | site.com/post/ | /layouts/section/post.html | -| /content/categories/hugo/\_index.md | site.com/categories/hugo/ | /layouts/taxonomy/hugo.html | - -## Why \_index.md files are used - -With a Single page such as a post it's possible to add the frontmatter and content directly into the .md page itself. With List/Terms/Home pages this is not possible so \_index.md files can be used to provide that frontmatter/content to them. - -## How to display content from \_index.md files - -From the information above it should follow that content within an \_index.md file won't be rendered in its own Single Page, instead it'll be made available to the respective List/Terms/Home page. - -To **_actually render that content_** you need to ensure that the relevant template responsible for rendering the List/Terms/Home page contains (at least) `{{ .Content }}`. - -This is the way to actually display the content within the \_index.md file on the List/Terms/Home page. - -A very simple/naive example of this would be: - -```html -{{ partial "header.html" . }} -
- {{ .Content }} - {{ range .Paginator.Pages }} - {{ partial "summary.html" . }} - {{ end }} - {{ partial "pagination.html" . }} -
-{{ partial "sidebar.html" . }} -{{ partial "footer.html" . }} -``` - -You can see `{{ .Content }}` just after the `
` element. For this particular example, the content of the \_index.md file will show before the main list of summaries. - -## Where to organise an \_index.md file - -To add content and frontmatter to the home page, a section, a taxonomy or a taxonomy terms listing, add a markdown file with the base name \_index on the relevant place on the file system. - -```bash -└── content - ├── _index.md - ├── categories - │   ├── _index.md - │   └── photo - │   └── _index.md - ├── post - │   ├── _index.md - │   └── firstpost.md - └── tags - ├── _index.md - └── hugo - └── _index.md -``` - -In the above example \_index.md pages have been added to each section/taxonomy. - -An \_index.md file has also been added in the top level 'content' directory. - -### Where to place \_index.md for the Home page - -Hugo themes are designed to use the 'content' directory as the root of the website, so adding an \_index.md file here (like has been done in the example above) is how you would add frontmatter/content to the home page. - - - - diff --git a/docs/content/extras/aliases.md b/docs/content/extras/aliases.md deleted file mode 100644 index 00f014ca0..000000000 --- a/docs/content/extras/aliases.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -aliases: -- /doc/redirects/ -- /doc/alias/ -- /doc/aliases/ -lastmod: 2015-12-23 -date: 2013-07-09 -menu: - main: - parent: extras -next: /extras/analytics -prev: /taxonomies/methods -title: 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 - -Given a post on your current Hugo site, with a path of: - -``content/posts/my-awesome-blog-post.md`` - -... you create an "aliases" section in the frontmatter of your post, and add previous paths to that. - -### TOML frontmatter - -```toml -+++ - ... -aliases = [ - "/posts/my-original-url/", - "/2010/01/01/even-earlier-url.html" -] - ... -+++ -``` - -### YAML frontmatter - -```yaml ---- - ... -aliases: - - /posts/my-original-url/ - - /2010/01/01/even-earlier-url.html - ... ---- -``` - -Now when you visit any of the locations specified in aliases, _assuming the same site domain_, you'll be redirected to the page they are specified on. - -## Important Behaviors - -1. *Hugo makes no assumptions about aliases. They also don't change based -on your UglyURLs setting. You need to provide absolute path to your webroot -and the complete filename or directory.* - -2. *Aliases are rendered prior to any content and will be overwritten by -any content with the same location.* - -## Multilingual example - -On [multilingual sites]({{< relref "content/multilingual.md" >}}), 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`: - -```yaml ---- -aliases: - - /es/posts/my-original-post/ ---- -``` - -## How Hugo Aliases Work - -When aliases are specified, Hugo creates a physical folder structure to match the alias entry, and, an html file specifying the canonical URL for the page, and a redirect target. - -Assuming a baseURL of `mysite.tld`, the contents of the html file will look something like: - -```html - - - - http://mysite.tld/posts/my-original-url - - - - - -``` - -The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case. - -## Customizing - -You may customize this alias page by creating an alias.html template in the -layouts folder of your site. 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 diff --git a/docs/content/extras/analytics.md b/docs/content/extras/analytics.md deleted file mode 100644 index 31f44c7bf..000000000 --- a/docs/content/extras/analytics.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -date: 2016-02-06 -linktitle: Analytics -menu: - main: - parent: extras -next: /extras/builders -prev: /extras/aliases -title: Analytics in Hugo ---- - -Hugo ships with prebuilt internal templates for Google Analytics tracking, including both synchronous and asynchronous tracking codes. - -## Configuring Google Analytics - -Provide your tracking id in your configuration file, e.g. config.yaml. - - googleAnalytics = "UA-123-45" - -## Example - -Include the internal template in your templates like so: - - {{ template "_internal/google_analytics.html" . }} - -For async include the async template: - - {{ template "_internal/google_analytics_async.html" . }} diff --git a/docs/content/extras/builders.md b/docs/content/extras/builders.md deleted file mode 100644 index 707eff306..000000000 --- a/docs/content/extras/builders.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -lastmod: 2015-12-24 -date: 2014-05-26 -linktitle: Builders -menu: - main: - parent: extras -next: /extras/comments -prev: /extras/analytics -title: Hugo Builders ---- - -Hugo provides the functionality to quickly get a site, theme or page -started. - - -## New Site - -Want to get a site built quickly? - -{{< nohighlight >}}$ hugo new site path/to/site -{{< /nohighlight >}} - -Hugo will create all the needed directories and files to get started -quickly. - -Hugo will only touch the files and create the directories (in the right -places), [configuration](/overview/configuration/) and content are up to -you... but luckily we have builders for content (see below). - -## New Theme - -Want to design a new theme? - - $ hugo new theme THEME_NAME - -Run from your working directory, this will create a new theme with all -the needed files in your themes directory. Hugo will provide you with a -license and theme.toml file with most of the work done for you. - -Follow the [Theme Creation Guide](/themes/creation/) once the builder is -done. - -## New Content - -You will use this builder the most of all. Every time you want to create -a new piece of content, the content builder will get you started right. - -Leveraging [content archetypes](/content/archetypes/) the content builder -will not only insert the current date and appropriate metadata, but it -will pre-populate values based on the content type. - - $ hugo new relative/path/to/content - -This assumes it is being run from your working directory and the content -path starts from your content directory. Now, Hugo watches your content directory by default and rebuilds your entire website if any change occurs. diff --git a/docs/content/extras/comments.md b/docs/content/extras/comments.md deleted file mode 100644 index a2ac5d1bb..000000000 --- a/docs/content/extras/comments.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -lastmod: 2015-08-04 -date: 2014-05-26 -linktitle: Comments -menu: - main: - parent: extras -next: /extras/crossreferences -prev: /extras/builders -title: Comments in Hugo ---- - -As Hugo is a static site generator, the content produced is static and doesn’t interact with the users. The most common interaction people ask for is comment capability. - -Hugo ships with support for [Disqus](https://disqus.com/), a third-party service that provides comment and community capabilities to website via JavaScript. - -Your theme may already support Disqus, but even it if doesn’t, it is easy to add. - -# Disqus Support - -## Adding Disqus to a template - -Hugo comes with all the code you would need to include load Disqus. Simply include the following line where you want your comments to appear: - - {{ template "_internal/disqus.html" . }} - -## Configuring Disqus - -That template requires you to set a single value in your site config file, e.g. config.yaml. - - disqusShortname = "XYW" - -Additionally, you can optionally set the following in the front matter -for a given piece of content: - - * **disqus_identifier** - * **disqus_title** - * **disqus_url** - -## Conditional Loading of Disqus Comments - -Users have noticed that enabling Disqus comments when running the Hugo web server on localhost causes the creation of unwanted discussions on the associated Disqus account. In order to prevent this, a slightly tweaked partial template is required. So, rather than using the built-in `"_internal/disqus.html"` template referenced above, create a template in your `partials` folder that looks like this: - -```html -
- - -comments powered by Disqus -``` - -Notice that there is a simple `if` statement that detects when you are running on localhost and skips the initialization of the Disqus comment injection. - -Now, reference the partial template from your page template: - - {{ partial "disqus.html" . }} - - -# Alternatives - -A few alternatives exist to [Disqus](https://disqus.com/): - -* [txtpen](https://txtpen.com) -* [Discourse](http://www.discourse.org) -* [IntenseDebate](http://intensedebate.com/) -* [Livefyre](http://www.adobe.com/marketing-cloud/enterprise-content-management/ugc-content-platform.html) -* [Muut](http://muut.com/) -* [多说](http://duoshuo.com/) ([Duoshuo](http://duoshuo.com/), popular in China) -* [isso](http://posativ.org/isso/) (Self-hosted, Python) -* [Kaiju](https://github.com/spf13/kaiju) - -## Kaiju - -[Kaiju](https://github.com/spf13/kaiju) is an open-source project started by [spf13](http://spf13.com/) (Hugo’s author) to bring easy and fast real time discussions to the web. - -Written using Go, Socket.io and MongoDB, it is very fast and easy to deploy. - -It is in early development but shows promise. If you have interest, please help by contributing whether via a pull request, an issue or even just a tweet. Everything helps. - -## txtpen - -[txtpen](https://txtpen.com) adds highlighting an in-line commenting similar to Medium to your Hugo blog. - -## Discourse - -Additionally, you may recognize [Discourse](http://www.discourse.org) as the system that powers the [Hugo Discussion Forum](http://discuss.gohugo.io). - diff --git a/docs/content/extras/crossreferences.md b/docs/content/extras/crossreferences.md deleted file mode 100644 index 9f3e7ef23..000000000 --- a/docs/content/extras/crossreferences.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -lastmod: 2015-12-23 -date: 2014-11-25 -menu: - main: - parent: extras -next: /extras/robots-txt -prev: /extras/comments -title: Cross-References -toc: true ---- - -Hugo makes it easy to link documents together with the `ref` and `relref` shortcodes. These shortcodes are also used to safely 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/`). - -## Using `ref` and `relref` - -```django -{{}} -{{}} -{{}} -{{}} -{{}} -{{}} -``` - -The single parameter to `ref` is a string with a content _document name_ (`about.md`), an in-document _anchor_ (`#who`), or both (`about.md#who`). - -### Document Names - -The _document name_ 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. - - {{}} ⇒ `/blog/post/` - {{}} ⇒ `/blog/post/` - -If you have multiple sections with the same filename, you should only use the relative path format, because the behaviour is _undefined_. So, if I also have a document `link/post.md`, the output of `ref` is unknown for `post.md`. - - {{}} ⇒ `/blog/post/` - {{}} ⇒ `/blog/post/` (maybe) - {{}} ⇒ `/link/post/` (maybe) - {{}} ⇒ `/link/post/` - -A relative document name must *not* begin with a slash (`/`). - - {{}} ⇒ `""` - -### Anchors - -When an _anchor_ is provided by itself, the current page’s unique identifier will be appended; when an _anchor_ is provided with a document name, the found page's unique identifier will be appended. - - {{}} ⇒ `#who:9decaf7` - {{}} ⇒ `/blog/post/#who:badcafe` - -More information about document unique identifiers and headings can be found [below]({{< ref "#hugo-heading-anchors" >}}). - -### Examples - -* `{{}}` ⇒ `http://1.com/blog/post/` -* `{{}}` ⇒ `http://1.com/blog/post/#tldr:caffebad` -* `{{}}` ⇒ `/blog/post/` -* `{{}}` ⇒ `/blog/post/#tldr:caffebad` -* `{{}}` ⇒ `#tldr:badcaffe` -* `{{}}` ⇒ `#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 document’s unique identifier. (The links in document tables of contents are automatically up-to-date with this value.) - - {{}} - /extras/crossreferences/#hugo-heading-anchors:77cd9ea530577debf4ce0f28c8dca242 - -> What follows is a deeper discussion of *why* and *how* Hugo generates heading anchors. It is not necessary to know this to use `ref` and `relref`, but it may be useful in understanding how some anchors may not match your expectations. - -### How to Generate a Heading Anchor - -Convert the text of the heading to lowercase. - - Hugo: A Fast & Modern Static Web Engine - hugo: a fast & modern static web engine - -Replace anything that isn't an ASCII letter (`a-z`) or number (`0-9`) with a dash (`-`). - - hugo: a fast & modern static web engine - hugo--a-fast---modern-static-web-engine - -Get rid of extra dashes. - - hugo--a-fast---modern-static-web-engine - hugo-a-fast-modern-static-web-engine - -You have just converting the text of a heading to a suitable anchor. If your document has unique heading text, all of the anchors will be unique, too. - -#### Specifying Heading Anchors - -You can also tell Hugo to use a particular heading anchor. - - # Hugo: A Fast & Modern Static Web Engine {#hugo-main} - -Hugo will use `hugo-main` as the heading anchor. - -### What About Duplicate Heading Anchors? - -The technique outlined above works well enough, but some documents have headings with identical text, like the [shortcodes](/extras/shortcodes/) page—there are three headings with the text "Example". You can specify heading anchors manually: - - ### Example {#example-1} - ### Example {#example-2} - ### Example {#example-3} - -It’s easy to forget to do that all the time, and Hugo is smart enough to do it for you. It just adds `-x` to the end of each heading it has already seen. - -* `### Example` ⇒ `example` -* `### Example` ⇒ `example-1` -* `### Example` ⇒ `example-2` - -Sometimes it's a little harder, but Hugo can recover from those, too, by adding more suffixes: - -* `# Heading` ⇒ `heading` -* `# Heading 1` ⇒ `heading-1` -* `# Heading` ⇒ `heading-1-1` -* `# Heading` ⇒ `heading-1-2` -* `# Heading 1` ⇒ `heading-2` - -This can even affect specified heading anchors that come after a generated heading anchor. - -* `# My Heading` ⇒ `my-heading` -* `# My Heading {#my-heading}` ⇒ `my-heading-1` - -> This particular collision and override is unfortunate, but unavoidable because Hugo processes each heading for collision detection as it sees it during conversion. - -This technique works well for documents rendered on individual pages, like blog posts. What about on Hugo list pages? - -### Unique Heading Anchors in Lists - -Hugo converts each document from Markdown independently. it doesn’t know that `blog/post.md` has an "Example" heading that will collide with the "Example" heading in `blog/post2.md`. Even if it did know this, the addition of `blog/post3.md` should not cause the anchors for the headings in the other blog posts to change. - -Enter the document’s unique identifier. To prevent this sort of collision on -list pages, Hugo always appends the document's to a generated heading anchor. -So, the "Example" heading in `blog/post.md` actually turns into -`#example:81df004…`, and the "Example" heading in `blog/post2.md` actually -turns into `#example:8cf1599…`. All you have to know is the heading anchor that -was generated, not the document identifier; `ref` and `relref` take care of the -rest for you. - - Post Example - Post Example - - [Post Two Example]({{}}) - Post Two Example - -Now you know. diff --git a/docs/content/extras/datadrivencontent.md b/docs/content/extras/datadrivencontent.md deleted file mode 100644 index e5c6c9130..000000000 --- a/docs/content/extras/datadrivencontent.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -aliases: -- /doc/datadrivencontent/ -lastmod: 2016-03-03 -date: 2015-02-14 -menu: - main: - parent: extras -next: /extras/gitinfo -prev: /extras/datafiles -title: Data-driven Content -toc: true ---- - -Data-driven content with a static site generator? Yes, it is possible! - -In addition to the [data files](/extras/datafiles/) feature, we have also -implemented the feature "Data-driven Content", which lets you load -any [JSON](http://www.json.org/) or -[CSV](http://en.wikipedia.org/wiki/Comma-separated_values) file -from nearly any resource. - -"Data-driven Content" currently consists of two functions, `getJSON` -and `getCSV`, which are available in **all template files**. - -## Implementation details - -### Calling the functions with an URL - -In any HTML template or Markdown document, call the functions like this: - - {{ $dataJ := getJSON "url" }} - {{ $dataC := getCSV "separator" "url" }} - -or, if you use a prefix or postfix for the URL, the functions -accept [variadic arguments](http://en.wikipedia.org/wiki/Variadic_function): - - {{ $dataJ := getJSON "url prefix" "arg1" "arg2" "arg n" }} - {{ $dataC := getCSV "separator" "url prefix" "arg1" "arg2" "arg n" }} - -The separator for `getCSV` must be put in the first position and can only -be one character long. - -All passed arguments will be joined to the final URL; for example: - - {{ $urlPre := "https://api.github.com" }} - {{ $gistJ := getJSON $urlPre "/users/GITHUB_USERNAME/gists" }} - -will resolve internally to: - - {{ $gistJ := getJSON "https://api.github.com/users/GITHUB_USERNAME/gists" }} - -Finally, you can range over an array. This example will output the -first 5 gists for a GitHub user: - -
    - {{ $urlPre := "https://api.github.com" }} - {{ $gistJ := getJSON $urlPre "/users/GITHUB_USERNAME/gists" }} - {{ range first 5 $gistJ }} - {{ if .public }} -
  • {{ .description }}
  • - {{ end }} - {{ end }} -
- - -### Example for CSV files - -For `getCSV`, the one-character long separator must be placed in the -first position followed by the URL. - - - - - - - - - - - {{ $url := "http://a-big-corp.com/finance/employee-salaries.csv" }} - {{ $sep := "," }} - {{ range $i, $r := getCSV $sep $url }} - - - - - - {{ end }} - -
NamePositionSalary
{{ index $r 0 }}{{ index $r 1 }}{{ index $r 2 }}
- -The expression `{{index $r number}}` must be used to output the nth-column from -the current row. - -### Caching of URLs - -Each downloaded URL will be cached in the default folder `$TMPDIR/hugo_cache/`. -The variable `$TMPDIR` will be resolved to your system-dependent -temporary directory. - -With the command-line flag `--cacheDir`, you can specify any folder on -your system as a caching directory. - -You can also set `cacheDir` in the main configuration file. - -If you don't like caching at all, you can fully disable caching with the -command line flag `--ignoreCache`. - -### Authentication when using REST URLs - -Currently, you can only use those authentication methods that can -be put into an URL. [OAuth](http://en.wikipedia.org/wiki/OAuth) or -other authentication methods are not implemented. - -### Loading local files - -To load local files with the two functions `getJSON` and `getCSV`, the -source files must reside within Hugo's working directory. The file -extension does not matter but the content does. - -It applies the same output logic as in the topic: *Calling the functions with an URL*. - -## LiveReload - -There is no chance to trigger a [LiveReload](/extras/livereload/) when -the content of an URL changes. However, when a local JSON/CSV file changes, -then a LiveReload will be triggered of course. Symlinks are not supported. - -**URLs and LiveReload**: If you change any local file and the LiveReload -is triggered, Hugo will either read the URL content from the cache or, if -you have disabled the cache, Hugo will re-download the content. -This can create huge traffic and you may also reach API limits quickly. - -As downloading of content takes a while, Hugo stops processing -your Markdown files until the content has been downloaded. - -## Examples - -- Photo gallery JSON powered: [https://github.com/pcdummy/hugo-lightslider-example](https://github.com/pcdummy/hugo-lightslider-example) -- GitHub Starred Repositories [in a posts](https://github.com/SchumacherFM/blog-cs/blob/master/content%2Fposts%2Fgithub-starred.md) with the related [short code](https://github.com/SchumacherFM/blog-cs/blob/master/layouts%2Fshortcodes%2FghStarred.html). -- More? Please tell us! diff --git a/docs/content/extras/datafiles.md b/docs/content/extras/datafiles.md deleted file mode 100644 index dc7e8059c..000000000 --- a/docs/content/extras/datafiles.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -aliases: -- /doc/datafiles/ -lastmod: 2015-08-04 -date: 2015-01-22 -menu: - main: - parent: extras -next: /extras/datadrivencontent -prev: /extras/robots-txt -title: Data Files ---- - -In addition to the [built-in variables](/templates/variables/) available from Hugo, you can specify your own custom data that can be accessed via templates or shortcodes. - -Hugo supports loading data from [YAML](http://yaml.org/), [JSON](http://www.json.org/), and [TOML](https://github.com/toml-lang/toml) files located in the `data` directory. - -**It even works with [LiveReload](/extras/livereload/).** - -Data Files can also be used in [themes](/themes/overview/), but note: If the same `key` is used in both the main data folder and in the theme's data folder, the main one will win. So, for theme authors, for theme specific data items that shouldn't be overridden, it can be wise to prefix the folder structure with a namespace, e.g. `mytheme/data/mytheme/somekey/...`. To check if any such duplicate exists, run hugo with the `-v` flag, e.g. `hugo -v`. - -## The Data Folder - -The `data` folder is where you can store additional data for Hugo to use when generating your site. Data files aren't used to generate standalone pages - rather they're meant to supplement the content files. This feature can extend the content in case your frontmatter would grow immensely. Or perhaps you want to show a larger dataset in a template (see example below). In both cases it's a good idea to outsource the data in their own file. - -These files must be YAML, JSON or TOML files (using either the `.yml`, `.yaml`, `.json` or `toml` extension) and the data will be accessible as a `map` in `.Site.Data`. - -**The keys in this map will be a dot chained set of _path_, _filename_ and _key_ in file (if applicable).** - -This is best explained with an example: - -## Example: Jaco Pastorius' Solo Discography - -[Jaco Pastorius](http://en.wikipedia.org/wiki/Jaco_Pastorius_discography) was a great bass player, but his solo discography is short enough to use as an example. [John Patitucci](http://en.wikipedia.org/wiki/John_Patitucci) is another bass giant. - -The example below is a bit constructed, but it illustrates the flexibility of Data Files. It uses TOML as file format. - -Given the files: - -* `data/jazz/bass/jacopastorius.toml` -* `data/jazz/bass/johnpatitucci.toml` - -`jacopastorius.toml` contains the content below, `johnpatitucci.toml` contains a similar list: - -``` -discography = [ -"1974 – Modern American Music … Period! The Criteria Sessions", -"1974 – Jaco", -"1976 - Jaco Pastorius", -"1981 - Word of Mouth", -"1981 - The Birthday Concert (released in 1995)", -"1982 - Twins I & II (released in 1999)", -"1983 - Invitation", -"1986 - Broadway Blues (released in 1998)", -"1986 - Honestly Solo Live (released in 1990)", -"1986 - Live In Italy (released in 1991)", -"1986 - Heavy'n Jazz (released in 1992)", -"1991 - Live In New York City, Volumes 1-7.", -"1999 - Rare Collection (compilation)", -"2003 - Punk Jazz: The Jaco Pastorius Anthology (compilation)", -"2007 - The Essential Jaco Pastorius (compilation)" -] -``` - -The list of bass players can be accessed via `.Site.Data.jazz.bass`, a single bass player by adding the filename without the suffix, e.g. `.Site.Data.jazz.bass.jacopastorius`. - -You can now render the list of recordings for all the bass players in a template: - -``` -{{ range $.Site.Data.jazz.bass }} - {{ partial "artist.html" . }} -{{ end }} -``` - -And then in `partial/artist.html`: - -``` -
    -{{ range .discography }} -
  • {{ . }}
  • -{{ end }} -
-``` - -Discover a new favourite bass player? Just add another TOML-file. - -## Example: Accessing named values in a Data File - -Assuming you have the following YAML structure to your `User0123.yml` Data File located directly in `data/` - -``` -Name: User0123 -"Short Description": "He is a **jolly good** fellow." -Achievements: - - "Can create a Key, Value list from Data File" - - "Learns Hugo" - - "Reads documentation" -``` - -To render the `Short Description` in your `layout` File following code is required. - -``` -
Short Description of {{.Site.Data.User0123.Name}}:

{{ index .Site.Data.User0123 "Short Description" | markdownify }}

-``` - -Note the use of the `markdownify` template function. This will send the description through the Blackfriday Markdown rendering engine. diff --git a/docs/content/extras/gitinfo.md b/docs/content/extras/gitinfo.md deleted file mode 100644 index d29641bcb..000000000 --- a/docs/content/extras/gitinfo.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -aliases: -- /doc/gitinfo/ -lastmod: 2016-12-11 -date: 2016-12-11 -menu: - main: - parent: extras -next: /extras/livereload -prev: /extras/datadrivencontent -title: GitInfo ---- - -Hugo provides a way to integrate Git data into your site. - - -## Prerequisites - -1. The Hugo site must be in a Git-enabled directory. -1. The Git executable must be installed and in your system `PATH`. -1. Enable the GitInfo feature in Hugo by using `--enableGitInfo` on the command - line or by setting `enableGitInfo` to `true` in your site configuration. - -## The GitInfo Object - -The `GitInfo` object contains the following fields: - -AbbreviatedHash -: abbreviated commit hash, e.g. `866cbcc` - -AuthorName -: author name, respecting `.mailmap` - -AuthorEmail -: author email address, respecting `.mailmap` - -AuthorDate -: the author date - -Hash -: commit hash, e.g. `866cbccdab588b9908887ffd3b4f2667e94090c3` - -Subject -: commit message subject, e.g. `tpl: Add custom index function` - - -## Performance Considerations - -The Git integrations should be fairly performant, but it does add some time to the build, which depends somewhat on the Git history size. - diff --git a/docs/content/extras/highlighting.md b/docs/content/extras/highlighting.md deleted file mode 100644 index 601373deb..000000000 --- a/docs/content/extras/highlighting.md +++ /dev/null @@ -1,197 +0,0 @@ ---- -aliases: -- /extras/highlight/ -lastmod: 2015-10-27 -date: 2013-07-01 -menu: - main: - parent: extras -next: /extras/toc -prev: /extras/shortcodes -title: Syntax Highlighting -toc: true ---- - -Hugo provides the ability for you to highlight source code in _two different ways_ — either pre-processed server side from your content, or to defer the processing to the client side, using a JavaScript library. - -**The advantage of server side** is that it doesn’t depend on a JavaScript library and consequently works very well when read from an RSS feed. - -**The advantage of client side** is that it doesn’t cost anything when building your site and some of the highlighting scripts available cover more languages than Pygments does. - -## Server-side - -For the pre-processed approach, highlighting is performed by an external Python-based program called [Pygments](http://pygments.org/) and is triggered via an embedded Hugo shortcode (see example below). If Pygments is absent from the path, it will silently simply pass the content along unhighlighted. - -### Pygments - -If you have never worked with Pygments before, here is a brief primer: - -+ Install Python from [python.org](https://www.python.org/downloads/). Version 2.7.x is already sufficient. -+ Run `pip install Pygments` in order to install Pygments. Once installed, Pygments gives you a command `pygmentize`. Make sure it sits in your PATH, otherwise Hugo cannot find it. - -On Debian and Ubuntu systems, you may also install Pygments by running `sudo apt-get install python3-pygments`. - -Hugo gives you two options that you can set with the variable `pygmentsuseclasses` (default `false`) in `config.toml` (or `config.yaml`). - -1. Color-codes for highlighting keywords are directly inserted if `pygmentsuseclasses = false` (default). See in the example below. The color-codes depend on your choice of the `pygmentsstyle` (default `"monokai"`). You can explore the different color styles on [pygments.org](http://pygments.org/) after inserting some example code. -2. If you choose `pygmentsuseclasses = true`, Hugo includes class names in your code instead of color-codes. For class-names to be meaningful, you need to include a `.css`-file in your website representing your color-scheme. You can either generate this `.css`-files according to this [description](http://pygments.org/docs/cmdline/) or download the standard ones from the [GitHub pygments-css repository](https://github.com/richleland/pygments-css). - -### Usage - -Highlighting is carried out via the in-built shortcode `highlight`. `highlight` takes exactly one required parameter of language, and requires a closing shortcode. Note that `highlight` is _not_ used for client-side javascript highlighting. - -### Example - -``` -{{}} -
-
-

{{ .Title }}

- {{ range .Data.Pages }} - {{ .Render "summary"}} - {{ end }} -
-
-{{}} -``` - -### Example Output - -``` -<section id="main"> - <div> - <h1 id="title">{{ .Title }}</h1> - {{ range .Data.Pages }} - {{ .Render "summary"}} - {{ end }} - </div> -</section> -``` - -### Options - -Options to control highlighting can be added as a quoted, comma separated key-value list as the second argument in the shortcode. The example below will highlight as language `go` with inline line numbers, with line number 2 and 3 highlighted. - -``` -{{}} -var a string -var b string -var c string -var d string -{{}} -``` - -Supported keywords: `style`, `encoding`, `noclasses`, `hl_lines`, `linenos`. Note that `style` and `noclasses` will override the similar setting in the global config. - -The keywords are the same you would using with Pygments from the command line, see the [Pygments doc](http://pygments.org/docs/) for more info. - -### Code fences - -It is also possible to add syntax highlighting with GitHub flavoured code fences. To enable this, set the `PygmentsCodeFences` to `true` in Hugo's configuration file. - -```` -``` html -
-
-

{{ .Title }}

- {{ range .Data.Pages }} - {{ .Render "summary"}} - {{ end }} -
-
-``` -```` - -### Disclaimers - - * Pygments is relatively slow and _causes a performance hit when building your site_, but Hugo has been designed to cache the results to disk. - * The caching can be turned off by setting the `--ignoreCache` flag to `true`. - * Languages available depends on your Pygments installation. - -## Client-side - -Alternatively, code highlighting can be done in client-side JavaScript. - -Client-side syntax highlighting is very simple to add. You'll need to pick -a library and a corresponding theme. Some popular libraries are: - -- [Highlight.js] -- [Prism] -- [Rainbow] -- [Syntax Highlighter] -- [Google Prettify] - -### Highlight.js example - -This example uses the popular [Highlight.js] library, hosted by [Yandex], a popular Russian search engine. - -In your `./layouts/partials/` (or `./layouts/chrome/`) folder, depending on your specific theme, there will be a snippet that will be included in every generated HTML page, such as `header.html` or `header.includes.html`. Simply add the css and js to initialize [Highlight.js]: - -~~~ - - - -~~~ - -### Prism example - -Prism is another popular highlighter library, used on some major sites. Similar to Highlight.js, you simply load `prism.css` in your `` via whatever Hugo partial template is creating that part of your pages, like so: - -```html -... - -... -``` - -... and add `prism.js` near the bottom of your `` tag, again in whatever Hugo partial template is appropriate for your site or theme. - -```html -... - -... - -``` - -In this example, the local paths indicate that your own copy of these files are being added to the site, typically under `./static/`. - -### Using Client-side highlighting - -To use client-side highlighting, most of these javascript libraries expect your code to be wrapped in semantically correct `` tags, with the language expressed in a class attribute on the `` tag, such as `class="language-abc"`, where the `abc` is the code the highlighter script uses to represent that language. - -The script would be looking for classes like `language-go`, `language-html`, or `language-css`. If you look at the page's source, it would be marked up like so: - -~~~html -
-
-body {
-  font-family: "Noto Sans", sans-serif;
-}
-
-
-~~~ - -The markup in your content pages (e.g. `my-css-tutorial.md`) needs to look like the following, with the name of the language to be highlighted entered directly after the first "fence", in a fenced code block: - -
~~~css
-body {
-  font-family: "Noto Sans", sans-serif;
-}
-~~~
- -When passed through the highlighter script, it would yield something like this output when viewed on your rendered page: - -~~~css -body { - font-family: "Noto Sans", sans-serif; -} -~~~ - -Please see individual libraries' documentation for how to implement each of the JavaScript-based libraries. - -[Prism]: http://prismjs.com -[Highlight.js]: http://highlightjs.org/ -[Rainbow]: http://craig.is/making/rainbows -[Syntax Highlighter]: http://alexgorbatchev.com/SyntaxHighlighter/ -[Google Prettify]: https://github.com/google/code-prettify -[Yandex]: http://yandex.ru/ - diff --git a/docs/content/extras/livereload.md b/docs/content/extras/livereload.md deleted file mode 100644 index cb4047636..000000000 --- a/docs/content/extras/livereload.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -lastmod: 2016-08-09 -date: 2014-05-26 -menu: - main: - parent: extras -next: /extras/menus -prev: /extras/gitinfo -title: LiveReload ---- - -Hugo may not be the first static site generator to utilize LiveReload -technology, but it’s the first to do it right. - -The combination of Hugo’s insane build speed and LiveReload make -crafting your content pure joy. Virtually instantly after you hit save -your rebuilt content will appear in your browser. - -## Using LiveReload - -Hugo comes with LiveReload built in. There are no additional packages to -install. A common way to use Hugo while developing a site is to have -Hugo run a server and watch for changes: - -{{< nohighlight >}}$ hugo server -{{< /nohighlight >}} - -This will run a full functioning web server while simultaneously -watching your file system for additions, deletions or changes within -your: - - * static files - * content - * data files - * layouts - * current theme - * configuration files - -Whenever anything changes, Hugo will rebuild the site while continuing to serve -the content. As soon as the build is finished, it will tell the -browser and silently reload the page. Because most Hugo builds are so -fast they are barely noticeable, you merely need to glance at your open -browser and you will see the change, already there. - -This means that keeping the site open on a second monitor (or another -half of your current monitor) allows you to see exactly what your -content looks like, without even leaving your text editor. - -## Disabling Watch - -If for some reason you don't want the Hugo server's watch functionality, -just do: - -{{< nohighlight >}}$ hugo server --watch=false -{{< /nohighlight >}} - -## Disabling LiveReload - -LiveReload works by injecting JavaScript into the pages Hugo generates, -which creates a connection from the browser web socket client to the -Hugo web socket server. - -Awesome for development, but not something you would want to do in -production. Since many people use `hugo server` in production to -instantly display any updated content, we’ve made it easy to disable the -LiveReload functionality: - -{{< nohighlight >}}$ hugo server --disableLiveReload -{{< /nohighlight >}} - -## Notes - -You must have a closing `` tag for LiveReload to work. -Hugo injects the LiveReload ` - -Extract the value from the field `data-id` and pass it to the shortcode: - - {{}} - -### Instagram - -If you'd like to embed photo from [Instagram](https://www.instagram.com/), all you need is photo ID from the URL, e. g.: - -* https://www.instagram.com/p/BMokmydjG-M/ - -Pass it to the shortcode: - - {{}} - -Optionally, hide caption: - - {{}} - -## Creating your own shortcodes - -To create a shortcode, place a template in the layouts/shortcodes directory. The -template name will be the name of the shortcode. - -In creating a shortcode, you can choose if the shortcode will use _positional -parameters_, or _named parameters_, or _both_. A good rule of thumb is that if a -shortcode has a single required value in the case of the `youtube` example below, -then positional works very well. For more complex layouts with optional -parameters, named parameters work best. Allowing both types of parameters is -useful for complex layouts where you want to set default values that can be -overridden. - -**Inside the template** - -To access a parameter by position, the `.Get` method can be used: - - {{ .Get 0 }} - -To access a parameter by name, the `.Get` method should be utilized: - - {{ .Get "class" }} - -`with` is great when the output depends on a parameter being set: - - {{ with .Get "class"}} class="{{.}}"{{ end }} - -`.Get` can also be used to check if a parameter has been provided. This is -most helpful when the condition depends on either one value or another... -or both: - - {{ or .Get "title" | .Get "alt" | if }} alt="{{ with .Get "alt"}}{{.}}{{else}}{{.Get "title"}}{{end}}"{{ end }} - -If a closing shortcode is used, the variable `.Inner` will be populated with all -of the content between the opening and closing shortcodes. If a closing -shortcode is required, you can check the length of `.Inner` and provide a warning -to the user. - -A shortcode with `.Inner` content can be used without the inline content, and without the closing shortcode, by using the self-closing syntax: - - {{}} - -The variable `.Params` contains the list of parameters in case you need to do -more complicated things than `.Get`. It is sometimes useful to provide a -flexible shortcode that can take named or positional parameters. To meet this -need, Hugo shortcodes have a `.IsNamedParams` boolean available that can be used -such as `{{ if .IsNamedParams }}...{{ else }}...{{ end }}`. See the -`Single Flexible Example` below for an example. - -You can also use the variable `.Page` to access all the normal [Page Variables](/templates/variables/). - -A shortcodes can be nested. In a nested shortcode you can access the parent shortcode context with `.Parent`. This can be very useful for inheritance of common shortcode parameters from the root. - -## Single Positional Example: youtube - - {{}} - -Would load the template /layouts/shortcodes/youtube.html - -
- -
- -This would be rendered as: - -
- -
- -## Single Named Example: image with caption - - {{}} - -Would load the template /layouts/shortcodes/img.html - - -
- {{ with .Get "link"}}{{ end }} - - {{ if .Get "link"}}{{ end }} - {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} -
{{ if isset .Params "title" }} -

{{ .Get "title" }}

{{ end }} - {{ if or (.Get "caption") (.Get "attr")}}

- {{ .Get "caption" }} - {{ with .Get "attrlink"}} {{ end }} - {{ .Get "attr" }} - {{ if .Get "attrlink"}} {{ end }} -

{{ end }} -
- {{ end }} -
- - -Would be rendered as: - -
- -
-

Steve Francia

-
-
- -## Single Flexible Example: vimeo with defaults - - {{}} - {{}} - -Would load the template /layouts/shortcodes/vimeo.html - - {{ if .IsNamedParams }} -
- -
- {{ else }} -
- -
- {{ end }} - -Would be rendered as: - -
- -
-
- -
- -## Paired Example: Highlight -*Hugo already ships with the `highlight` shortcode* - - {{}} - - This HTML - - {{}} - -The template for this utilizes the following code (already included in Hugo) - - {{ .Get 0 | highlight .Inner }} - -And will be rendered as: - -
<html>
-        <body> This HTML </body>
-    </html>
-    
- -Please notice that this template makes use of a Hugo-specific template function -called `highlight` which uses Pygments to add the highlighting code. - -## Simple Single-word Example: Year - -Let's assume you would like to have a shortcode to be replaced by the current year in your Markdown content files, for a license or copyright statement. Calling a shortcode like this: - - {{}} - -... would load your one-line template ``/layouts/shortcodes/year.html``, which contains: - - {{ .Page.Now.Year }} - -More shortcode examples can be found at [spf13.com](https://github.com/spf13/spf13.com/tree/master/layouts/shortcodes). diff --git a/docs/content/extras/toc.md b/docs/content/extras/toc.md deleted file mode 100644 index 56e093ba7..000000000 --- a/docs/content/extras/toc.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2013-07-09 -menu: - main: - parent: extras -next: /extras/localfiles -prev: /extras/highlighting -title: Table of Contents ---- - -Hugo will automatically parse the Markdown for your content and create -a Table of Contents you can use to guide readers to the sections within -your content. - -## Usage - -Simply create content like you normally would with the appropriate -headers. - -Hugo will take this Markdown and create a table of contents stored in the -[content variable](/layout/variables/) `.TableOfContents` - - -## Template Example - -This is example code of a [single.html template](/layout/content/). - - {{ partial "header.html" . }} -
- {{ .TableOfContents }} -
-

{{ .Title }}

- {{ .Content }} - {{ partial "footer.html" . }} - - diff --git a/docs/content/extras/urls.md b/docs/content/extras/urls.md deleted file mode 100644 index 487e685f3..000000000 --- a/docs/content/extras/urls.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -aliases: -- /doc/urls/ -lastmod: 2016-05-07 -date: 2014-01-03 -menu: - main: - parent: extras -next: /community/mailing-list -notoc: true -prev: /extras/localfiles -title: URLs ---- - -## Pretty URLs - -By default, Hugo creates content with 'pretty' URLs. For example, -content created at `/content/extras/urls.md` will be rendered at -`/public/extras/urls/index.html`, thus accessible from the browser -at http://example.com/extras/urls/. No non-standard server-side -configuration is required for these pretty URLs to work. - -If you would like to have what we call "ugly URLs", -e.g. http://example.com/extras/urls.html, you are in luck. -Hugo supports the ability to create your entire site with ugly URLs. -Simply add `uglyurls = true` to your site-wide `config.toml`, -or use the `--uglyURLs=true` flag on the command line. - -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. See [Content -Organization](/content/organization/) for more details. - -## Canonicalization - -By default, all relative URLs encountered in the input are left unmodified, -e.g. `/css/foo.css` would stay as `/css/foo.css`, -i.e. `canonifyURLs` defaults to `false`. - -By setting `canonifyURLs` to `true`, all relative URLs would instead -be *canonicalized* using `baseURL`. For example, assuming you have -`baseURL = http://yoursite.example.com/` defined in the site-wide -`config.toml`, the relative URL `/css/foo.css` would be turned into -the absolute URL `http://yoursite.example.com/css/foo.css`. - -Benefits of canonicalization include fixing all URLs to be absolute, which may -aid with some parsing tasks. Note though that all real browsers handle this -client-side without issues. - -Benefits of non-canonicalization include being able to have resource inclusion -be scheme-relative, so that http vs https can be decided based on how this -page was retrieved. - -> Note: 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. So, please verify and adjust your website accordingly if you are upgrading from v0.10 or older versions. - -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 - -## 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 the site configuration will cause Hugo to rewrite all relative URLs to be relative to the current content. - -For example, if the `/post/first/` page contained a link with a relative URL of `/about/`, Hugo would rewrite that URL to `../../about/`. diff --git a/docs/content/meta/license.md b/docs/content/meta/license.md deleted file mode 100644 index a16923bfb..000000000 --- a/docs/content/meta/license.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -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 -============== - -_Version 2.0, January 2004_ -_<>_ - -### Terms and Conditions for use, reproduction, and distribution - -#### 1. Definitions - -“License” shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -“Licensor” shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -“Legal Entity” shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, “control” means **(i)** the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the -outstanding shares, or **(iii)** beneficial ownership of such entity. - -“You” (or “Your”) shall mean an individual or Legal Entity exercising -permissions granted by this License. - -“Source” form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -“Object” form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -“Work” shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -“Derivative Works” shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -“Contribution” shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -“submitted” means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as “Not a Contribution.” - -“Contributor” shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -#### 2. Grant of Copyright License - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -#### 3. Grant of Patent License - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -#### 4. Redistribution - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -* **(a)** You must give any other recipients of the Work or Derivative Works a copy of -this License; and -* **(b)** You must cause any modified files to carry prominent notices stating that You -changed the files; and -* **(c)** You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. - -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -#### 5. Submission of Contributions - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -#### 6. Trademarks - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -#### 7. Disclaimer of Warranty - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -#### 8. Limitation of Liability - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -#### 9. Accepting Warranty or Additional Liability - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -_END OF TERMS AND CONDITIONS_ - -### APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets `[]` replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same “printed page” as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/docs/content/meta/roadmap.md b/docs/content/meta/roadmap.md deleted file mode 100644 index 13395fed4..000000000 --- a/docs/content/meta/roadmap.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -aliases: -- /doc/roadmap/ -- /meta/roadmap/ -lastmod: 2015-02-16 -date: 2013-07-01 -menu: - main: - parent: about -notoc: true -title: Hugo Roadmap -weight: 20 ---- - -In no particular order, here is what we are working on: - - * Intelligently related posts ([#98][]) - * Even easier deployment to S3, SSH, GitHub, rsync. Give the [tools section](https://gohugo.io/tools/#deployment) a shot or read one of the related tutorials. - * Import from other website systems. There are already existing [migration tools](https://gohugo.io/tools/#migration) but they don't cover all major platforms. - * An interactive web based editor (See https://discuss.gohugo.io/t/web-based-editor/155) - * Additional [themes](https://github.com/gohugoio/hugoThemes) (always on-going, contributions welcome!) - * Dynamic image resizing via shortcodes ([#1014][]) - * Native support for additional content formats (AsciiDoc [#1435][], reST [#1436][]) - * And, last but not least, ***Your best ideas***! - -[#100]: https://github.com/gohugoio/hugo/issues/100 "hugo import from wordpress · Issue #100 · gohugoio/hugo" -[#101]: https://github.com/gohugoio/hugo/issues/101 "hugo import from jekyll · Issue #101 · gohugoio/hugo" -[#1435]: https://github.com/gohugoio/hugo/issues/1435 "Add support for native Go implementation of AsciiDoc · Issue #1435 · gohugoio/hugo" -[#1436]: https://github.com/gohugoio/hugo/issues/1436 "Add support for native Go implementation of reStructuredText (reST) · Issue #1436 · gohugoio/hugo" -[#1014]: https://github.com/gohugoio/hugo/issues/1014 "Image Resizing and Cropping · Issue #1014 · gohugoio/hugo" -[#98]: https://github.com/gohugoio/hugo/issues/98 "Add support for related content · Issue #98 · gohugoio/hugo" - -> Feel free to [contribute]({{< relref "tutorials/how-to-contribute-to-hugo.md" >}}) or open a [new issue](https://github.com/gohugoio/hugo/issues/new) if you have an idea for a new feature.) diff --git a/docs/content/overview/configuration.md b/docs/content/overview/configuration.md deleted file mode 100644 index 7d05570b7..000000000 --- a/docs/content/overview/configuration.md +++ /dev/null @@ -1,458 +0,0 @@ ---- -aliases: -- /doc/configuration/ -lastmod: 2016-09-17 -date: 2013-07-01 -linktitle: Configuration -menu: - main: - parent: getting started -next: /overview/source-directory -toc: true -prev: /overview/usage -title: Configuring Hugo -weight: 40 ---- -The directory structure of a Hugo web site—or more precisely, -of the source files containing its content and templates—provide -most of the configuration information that Hugo needs. -Therefore, in essence, -many web sites wouldn't actually need a configuration file. -This is because Hugo is designed to recognize certain typical usage patterns -(and it expects them, by default). - -Nevertheless, Hugo does search for a configuration file bearing -a particular name in the root of your web site's source directory. -First, it looks for a `./config.toml` file. -If that's not present, it will seek a `./config.yaml` file, -followed by a `./config.json` file. - -In this `config` file for your web site, -you can include precise directions to Hugo regarding -how it should render your site, as well as define its menus, -and set various other site-wide parameters. - -Another way that web site configuration can be accomplished is through -operating system environment variables. -For instance, the following command will work on Unix-like systems—it -sets a web site's title: -```bash -$ env HUGO_TITLE="Some Title" hugo -``` -(**Note:** all such environment variable names must be prefixed with -HUGO_.) - -## Examples - -Following is a typical example of a YAML configuration file. -Three periods end the document: - -```yaml ---- -baseURL: "http://yoursite.example.com/" -... -``` -Following is an example TOML configuration file with some default values. -The values under `[params]` will populate the `.Site.Params` variable -for use in templates: - -```toml -contentDir = "content" -layoutDir = "layouts" -publishDir = "public" -buildDrafts = false -baseURL = "http://yoursite.example.com/" -canonifyURLs = true - -[taxonomies] - category = "categories" - tag = "tags" - -[params] - description = "Tesla's Awesome Hugo Site" - author = "Nikola Tesla" -``` -Here is a YAML configuration file which sets a few more options: - -```yaml ---- -baseURL: "http://yoursite.example.com/" -title: "Yoyodyne Widget Blogging" -footnoteReturnLinkContents: "↩" -permalinks: - post: /:year/:month/:title/ -params: - Subtitle: "Spinning the cogs in the widgets" - AuthorName: "John Doe" - GitHubUser: "spf13" - ListOfFoo: - - "foo1" - - "foo2" - SidebarRecentLimit: 5 -... -``` -## Configuration variables - -Following is a list of Hugo-defined variables you can configure, -along with their current, default values: - - --- - archetypeDir: "archetypes" - # hostname (and path) to the root, e.g. http://spf13.com/ - baseURL: "" - # include content marked as draft - buildDrafts: false - # include content with publishdate in the future - buildFuture: false - # include content already expired - buildExpired: false - # enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs. - relativeURLs: false - canonifyURLs: false - # config file (default is path/config.yaml|json|toml) - config: "config.toml" - contentDir: "content" - dataDir: "data" - defaultExtension: "html" - defaultLayout: "post" - # Missing translations will default to this content language - defaultContentLanguage: "en" - # Renders the default content language in subdir, e.g. /en/. The root directory / will redirect to /en/ - defaultContentLanguageInSubdir: false - # The below example will disable all page types and will render nothing. - disableKinds = ["page", "home", "section", "taxonomy", "taxonomyTerm", "RSS", "sitemap", "robotsTXT", "404"] - disableLiveReload: false - # Do not build RSS files - disableRSS: false - # Do not build Sitemap file - disableSitemap: false - # Enable GitInfo feature - enableGitInfo: false - # Build robots.txt file - enableRobotsTXT: false - # Do not render 404 page - disable404: false - # Do not inject generator meta tag on homepage - disableHugoGeneratorInject: false - # Enable Emoji emoticons support for page content. - # See www.emoji-cheat-sheet.com - enableEmoji: false - # Show a placeholder instead of the default value or an empty string if a translation is missing - enableMissingTranslationPlaceholders: false - footnoteAnchorPrefix: "" - footnoteReturnLinkContents: "" - # google analytics tracking id - googleAnalytics: "" - languageCode: "" - layoutDir: "layouts" - # Enable Logging - log: false - # Log File path (if set, logging enabled automatically) - logFile: "" - # "yaml", "toml", "json" - metaDataFormat: "toml" - # Edit new content with this editor, if provided - newContentEditor: "" - # Don't sync permission mode of files - noChmod: false - # Don't sync modification time of files - noTimes: false - paginate: 10 - paginatePath: "page" - permalinks: - # Pluralize titles in lists using inflect - pluralizeListTitles: true - # Preserve special characters in taxonomy names ("Gérard Depardieu" vs "Gerard Depardieu") - preserveTaxonomyNames: false - # filesystem path to write files to - publishDir: "public" - # enables syntax guessing for code fences without specified language - pygmentsCodeFencesGuessSyntax: false - # color-codes for highlighting derived from this style - pygmentsStyle: "monokai" - # true: use pygments-css or false: color-codes directly - pygmentsUseClasses: false - # maximum number of items in the RSS feed - rssLimit: 15 - # default sitemap configuration map - sitemap: - # filesystem path to read files relative from - source: "" - staticDir: "static" - # display memory and timing of different steps of the program - stepAnalysis: false - # theme to use (located by default in /themes/THEMENAME/) - themesDir: "themes" - theme: "" - title: "" - # if true, use /filename.html instead of /filename/ - uglyURLs: false - # Do not make the url/path to lowercase - disablePathToLower: false - # if true, auto-detect Chinese/Japanese/Korean Languages in the content. (.Summary and .WordCount can work properly in CJKLanguage) - hasCJKLanguage: false - # verbose output - verbose: false - # verbose logging - verboseLog: false - # watch filesystem for changes and recreate as needed - watch: true - --- - -## Ignore various files when rendering - -The following statement inside `./config.toml` will cause Hugo to ignore files -ending with `.foo` and `.boo` when rendering: - -```toml -ignoreFiles = [ "\\.foo$", "\\.boo$" ] -``` -The above is a list of regular expressions. -Note that the backslash (`\`) character is escaped, to keep TOML happy. - -## Configure Blackfriday rendering - -[Blackfriday](https://github.com/russross/blackfriday) is Hugo's -[Markdown](http://daringfireball.net/projects/markdown/) -rendering engine. - -In the main, Hugo typically configures Blackfriday with a sane set of defaults. -These defaults should fit most use cases, reasonably well. - -However, if you have unusual needs with respect to Markdown, -Hugo exposes some of its Blackfriday behavior options for you to alter. -The following table lists these Hugo options, -paired with the corresponding flags from Blackfriday's source code (for the latter, see -[html.go](https://github.com/russross/blackfriday/blob/master/html.go) and -[markdown.go](https://github.com/russross/blackfriday/blob/master/markdown.go)): - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FlagDefaultBlackfriday flag
taskListstrue
- Purpose: - false turns off GitHub-style automatic task/TODO - list generation. -
smartypantstrueHTML_USE_SMARTYPANTS
- Purpose: - false disables smart punctuation substitutions - including smart quotes, smart dashes, smart fractions, etc. - If true, it may be fine-tuned with the - angledQuotes, - fractions, - smartDashes and - latexDashes flags (see below). -
angledQuotesfalseHTML_SMARTYPANTS_ANGLED_QUOTES
- Purpose: - true enables smart, angled double quotes.
- - Example: - "Hugo" renders to - «Hugo» instead of “Hugo”. - -
fractionstrueHTML_SMARTYPANTS_FRACTIONS
- Purpose: - false disables smart fractions.
- - Example: - 5/12 renders to - 512 - (<sup>5</sup>&frasl;<sub>12</sub>).
- Caveat: - Even with fractions = false, - Blackfriday still converts - 1/2, 1/4 and 3/4 respectively to - ½ (&frac12;), - ¼ (&frac14;) and - ¾ (&frac34;), - but only these three.
-
smartDashestrueHTML_SMARTYPANTS_DASHES
- Purpose: - false disables smart dashes; i.e., the conversion - of multiple hyphens into en dash or em dash. - If true, its behavior can be modified with the - latexDashes flag below. -
latexDashestrueHTML_SMARTYPANTS_LATEX_DASHES
- Purpose: - false disables LaTeX-style smart dashes and - selects conventional smart dashes. Assuming - smartDashes (above), if this is: -
    -
  • - true, then - -- is translated into “–” - (&ndash;), whereas - --- is translated into “—” - (&mdash;). -
  • -
  • - false, then - -- is translated into “—” - (&mdash;), whereas a - spaced single hyphen between two words - is translated into an en dash—e.g., - 12 June - 3 July becomes - 12 June &ndash; 3 July. -
  • -
-
hrefTargetBlankfalseHTML_HREF_TARGET_BLANK
- Purpose: - true opens external links in a new window or tab. -
plainIDAnchorstrue - FootnoteAnchorPrefix and - HeaderIDSuffix -
- Purpose: - true renders any header and footnote IDs - without the document ID.
- - Example: - renders #my-header instead of - #my-header:bec3ed8ba720b9073ab75abcf3ba5d97. - -
extensions[]EXTENSION_*
- Purpose: - Enable one or more of Blackfriday's Markdown extensions - (if they aren't Hugo defaults).
- - Example:   - Include "hardLineBreak" - in the list to enable Blackfriday's - EXTENSION_HARD_LINE_BREAK. - -
extensionsmask[]EXTENSION_*
- Purpose: - Disable one or more of Blackfriday's Markdown extensions - (if they are Hugo defaults).
- - Example:   - Include "autoHeaderIds" - in the list to disable Blackfriday's - EXTENSION_AUTO_HEADER_IDS. - -
- -**Notes** - -* These flags are **case sensitive** (as of Hugo v0.15)! -* These flags must be grouped under the `blackfriday` key -and can be set on **both the site level and the page level**. -Any setting on a page will override the site setting -there. For example: - - - - - - - - - - - - - - -
TOMLYAML
-
[blackfriday]
-  angledQuotes = true
-  fractions = false
-  plainIDAnchors = true
-  extensions = ["hardLineBreak"]
-
-
-
blackfriday:
-  angledQuotes: true
-  fractions: false
-  plainIDAnchors: true
-  extensions:
-    - hardLineBreak
-
-
diff --git a/docs/content/overview/installing.md b/docs/content/overview/installing.md deleted file mode 100644 index 1249d4630..000000000 --- a/docs/content/overview/installing.md +++ /dev/null @@ -1,138 +0,0 @@ - ---- -aliases: -- /doc/installing/ -lastmod: 2016-01-04 -date: 2013-07-01 -menu: - main: - parent: getting started -next: /overview/usage -prev: /overview/quickstart -title: Installing Hugo -weight: 20 ---- - -Hugo is written in [Go][] with support for multiple platforms. - -The latest release can be found at [Hugo Releases](https://github.com/gohugoio/hugo/releases). -We currently provide pre-built binaries for - Windows, - Linux, - FreeBSD -and  OS X (Darwin) -for x64, i386 and ARM architectures. - -Hugo may also be compiled from source wherever the Go compiler tool chain can run, e.g. for other operating systems including DragonFly BSD, OpenBSD, Plan 9 and Solaris. See http://golang.org/doc/install/source for the full set of supported combinations of target operating systems and compilation architectures. - -## Installing Hugo (binary) - -Installation is very easy. Simply download the appropriate version for your -platform from [Hugo Releases](https://github.com/gohugoio/hugo/releases). -Once downloaded it can be run from anywhere. You don't need to install -it into a global location. This works well for shared hosts and other systems -where you don't have a privileged account. - -Ideally, you should install it somewhere in your `PATH` for easy use. -`/usr/local/bin` is the most probable location. - -On macOS, if you have [Homebrew](http://brew.sh/), installation is even -easier: just run `brew install hugo`. - -For a more detailed explanation follow the corresponding installation guides: - -- [Installation on macOS]({{< relref "tutorials/installing-on-mac.md" >}}) -- [Installation on Windows]({{< relref "tutorials/installing-on-windows.md" >}}) - -### Installing Pygments (optional) - -The Hugo executable has one *optional* external dependency for source code highlighting (Pygments). - -If you want to have source code highlighting using the [highlight shortcode](/extras/highlighting/), -you need to install the Python-based Pygments program. The procedure is outlined on the [Pygments home page](http://pygments.org/). - -## Upgrading Hugo - -Upgrading Hugo is as easy as downloading and replacing the executable you’ve -placed in your `PATH`. - -## Installing Hugo on Linux from native packages - -### Arch Linux - -You can install Hugo from the [Arch user repository](https://aur.archlinux.org/) on Arch Linux or derivatives such as Manjaro. - - sudo pacman -S yaourt - yaourt -S hugo - -Be aware that Hugo is built from source. This means that additional tools like [Git](https://git-scm.com/) and [Go](https://golang.org/doc/install) will be installed as well. - -### Debian and Ubuntu - -Hugo has been included in Debian and Ubuntu since 2016, and thus installing Hugo is as simple as: - - sudo apt install hugo - -Pros: - -* Native Debian/Ubuntu package maintained by Debian Developers -* Pre-installed bash completion script and man pages for best interactive experience - -Cons: - -* Might not be the latest version, especially if you are using an older stable version (e.g., Ubuntu 16.04 LTS). - Until backports and PPA are available, you may consider installing the Hugo snap package to get the latest version of Hugo, as described below. - -### Fedora, CentOS and Red Hat - -* https://copr.fedorainfracloud.org/coprs/spf13/Hugo/ (updated to Hugo v0.16) -* https://copr.fedorainfracloud.org/coprs/daftaupe/hugo/ (updated to Hugo v0.22) : usually released a few days after the official Hugo release. - -See also [this discussion](https://discuss.gohugo.io/t/solved-fedora-copr-repository-out-of-service/2491). - -### Snap package for Hugo - -In any of the [Linux distributions that support snaps](http://snapcraft.io/docs/core/install): - - snap install hugo - -> Note: Hugo-as-a-snap can write only inside the user’s `$HOME` directory—and gvfs-mounted directories owned by the user—because of Snaps’ confinement and security model. -> More information is also available [in this related GitHub issue](https://github.com/gohugoio/hugo/issues/3143). - -## Installing from source - -### Prerequisite tools for downloading and building source code - -* [Git](http://git-scm.com/) -* [Go][] 1.8+ -* [govendor][] - -### 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 from GitHub - - go get github.com/kardianos/govendor - govendor get github.com/gohugoio/hugo - -`govendor get` will fetch Hugo and all its dependent libraries to -`$HOME/go/src/github.com/gohugoio/hugo`, and compile everything into a final `hugo` -(or `hugo.exe`) executable, which you will find sitting inside -`$HOME/go/bin/`, all ready to go! - -*Windows users: where you see the `$HOME` environment variable above, replace it with `%USERPROFILE%`.* - - -*Note: For syntax highlighting using the [highlight shortcode](/extras/highlighting/), -you need to install the Python-based [Pygments](http://pygments.org/) program.* - -## Contributing - -Please see the [contributing guide](/doc/contributing/) if you are interested in -working with the Hugo source or contributing to the project in any way. - -[Go]: http://golang.org/ -[govendor]: https://github.com/kardianos/govendor diff --git a/docs/content/overview/introduction.md b/docs/content/overview/introduction.md deleted file mode 100644 index 305ddce37..000000000 --- a/docs/content/overview/introduction.md +++ /dev/null @@ -1,197 +0,0 @@ ---- -lastmod: 2016-08-14 -date: 2013-07-01 -linktitle: Introduction -menu: - main: - parent: getting started -next: /overview/quickstart -title: Introduction to Hugo -weight: 5 ---- - -## What is Hugo? - -Hugo is a general-purpose website framework. Technically speaking, Hugo is -a static site generator. Unlike other systems which dynamically build a page -every time a visitor requests one, Hugo does the building when you create -your content. Since websites are viewed far more often than they are -edited, Hugo is optimized for website viewing while providing a great -writing experience. - -Sites built with Hugo are extremely fast and very secure. Hugo sites can -be hosted anywhere, including [Heroku][], [GoDaddy][], [DreamHost][], -[GitHub Pages][], [Netlify][], [Surge][], [Aerobatic][], [Firebase Hosting][], -[Google Cloud Storage][], [Amazon S3][] and [CloudFront][], and work well -with CDNs. Hugo sites run without dependencies on expensive runtimes -like Ruby, Python or PHP and without dependencies on any databases. - -[Heroku]: https://www.heroku.com/ -[GoDaddy]: https://www.godaddy.com/ -[DreamHost]: http://www.dreamhost.com/ -[GitLab]: https://about.gitlab.com -[GitHub Pages]: https://pages.github.com/ -[Aerobatic]: https://www.aerobatic.com/ -[Firebase Hosting]: https://firebase.google.com/docs/hosting/ -[Google Cloud Storage]: http://cloud.google.com/storage/ -[Amazon S3]: http://aws.amazon.com/s3/ -[CloudFront]: http://aws.amazon.com/cloudfront/ "Amazon CloudFront" -[Surge]: https://surge.sh -[Netlify]: https://www.netlify.com - -We think of Hugo as the ideal website creation tool. With nearly instant -build times and the ability to rebuild whenever a change is made, Hugo -provides a very fast feedback loop. This is essential when you are -designing websites, but also very useful when creating content. - -## What makes Hugo different? - -Web site generators render content into HTML files. Most are "dynamic -site generators." That means the HTTP -server (which is the program running on your website that the user's -browser talks to) runs the generator to create a new HTML file -each and every time a user wants to view a page. - -Creating the page dynamically means that the computer hosting -the HTTP server has to have enough memory and CPU to effectively run -the generator around the clock. If not, then the user has to wait -in a queue for the page to be generated. - -Nobody wants users to wait longer than needed, so the dynamic site -generators programmed their systems to cache the HTML files. When -a file is cached, a copy of it is temporarily stored on the computer. -It is much faster for the HTTP server to send that copy the next time -the page is requested than it is to generate it from scratch. - -Hugo takes caching a step further. All HTML files are rendered on your -computer. You can review the files before you copy 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." - -Not running a web site generator on your HTTP server has many benefits. -The most noticeable is performance - HTTP servers are very good at -sending files. So good that you can effectively serve the same number -of pages with a fraction of the memory and CPU needed for a dynamic site. - -Hugo has two components to help you build and test your web site. The -one that you'll probably use most often is the built-in HTTP server. -When you run `hugo server`, Hugo renders all of your content into -HTML files and then runs an HTTP server on your computer so that you -can see what the pages look like. - -The second component is used when you're ready to publish your web -site to the computer running your website. Running Hugo without any -actions will rebuild your entire web site using the `baseURL` setting -from your site's configuration file. That's required to have your page -links work properly with most hosting companies. - -## 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. - -Hugo boasts the following features: - -### General - - * Extremely fast build times (~1 ms per page) - * Completely cross platform: Runs on  macOS,  Linux,  Windows, and more! - * Easy [installation](/overview/installing/) - * Render changes [on the fly](/overview/usage/) with [LiveReload](/extras/livereload/) as you develop - * Complete theme support - * Host your site anywhere - -### Organization - - * Straightforward [organization](/content/organization/) - * Support for [website sections](/content/sections/) - * Completely customizable [URLs](/extras/urls/) - * Support for configurable [taxonomies](/taxonomies/overview/) which includes categories and tags. Create your own custom organization of content - * Ability to [sort content](/content/ordering/) as you desire - * Automatic [table of contents](/extras/toc/) generation - * Dynamic menu creation - * [Pretty URLs](/extras/urls/) support - * [Permalink](/extras/permalinks/) pattern support - * [Aliases](/extras/aliases/) (redirects) - -### Content - - * Native support for content written in [Markdown](/content/example/) - * Support for other languages through _external helpers_, see [supported formats](/content/supported-formats) - * Support for TOML, YAML and JSON metadata in [frontmatter](/content/front-matter/) - * Completely [customizable homepage](/layout/homepage/) - * Support for multiple [content types](/content/types/) - * Automatic and user defined [summaries](/content/summaries/) - * [Shortcodes](/extras/shortcodes/) to enable rich content inside of Markdown - * ["Minutes to Read"](/layout/variables/) functionality - * ["Wordcount"](/layout/variables/) functionality - -### Additional Features - - * Integrated [Disqus](https://disqus.com/) comment support - * Integrated [Google Analytics](https://google-analytics.com/) support - * Automatic [RSS](/layout/rss/) creation - * Support for [Go](http://golang.org/pkg/html/template/), [Amber](https://github.com/eknkc/amber) and [Ace](https://github.com/yosssi/ace) HTML templates - * Syntax [highlighting](/extras/highlighting/) powered by [Pygments](http://pygments.org/) - -See what's coming next in the [roadmap](/meta/roadmap/). - -## 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, company site, portfolio, tumblog, -documentation, single page site or a site with thousands of -pages. - -## Why did you write Hugo? - -I wrote Hugo ultimately for a few reasons. First, I was disappointed with -WordPress, my then website solution. With it, I couldn't create -content as efficiently as I wanted to. -It rendered slowly. It required me to be online to write -posts: plus its constant security updates and the horror stories of people's -hacked blogs! I hated how content for it was written only in HTML, instead of the much -simpler Markdown. Overall, I felt like WordPress got in my way -much more than it helped me. It kept -me from writing great content. - -I looked at the existing static site generators -like [Jekyll][], [Middleman][] and [Nanoc][]. -All had complicated installation dependencies and took far longer to render -my blog with its hundreds of posts than I felt was acceptable. I wanted -a framework to be able to give me rapid feedback while making changes to the -templates, and the 5+-minute render times were just too slow. In general, -they were also very blog minded and didn't have the ability to provide -other content types and flexible URLs. - -[Jekyll]: http://jekyllrb.com/ -[Middleman]: https://middlemanapp.com/ -[Nanoc]: http://nanoc.ws/ - -I wanted to develop a fast and full-featured website framework without any -dependencies. The [Go language][] seemed to have all the features I needed -in a language. I began developing Hugo in Go and fell in love with the -language. I hope you will enjoy using Hugo (and contributing to it) as much -as I have writing it. - -—Steve Francia (@spf13) - -[Go language]: http://golang.org/ "The Go Programming Language" - -## Next Steps - - * [Install Hugo](/overview/installing/) - * [Quick start](/overview/quickstart/) - * [Join the Mailing List](/community/mailing-list/) - * [Star us on GitHub](https://github.com/gohugoio/hugo) - * [Discussion Forum](http://discuss.gohugo.io/) diff --git a/docs/content/overview/quickstart.md b/docs/content/overview/quickstart.md deleted file mode 100644 index 7340a4957..000000000 --- a/docs/content/overview/quickstart.md +++ /dev/null @@ -1,573 +0,0 @@ ---- -lastmod: 2016-10-20 -date: 2013-07-01 -linktitle: Quickstart -menu: - main: - parent: getting started -next: /overview/installing -prev: /overview/introduction -title: Hugo Quickstart Guide -weight: 10 ---- - -Building a bookshelf ---- - -In this quickstart, we will build an online bookshelf that will list books and their reviews. - -> _Note: This quickstart depends on features introduced in Hugo v0.15. If you have an earlier version of Hugo, you will need to [upgrade](/overview/installing/) before proceeding._ - -{{% youtube w7Ft2ymGmfc %}} - -## Step 1. Install Hugo - -Go to [Hugo Releases](https://github.com/gohugoio/hugo/releases) and download the -appropriate version for your OS and architecture. - -Save the main executable as `hugo` (or `hugo.exe` on Windows) somewhere in your `PATH` as we will be using it in the next step. - -More complete instructions are available -at [Installing Hugo]({{< relref "overview/installing.md" >}}). - -If you're on Windows, this quickstart will assume -you're using [Git Bash](https://git-for-windows.github.io/) -(also known as Git for Windows). -Thus all commands will begin with the Bash prompt character (which is `$`). - -Once `hugo` is installed, make sure to run the `help` command to verify `hugo` installation. Below you can see part of the `help` command output for brevity. - -```bash -$ hugo help -``` -``` -hugo is the main command, used to build your Hugo site. - -Hugo is a Fast and Flexible Static Site Generator -built with love by spf13 and friends in Go. - -Complete documentation is available at http://gohugo.io/. -``` - -You can check `hugo` version using the command shown below. - -```bash -$ hugo version -``` -``` -Hugo Static Site Generator v0.15 BuildDate: 2015-11-26T11:59:00+05:30 -``` - -## Step 2. Scaffold bookshelf hugo site - -Hugo has commands that allows us to quickly scaffold a Hugo managed website. Navigate to a convenient location on your filesystem and create a new Hugo site `bookshelf` by executing the following command. - -```bash -$ hugo new site bookshelf -``` - -Change directory to `bookshelf` and you will see the following directory layout. - -```bash -$ tree -a -``` -``` -. -|-- archetypes -|-- config.toml -|-- content -|-- data -|-- layouts -|-- static -`-- themes - -6 directories, 1 file -``` - -As mentioned in the command output, `bookshelf` directory has 6 sub-directories and 1 file. Let's look at each of them one by one. - -* **archetypes**: You can create new content files in Hugo using the `hugo new` command. When you run that command, it adds few configuration properties to the post like date and title. [Archetype]({{< relref "content/archetypes.md" >}}) allows you to define your own configuration properties that will be added to the post front matter whenever `hugo new` command is used. - -* **config.toml**: Every website should have a configuration file at the root. By default, the configuration file uses `TOML` format but you can also use `YAML` or `JSON` formats as well. [TOML](https://github.com/toml-lang/toml) is minimal configuration file format that's easy to read due to obvious semantics. The configuration settings mentioned in the `config.toml` are applied to the full site. These configuration settings include `baseURL` and `title` of the website. - -* **content**: This is where you will store content of the website. Inside content, you will create sub-directories for different sections. Let's suppose your website has three sections -- `blog`, `article`, and `tutorial` then you will have three different directories for each of them inside the `content` directory. The name of the section i.e. `blog`, `article`, or `tutorial` will be used by Hugo to apply a specific layout applicable to that section. - -* **data**: This directory is used to store configuration files that can be -used by Hugo when generating your website. -You can write these files in YAML, JSON, or TOML format. - -* **layouts**: The content inside this directory is used to specify how your content will be converted into the static website. - -* **static**: This directory is used to store all the static content that your website will need like images, CSS, JavaScript or other static content. - -* **themes**: This is where you will create a theme for your site to use. Themes provide the layout and templates that renders content. There's a wide variety of open-source themes available to download and use but you can also create your own if you prefer. - -## Step 3. Add content - -Let's now add a post to our `bookshelf`. We will use the `hugo new` command to add a post. In January, I read [Good To Great](http://www.amazon.com/Good-Great-Some-Companies-Others/dp/0066620996/) book so we will start with creating a post for it. **Make sure you are inside the `bookshelf` directory.** - -```bash -$ hugo new post/good-to-great.md -``` -``` -/Users/shekhargulati/bookshelf/content/post/good-to-great.md created -``` - -The above command will create a new directory `post` -inside the `bookshelf/content` directory -and create `good-to-great.md` file inside it. - -```bash -$ tree -a content -``` -``` -content -`-- post - `-- good-to-great.md - -1 directory, 1 file -``` - -The content inside the `good-to-great.md` file looks as shown below. - -``` -+++ -date = "2016-02-14T16:11:58+05:30" -draft = true -title = "good to great" - -+++ -``` - -The content inside `+++` is the TOML configuration for the post. -This configuration is called **front matter**. -It enables you to define post configuration along with its content. -By default, each post will have the three configuration properties shown above. - -* **date** specifies the date and time at which post was created. -* **draft** specifies that post is not ready for publication yet so it will not be in the generated site. -* **title** specifies title for the post. - -Let's add a small review for **Good to Great** book. - -``` -+++ -date = "2016-02-14T16:11:58+05:30" -draft = true -title = "Good to Great Book Review" - -+++ - -I read **Good to Great in January 2016**. An awesome read sharing detailed analysis on how good companies became great. -``` - -## Step 4. Serve content - -Hugo has an inbuilt server that can serve your website content so that you can preview it. You can also use the inbuilt Hugo server in production. To serve content, execute the following command inside the `bookshelf` directory. - -```bash -$ hugo server -``` -``` -0 of 1 draft rendered -0 future content -0 pages created -0 paginator pages created -0 tags created -0 categories created -in 9 ms -Watching for changes in /Users/shekhargulati/bookshelf/{data,content,layouts,static} -Serving pages from memory -Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) -Press Ctrl+C to stop -``` - -This will start the server on port `1313`. -You can view your blog at http://localhost:1313/. -When you go to the link, you will see nothing. -There are couple of reasons for that: - -1. As you can see in the `hugo server` command output, Hugo didn't render the draft. Hugo will only render drafts if you pass the `buildDrafts` flag to the `hugo server` command. -2. We have not specified how Markdown content should be rendered. We have to specify a theme that Hugo can use. We will do that in the next step. - -To render drafts, re-run the server with command shown below. - -```bash -$ hugo server --buildDrafts -``` -``` -1 of 1 draft rendered -0 future content -1 pages created -0 paginator pages created -0 tags created -0 categories created -in 6 ms -Watching for changes in /Users/shekhargulati/bookshelf/{data,content,layouts,static} -Serving pages from memory -Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) -Press Ctrl+C to stop -``` - -If you go to [http://localhost:1313/](http://localhost:1313/), -you still will not see anything as we have not specified a theme that Hugo should use. - -## Step 5. Add theme - -Themes provide the layout and templates that will be used by Hugo to render your website. There are a lot of Open-source themes available at [https://themes.gohugo.io/](https://themes.gohugo.io/) that you can use. - -> **Hugo currently doesn’t ship with a `default` theme, allowing the user to pick whichever theme best suits their project.** - -Themes should be added in the `themes` directory inside the repository root. - -```bash -$ cd themes -``` -Now, you can clone one or more themes inside the `themes` directory. -We will use the `robust` theme, -but at a commit (in its history) that works with this quickstart. - -```bash -$ git clone https://github.com/dim0627/hugo_theme_robust.git -$ (cd hugo_theme_robust; git checkout b8ce466) -``` - -Leave the themes folder. - -```bash -$ cd .. -``` - - -Start the server again. - -```bash -$ hugo server --theme=hugo_theme_robust --buildDrafts -``` -``` -1 of 1 draft rendered -0 future content -1 pages created -2 paginator pages created -0 tags created -0 categories created -in 10 ms -Watching for changes in /Users/shekhargulati/bookshelf/{data,content,layouts,static,themes} -Serving pages from memory -Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) -Press Ctrl+C to stop -``` - -> *Note: If Hugo doesn't find the specified theme in the `themes` directory, -it will throw an exception as shown below.* -``` -FATAL: 2016/02/14 Unable to find theme Directory: /Users/shekhargulati/bookshelf/themes/robust -``` - -To view your website, you can go to http://localhost:1313/. You will see as shown below. - -![](/img/quickstart/bookshelf-robust-theme.png) - -Let's understand the layout of the theme. A theme consists of the following: - -* **theme.toml** is the theme configuration file that gives information -about the theme like name and description of theme, -author details, and theme license. - -* **images** directory contains two images -- `screenshot.png` and `tn.png`. `screenshot.png` is the image of the list view and `tn.png` is the single post view. - -* **layouts** directory contains different views for different content types. -Every content type should have two files `single.html` and `list.html`. -`single.html` is used for rendering a single piece of content. -`list.html` is used to view a list of content items. -For example, you will use `list.html` to view all the posts -that have the `programming` tag. - -* **static** directory stores all the static assets used by the template. -Static assets could be JavaScript libraries like jQuery or CSS styles or images, -or any other static content. -This directory will be copied into the final site when rendered. - -## Step 6. Use multiple themes - -You can very easily test different layouts by switching between different themes. -Let's suppose we want to try out the `bleak` theme. -We clone the `bleak` theme inside the `bookshelf/themes` directory. - -```bash -$ git clone https://github.com/Zenithar/hugo-theme-bleak.git -``` - -Restart the server using `hugo-theme-bleak` as shown below. - -```bash -$ hugo server --theme=hugo-theme-bleak --buildDrafts -``` - -Now, the website will use the `bleak` theme -and will be rendered differently as shown below. - -![](/img/quickstart/bookshelf-bleak-theme.png) - -## Step 7. Update config.toml and live reloading in action - -Restart the server with the `robust` theme, as we will use it in this quickstart. - -```bash -$ hugo server --theme=hugo_theme_robust --buildDrafts -``` - -The website uses the dummy values specified in `bookshelf/config.toml`. -Let's update the configuration. - -```toml -baseURL = "http://example.org/" -languageCode = "en-us" -title = "Shekhar Gulati Book Reviews" - -[Params] - Author = "Shekhar Gulati" -``` - -Hugo has inbuilt support for live reloading. -So, as soon as you save your changes it will apply the change -and reload the web page. You will see the changes shown below. - -![](/img/quickstart/bookshelf-updated-config.png) - -The same is reflected in the Hugo server logs as well. -As soon as you changed the configuration file, -Hugo applied those changes to the affected pages. - -``` -Config file changed: /Users/shekhargulati/bookshelf/config.toml -1 of 1 draft rendered -0 future content -1 pages created -2 paginator pages created -0 tags created -0 categories created -in 11 ms -``` - -## Step 8. Customize robust theme - -The `robust` theme is a good start towards our online bookshelf but we want to -customize it a bit to meet the look and feel required for the bookshelf. -Hugo makes it very easy to customize themes. -You can also create your themes but we will not do that today. -If you want to create your own theme, then you should refer to -the [Hugo documentation]({{< relref "themes/creation.md" >}}). - -The first change that we have to make is to use a different default image -instead of the one used in the theme. -The theme's default image used in both the list and single view page resides -inside `themes/hugo_theme_robust/static/images/default.jpg`. -We can easily override it by creating a simple directory structure -inside the repository's `static` directory. - -Create an images directory inside the `bookshelf/static` directory -and copy an image with name `default.jpg` inside it. -We will use the default image shown below. - -![](/img/quickstart/default.jpg) - -Hugo will sync the changes and reload the website to use new image as shown below. - -![](/img/quickstart/bookshelf-new-default-image.png) - -Now, we need to change the layout of the index page so that only images are shown instead of the text. The index.html inside the layouts directory of the theme refer to partial `li` that renders the list view shown below. - -```html - -``` - -Create a new file li.html inside the `bookshelf/layouts/_default` directory. Copy the content shown below into the li.html. We have removed details of the book so that only image is shown. - -```html - -``` - -Now, the website will be rendered as shown below. - -![](/img/quickstart/bookshelf-only-picture.png) - -Next, we want to remove information related to theme from the footer. -So, create a new directory `partials` inside `bookshelf/layouts`. -There, create a new file `default_foot.html` with the content copied -from the theme's `layouts/partials/default_foot.html`. -Replace the footer section with the one shown below. - -```html -
-

{{ with .Site.Copyright | safeHTML }}{{ . }}{{ else }}© {{ $.Site.LastChange.Year }} {{ if isset $.Site.Params "Author" }}{{ $.Site.Params.Author }}{{ else }}{{ .Site.Title }}{{ end }}{{ end }}

-

Powered by Hugo,

-
-``` - -We also have to remove the sidebar on the right. -Copy the `index.html` from the theme's `layouts` directory to -the `bookshelf/layouts` directory. -Remove the section related to the sidebar from the HTML: - -```html -
- {{ partial "sidebar.html" . }} -
-``` - -So far we are using the default image but we would like to use the book image so that we can relate to the book. Every book review will define a configuration setting in its front matter. Update the `good-to-great.md` as shown below. - - -``` -+++ -date = "2016-02-14T16:11:58+05:30" -draft = true -title = "Good to Great Book Review" -image = "good-to-great.jpg" -+++ - -I read **Good to Great in January 2016**. An awesome read sharing detailed analysis on how good companies became great. Although this book is about how companies became great but we could apply a lot of the learnings on ourselves. Concepts like level 5 leader, hedgehog concept, the stockdale paradox are equally applicable to individuals. -``` - -Grab a (legal) image from somewhere, name it `good-to-great.jpg`, -and place it in the `bookshelf/static/images` directory. - - -After adding few more books to our shelf, the shelf appears as shown below. -These are a few of the books that I have read within the last year. - -![](/img/quickstart/bookshelf.png) - - -## Step 9. Make posts public - -So far all the posts that we have written are in draft status. -To make a draft public, you can either run a command -or manually change the draft status in the post to `false`. - -```bash -$ hugo undraft content/post/good-to-great.md -``` - -Now, you can start the server without the `buildDrafts` option. - -``` -$ hugo server --theme=hugo_theme_robust -``` - -## Step 10. Integrate Disqus - -Disqus allows you to integrate comments in your static blog. To enable Disqus, you just have to set `disqusShortname` in the config.toml as shown below. - -``` -[Params] - Author = "Shekhar Gulati" - disqusShortname = -``` - -Now, commenting will be enabled in your blog. - -![](/img/quickstart/bookshelf-disqus.png) - -## Step 11. Generate website - -To generate Hugo website source you can use -to deploy your website on GitHub pages, -first edit `bookshelf/config.toml`, changing the `baseURL` line to: - -``` -baseURL = "https://.github.io/bookshelf/" -``` - -Then type the following command. - -```bash -$ hugo --theme=hugo_theme_robust -``` -``` -0 draft content -0 future content -5 pages created -2 paginator pages created -0 tags created -0 categories created -in 17 ms -``` - -After you run the `hugo` command, a `bookshelf/public` directory -will be created containing the generated website source. - -BTW (in case you tried), -the website isn't properly accessible via the `file:///` protocol. - -## Step 12. Deploy bookshelf on GitHub pages - -Let's version control your bookshelf: - -```bash -$ git init -$ echo "/public/" >> .gitignore -$ echo "/themes/" >> .gitignore -$ git add --all -$ git commit -m "Initial commit" -``` - -Now the Git repositories under `bookshelf/themes` -won't conflict with your `bookshelf` repository, -and neither will a Git repository in `bookshelf/public`. - -Create a new repository on GitHub named `bookshelf` (without a README). -Once that's done, create a new Git repository on your local system -in `bookshelf/public` and add remote: - -```bash -$ cd public -$ git init -$ git remote add origin git@github.com:/bookshelf.git -``` - -There, create and check out a new branch `gh-pages`. - -```bash -$ git checkout -b gh-pages -Switched to a new branch 'gh-pages' -``` - -Add all the files (within `bookshelf/public`) to the index, -commit them, and push the changes to GitHub. - -```bash -$ git add --all -$ git commit -m "bookshelf added" -$ git push -f origin gh-pages -``` - -In couple of minutes, your website will be live -at `https://.github.io/bookshelf/`. - -Anytime, you can regenerate your site with: - -```bash -$ (cd ..; hugo --theme=hugo_theme_robust) -$ git add --all -$ git commit -m "" -$ git push -f origin gh-pages -``` - ----- - -This quickstart was originally written by [Shekhar Gulati](https://twitter.com/shekhargulati) in his [52 Technologies in 2016](https://github.com/shekhargulati/52-technologies-in-2016) blog series. diff --git a/docs/content/overview/source-directory.md b/docs/content/overview/source-directory.md deleted file mode 100644 index 2d4ce10f4..000000000 --- a/docs/content/overview/source-directory.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -aliases: -- /doc/source-directory/ -lastmod: 2015-02-09 -date: 2013-07-01 -menu: - main: - parent: getting started -next: /content/organization -notoc: true -prev: /overview/configuration -title: Source Organization -weight: 50 ---- - -Hugo takes a single directory and uses it as the input for creating a complete -website. - - -The top level of a source directory will typically have the following elements: - - ▸ archetypes/ - ▸ content/ - ▸ data/ - ▸ i18n/ - ▸ layouts/ - ▸ static/ - ▸ themes/ - config.toml - -Learn more about the different directories and what their purpose is: - -* [config]({{< relref "overview/configuration.md" >}}) -* [data]({{< relref "extras/datafiles.md" >}}) -* [i18n]({{< relref "content/multilingual.md#translation-of-strings" >}}) -* [archetypes]({{< relref "content/archetypes.md" >}}) -* [content]({{< relref "content/organization.md" >}}) -* [layouts]({{< relref "templates/overview.md" >}}) -* [static]({{< relref "themes/creation.md#static" >}}) -* [themes]({{< relref "themes/overview.md" >}}) - - -## Example - -An example directory may look like: - - . - ├── config.toml - ├── archetypes - | └── default.md - ├── content - | ├── post - | | ├── firstpost.md - | | └── secondpost.md - | └── quote - | | ├── first.md - | | └── second.md - ├── data - ├── i18n - ├── layouts - | ├── _default - | | ├── single.html - | | └── list.html - | ├── partials - | | ├── header.html - | | └── footer.html - | ├── taxonomy - | | ├── category.html - | | ├── post.html - | | ├── quote.html - | | └── tag.html - | ├── post - | | ├── li.html - | | ├── single.html - | | └── summary.html - | ├── quote - | | ├── li.html - | | ├── single.html - | | └── summary.html - | ├── shortcodes - | | ├── img.html - | | ├── vimeo.html - | | └── youtube.html - | ├── index.html - | └── sitemap.xml - ├── themes - | ├── hyde - | └── doc - └── static - ├── css - └── js - -This directory structure tells us a lot about this site: - -1. The website intends to have two different types of content: *posts* and *quotes*. -2. It will also apply two different taxonomies to that content: *categories* and *tags*. -3. It will be displaying content in 3 different views: a list, a summary and a full page view. - -## Content for home page and other list pages - -Since Hugo 0.18, "everything" is a `Page` that can have content and metadata, like `.Params`, attached to it -- and share the same set of [page variables](/templates/variables/). - -To add content and frontmatter to the home page, a section, a taxonomy or a taxonomy terms listing, add a markdown file with the base name `_index` on the relevant place on the file system. - -For the default Markdown content, the filename will be `_index.md`. - -Se the example directory tree below. - -**Note that you don't have to create `_index` file for every section, taxonomy and similar, a default page will be created if not present, but with no content and default values for `.Title` etc.** - -```bash -└── content - ├── _index.md - ├── categories - │   ├── _index.md - │   └── photo - │   └── _index.md - ├── post - │   ├── _index.md - │   └── firstpost.md - └── tags - ├── _index.md - └── hugo - └── _index.md -``` - diff --git a/docs/content/overview/usage.md b/docs/content/overview/usage.md deleted file mode 100644 index d7c7f7772..000000000 --- a/docs/content/overview/usage.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -aliases: -- /doc/usage/ -lastmod: 2016-08-19 -date: 2013-07-01 -menu: - main: - parent: getting started -next: /overview/configuration -notoc: true -prev: /overview/installing -title: Using Hugo -weight: 30 ---- - -Make sure Hugo is in your `PATH` (or provide a path to it). Test this by: - -{{< nohighlight >}}$ hugo help -hugo is the main command, used to build your Hugo site. - -Hugo is a Fast and Flexible Static Site Generator -built with love by spf13 and friends in Go. - -Complete documentation is available at http://gohugo.io/. - -Usage: - hugo [flags] - hugo [command] - -Available Commands: - benchmark Benchmark Hugo by building a site a number of times. - check Contains some verification checks - config Print the site configuration - convert Convert your content to different formats - env Print Hugo version and environment info - gen A collection of several useful generators. - help Help about any command - import Import your site from others. - list Listing out various types of content - new Create new content for your site - server A high performance webserver - undraft Undraft changes the content's draft status from 'True' to 'False' - version Print the version number of Hugo - -Flags: - -b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/ - -D, --buildDrafts include content marked as draft - -E, --buildExpired include expired content - -F, --buildFuture include content with publishdate in the future - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ - --canonifyURLs if true, all relative URLs will be canonicalized using baseURL - --cleanDestinationDir remove files from destination not found in static directories - --config string config file (default is path/config.yaml|json|toml) - -c, --contentDir string filesystem path to content directory - -d, --destination string filesystem path to write files to - --disable404 do not render 404 page - --disableKinds stringSlice disable different kind of pages (home, RSS etc.) - --disableRSS do not build RSS files - --disableSitemap do not build Sitemap file - --enableGitInfo add Git revision, date and author info to the pages - --forceSyncStatic copy all files when static is changed. - -h, --help help for hugo - --i18n-warnings print missing translations - --ignoreCache ignores the cache directory - -l, --layoutDir string filesystem path to layout directory - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --noChmod don't sync permission mode of files - --noTimes don't sync modification time of files - --pluralizeListTitles pluralize titles in lists using inflect (default true) - --preserveTaxonomyNames preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu") - --quiet build in quiet mode - --renderToMemory render to memory (only useful for benchmark testing) - -s, --source string filesystem path to read files relative from - --stepAnalysis display memory and timing of different steps of the program - -t, --theme string theme to use (located in /themes/THEMENAME/) - --themesDir string filesystem path to themes directory - --uglyURLs if true, use /filename.html instead of /filename/ - -v, --verbose verbose output - --verboseLog verbose logging - -w, --watch watch filesystem for changes and recreate as needed - -Use "hugo [command] --help" for more information about a command. -{{< /nohighlight >}} - -## Common Usage Example - -The most common use is probably to run `hugo` with your current directory being the input directory: - -{{< nohighlight >}}$ hugo -0 draft content -0 future content -99 pages created -0 paginator pages created -16 tags created -0 groups created -in 120 ms -{{< /nohighlight >}} - -This generates your web site to the `public/` directory, -ready to be deployed to your web server. - - -## Instant feedback as you develop your web site - -If you are working on things and want to see the changes immediately, by default -Hugo will watch the filesystem for changes, and rebuild your site as soon as a file is saved: - -{{< nohighlight >}}$ hugo -s ~/Code/hugo/docs -0 draft content -0 future content -99 pages created -0 paginator pages created -16 tags created -0 groups created -in 120 ms -Watching for changes in /Users/spf13/Code/hugo/docs/content -Press Ctrl+C to stop -{{< /nohighlight >}} - -Hugo can even run a server and create a site preview at the same time! -Hugo implements [LiveReload](/extras/livereload/) technology to automatically -reload any open pages in all JavaScript-enabled browsers, including mobile. -This is the easiest and most common way to develop a Hugo web site: - -{{< nohighlight >}}$ hugo server -ws ~/Code/hugo/docs -0 draft content -0 future content -99 pages created -0 paginator pages created -16 tags created -0 groups created -in 120 ms -Watching for changes in /Users/spf13/Code/hugo/docs/content -Serving pages from /Users/spf13/Code/hugo/docs/public -Web Server is available at http://localhost:1313/ -Press Ctrl+C to stop -{{< /nohighlight >}} - - -## Deploying your web site - -After running `hugo server` for local web development, -you need to do a final `hugo` run -**without the `server` part of the command** -to rebuild your site. -You may then **deploy your site** by copying the `public/` directory -(by FTP, SFTP, WebDAV, Rsync, `git push`, etc.) -to your production web server. - -Since Hugo generates a static website, your site can be hosted anywhere, -including [Heroku][], [GoDaddy][], [DreamHost][], [GitHub Pages][], -[Amazon S3][] with [CloudFront][], [Firebase Hosting][], -or any other cheap (or even free) static web hosting service. - -[Apache][], [nginx][], [IIS][]... Any web server software would do! - -[Apache]: http://httpd.apache.org/ "Apache HTTP Server" -[nginx]: http://nginx.org/ -[IIS]: http://www.iis.net/ -[Heroku]: https://www.heroku.com/ -[GoDaddy]: https://www.godaddy.com/ -[DreamHost]: http://www.dreamhost.com/ -[GitHub Pages]: https://pages.github.com/ -[GitLab]: https://about.gitlab.com -[Amazon S3]: http://aws.amazon.com/s3/ -[CloudFront]: http://aws.amazon.com/cloudfront/ "Amazon CloudFront" -[Firebase Hosting]: https://firebase.google.com/docs/hosting/ - -### A note about deployment - -Running `hugo` *does not* remove generated files before building. This means that you should delete your `public/` directory (or the directory you specified with `-d`/`--destination`) before running the `hugo` command, or you run the risk of the wrong files (e.g. drafts and/or future posts) being left in the generated site. - -An easy way to work around this is to use different directories for development and production. - -To start a server that builds draft content (helpful for editing), you can specify a different destination: the `dev/` dir. - -{{< nohighlight >}}$ hugo server -wDs ~/Code/hugo/docs -d dev -{{< /nohighlight >}} - -When the content is ready for publishing, use the default `public/` dir: - -{{< nohighlight >}}$ hugo -s ~/Code/hugo/docs -{{< /nohighlight >}} - -This prevents content you're not yet ready to share -from accidentally becoming available. - -### Alternatively, serve your web site with Hugo! - -Yes, that's right! Because Hugo is so blazingly fast both in web site creation -*and* in web serving (thanks to its concurrent and multi-threaded design and -its Go heritage), some users actually prefer using Hugo itself to serve their -web site *on their production server*! - -No other web server software (Apache, nginx, IIS...) is necessary. - -Here is the command: - -{{< nohighlight >}}$ hugo server --baseURL=http://yoursite.org/ \ - --port=80 \ - --appendPort=false \ - --bind=87.245.198.50 -{{< /nohighlight >}} - -Note the `bind` option, -which is the interface to which the server will bind -(defaults to `127.0.0.1`: -fine for most development use cases). -Some hosts, such as Amazon Web Services, -run NAT (network address translation); -sometimes it can be hard to figure out the actual IP address. -Using `--bind=0.0.0.0` will bind to all interfaces. - -This way, you may actually deploy just the source files, -and Hugo on your server will generate the resulting web site -on-the-fly and serve them at the same time. - -You may optionally add `--disableLiveReload=true` if you do not want -the JavaScript code for LiveReload to be added to your web pages. - -Interested? Here are some great tutorials contributed by Hugo users: - -* [hugo, syncthing](http://fredix.xyz/2014/10/hugo-syncthing/) (French) by Frédéric Logier (@fredix) diff --git a/docs/content/release-notes/0.20.3-relnotes.md b/docs/content/release-notes/0.20.3-relnotes.md deleted file mode 100644 index 5ab476ee6..000000000 --- a/docs/content/release-notes/0.20.3-relnotes.md +++ /dev/null @@ -1,23 +0,0 @@ - ---- -date: 2017-04-24 -title: 0.20.3 ---- - - - -This is a bug-fix relase with one important fix. But it also adds some harness around [GoReleaser](https://github.com/goreleaser/goreleaser) to automate the Hugo release process. Big thanks to [@caarlos0](https://github.com/caarlos0) for great and super-fast support fixing issues along the way. - -Hugo now has: - -* 16619+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 458+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 156+ [themes](http://themes.gohugo.io/) - -## Enhancement - -* Automate the Hugo release process [550eba64](https://github.com/gohugoio/hugo/commit/550eba64705725eb54fdb1042e0fb4dbf6f29fd0) [@bep](https://github.com/bep) [#3358](https://github.com/gohugoio/hugo/issues/3358) - -## Fix - -* Fix handling of zero-length files [9bf5c381](https://github.com/gohugoio/hugo/commit/9bf5c381b6b3e69d4d8dbfd7a40074ac44792bbf) [@bep](https://github.com/bep) [#3355](https://github.com/gohugoio/hugo/issues/3355) diff --git a/docs/content/release-notes/0.20.4-relnotes.md b/docs/content/release-notes/0.20.4-relnotes.md deleted file mode 100644 index 4ddc78c8e..000000000 --- a/docs/content/release-notes/0.20.4-relnotes.md +++ /dev/null @@ -1,28 +0,0 @@ - ---- -date: 2017-04-24T21:12:31+01:00 -title: 0.20.4 ---- - - - -This is the second bug-fix relase of the day, fixing a couple of issues related to the new release scripts. - - -Hugo now has: - -* 16626+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 457+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 156+ [themes](http://themes.gohugo.io/) - -## Fixes - -* Fix statically linked binaries [275bcf56](https://github.com/gohugoio/hugo/commit/275bcf566c7cb72367d4423cf4810319311ff680) [@munnerz](https://github.com/munnerz) [#3382](https://github.com/gohugoio/hugo/issues/3382) -* Filename change in Hugo 0.20.3 binaries [#3385](https://github.com/gohugoio/hugo/issues/3385) -* Fix version calculation [cb3c6b6f](https://github.com/gohugoio/hugo/commit/cb3c6b6f7670f85189a4a3637e7132901d1ed6e9) [@bep](https://github.com/bep) - - - - - - diff --git a/docs/content/release-notes/0.20.5-relnotes.md b/docs/content/release-notes/0.20.5-relnotes.md deleted file mode 100644 index 4a848169e..000000000 --- a/docs/content/release-notes/0.20.5-relnotes.md +++ /dev/null @@ -1,9 +0,0 @@ - ---- -date: 2017-04-25 -title: 0.20.5 ---- - - - -This is a bug-fix relase which fixes the version number of `0.20.4` (which wrongly shows up as `0.21-DEV`) ([#3388](https://github.com/gohugoio/hugo/issues/3388)). \ No newline at end of file diff --git a/docs/content/release-notes/0.20.6-relnotes.md b/docs/content/release-notes/0.20.6-relnotes.md deleted file mode 100644 index fe6a2b273..000000000 --- a/docs/content/release-notes/0.20.6-relnotes.md +++ /dev/null @@ -1,26 +0,0 @@ - ---- -date: 2017-04-27 -title: 0.20.6 ---- - - - -There have been some [shouting on discuss.gohugo.io](https://discuss.gohugo.io/t/index-md-is-generated-in-subfolder-index-index-html-hugo-0-20/6338/15) about some broken sites after the release of Hugo `0.20`. This release reintroduces the old behaviour, making `/my-blog-post/index.md` work as expected. - -Hugo now has: - -* 16675+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 456+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 156+ [themes](http://themes.gohugo.io/) - -## Fixes - -* Avoid index.md in /index/index.html [#3396](https://github.com/gohugoio/hugo/issues/3396) -* Make missing GitInfo a WARNING [b30ca4be](https://github.com/gohugoio/hugo/commit/b30ca4bec811dbc17e9fd05925544db2b75e0e49) [@bep](https://github.com/bep) [#3376](https://github.com/gohugoio/hugo/issues/3376) -* Fix some of the fpm fields for deb [3bd1d057](https://github.com/gohugoio/hugo/commit/3bd1d0571d5f2f6bf0dc8f90a8adf2dbfcb2fdfd) [@anthonyfok](https://github.com/anthonyfok) - - - - - diff --git a/docs/content/release-notes/0.21-relnotes.md b/docs/content/release-notes/0.21-relnotes.md deleted file mode 100644 index 2f393d20f..000000000 --- a/docs/content/release-notes/0.21-relnotes.md +++ /dev/null @@ -1,106 +0,0 @@ - ---- -date: 2017-05-22 -title: 0.21 ---- - - Hugo `0.21` brings full support for shortcodes per [Output Format](https://gohugo.io/extras/output-formats/) ([#3220](https://github.com/gohugoio/hugo/issues/3220)), the last vital piece of that puzzle. This is especially useful for `Google AMP` with its many custom media tags. - -This release represents **126 contributions by 29 contributors** to the main Hugo code base. Since last main release Hugo has **gained 850 stars and 7 additional themes**. - -Hugo now has: - -* 17156+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 457+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 163+ [themes](http://themes.gohugo.io/) - -[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@moorereason](https://github.com/moorereason), [@bogem](https://github.com/bogem), and [@munnerz](https://github.com/munnerz) for their ongoing contributions. And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition. - -## Other Highlights - -On a more technical side, [@moorereason](https://github.com/moorereason) and [@bep](https://github.com/bep) have introduced namespaces for Hugo's many template funcs ([#3042](https://github.com/gohugoio/hugo/issues/3042) ). There are so many now, and adding more into that big pile would be a sure path toward losing control. Now they are nicely categorised into namespaces with its own tests and examples, with an API that the documentation site can use to make sure it is correct and up-to-date. - -## Notes - -* The deprecated `.Extension`, `.Now` and `.TargetPath` will now `ERROR` [544f0a63](https://github.com/gohugoio/hugo/commit/544f0a6394b0e085d355e8217fc5bb3d96c12a98) [@bep](https://github.com/bep) -* The config settings and flags `disable404`, `disableRSS`, `disableSitemap`, `disableRobotsTXT` are now deprecated. Use `disableKinds`. [5794a265](https://github.com/gohugoio/hugo/commit/5794a265b41ffdeebfd8485eecf65cf4088d49d6) [@bep](https://github.com/bep) [#3345](https://github.com/gohugoio/hugo/issues/3345) - -## Enhancements - -### Templates - -* Log a WARNING on wrong usage of `IsSet` [38661c17](https://github.com/gohugoio/hugo/commit/38661c17bb8c31c9f31ee18f8eba5e3bfddd5574) [@moorereason](https://github.com/moorereason) [#3092](https://github.com/gohugoio/hugo/issues/3092) -* Add support for ellipsed paginator navigator, making paginators with lots of pages more compact [b6ea492b](https://github.com/gohugoio/hugo/commit/b6ea492b7a6325d04d44eeb00a990a3a0e29e0c0) [@bep](https://github.com/bep) [#3466](https://github.com/gohugoio/hugo/issues/3466) -* Add support for interfaces to `intersect` [f1c29b01](https://github.com/gohugoio/hugo/commit/f1c29b017bbd88e701cd5151dd186e868672ef89) [@moorereason](https://github.com/moorereason) [#1952](https://github.com/gohugoio/hugo/issues/1952) -* Add `NumFmt` function [93b3b138](https://github.com/gohugoio/hugo/commit/93b3b1386714999d716e03b131f77234248f1724) [@moorereason](https://github.com/moorereason) [#1444](https://github.com/gohugoio/hugo/issues/1444) -* Add template function namespaces [#3418](https://github.com/gohugoio/hugo/issues/3418) [#3042](https://github.com/gohugoio/hugo/issues/3042) [@moorereason](https://github.com/moorereason) [@bep](https://github.com/bep) -* Add translation links to the default sitemap template [90d3fbf1](https://github.com/gohugoio/hugo/commit/90d3fbf1da93a279cfe994a226ae82cf5441deab) [@rayjolt](https://github.com/rayjolt) [#2569](https://github.com/gohugoio/hugo/issues/2569) -* Allow text partials in HTML templates and the other way around [1cf29200](https://github.com/gohugoio/hugo/commit/1cf29200b4bb0a9c006155ec76759b7f4b1ad925) [@bep](https://github.com/bep) [#3273](https://github.com/gohugoio/hugo/issues/3273) - -### Output - -* Refactor site rendering with an "output format context". In this release, this is used for shortcode handling only, but this paves the way for future niceness [1e4d082c](https://github.com/gohugoio/hugo/commit/1e4d082cf5b92fedbc60b1b4f0e9d1ee6ec45e33) [@bep](https://github.com/bep) [#3397](https://github.com/gohugoio/hugo/issues/3397) [2bcbf104](https://github.com/gohugoio/hugo/commit/2bcbf104006e0ec03be4fd500f2519301d460f8c) [@bep](https://github.com/bep) [#3220](https://github.com/gohugoio/hugo/issues/3220) - - -### Core - -* Handle `shortcode` per `Output Format` [af72db80](https://github.com/gohugoio/hugo/commit/af72db806f2c1c0bf1dfe5832275c41eeba89906) [@bep](https://github.com/bep) [#3220](https://github.com/gohugoio/hugo/issues/3220) -* Improve shortcode error message [58d9cbd3](https://github.com/gohugoio/hugo/commit/58d9cbd31bcf7c296a39860fd7e566d10faaff28) [@bep](https://github.com/bep) -* Avoid `index.md` in `/index/index.html` [fea4fd86](https://github.com/gohugoio/hugo/commit/fea4fd86a324bf9679df23f8289887d91b42e919) [@bep](https://github.com/bep) [#3396](https://github.com/gohugoio/hugo/issues/3396) -* Make missing `GitInfo` a `WARNING` [5ad2f176](https://github.com/gohugoio/hugo/commit/5ad2f17693a9860be76ef8089c8728d2b59d6b04) [@bep](https://github.com/bep) [#3376](https://github.com/gohugoio/hugo/issues/3376) -* Prevent decoding `pageParam` in common cases [e98f885b](https://github.com/gohugoio/hugo/commit/e98f885b8af27f5473a89d31d0b1f02e61e8a5ec) [@bogem](https://github.com/bogem) -* Ignore non-source files on partial rebuild [b5b6e81c](https://github.com/gohugoio/hugo/commit/b5b6e81c0269abf9b0f4bc6a127744a25344e5c6) [@xofyarg](https://github.com/xofyarg) [#3325](https://github.com/gohugoio/hugo/issues/3325) -* Log `WARNING` only on unknown `/data` files [ab692e73](https://github.com/gohugoio/hugo/commit/ab692e73dea3ddfe979c88ee236cc394e47e82f1) [@bep](https://github.com/bep) [#3361](https://github.com/gohugoio/hugo/issues/3361) -* Avoid processing the same notify event twice [3b677594](https://github.com/gohugoio/hugo/commit/3b67759495c9268c30e6ba2d8c7e3b75d52d2960) [@bep](https://github.com/bep) -* Only show `rssURI` deprecation `WARNING` if it is actually set [cfd3af8e](https://github.com/gohugoio/hugo/commit/cfd3af8e691119461effa4385251b9d3818e2291) [@bep](https://github.com/bep) [#3319](https://github.com/gohugoio/hugo/issues/3319) - -### Docs - -* Add documentation on slug translation [635b3bb4](https://github.com/gohugoio/hugo/commit/635b3bb4eb873978c7d52e6c0cb85da0c4d25299) [@xavib](https://github.com/xavib) -* Replace `cdn.mathjax.org` with `cdnjs.cloudflare.com` [4b637ac0](https://github.com/gohugoio/hugo/commit/4b637ac041d17b22187f5ccd0f65461f0065aaa9) [@takuti](https://github.com/takuti) -* Add notes about some output format behaviour [162d3a58](https://github.com/gohugoio/hugo/commit/162d3a586d36cabf6376a76b096fd8b6414487ae) [@jpatters](https://github.com/jpatters) -* Add `txtpen` as alternative commenting service [7cdc244a](https://github.com/gohugoio/hugo/commit/7cdc244a72de4c08edc0008e37aec83d945dccdf) [@rickyhan](https://github.com/rickyhan) - -### Other - -* Embed `Page` in `WeightedPage` [ebf677a5](https://github.com/gohugoio/hugo/commit/ebf677a58360126d8b9a1e98d086aa4279f53181) [@bep](https://github.com/bep) [#3435](https://github.com/gohugoio/hugo/issues/3435) -* Improve the detection of untranslated strings [a40d1f6e](https://github.com/gohugoio/hugo/commit/a40d1f6ed2aedddc99725658993258cd557640ed) [@bogem](https://github.com/bogem) [#2607](https://github.com/gohugoio/hugo/issues/2607) -* Make first letter of the Hugo commands flags' usage lowercase [f0f69d03](https://github.com/gohugoio/hugo/commit/f0f69d03c551acb8ac2eeedaad579cf0b596f9ef) [@bogem](https://github.com/bogem) -* Import `Octopress` image tag in `Jekyll importer` [5f3ad1c3](https://github.com/gohugoio/hugo/commit/5f3ad1c31985450fab8d6772e9cbfcb57cf5cc53) [@buynov](https://github.com/buynov) - -## Fixes - -### Templates - -* Do not lower case template names [6d2ea0f7](https://github.com/gohugoio/hugo/commit/6d2ea0f7d7e8a54b8edfc36e52ff74266c30dc27) [@bep](https://github.com/bep) [#3333](https://github.com/gohugoio/hugo/issues/3333) - -### Output - -* Fix output format mixup in example [10287263](https://github.com/gohugoio/hugo/commit/10287263f529181d3169668b044cb84e2e3b049a) [@bep](https://github.com/bep) [#3481](https://github.com/gohugoio/hugo/issues/3481) -* Fix base theme vs project base template logic [077005e5](https://github.com/gohugoio/hugo/commit/077005e514b1ed50d84ceb90c7c72f184cb04521) [@bep](https://github.com/bep) [#3323](https://github.com/gohugoio/hugo/issues/3323) - -### Core -* Render `404` in default language only [154e18dd](https://github.com/gohugoio/hugo/commit/154e18ddb9ad205055d5bd4827c87f3f0daf499f) [@mitchchn](https://github.com/mitchchn) [#3075](https://github.com/gohugoio/hugo/issues/3075) -* Fix `RSSLink` vs `RSS` `Output Format` [e682fcc6](https://github.com/gohugoio/hugo/commit/e682fcc62233b47cf5bdcaf598ac0657ef089471) [@bep](https://github.com/bep) [#3450](https://github.com/gohugoio/hugo/issues/3450) -* Add default config for `ignoreFiles`, making that option work when running in server mode [42f4ce15](https://github.com/gohugoio/hugo/commit/42f4ce15a9d68053da36f9efcf7a7d975cc59559) [@chaseadamsio](https://github.com/chaseadamsio) -* Fix output formats override when no outputs definition given [6e2f2dd8](https://github.com/gohugoio/hugo/commit/6e2f2dd8d3ca61c92a2ee8824fbf05cadef08425) [@bep](https://github.com/bep) [#3447](https://github.com/gohugoio/hugo/issues/3447) -* Fix handling of zero-length files [0e87b18b](https://github.com/gohugoio/hugo/commit/0e87b18b66d2c8ba9e2abc429630cb03f5b093d6) [@bep](https://github.com/bep) [#3355](https://github.com/gohugoio/hugo/issues/3355) -* Must recreate `Paginator` on live-reload [45c74526](https://github.com/gohugoio/hugo/commit/45c74526686f6a2afa02bcee767d837d6b9dd028) [@bep](https://github.com/bep) [#3315](https://github.com/gohugoio/hugo/issues/3315) - -### Docs - -* Fix incorrect path in `templates/list` [27e88154](https://github.com/gohugoio/hugo/commit/27e88154af2dd9af6d0523d6e67b612e6336f91c) [@MunifTanjim](https://github.com/MunifTanjim) -* Fixed incorrect specification of directory structure [a28fbca6](https://github.com/gohugoio/hugo/commit/a28fbca6dcfa80b6541f5ef6c8c12cd1804ae9ed) [@TejasQ](https://github.com/TejasQ) -* Fix `bash` command in `tutorials/github-pages-blog` [c9976155](https://github.com/gohugoio/hugo/commit/c99761555c014e4d041438d5d7e53a6cbaee4492) [@hansott](https://github.com/hansott) -* Fix `.Data.Pages` range in example [b5e32eb6](https://github.com/gohugoio/hugo/commit/b5e32eb60993b4656918af2c959ae217a68c461e) [@hxlnt](https://github.com/hxlnt) - -### Other - -* Fix data race in live-reload close, avoiding some rare panics [355736ec](https://github.com/gohugoio/hugo/commit/355736ec357c81dfb2eb6851ee019d407090c5ec) [@bep](https://github.com/bep) [#2625](https://github.com/gohugoio/hugo/issues/2625) -* Skip `.git` directories in file scan [94b5be67](https://github.com/gohugoio/hugo/commit/94b5be67fc73b87d114d94a7bb1a33ab997f30f1) [@bogem](https://github.com/bogem) [#3468](https://github.com/gohugoio/hugo/issues/3468) - - - - - - diff --git a/docs/content/release-notes/0.22-relnotes.md b/docs/content/release-notes/0.22-relnotes.md deleted file mode 100644 index f5250062e..000000000 --- a/docs/content/release-notes/0.22-relnotes.md +++ /dev/null @@ -1,85 +0,0 @@ - ---- -date: 2017-06-12 -title: 0.22 ---- - - -Hugo `0.22` brings **nested sections**, by popular demand and a long sought after feature ([#465](https://github.com/gohugoio/hugo/issues/465)). We are still low on documentation for this great feature, but [@bep](https://github.com/bep) has been kind enough to accompany his implementation with a [demo site](http://hugotest.bep.is/). - -This release represents **58 contributions by 10 contributors** to the main Hugo code base. Since last release Hugo has **gained 420 stars and 2 additional themes.** - -[@bep](https://github.com/bep) still leads the Hugo development with his witty Norwegian humor, and once again contributed a significant amount of additions. But also a big shoutout to [@bogem](https://github.com/bogem), [@moorereason](https://github.com/moorereason), and [@onedrawingperday](https://github.com/onedrawingperday) for their ongoing contributions. And as always big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition. - -Hugo now has: - -* 17576+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 455+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 165+ [themes](http://themes.gohugo.io/) - -## Other Highlights - -`.Site.GetPage` can now also be used to get regular pages ([#2844](https://github.com/gohugoio/hugo/issues/2844)): - -```go -{{ (.Site.GetPage "page" "blog" "mypost.md" ).Title }} -``` - -Also, considerable work has been put into writing automated benchmark tests for the site builds, and we're happy to report that although this release comes with fundamental structural changes, this version is -- in general -- even faster than the previous. It’s quite a challenge to consistently add significant new functionality and simultaneously maintain the stellar performance Hugo is famous for. - - - -## Notes - -`.Site.Sections` is replaced. We have reworked how sections work in Hugo, they can now be nested and are no longer taxonomies. If you use the old collection, you should get detailed upgrade instructions in the log when you run `hugo`. For more information, see this [demo site](http://hugotest.bep.is/). - -## Enhancements - -### Templates - -* Add `uint` support to `In` [b82cd82f](https://github.com/gohugoio/hugo/commit/b82cd82f1198a371ed94bda7faafe22813f4cb29) [@moorereason](https://github.com/moorereason) -* Support interfaces in `union` [204c3a9e](https://github.com/gohugoio/hugo/commit/204c3a9e32fcf6617ede978e35d3e2e89a5b491c) [@moorereason](https://github.com/moorereason) [#3411](https://github.com/gohugoio/hugo/issues/3411) -* Add `uniq` function [e28d9aa4](https://github.com/gohugoio/hugo/commit/e28d9aa42c3429d22fe254e69e4605aaf1e684f3) [@adiabatic](https://github.com/adiabatic) -* Handle `template.HTML` and friends in `ToInt` [4113693a](https://github.com/gohugoio/hugo/commit/4113693ac1b275f3a40aa5c248269340ef9b57f6) [@moorereason](https://github.com/moorereason) [#3308](https://github.com/gohugoio/hugo/issues/3308) - - -### Core - -* Make the `RSS feed` use the date for the node it represents [f1da5a15](https://github.com/gohugoio/hugo/commit/f1da5a15a37666ee59350d6600a8c14c1383f5bc) [@bep](https://github.com/bep) [#2708](https://github.com/gohugoio/hugo/issues/2708) -* Enable `nested sections` [b3968939](https://github.com/gohugoio/hugo/commit/b39689393ccb8434d9a57658a64b77568c718e99) [@bep](https://github.com/bep) [#465](https://github.com/gohugoio/hugo/issues/465) -* Add test for "no 404" in `sitemap` [8aaec644](https://github.com/gohugoio/hugo/commit/8aaec644a90d09bd7f079d35d382f76bb4ed35db) [@bep](https://github.com/bep) [#3563](https://github.com/gohugoio/hugo/issues/3563) -* Support regular pages in `.Site.GetPage` [e0c2e798](https://github.com/gohugoio/hugo/commit/e0c2e798201f75ae6e9a81a7442355288c2d141b) [@bep](https://github.com/bep) [#2844](https://github.com/gohugoio/hugo/issues/2844) -[#3082](https://github.com/gohugoio/hugo/issues/3082) - -### Performance -* Add site building benchmarks [8930e259](https://github.com/gohugoio/hugo/commit/8930e259d78cba4041b550cc51a7f40bc91d7c20) [@bep](https://github.com/bep) [#3535](https://github.com/gohugoio/hugo/issues/3535) -* Add a cache to `GetPage` which makes it much faster [50d11138](https://github.com/gohugoio/hugo/commit/50d11138f3e18b545c15fadf52f7b0b744bf3e7c) [@bep](https://github.com/bep) -* Speed up `GetPage` [fbb78b89](https://github.com/gohugoio/hugo/commit/fbb78b89df8ccef8f0ab26af00aa45d35c1ee2cf) [@bep](https://github.com/bep) [#3503](https://github.com/gohugoio/hugo/issues/3503) -* Add BenchmarkFrontmatterTags [3d9c4f51](https://github.com/gohugoio/hugo/commit/3d9c4f513b0443648d7e88995e351df1739646d2) [@bep](https://github.com/bep) [#3464](https://github.com/gohugoio/hugo/issues/3464) -* Add `benchSite.sh` to make it easy to run Hugo performance benchmarks [d74452cf](https://github.com/gohugoio/hugo/commit/d74452cfe8f69a85ec83e05481e16bebf199a5cb) [@bep](https://github.com/bep) -* Cache language config [4aff2b6e](https://github.com/gohugoio/hugo/commit/4aff2b6e7409a308f30cff1825fec02991e0d56a) [@bep](https://github.com/bep) -* Temporarily revert to BurntSushi for `TOML` front matter handling; it is currently much faster [0907a5c1](https://github.com/gohugoio/hugo/commit/0907a5c1c293755e6bf297246f07888448d81f8b) [@bep](https://github.com/bep) [#3541](https://github.com/gohugoio/hugo/issues/3541) [#3464](https://github.com/gohugoio/hugo/issues/3464) -* Add a simple partitioned lazy cache [87203139](https://github.com/gohugoio/hugo/commit/87203139c38e0b992c96d7b8a23c7730649c68e5) [@bep](https://github.com/bep) - -### Other - -* Add `noindex` tag to HTML generated by Hugo aliases [d5ab7f08](https://github.com/gohugoio/hugo/commit/d5ab7f087d967b30e7de7d789e6ad3091b42f1f7) [@onedrawingperday](https://github.com/onedrawingperday) -* Update Go versions [bde807bd](https://github.com/gohugoio/hugo/commit/bde807bd1e560fb4cc765c0fc22132db7f8a0801) [@bep](https://github.com/bep) -* Remove the `rlimit` tweaking on `macOS` [bcd32f10](https://github.com/gohugoio/hugo/commit/bcd32f1086c8c604fb22a7496924e41cc46b1605) [@bep](https://github.com/bep) [#3512](https://github.com/gohugoio/hugo/issues/3512) - -### Docs -* Rewrite “Archetypes” article [@davidturnbull](https://github.com/davidturnbull) [#3543](https://github.com/gohugoio/hugo/pull/3543/) -* Remove Unmaintaned Frontends from Tools. [f41f7282](https://github.com/gohugoio/hugo/commit/f41f72822251c9a31031fd5b3dda585c57c8b028) [@onedrawingperday](https://github.com/onedrawingperday) - -## Fixes - -### Core -* Improve `live-reload` on directory structure changes making removal of directories or pasting new content directories into  `/content` just work [fe901b81](https://github.com/gohugoio/hugo/commit/fe901b81191860b60e6fcb29f8ebf87baef2ee79) [@bep](https://github.com/bep) [#3570](https://github.com/gohugoio/hugo/issues/3570) -* Respect `disableKinds=["sitemap"]` [69d92dc4](https://github.com/gohugoio/hugo/commit/69d92dc49cb8ab9276ab013d427ba2d9aaf9135d) [@bep](https://github.com/bep) [#3544](https://github.com/gohugoio/hugo/issues/3544) -* Fix `disablePathToLower` regression [5be04486](https://github.com/gohugoio/hugo/commit/5be0448635fdf5fe6b1ee673e869f2b9baf1a5c6) [@bep](https://github.com/bep) [#3374](https://github.com/gohugoio/hugo/issues/3374) -* Fix `ref`/`relref` issue with duplicate base filenames [612f6e3a](https://github.com/gohugoio/hugo/commit/612f6e3afe0510c31f70f3621f3dc8ba609dade4) [@bep](https://github.com/bep) [#2507](https://github.com/gohugoio/hugo/issues/2507) - -### Docs - -* Fix parameter name in `YouTube` shortcode section [37e37877](https://github.com/gohugoio/hugo/commit/37e378773fbc127863f2b7a389d5ce3a14674c73) [@zivbk1](https://github.com/zivbk1) - diff --git a/docs/content/release-notes/0.22.1-relnotes.md b/docs/content/release-notes/0.22.1-relnotes.md deleted file mode 100644 index c0a7dd453..000000000 --- a/docs/content/release-notes/0.22.1-relnotes.md +++ /dev/null @@ -1,40 +0,0 @@ - ---- -date: 2017-06-13 -title: 0.22.1 ---- - - - -Hugo `0.22.1` fixes a couple of issues reported after the [0.22 release](https://github.com/gohugoio/hugo/releases/tag/v0.22) Monday. Most importantly a fix for detecting regular subfolders below the root-sections. - -Also, we forgot to adapt the `permalink settings` with support for nested sections, which made that feature less useful than it could be. - -With this release you can configure **permalinks with sections** like this: - -**First level only:** - -```toml -[permalinks] -blog = ":section/:title" -``` - -**Nested (all levels):** - -```toml -[permalinks] -blog = ":sections/:title" -``` -## Fixes - -* Fix section logic for root folders with subfolders [a30023f5](https://github.com/gohugoio/hugo/commit/a30023f5cbafd06034807255181a5b7b17f3c25f) [@bep](https://github.com/bep) [#3586](https://github.com/gohugoio/hugo/issues/3586) -* Support sub-sections in permalink settings [1f26420d](https://github.com/gohugoio/hugo/commit/1f26420d392a5ab4c7b7fe1911c0268b45d01ab8) [@bep](https://github.com/bep) [#3580](https://github.com/gohugoio/hugo/issues/3580) -* Adjust rlimit to 64000 [ff54b6bd](https://github.com/gohugoio/hugo/commit/ff54b6bddcefab45339d8dc2b13776b92bdc04b9) [@bep](https://github.com/bep) [#3582](https://github.com/gohugoio/hugo/issues/3582) -* Make error on setting rlimit a warning only [629e1439](https://github.com/gohugoio/hugo/commit/629e1439e819a7118ae483381d4634f16d3474dd) [@bep](https://github.com/bep) [#3582](https://github.com/gohugoio/hugo/issues/3582) -* Revert: Remove the rlimit tweaking on macOS" [26aa06a3](https://github.com/gohugoio/hugo/commit/26aa06a3db57ab7134a900d641fa2976f7971520) [@bep](https://github.com/bep) [#3582](https://github.com/gohugoio/hugo/issues/3582) - - - - - - diff --git a/docs/content/release-notes/_index.md b/docs/content/release-notes/_index.md deleted file mode 100644 index 3b934c69d..000000000 --- a/docs/content/release-notes/_index.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -date: 2017-04-17 -aliases: -- /doc/release-notes/ -- /meta/release-notes/ -title: Release Notes -weight: 10 ---- diff --git a/docs/content/release-notes/release-notes.md b/docs/content/release-notes/release-notes.md deleted file mode 100644 index 79ea1594d..000000000 --- a/docs/content/release-notes/release-notes.md +++ /dev/null @@ -1,959 +0,0 @@ ---- -aliases: -- /doc/release-notes/ -- /meta/release-notes/ -date: 2017-04-16 -title: Older Release Notes ---- -# **0.20.2** April 16th 2017 - -Hugo `0.20.2` adds support for plain text partials included into `HTML` templates. This was a side-effect of the big new [Custom Output Format](https://gohugo.io/extras/output-formats/) feature in `0.20`, and while the change was intentional and there was an ongoing discussion about fixing it in {{< gh 3273 >}}, it did break some themes. There were valid workarounds for these themes, but we might as well get it right. - -The most obvious use case for this is inline `CSS` styles, which you now can do without having to name your partials with a `html` suffix. - -A simple example: - -In `layouts/partials/mystyles.css`: - -```css -body { - background-color: {{ .Param "colors.main" }} -} -``` - -Then in `config.toml` (note that by using the `.Param` lookup func, we can override the color in a page's front matter if we want): - -```toml -[params] -[params.colors] -main = "green" -text = "blue" -``` - -And then in `layouts/partials/head.html` (or the partial used to include the head section into your layout): - -```html - - - -``` - -Of course, `0.20` also made it super-easy to create external `CSS` stylesheets based on your site and page configuration. A simple example: - -Add "CSS" to your home page's `outputs` list, create the template `/layouts/index.css` using Go template syntax for the dynamic parts, and then include it into your `HTML` template with: - -```html -{{ with .OutputFormats.Get "css" }} - -{{ end }}` -``` - - -# **0.20.1** April 13th 2017 -Hugo `0.20.1` is a bug fix release, fixing some important regressions introduced in `0.20` a couple of days ago: - -* Fix logic for base template in work dir vs in the theme {{< gh 3323 >}} -* camelCased templates (partials, shortcodes etc.) not found {{< gh 3333 >}} -* Live-reload fails with `_index.md` with paginator {{< gh 3315 >}} -* `rssURI` WARNING always shown {{< gh 3319 >}} - -See the [full list](https://github.com/gohugoio/hugo/milestone/16?closed=1). - -# **0.20** April 10th 2017 - -Hugo `0.20` introduces the powerful and long sought after feature [Custom Output Formats]({{< ref "extras/output-formats.md" >}}); Hugo isn't just that "static HTML with an added RSS feed" anymore. *Say hello* to calendars, e-book formats, Google AMP, and JSON search indexes, to name a few ({{< gh 2828 >}}). - -This release represents **over 180 contributions by over 30 contributors** to the main Hugo code base. Since last release Hugo has **gained 1100 stars, 20 new contributors and 5 additional themes.** - -Hugo now has: - -- 16300+ stars -- 495+ contributors -- 156+ themes - -{{< gh "@bep" >}} still leads the Hugo development with his witty Norwegian humor, and once again contributed a significant amount of additions. Also a big shoutout to {{< gh "@digitalcraftsman" >}} for his relentless work on keeping the documentation and the themes site in pristine condition, and {{< gh "@moorereason" >}} and {{< gh "@bogem" >}} for their ongoing contributions. - -## Other Highlights - -{{< gh "@bogem" >}} has also contributed TOML as an alternative and much simpler format for language/i18n files ({{< gh 3200 >}}). A feature you will appreciate when you start to work on larger translations. - -Also, there have been some important updates in the Emacs Org-mode handling: {{< gh "@chaseadamsio" >}} has fixed the newline-handling ({{< gh 3126 >}}) and {{< gh "@clockoon" >}} has added basic footnote support. - -Worth mentioning is also the ongoing work that {{< gh "@rdwatters" >}} and {{< gh "@budparr" >}} is doing to re-do the [gohugo.io](https://gohugo.io/) site, including a total restructuring and partial rewrite of the documentation. It is getting close to finished, and it looks fantastic! - -## Notes -* `RSS` description in the built-in template is changed from full `.Content` to `.Summary`. This is a somewhat breaking change, but is what most people expect from their RSS feeds. If you want full content, please provide your own RSS template. -* The deprecated `.RSSlink` is now removed. Use `.RSSLink`. -* `RSSUri` is deprecated and will be removed in a future Hugo version, replace it with an output format definition. -* The deprecated `.Site.GetParam` is now removed, use `.Site.Param`. -* Hugo does no longer append missing trailing slash to `baseURL` set as a command line parameter, making it consistent with how it behaves from site config. {{< gh 3262 >}} - -## Enhancements - -* Hugo `0.20` is built with Go 1.8.1. -* Add `.Site.Params.mainSections` that defaults to the section with the most pages. Plan is to get themes to use this instead of the hardcoded `blog` in `where` clauses. {{< gh 3206 >}} -* File extension is now configurable. {{< gh 320 >}} -* Impove `markdownify` template function performance. {{< gh 3292 >}} -* Add taxonomy terms' pages to `.Data.Pages` {{< gh 2826 >}} -* Change `RSS` description from full `.Content` to `.Summary`. -* Ignore "." dirs in `hugo --cleanDestinationDir` {{< gh 3202 >}} -* Allow `jekyll import` to accept both `2006-01-02` and `2006-1-2` date format {{< gh 2738 >}} -* Raise the default `rssLimit` {{< gh 3145 >}} -* Unify section list vs single template lookup order {{< gh 3116 >}} -* Allow `apply` to be used with the built-in Go template funcs `print`, `printf` and `println`. {{< gh 3139 >}} - -## Fixes -* Fix deadlock in `getJSON` {{< gh 3211 >}} -* Make sure empty terms pages are created. {{< gh 2977 >}} -* Fix base template lookup order for sections {{< gh 2995 >}} -* `URL` fixes: - * Fix pagination URLs with `baseURL` with sub-root and `canonifyUrls=false` {{< gh 1252 >}} - * Fix pagination URL for resources with "." in name {{< gh 2110 >}} {{< gh 2374 >}} {{< gh 1885 >}} - * Handle taxonomy names with period {{< gh 3169 >}} - * Handle `uglyURLs` ambiguity in `Permalink` {{< gh 3102 >}} - * Fix `Permalink` for language-roots wrong when `uglyURLs` is `true` {{< gh 3179 >}} - * Fix misc case issues for `URLs` {{< gh 1641 >}} - * Fix for taxonomies URLs when `uglyUrls=true` {{< gh 1989 >}} - * Fix empty `RSSLink` for list pages with content page. {{< gh 3131 >}} -* Correctly identify regular pages on the form "my_index_page.md" {{< gh 3234 >}} -* `Exit -1` on `ERROR` in global logger {{< gh 3239 >}} -* Document hugo `help command` {{< gh 2349 >}} -* Fix internal `Hugo` version handling for bug fix releases. {{< gh 3025 >}} -* Only return `RSSLink` for pages that actually have a RSS feed. {{< gh 1302 >}} - - -# **0.19** February 27th 2017 - -We're happy to announce the first release of Hugo in 2017. - -This release represents **over 180 contributions by over 50 contributors** to the main Hugo code base. Since last release Hugo has **gained 1450 stars, 35 new contributors and 15 additional themes.** - -Hugo now has: - -- 15200+ stars -- 470+ contributors -- 151+ themes - -Furthermore, Hugo has its own Twitter account ([@gohugoio](https://twitter.com/gohugoio)) where we share bite-sized news and themes from the Hugo community. - -{{< gh "@bep" >}} leads the Hugo development and once again contributed a significant amount of additions. Also a big shoutout to {{< gh "@chaseadamsio" >}} for the Emacs Org-mode support, {{< gh "@digitalcraftsman" >}} for his relentless work on keeping the documentation and the themes site in pristine condition, {{< gh "@fj" >}}for his work on revising the `params` handling in Hugo, and {{< gh "@moorereason" >}} and {{< gh "@bogem" >}} for their ongoing contributions. - -## Highlights -Hugo `0.19` brings native Emacs Org-mode content support ({{}}), big thanks to {{< gh "@chaseadamsio" >}}. - -Also, a considerably amount of work have been put into cleaning up the Hugo source code, in an issue titled [Refactor the globals out of site build](https://github.com/gohugoio/hugo/issues/2701). This is not immediately visible to the Hugo end user, but will speed up future development. - -Hugo `0.18` was bringing full-parallel page rendering, so workarounds depending on rendering order did not work anymore, and pages with duplicate target paths (common examples would be `/index.md` or `/about/index.md`) would now conflict with the home page or the section listing. - -With Hugo `0.19`, you can control this behaviour by turning off page types you do not want ({{}}). In its most extreme case, if you put the below setting in your `config.toml`, you will get **nothing!**: - -``` -disableKinds = ["page", "home", "section", "taxonomy", "taxonomyTerm", "RSS", "sitemap", "robotsTXT", "404"] -``` -## Other New Features - -* Add ability to sort pages by frontmatter parameters, enabling easy custom "top 10" page lists. {{}} -* Add `truncate` template function {{}} -* Add `now` function, which replaces the now deprecated `.Now` {{}} -* Make RSS item limit configurable {{}} - -## Enhancements -* Enhance `.Param` to permit arbitrarily nested parameter references {{}} -* Use `Page.Params` more consistently when adding metadata {{}} -* The `sectionPagesMenu` feature ("Section menu for the lazy blogger") is now integrated with the section content pages. {{}} -* Hugo `0.19` is compiled with Go 1.8! -* Make template funcs like `findRE` and friends more liberal in what argument types they accept {{}} {{}} -* Improve generation of OpenGraph date tags {{}} - -## Notes - -* `sourceRelativeLinks` is now deprecated and will be removed in Hugo `0.21` if no one is stepping up to the plate and fixes and maintains this feature. {{}} - -## Fixes -* Fix `.Site.LastChange` on sites where the default sort order is not chronological. {{}} -* Fix regression of `.Truncated` evaluation in manual summaries. {{}} -* Fix `preserveTaxonomyNames` regression {{}} -* Fix issue with taxonomies when only some have content page {{}} -* Fix instagram shortcode panic on invalid ID {{}} -* Fix subtle data race in `getJSON` {{}} -* Fix deadlock in cached partials {{}} -* Avoid double-encoding of paginator URLs {{}} -* Allow tilde in URLs {{}} -* Fix `.Site.Pages` handling on live reloads {{}} -* `UniqueID` now correctly uses the fill file path from the content root to calculate the hash, and is finally ... unique! -* Discard current language based on `.Lang()`, go get translations correct for paginated pages. {{}} -* Fix infinite loop in template AST handling for recursive templates {{}} -* Fix issue with watching when config loading fails {{}} -* Correctly flush the imageConfig on live-reload {{}} -* Fix parsing of TOML arrays in frontmatter {{}} - -## Docs -* Add tutorial "How to use Google Firebase to host a Hugo site" {{}} -* Improve documentation for menu rendering {{}} -* Revise GitHub Pages deployment tutorial {{}} - -# **0.18.1** December 30th 2016 - -Hugo 0.18.1 is a bug fix release fixing some issues introduced in Hugo 0.18: - -* Fix 32-bit binaries {{}} -* Fix issues with `preserveTaxonomyNames` {{}} -* Fix `.URL` for taxonomy pages when `uglyURLs=true` {{}} -* Fix `IsTranslated` and `Translations` for node pages {{}} -* Make template error messages more verbose {{}} - -# **0.18.0** December 19th 2016 - -Today, we're excited to release the much-anticipated Hugo 0.18! - -We're heading towards the end of the year 2016, and we can look back on three releases and a steady growing community around the project. -This release includes **over 220 contributions by nearly 50 contributors** to the main codebase. -Since the last release, Hugo has **gained 1750 stars and 27 additional themes**. - -Hugo now has: - -- 13750+ stars -- 408+ contributors -- 137+ themes - -{{< gh "@bep" >}} once again took the lead of Hugo and contributed a significant amount of additions. -Also a big shoutout to {{< gh "@digitalcraftsman" >}} for his relentless work on keeping the documentation and the themes site in pristine condition, -and also a big thanks to {{< gh "@moorereason" >}} and {{< gh "@bogem" >}} for their contributions. - -We wish you all a Merry Christmas and a Happy New Year.
-*The Hugo team* - -## Highlights - -The primary new feature in Hugo 0.18 is that every piece of content is now a `Page` ({{}}). -This means that every page, including the home page, can have a content file with frontmatter. -Not only is this a much simpler model to understand, it is also faster and paved the way for several important new features: - -* Enable proper titles for Nodes {{}} -* Sitemap.xml should include nodes, as well as pages {{}} -* Document homepage content workaround {{}} -* Allow home page to be easily authored in markdown {{}} -* Minimalist website with homepage as content {{}} - -Hugo again continues its trend of each release being faster than the last. It's quite a challenge to consistently add significant new functionality and simultaneously dramatically improve performance. Running [this benchmark]( https://github.com/bep/hugo-benchmark) with [these sites](https://github.com/bep/hugo-benchmark/tree/master/sites) (renders to memory) shows about 60% reduction in time spent and 30% reduction in memory usage compared to Hugo 0.17. - -## Other New Features - -* Every `Page` now has a `Kind` property. Since everything is a `Page` now, the `Kind` is used to differentiate different kinds of pages. - Possible values are `page`, `home`, `section`, `taxonomy`, and `taxonomyTerm`. - (Internally, we also define `RSS`, `sitemap`, `robotsTXT`, and `404`, but those have no practical use for end users at the moment since they are not included in any collections.) -* Add a `GitInfo` object to `Page` if `enableGitInfo` is set. It then also sets `Lastmod` for the given `Page` to the author date provided by Git. {{}} -* Implement support for alias templates {{}} -* New template functions: - * Add `imageConfig` function {{}} - * Add `sha256` function {{}} - * Add `partialCached` template function {{}} -* Add shortcode to display Instagram images {{}} -* Add `noChmod` option to disable perm sync {{}} -* Add `quiet` build mode {{}} - -## Notices - -* `.Site.Pages` will now contain *several kinds of pages*, including regular pages, sections, taxonomies, and the home page. - If you want a specific kind of page, you can filter it with `where` and `Kind`. - `.Site.RegularPages` is a shortcut to the page collection you have been used to getting. -* `RSSlink` is now deprecated. Use `RSSLink` instead. - Note that in Hugo 0.17 both of them existed, so there is a fifty-fifty chance you will not have to do anything - (if you use a theme, the chance is close to 0), and `RSSlink` will still work for two Hugo versions. - -## Fixes - -* Revise the `base` template lookup logic so it now better matches the behavior of regular templates, making it easier to override the master templates from the theme {{}} -* Add workaround for `block` template crash. - Block templates are very useful, but there is a bug in Go 1.6 and 1.7 which makes the template rendering crash if you use the block template in more complex scenarios. - This is fixed in the upcoming Go 1.8, but Hugo adds a temporary workaround in Hugo 0.18. {{}} -* All the `Params` configurations are now case insensitive {{}} {{}} {{}} -* Make RawContent raw again {{}} -* Fix archetype title and date handling {{}} -* Fix TOML archetype parsing in `hugo new` {{}} -* Fix page sorting when weight is zero {{}} -* Fix page names that contain dot {{}} -* Fix RSS Title regression {{}} -* Handle ToC before handling shortcodes {{}} -* Only watch relevant themes dir {{}} -* Hugo new content creates TOML slices with closing bracket on new line {{}} - - -## Improvements - -* Add page information to error logging in rendering {{}} -* Deprecate `RSSlink` in favor of `RSSLink` -* Make benchmark command more useful {{}} -* Consolidate the `Param` methods {{}} -* Allow to set cache dir in config file -* Performance improvements: - * Avoid repeated Viper loads of `sectionPagesMenu` {{}} - * Avoid reading from Viper for path and URL funcs {{}} - * Add `partialCached` template function. This can be a significant performance boost if you have complex partials that does not need to be rerendered for every page. {{}} - -## Documentation Updates - -* Update roadmap {{}} -* Update multilingual example {{}} -* Add a "Deployment with rsync" tutorial page {{}} -* Refactor `/docs` to use the `block` keyword {{}} - - -## **0.17.0** October 7th 2016 - -Hugo is going global with our 0.17 release. We put a lot of thought into how we could extend Hugo -to support multilingual websites with the most simple and elegant experience. Hugo's multilingual -capabilities rival the best web and documentation software, but Hugo's experience is unmatched. -If you have a single language website, the simple Hugo experience you already love is unchanged. -Adding additional languages to your website is simple and straightforward. Hugo has been completely -internally rewritten to be multilingual aware with translation and internationalization features -embedded throughout Hugo. - -Hugo continues its trend of each release being faster than the last. It's quite a challenge to consistently add -significant new functionality and simultaneously dramatically improve performance. {{}} has made it -his personal mission to apply the Go mantra of "Enable more. Do less" to Hugo. Hugo's consistent improvement -is a testament to his brilliance and his dedication to his craft. Hugo additionally benefits from the -performance improvements from the Go team in the Go 1.7 release. - -This release represents **over 300 contributions by over 70 contributors** to -the main Hugo code base. Since last release Hugo has **gained 2000 stars, 50 new -contributors and 20 additional themes.** - -Hugo now has: - -* 12,000 stars on GitHub -* 370+ contributors -* 110+ themes - -{{}} continues to lead the project with the lionshare of contributions -and reviews. A special thanks to {{}} and {{}} for their -considerable work on multilingual support. - -A big welcome to newcomers {{}}, {{}} and -{{}} for their critical contributions. - -### Highlights - -**Multilingual Support:** -Hugo now supports multiple languages side-by-side. A single site can now have multiple languages rendered with -full support for translation and i18n. - -**Performance:** -Hugo is faster than ever! Hugo 0.17 is not only our fastest release, it's also the most efficient. -Hugo 0.17 is **nearly twice as fast as Hugo 0.16** and uses about 10% less memory. -This means that the same site will build in nearly half the time it took with Hugo 0.16. -For the first time Hugo sites are averaging well under 1ms per rendered content. - -**Docs overhaul:** -This release really focused on improving the documentation. [Gohugo.io](http://gohugo.io) is -more accurate and complete than ever. - -**Support for macOS Sierra** - -### New Features -* Multilingual support {{}} -* Allow content expiration {{}} -* New templates functions: - * `querify` function to generate query strings inside templates {{}} - * `htmlEscape` and `htmlUnescape` template functions {{}} - * `time` converts a timestamp string into a time.Time structure {{}} - -### Enhancements - -* Render the shortcodes as late as possible {{}} -* Remove unneeded casts in page.getParam {{}} -* Automatic page date fallback {{}} -* Enable safeHTMLAttr {{}} -* Add TODO list support for markdown {{}} -* Make absURL and relURL accept any type {{}} -* Suppress 'missing static' error {{}} -* Make summary, wordcount etc. more efficient {{}} -* Better error reporting in `hugo convert` {{}} -* Reproducible builds thanks to govendor {{}} - -### Fixes - -* Fix shortcode in markdown headers {{}} -* Explicitly bind livereload to hugo server port {{}} -* Fix Emojify for certain text patterns {{}} -* Normalize file name to NFC {{}} -* Ignore emacs temp files {{}} -* Handle symlink change event {{}} -* Fix panic when using URLize {{}} -* `hugo import jekyll`: Fixed target path location check {{}} -* Return all errors from casting in templates {{}} -* Fix paginator counter on x86-32 {{}} -* Fix half-broken self-closing shortcodes {{}} - -**** - -## **0.16.0** June 6th 2016 - -Hugo 0.16 is our best and biggest release ever. The Hugo community has -outdone itself with continued performance improvements, -[beautiful themes](http://themes.gohugo.io) for all types of sites from project -sites to documentation to blogs to portfolios, and increased stability. - -This release represents **over 550 contributions by over 110 contributors** to -the main Hugo code base. Since last release Hugo has **gained 3500 stars, 90 -contributors and 23 additional themes.** - -This release celebrates 3 years since {{< gh "@spf13" >}} wrote the first lines -of Hugo. During those 3 years Hugo has accomplished some major milestones -including... - -* 10,000+ stars on GitHub -* 320+ contributors -* 90+ themes -* 1000s of happy websites -* Many subprojects like {{< gh "@spf13/cobra">}}, {{< gh "@spf13/viper">}} and - {{< gh "@spf13/afero">}} which have experienced broad usage across the Go - ecosystem. - -{{< gh "@bep" >}} led the development of Hugo for the 3rd consecutive release -with nearly half of the contributions to 0.16 in addition to his considerable -contributions as lead maintainer. {{< gh "@anthonyfok" >}}, {{< gh -"@DigitalCraftsman" >}}, {{< gh "@MooreReason" >}} all made significant -contributions. A special thanks to {{< gh "@abourget " >}} for his considerable -work on multilingual support. Due to its broad impact we wanted to spend more -time testing it and it will be included in Hugo's next release. - -### Highlights - -**Partial Builds:** Prior to this release Hugo would always reread and rebuild -the entire site. This release introduces support for reactive site building -while watching (`hugo server`). Hugo will watch the filesystem for changes and -only re-read the changed files. Depending on the files change Hugo will -intelligently re-render only the needed portion of the site. Performance gains -depend on the operation performed and size of the site. In our testing build -times decreased anywhere from 10% to 99%. - -**Template Improvements:** Template improvements continue to be a mainstay of each Hugo release. Hugo 0.16 adds support for the new `block` keyword introduced in Go 1.6 -- think base templates with default sections -- as well as many new template functions. - -**Polish:** As Hugo matures releases will inevitably contain fewer huge new features. This release represents hundreds of small improvements across ever facet of Hugo which will make for a much better experience for all of our users. Worth mentioning here is the curious bug where live reloading didn't work in some editors on OS X, including the popular TextMate 2. This is now fixed. Oh, and now any error will exit with an error code, a big thing for automated deployments. - -### New Features -* Support reading configuration variables from the OS environment {{}} -* Add emoji support {{}} -* Add `themesDir` option to configuration {{}} -* Add support for Go 1.6 `block` keyword in templates {{}} -* Partial static sync {{}} -* Source file based relative linking (a la GitHub) {{}} -* Add `ByLastmod` sort function to pages. {{}} -* New templates functions: - * `readFile` {{}} - * `countwords` and `countrunes` {{}} - * `default` {{}} - * `hasPrefix` {{}} - * `humanize` {{}} - * `jsonify` {{}} - * `md5` and `sha1` {{}} - * `replaceRE` {{}} - * `findRE` {{}} - * `shuffle` {{}} - * `slice` {{}} - * `plainify` {{}} - -### Enhancements - -* Hugo now exits with error code on any error. This is a big thing for - automated deployments. {{}} -* Print error when `/index.html` is zero-length {{}} -* Enable dirname and filename bash autocompletion for more flags {{}} -* Improve error handling in commands {{}} -* Add sanity checks for `hugo import jekyll` {{}} -* Add description to `Page.Params` {{}} -* Add async version of Google Analytics internal template {{}} -* Add autostart option to YouTube shortcode {{}} -* Set Date and Lastmod for main home page {{}} -* Allow URL with extension in frontmatter {{}} -* Add list support in Scratch {{}} -* Add file option to gist shortcode {{}} -* Add config layout and content directory CLI options {{}} -* Add boolean value comparison to `where` template function {{}} -* Do not write to to cache when `ignoreCache` is set {{}} -* Add option to disable rendering of 404 page {{}} -* Mercurial is no longer needed to build Hugo {{}} -* Do not create `robots.txt` by default {{}} -* Disable syntax guessing for PygmentsCodeFences by default. To enable syntax - guessing again, add the following to your config file: - `PygmentsCodeFencesGuessSyntax = true` {{}} -* Make `ByCount` sort consistently {{}} -* Add `Scratch` to shortcode {{}} -* Add support for symbolic links for content, layout, static, theme {{}} -* Add '+' as one of the valid characters in URLs specified in the front matter - {{}} -* Make alias redirect output URLs relative when `RelativeURLs = true` {{}} -* Hugo injects meta generator tag on homepage if missing {{}} - -### Fixes -* Fix file change watcher for TextMate 2 and friends on OS X {{}} -* Make dynamic reloading of config file reliable on all platform {{}} -* Hugo now works on Linux/arm64 {{}} -* `plainIDAnchors` now defaults to `true` {{}} -* Win32 and ARM builds fixed {{}} -* Copy static dir files without theme's static dir {{}} -* Make `noTimes` command flag work {{}} -* Change most global CLI flags into local ones {{}} -* Remove transformation of menu URLs {{}} -* Do not fail on unknown Jekyll file {{}} -* Use absolute path when editing with editor {{}} -* Fix hugo server "Watching for changes" path display {{}} -* Do not strip special characters out of URLs {{}} -* Fix `RSSLink` when uglyURLs are enabled {{}} -* Get BaseURL from viper in server mode {{}} -* Fix shortcode handling in RST {{}} -* Use default sitemap configuration for homepage {{}} -* Exit if specific port is unavailable in server mode {{}} -* Fix regression in "section menus for lazy blogger" {{}} - -**** - -## **0.15.0** November 25, 2015 - -The v0.15.0 Hugo release brings a lot of polish to Hugo. Exactly 6 months after -the 0.14 release, Hugo has seen massive growth and changes. Most notably, this -is Hugo's first release under the Apache 2.0 license. With this license change -we hope to expand the great community around Hugo and make it easier for our -many users to contribute. This release represents over **377 contributions by -87 contributors** to the main Hugo repo and hundreds of improvements to the -libraries Hugo uses. Hugo also launched a [new theme -showcase](http://themes.gohugo.io) and participated in -[Hacktoberfest](https://hacktoberfest.digitalocean.com). - -Hugo now has: - -* 6700 (+2700) stars on GitHub -* 235 (+75) contributors -* 65 (+30) themes - - -**Template Improvements:** This release takes Hugo to a new level of speed and -usability. Considerable work has been done adding features and performance to -the template system which now has full support of Ace, Amber and Go Templates. - -**Hugo Import:** Have a Jekyll site, but dreaming of porting it to Hugo? This -release introduces a new `hugo import jekyll`command that makes this easier -than ever. - -**Performance Improvements:** Just when you thought Hugo couldn't get any faster, -Hugo continues to improve in speed while adding features. Notably Hugo 0.15 -introduces the ability to render and serve directly from memory resulting in -30%+ lower render times. - -Huge thanks to all who participated in this release. A special thanks to -{{< gh "@bep" >}} who led the development of Hugo this release again, -{{< gh "@anthonyfok" >}}, -{{< gh "@eparis" >}}, -{{< gh "@tatsushid" >}} and -{{< gh "@DigitalCraftsman" >}}. - - -### New features -* new `hugo import jekyll` command. {{< gh 1469 >}} -* The new `Param` convenience method on `Page` and `Node` can be used to get the most specific parameter value for a given key. {{< gh 1462 >}} -* Several new information elements have been added to `Page` and `Node`: - * `RuneCount`: The number of [runes](http://blog.golang.org/strings) in the content, excluding any whitespace. This may be a good alternative to `.WordCount` for Japanese and other CJK languages where a word-split by spaces makes no sense. {{< gh 1266 >}} - * `RawContent`: Raw Markdown as a string. One use case may be of embedding remarkjs.com slides. - * `IsHome`: tells the truth about whether you're on the home page or not. - -### Improvements -* `hugo server` now builds ~30%+ faster by rendering to memory instead of disk. To get the old behavior, start the server with `--renderToDisk=true`. -* Hugo now supports dynamic reloading of the config file when watching. -* We now use a custom-built `LazyFileReader` for reading file contents, which means we don't read media files in `/content` into memory anymore -- and file reading is now performed in parallel on multicore PCs. {{< gh 1181 >}} -* Hugo is now built with `Go 1.5` which, among many other improvements, have fixed the last known data race in Hugo. {{< gh 917 >}} -* Paginator now also supports page groups. {{< gh 1274 >}} -* Markdown improvements: - * Hugo now supports GitHub-flavoured markdown code fences for highlighting for `md`-files (Blackfriday rendered markdown) and `mmark` files (MMark rendered markdown). {{< gh 362 1258 >}} - * Several new Blackfriday options are added: - * Option to disable Blackfriday's `Smartypants`. - * Option for Blackfriday to open links in a new window/tab. {{< gh 1220 >}} - * Option to disable Blackfriday's LaTeX style dashes {{< gh 1231 >}} - * Definition lists extension support. -* `Scratch` now has built-in `map` support. -* We now fall back to `link title` for the default page sort. {{< gh 1299 >}} -* Some notable new configuration options: - * `IgnoreFiles` can be set with a list of Regular Expressions that matches files to be ignored during build. {{< gh 1189 >}} - * `PreserveTaxonomyNames`, when set to `true`, will preserve what you type as the taxonomy name both in the folders created and the taxonomy `key`, but it will be normalized for the URL. {{< gh 1180 >}} -* `hugo gen` can now generate man files, bash auto complete and markdown documentation -* Hugo will now make suggestions when a command is mistyped -* Shortcodes now have a boolean `.IsNamedParams` property. {{< gh 1597 >}} - -### New Template Features -* All template engines: - * The new `dict` function that could be used to pass maps into a template. {{< gh 1463 >}} - * The new `pluralize` and `singularize` template funcs. - * The new `base64Decode` and `base64Encode` template funcs. - * The `sort` template func now accepts field/key chaining arguments and pointer values. {{< gh 1330 >}} - * Several fixes for `slicestr` and `substr`, most importantly, they now have full `utf-8`-support. {{< gh 1190 1333 1347 >}} - * The new `last` template function allows the user to select the last `N` items of a slice. {{< gh 1148 >}} - * The new `after` func allows the user to select the items after the `Nth` item. {{< gh 1200 >}} - * Add `time.Time` type support to the `where`, `ge`, `gt`, `le`, and `lt` template functions. - * It is now possible to use constructs like `where Values ".Param.key" nil` to filter pages that doesn't have a particular parameter. {{< gh 1232 >}} - * `getJSON`/`getCSV`: Add retry on invalid content. {{< gh 1166 >}} - * The new `readDir` func lists local files. {{< gh 1204 >}} - * The new `safeJS` function allows the embedding of content into JavaScript contexts in Go templates. - * Get the main site RSS link from any page by accessing the `.Site.RSSLink` property. {{< gh 1566 >}} -* Ace templates: - * Base templates now also works in themes. {{< gh 1215 >}}. - * And now also on Windows. {{< gh 1178 >}} -* Full support for Amber templates including all template functions. -* A built-in template for Google Analytics. {{< gh 1505 >}} -* Hugo is now shipped with new built-in shortcodes: {{< gh 1576 >}} - * `youtube` for YouTube videos - * `vimeo` for Vimeo videos - * `gist` for GitHub gists - * `tweet` for Twitter Tweets - * `speakerdeck` for Speakerdeck slides - - -### Bugfixes -* Fix data races in page sorting and page reversal. These operations are now also cached. {{< gh 1293 >}} -* `page.HasMenuCurrent()` and `node.HasMenuCurrent()` now work correctly in multi-level nested menus. -* Support `Fish and Chips` style section titles. Previously, this would end up as `Fish And Chips`. Now, the first character is made toupper, but the rest are preserved as-is. {{< gh 1176 >}} -* Hugo now removes superfluous p-tags around shortcodes. {{< gh 1148 >}} - -### Notices -* `hugo server` will watch by default now. -* Some fields and methods were deprecated in `0.14`. These are now removed, so the error message isn't as friendly if you still use the old values. So please change: - * `getJson` to `getJSON`, `getCsv` to `getCSV`, `safeHtml` to - `safeHTML`, `safeCss` to `safeCSS`, `safeUrl` to `safeURL`, `Url` to `URL`, - `UrlPath` to `URLPath`, `BaseUrl` to `BaseURL`, `Recent` to `Pages`. - -### Known Issues - -Using the Hugo v0.15 32-bit Windows or ARM binary, running `hugo server` would crash or hang due to a [memory alignment issue](https://golang.org/pkg/sync/atomic/#pkg-note-BUG) in [Afero](https://github.com/spf13/afero). The bug was discovered shortly after the v0.15.0 release and has since been [fixed](https://github.com/spf13/afero/pull/23) by {{< gh "@tpng" >}}. If you encounter this bug, you may either compile Hugo v0.16-DEV from source, or use the following solution/workaround: - -* **64-bit Windows users: Please use [hugo_0.15_windows_amd64.zip](https://github.com/gohugoio/hugo/releases/download/v0.15/hugo_0.15_windows_amd64.zip)** (amd64 == x86-64). It is only the 32-bit hugo_0.15_windows_386.zip that crashes/hangs (see {{< gh 1621 >}} and {{< gh 1628 >}}). -* **32-bit Windows and ARM users: Please run `hugo server --renderToDisk` as a workaround** until Hugo v0.16 is released (see [“hugo server” returns runtime error on armhf](https://discuss.gohugo.io/t/hugo-server-returns-runtime-error-on-armhf/2293) and {{< gh 1716 >}}). - ----- - -## **0.14.0** May 25, 2015 - -The v0.14.0 Hugo release brings of the most demanded features to Hugo. The -foundation of Hugo is stabilizing nicely and a lot of polish has been added. -We’ve expanded support for additional content types with support for AsciiDoc, -Restructured Text, HTML and Markdown. Some of these types depend on external -libraries as there does not currently exist native support in Go. We’ve tried -to make the experience as seamless as possible. Look for more improvements here -in upcoming releases. - -A lot of work has been done to improve the user experience, with extra polish -to the Windows experience. Hugo errors are more helpful overall and Hugo now -can detect if it’s being run in Windows Explorer and provide additional -instructions to run it via the command prompt. - -The Hugo community continues to grow. Hugo has over 4000 stars on github, 165 -contributors, 35 themes and 1000s of happy users. It is now the 5th most -popular static site generator (by Stars) and has the 3rd largest contributor -community. - -This release represents over **240 contributions by 36 contributors** to the main -Hugo codebase. - -Big shout out to {{< gh "@bep" >}} who led the development of Hugo -this release, {{< gh "@anthonyfok" >}}, -{{< gh "@eparis" >}}, -{{< gh "@SchumacherFM" >}}, -{{< gh "@RickCogley" >}} & -{{< gh "@mdhender" >}} for their significant contributions -and {{< gh "@tatsushid" >}} for his continuous improvements -to the templates. Also a big thanks to all the theme creators. 11 new themes -have been added since last release and the [hugoThemes repo now has previews of -all of -them](https://github.com/gohugoio/hugoThemes/blob/master/README.md#theme-list). - -Hugo also depends on a lot of other great projects. A big thanks to all of our dependencies including: -[cobra](https://github.com/spf13/cobra), -[viper](https://github.com/spf13/viper), -[blackfriday](https://github.com/russross/blackfriday), -[pflag](https://github.com/spf13/pflag), -[HugoThemes](https://github.com/gohugoio/hugothemes), -[BurntSushi](https://github.com/BurntSushi/toml), -[goYaml](https://github.com/go-yaml/yaml/tree/v2), and the Go standard library. - -## New features -* Support for all file types in content directory. - * If dedicated file type handler isn’t found it will be copied to the destination. -* Add `AsciiDoc` support using external helpers. -* Add experimental support for [`Mmark`](https://github.com/miekg/mmark) markdown processor -* Bash autocomplete support via `genautocomplete` command -* Add section menu support for a [Section Menu for "the Lazy Blogger"]({{< relref "extras/menus.md#section-menu-for-the-lazy-blogger" >}}) -* Add support for `Ace` base templates -* Adding `RelativeURLs = true` to site config will now make all the relative URLs relative to the content root. -* New template functions: - * `getenv` - * The string functions `substr` and `slicestr` - * `seq`, a sequence generator very similar to its Gnu counterpart - * `absURL` and `relURL`, both of which takes the `BaseURL` setting into account - -## Improvements -* Highlighting with `Pygments` is now cached to disk -- expect a major speed boost if you use it! -* More Pygments highlighting options, including `line numbers` -* Show help information to Windows users who try to double click on `hugo.exe`. -* Add `bind` flag to `hugo server` to set the interface to which the server will bind -* Add support for `canonifyURLs` in `srcset` -* Add shortcode support for HTML (content) files -* Allow the same `shortcode` to be used with or without inline content -* Configurable RSS output filename - -## Bugfixes -* Fix panic with paginator and zero pages in result set. -* Fix crossrefs on Windows. -* Fix `eq` and `ne` template functions when used with a raw number combined with the result of `add`, `sub` etc. -* Fix paginator with uglyURLs -* Fix {{< gh 998 >}}, supporting UTF8 characters in Permalinks. - -## Notices -* To get variable and function names in line with the rest of the Go community, - a set of variable and function names has been deprecated: These will still - work in 0.14, but will be removed in 0.15. What to do should be obvious by - the build log; `getJson` to `getJSON`, `getCsv` to `getCSV`, `safeHtml` to - `safeHTML`, `safeCss` to `safeCSS`, `safeUrl` to `safeURL`, `Url` to `URL`, - `UrlPath` to `URLPath`, `BaseUrl` to `BaseURL`, `Recent` to `Pages`, - `Indexes` to `Taxonomies`. - - ----- - -## **0.13.0** Feb 21, 2015 - -The v0.13.0 release is the largest Hugo release to date. The release introduced -some long sought after features (pagination, sequencing, data loading, tons of -template improvements) as well as major internal improvements. In addition to -the code changes, the Hugo community has grown significantly and now has over -3000 stars on github, 134 contributors, 24 themes and 1000s of happy users. - -This release represents **448 contributions by 65 contributors** - -A special shout out to {{< gh "@bep" >}} and -{{< gh "@anthonyfok" >}} for their new role as Hugo -maintainers and their tremendous contributions this release. - -### New major features -* Support for [data files](/extras/datafiles/) in [YAML](http://yaml.org/), - [JSON](http://www.json.org/), or [TOML](https://github.com/toml-lang/toml) - located in the `data` directory ({{< gh 885 >}}) -* Support for [dynamic content](/extras/dynamiccontent/) by loading JSON & CSV - from remote sources via GetJson and GetCsv in short codes or other layout - files ({{< gh 748 >}}) -* [Pagination support](/extras/pagination/) for home page, sections and - taxonomies ({{< gh 750 >}}) -* Universal sequencing support - * A new, generic Next/Prev functionality is added to all lists of pages - (sections, taxonomies, etc.) - * Add in-section [Next/Prev](/templates/variables/) content pointers -* `Scratch` -- [a "scratchpad"](/extras/scratch) for your node- and page-scoped - variables -* [Cross Reference](/extras/crossreferences/) support to easily link documents - together with the ref and relref shortcodes. -* [Ace](http://ace.yoss.si/) template engine support ({{< gh 541 >}}) -* A new [shortcode](/extras/shortcodes/) token of `{{}}` (raw HTML) - alongside the existing `{{%/* */%}}` (Markdown) -* A top level `Hugo` variable (on Page & Node) is added with various build - information -* Several new ways to order and group content: - * `ByPublishDate` - * `GroupByPublishDate(format, order)` - * `GroupByParam(key, order)` - * `GroupByParamDate(key, format, order)` -* Hugo has undergone a major refactoring, with a new handler system and a - generic file system. This sounds and is technical, but will pave the way for - new features and make Hugo even speedier - -### Notable enhancements to existing features - -* The [shortcode](/extras/shortcodes/) handling is rewritten for speed and - better error messages. -* Several improvements to the [template functions](/templates/functions/): - * `where` is now even more powerful and accepts SQL-like syntax with the - operators `==`, `eq`; `!=`, `<>`, `ne`; `>=`, `ge`; `>`, `gt`; `<=`, - `le`; `<`, `lt`; `in`, `not in` - * `where` template function now also accepts dot chaining key argument - (e.g. `"Params.foo.bar"`) -* New template functions: - * `apply` - * `chomp` - * `delimit` - * `sort` - * `markdownify` - * `in` and `intersect` - * `trim` - * `replace` - * `dateFormat` -* Several [configurable improvements related to Markdown - rendering](/overview/configuration/#configure-blackfriday-rendering:a66b35d20295cb764719ac8bd35837ec): - * Configuration of footnote rendering - * Optional support for smart angled quotes, e.g. `"Hugo"` → «Hugo» - * Enable descriptive header IDs -* URLs in XML output is now correctly canonified ({{< gh 725 728 >}}, and part - of {{< gh 789 >}}) - -### Other improvements - -* Internal change to use byte buffer pool significantly lowering memory usage - and providing measurable performance improvements overall -* Changes to docs: - * A new [Troubleshooting](/troubleshooting/overview/) section is added - * It's now searchable through Google Custom Search ({{< gh 753 >}}) - * Some new great tutorials: - * [Automated deployments with - Wercker](/tutorials/automated-deployments/) - * [Creating a new theme](/tutorials/creating-a-new-theme/) -* [`hugo new`](/content/archetypes/) now copies the content in addition to the front matter -* Improved unit test coverage -* Fixed a lot of Windows-related path issues -* Improved error messages for template and rendering errors -* Enabled soft LiveReload of CSS and images ({{< gh 490 >}}) -* Various fixes in RSS feed generation ({{< gh 789 >}}) -* `HasMenuCurrent` and `IsMenuCurrent` is now supported on Nodes -* A bunch of [bug fixes](https://github.com/gohugoio/hugo/commits/master) - ----- - -## **0.12.0** Sept 1, 2014 - -A lot has happened since Hugo v0.11.0 was released. Most of the work has been -focused on polishing the theme engine and adding critical functionality to the -templates. - -This release represents over 90 code commits from 28 different contributors. - - * 10 [new themes](https://github.com/gohugoio/hugoThemes) created by the community - * Fully themable [Partials](/templates/partials/) - * [404 template](/templates/404/) support in themes - * [Shortcode](/extras/shortcodes/) support in themes - * [Views](/templates/views/) support in themes - * Inner [shortcode](/extras/shortcodes/) content now treated as Markdown - * Support for header ids in Markdown (# Header {#myid}) - * [Where](/templates/list/) template function to filter lists of content, taxonomies, etc. - * [GroupBy](/templates/list/) & [GroupByDate](/templates/list/) methods to group pages - * Taxonomy [pages list](/taxonomies/methods/) now sortable, filterable, limitable & groupable - * General cleanup to taxonomies & documentation to make it more clear and consistent - * [Showcase](/showcase/) returned and has been expanded - * Pretty links now always have trailing slashes - * [BaseUrl](/overview/configuration/) can now include a subdirectory - * Better feedback about draft & future post rendering - * A variety of improvements to [the website](http://gohugo.io/) - ----- - -## **0.11.0** May 28, 2014 - -This release represents over 110 code commits from 29 different contributors. - - * Considerably faster... about 3 - 4x faster on average - * [LiveReload](/extras/livereload/). Hugo will automatically reload the browser when the build is complete - * Theme engine w/[Theme Repository](https://github.com/gohugoio/hugoThemes) - * [Menu system](/extras/menus/) with support for active page - * [Builders](/extras/builders/) to quickly create a new site, content or theme - * [XML sitemap](/templates/sitemap/) generation - * [Integrated Disqus](/extras/comments/) support - * Streamlined [template organization](/templates/overview/) - * [Brand new docs site](http://gohugo.io/) - * Support for publishDate which allows for posts to be dated in the future - * More [sort](/content/ordering/) options - * Logging support - * Much better error handling - * More informative verbose output - * Renamed Indexes > [Taxonomies](/taxonomies/overview/) - * Renamed Chrome > [Partials](/templates/partials/) - ----- - -## **0.10.0** March 1, 2014 - -This release represents over 110 code commits from 29 different contributors. - - * [Syntax highlighting](/extras/highlighting/) powered by pygments (**slow**) - * Ability to [sort content](/content/ordering/) many more ways - * Automatic [table of contents](/extras/toc/) generation - * Support for Unicode URLs, aliases and indexes - * Configurable per-section [permalink](/extras/permalinks/) pattern support - * Support for [paired shortcodes](/extras/shortcodes/) - * Shipping with some [shortcodes](/extras/shortcodes/) (highlight & figure) - * Adding [canonify](/extras/urls/) option to keep urls relative - * A bunch of [additional template functions](/layout/functions/) - * Watching very large sites now works on Mac - * RSS generation improved. Limited to 50 items by default, can limit further in [template](/layout/rss/) - * Boolean params now supported in [frontmatter](/content/front-matter/) - * Launched website [showcase](/showcase/). Show off your own hugo site! - * A bunch of [bug fixes](https://github.com/gohugoio/hugo/commits/master) - ----- - -## **0.9.0** November 15, 2013 - -This release represents over 220 code commits from 22 different contributors. - - * New [command based interface](/overview/usage/) similar to git (`hugo server -s ./`) - * Amber template support - * [Aliases](/extras/aliases/) (redirects) - * Support for top level pages (in addition to homepage) - * Complete overhaul of the documentation site - * Full Windows support - * Better index support including [ordering by content weight](/content/ordering/) - * Add params to site config, available in .Site.Params from templates - * Friendlier json support - * Support for html & xml content (with frontmatter support) - * Support for [summary](/content/summaries/) content divider (<!--more-->) - * HTML in [summary](/content/summaries/) (when using divider) - * Added ["Minutes to Read"](/layout/variables/) functionality - * Support for a custom 404 page - * Cleanup of how content organization is handled - * Loads of unit and performance tests - * Integration with travis ci - * Static directory now watched and copied on any addition or modification - * Support for relative permalinks - * Fixed watching being triggered multiple times for the same event - * Watch now ignores temp files (as created by Vim) - * Configurable number of posts on [homepage](/layout/homepage/) - * [Front matter](/content/front-matter/) supports multiple types (int, string, date, float) - * Indexes can now use a default template - * Addition of truncated bool to content to determine if should show 'more' link - * Support for [linkTitles](/layout/variables/) - * Better handling of most errors with directions on how to resolve - * Support for more date / time formats - * Support for go 1.2 - * Support for `first` in templates - ----- - -## **0.8.0** August 2, 2013 - -This release represents over 65 code commits from 6 different contributors. - - * Added support for pretty urls (filename/index.html vs filename.html) - * Hugo supports a destination directory - * Will efficiently sync content in static to destination directory - * Cleaned up options.. now with support for short and long options - * Added support for TOML - * Added support for YAML - * Added support for Previous & Next - * Added support for indexes for the indexes - * Better Windows compatibility - * Support for series - * Adding verbose output - * Loads of bugfixes - ----- - -## **0.7.0** July 4, 2013 - * Hugo now includes a simple server - * First public release - ----- - -## **0.6.0** July 2, 2013 - * Hugo includes an example documentation site which it builds - ----- - -## **0.5.0** June 25, 2013 - * Hugo is quite usable and able to build spf13.com diff --git a/docs/content/showcase/2626info.md b/docs/content/showcase/2626info.md deleted file mode 100644 index 3797860c0..000000000 --- a/docs/content/showcase/2626info.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-05-03T17:20:59+09:00 -description: "Personal blog of Masashi Tsuru" -license: "" -licenseLink: "" -sitelink: http://2626.info/ -tags: -- personal -- blog -thumbnail: /img/2626info-tn.png -title: 2626.info ---- - diff --git a/docs/content/showcase/antzucaro.md b/docs/content/showcase/antzucaro.md deleted file mode 100644 index 36ec43245..000000000 --- a/docs/content/showcase/antzucaro.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2014-02-03T20:00:00Z -description: Ant Zucaro's Blog -license: GPL -licenseLink: "" -sitelink: http://antzucaro.com/ -sourceLink: https://github.com/antzucaro/az.com -tags: -- personal -- blog -- foundation -thumbnail: /img/antzucaro-tn.jpg -title: Ant Zucaro ---- - diff --git a/docs/content/showcase/appernetic.md b/docs/content/showcase/appernetic.md deleted file mode 100644 index 53d2d8f77..000000000 --- a/docs/content/showcase/appernetic.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2016-04-26 -date: 2016-04-26T13:33:33Z -description: Appernetic.io blog -license: MIT -licenseLink: https://github.com/appernetic/hugo-bootstrap-premium/blob/master/LICENSE.md -sitelink: https://blog.appernetic.io/ -sourceLink: https://github.com/appernetic/hugo-bootstrap-premium -tags: -- company -- blog -- bootstrap -thumbnail: /img/apperneticioblog.png -title: Appernetic ---- diff --git a/docs/content/showcase/arresteddevops.md b/docs/content/showcase/arresteddevops.md deleted file mode 100644 index b520b5667..000000000 --- a/docs/content/showcase/arresteddevops.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2015-11-20 -date: 2015-11-20T01:46:33-06:00 -description: "Arrested DevOps is a podcast focusing on trends in the DevOps space" -license: "apache2" -licenseLink: "https://github.com/arresteddevops/ado-hugo/blob/master/LICENSE.md" -sitelink: https://www.arresteddevops.com/ -sourceLink: https://github.com/arresteddevops/ado-hugo -tags: -- podcast -- bootstrap -thumbnail: /img/arresteddevops-tn.png -title: arresteddevops ---- diff --git a/docs/content/showcase/asc.md b/docs/content/showcase/asc.md deleted file mode 100644 index bc9424820..000000000 --- a/docs/content/showcase/asc.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2014-01-22T07:32:00Z -description: "" -license: CC-BY-SA -licenseLink: "" -sitelink: http://andrewcodispoti.com/ -sourceLink: https://gitlab.com/acodispo/andrewcodispoti-com -tags: -- personal -- bootstrap -thumbnail: /img/asc-tn.jpg -title: Andrew S Codispoti ---- - diff --git a/docs/content/showcase/astrochili.md b/docs/content/showcase/astrochili.md deleted file mode 100644 index fcf1a4217..000000000 --- a/docs/content/showcase/astrochili.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-07-31T11:22:32+03:00 -description: "Personal website" -license: "" -licenseLink: "" -sitelink: http://romansilin.com/ -sourceLink: https://github.com/astrochili/astrochili.github.io -tags: -- personal -- blog -thumbnail: /img/astrochili-tn.png -title: Roman Silin ---- - diff --git a/docs/content/showcase/aydoscom.md b/docs/content/showcase/aydoscom.md deleted file mode 100644 index 3239d4467..000000000 --- a/docs/content/showcase/aydoscom.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -date: 2016-04-23T13:23:00Z -description: "web applications" -license: "" -licenseLink: "" -sitelink: https://aydos.com/ -tags: -- web applications -thumbnail: /img/aydoscom.png -title: aydos.com ---- - diff --git a/docs/content/showcase/balaramadurai.net.md b/docs/content/showcase/balaramadurai.net.md deleted file mode 100644 index ca4a7c71e..000000000 --- a/docs/content/showcase/balaramadurai.net.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -date: 2016-11-17T12:27:18+05:30 -description: "Dr. Bala Ramadurai, Professor & Consultant in Innovation, Design Thinking and Tech Forecasting" -license: "" -licenseLink: "" -sitelink: http://balaramadurai.net -tags: -- personal -- blog -thumbnail: /img/balaramadurai-net-tn.jpg -title: Dr. Bala Ramadurai | Professor & Consultant in Innovation, Design Thinking and Tech Forecasting ---- diff --git a/docs/content/showcase/barricade.md b/docs/content/showcase/barricade.md deleted file mode 100644 index 6316e085a..000000000 --- a/docs/content/showcase/barricade.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-04-15T14:14:28+01:00 -description: "Barricade is an early warning system against hackers." -license: "" -licenseLink: "" -sitelink: https://barricade.io -tags: -- company -- security -thumbnail: /img/barricade-tn.png -title: Barricade ---- - diff --git a/docs/content/showcase/bepsays.md b/docs/content/showcase/bepsays.md deleted file mode 100644 index c6c749f11..000000000 --- a/docs/content/showcase/bepsays.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-05-26 -date: 2013-11-01T07:32:00Z -description: "bep's blog" -license: "" -licenseLink: "" -sitelink: http://bepsays.com/ -sourceLink: "https://github.com/bep/bepsays.com" -tags: -- personal -- blog -thumbnail: /img/bepsays-tn.png -title: bepsays.com ---- - diff --git a/docs/content/showcase/bharathpalavalli.com.md b/docs/content/showcase/bharathpalavalli.com.md deleted file mode 100644 index 79d60dcf3..000000000 --- a/docs/content/showcase/bharathpalavalli.com.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2017-03-15T07:32:00Z -description: "Bharath M. Palavalli" -license: "" -licenseLink: "" -sitelink: http://bharathpalavalli.com -sourceLink: https://github.com/bmp/bharathmp-hugo/tree/gh-pages -tags: -- personal -- website -thumbnail: /img/bharathpalavalli-tn.png -title: bharathpalavalli.com ---- - diff --git a/docs/content/showcase/bugtrackers.io.md b/docs/content/showcase/bugtrackers.io.md deleted file mode 100644 index d3a61489c..000000000 --- a/docs/content/showcase/bugtrackers.io.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -lastmod: 2015-10-27 -date: 2015-10-27T09:02:00Z -description: bugtrackers.io provides stories of digital crafters. It shows people behind bits, pixels and bug reports. bugtrackers.io is your resource for web development. -sitelink: https://www.bugtrackers.io/ -tags: -- blog -- community -- interviews -thumbnail: /img/bugtrackersio-tn.jpg -title: bugtrackers.io ---- - diff --git a/docs/content/showcase/bullion-investor.md b/docs/content/showcase/bullion-investor.md deleted file mode 100644 index 262dcfb53..000000000 --- a/docs/content/showcase/bullion-investor.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -date: 2017-02-11T10:30:00+02:00 -description: "German language GOLD REPORT. Tips, tricks, news & glossary on coins, bullion bars and precious-metals investments." -sitelink: https://www.bullion-investor.com/report/ -tags: -- 'gold price' -- blog -- coins -- deutschland -- finance -- germany -- gold -- investment -- news -- numismatics -- palladium -- platinum -- report -- silver -thumbnail: /img/bullion-investor-com.png -title: GOLDREPORT — Gold, Silver & Numismatics News ---- \ No newline at end of file diff --git a/docs/content/showcase/camunda-blog.md b/docs/content/showcase/camunda-blog.md deleted file mode 100644 index 7e7f76427..000000000 --- a/docs/content/showcase/camunda-blog.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-11-30 -date: 2015-12-01T04:20:00Z -description: "Camunda BPM Team Blog" -license: "Apache 2.0" -licenseLink: "https://github.com/camunda/blog.camunda.org#license" -sitelink: http://blog.camunda.org/ -sourceLink: https://github.com/camunda/blog.camunda.org -tags: -- company -- blog -thumbnail: /img/camunda-blog.png -title: Camunda Blog ---- - diff --git a/docs/content/showcase/camunda-docs.md b/docs/content/showcase/camunda-docs.md deleted file mode 100644 index 8d97d1492..000000000 --- a/docs/content/showcase/camunda-docs.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-11-30 -date: 2015-12-01T04:20:00Z -description: "Camunda BPM Documentation" -license: MIT -licenseLink: "https://github.com/camunda/camunda-docs-theme#licence" -sitelink: http://docs.camunda.org/ -sourceLink: https://github.com/camunda/camunda-docs-theme -tags: -- company -- documentation -thumbnail: /img/camunda-docs.png -title: Camunda Docs ---- - diff --git a/docs/content/showcase/carnivorousplants.md b/docs/content/showcase/carnivorousplants.md deleted file mode 100644 index 30f3b3756..000000000 --- a/docs/content/showcase/carnivorousplants.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2017-05-13T11:00:00Z -description: "Tools, guides, and interactive resources for growers of all carnivorous plant species." -license: "" -licenseLink: "" -sitelink: https://www.carnivorousplants.co.uk/ -tags: -- blog -- education -thumbnail: /img/carnivorousplants-tn.png -title: CarnivorousPlants.co.uk ---- - diff --git a/docs/content/showcase/cdnoverview.md b/docs/content/showcase/cdnoverview.md deleted file mode 100644 index d48788ec6..000000000 --- a/docs/content/showcase/cdnoverview.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-02-17T15:19:08+01:00 -description: "Overview and comparison of CDNs, their features and prices" -license: "" -licenseLink: "" -sitelink: https://www.cdnoverview.com/ -tags: -- bootstrap -- portfolio -- tech -thumbnail: /img/cdnoverview-tn.png -title: cdnoverview.com ---- - diff --git a/docs/content/showcase/chinese-grammar.md b/docs/content/showcase/chinese-grammar.md deleted file mode 100644 index 3e8bc3563..000000000 --- a/docs/content/showcase/chinese-grammar.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -lastmod: 2015-08-21 -date: 2015-08-23 -description: Chinese grammar lessons -sitelink: https://www.chineseboost.com/grammar/ -sourceLink: https://github.com/hughgrigg/chineseboost-articles -tags: -- learning -- education -thumbnail: /img/chinese-grammar-tn.png -title: Chinese Grammar ---- diff --git a/docs/content/showcase/chingli.md b/docs/content/showcase/chingli.md deleted file mode 100644 index ae2d4a4db..000000000 --- a/docs/content/showcase/chingli.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -lastmod: 2015-12-19 -date: 2014-08-26T11:20:02-04:00 -description: "chingli’s personal blog" -sitelink: http://www.chingli.com/ -tags: -- personal -- blog -thumbnail: /img/chingli-tn.jpg -title: 青砾 (chingli) ---- - diff --git a/docs/content/showcase/chipsncookies.md b/docs/content/showcase/chipsncookies.md deleted file mode 100644 index ff3128d81..000000000 --- a/docs/content/showcase/chipsncookies.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2016-04-14 -date: 2015-07-08T14:02:16+02:00 -description: "personal blog and portfolio of Samuel Debruyn" -license: "" -licenseLink: "" -sitelink: https://chipsncookies.com -sourceLink: https://github.com/SamuelDebruyn/chipsncookies-site -tags: -- personal -- blog -thumbnail: /img/chipsncookies-tn.png -title: Chips 'n' Cookies ---- - diff --git a/docs/content/showcase/christianmendoza.md b/docs/content/showcase/christianmendoza.md deleted file mode 100644 index 6d18735d9..000000000 --- a/docs/content/showcase/christianmendoza.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-10-16T13:30:47-04:00 -date: 2016-12-20T17:21:00-05:00 -description: "Personal site" -license: "" -licenseLink: "" -sitelink: https://christianmendoza.me/ -sourceLink: https://github.com/christianmendoza/christianmendoza.me -tags: -- personal -- profile -thumbnail: /img/christianmendoza-tn.jpg -title: christianmendoza.me ---- diff --git a/docs/content/showcase/cinegyopen.md b/docs/content/showcase/cinegyopen.md deleted file mode 100644 index 592df2612..000000000 --- a/docs/content/showcase/cinegyopen.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -date: 2016-09-05T23:23:18+02:00 -description: "Cinegy Open documentation project" -license: "" -licenseLink: "" -sitelink: https://open.cinegy.com/ -sourceLink: -tags: -- documentation -thumbnail: /img/cinegyopen-tn.png -title: Cinegy Open ---- \ No newline at end of file diff --git a/docs/content/showcase/clearhaus.md b/docs/content/showcase/clearhaus.md deleted file mode 100644 index 9408ec8e6..000000000 --- a/docs/content/showcase/clearhaus.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-10-21T12:37:00+02:00 -description: "Online Acquiring · Accept Visa & MasterCard within 1-3 days" -license: "" -licenseLink: "" -sitelink: https://www.clearhaus.com/ -tags: - - company - - fintech - - payments - - acquirer -thumbnail: /img/clearhaus-tn.png -title: Clearhaus ---- diff --git a/docs/content/showcase/cloudshark.md b/docs/content/showcase/cloudshark.md deleted file mode 100644 index 6a8b3fa4f..000000000 --- a/docs/content/showcase/cloudshark.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2014-03-27T09:45:00Z -description: CloudShark Appliance homepage and documentation -license: "" -licenseLink: "" -sitelink: https://appliance.cloudshark.org/ -tags: -- company -- documentation -- foundation -thumbnail: /img/cloudshark-tn.jpg -title: CloudShark ---- - diff --git a/docs/content/showcase/coding-journal.md b/docs/content/showcase/coding-journal.md deleted file mode 100644 index 78e4b38d2..000000000 --- a/docs/content/showcase/coding-journal.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2015-12-23 -date: 2015-12-23T11:42:00+01:00 -description: blog, portfolio -license: "" -licenseLink: "" -sitelink: http://blog.kulman.sk/ -sourceLink: https://github.com/igorkulman/coding-journal -tags: -- blog -- portfolio -thumbnail: /img/codingjournal-tn.png -title: Coding Journal ---- diff --git a/docs/content/showcase/consequently.md b/docs/content/showcase/consequently.md deleted file mode 100644 index 3469129f9..000000000 --- a/docs/content/showcase/consequently.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2015-02-11 -date: 2015-02-11T13:21:27+11:00 -description: "consequently.org, Greg Restall's personal website" -license: "" -licenseLink: "" -sitelink: http://consequently.org -sourceLink: "https://github.com/consequently/consequently-hugo" -tags: -- academic -- blog -- kube -thumbnail: /img/consequently.jpg -title: consequently.org ---- - diff --git a/docs/content/showcase/ctlcompiled.md b/docs/content/showcase/ctlcompiled.md deleted file mode 100644 index 18179cf5b..000000000 --- a/docs/content/showcase/ctlcompiled.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-07-25T13:45:09-04:00 -description: "CompilED is a collection of reflections and comments by the software developers at Columbia’s Center for Teaching and Learning (CTL). These views are rooted in our professional and personal experiences developing educational technology." -license: "Creative Commons Attribution-ShareAlike 3.0 United States." -licenseLink: "https://creativecommons.org/licenses/by-sa/3.0/us/" -sitelink: https://compiled.ctl.columbia.edu/ -tags: -- edtech -- technology -- blog -thumbnail: /img/ctlcompiled-tn.png -title: CompilED at CTL ---- - diff --git a/docs/content/showcase/danmux.md b/docs/content/showcase/danmux.md deleted file mode 100644 index 1ae4589d1..000000000 --- a/docs/content/showcase/danmux.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2014-08-26 -date: 2014-08-26T10:55:23-04:00 -description: "" -license: MIT -licenseLink: "" -sitelink: http://danmux.com/ -sourceLink: https://github.com/danmux/danmux-hugo -tags: -- personal -- blog -thumbnail: /img/danmux-tn.jpg -title: Danmux ---- - diff --git a/docs/content/showcase/datapipelinearchitect.md b/docs/content/showcase/datapipelinearchitect.md deleted file mode 100644 index a74eb835e..000000000 --- a/docs/content/showcase/datapipelinearchitect.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-02-04T18:30:07-05:00 -description: "Professional website at datapipelinearchitect.com" -sitelink: http://datapipelinearchitect.com/ -tags: -- company -- tech -- blog -- website -thumbnail: /img/datapipelinearchitect-tn.jpg -title: Data Pipeline Architect ---- - diff --git a/docs/content/showcase/davidepetilli.md b/docs/content/showcase/davidepetilli.md deleted file mode 100644 index 6b69eee0f..000000000 --- a/docs/content/showcase/davidepetilli.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2015-05-25 -date: 2013-11-01T07:32:00Z -description: "" -license: MIT -licenseLink: "" -sitelink: http://davidepetilli.com -tags: -- personal -- photography -- portfolio -- blog -thumbnail: /img/davidepetilli-tn.jpg -title: Davide Petilli ---- - diff --git a/docs/content/showcase/davidrallen.md b/docs/content/showcase/davidrallen.md deleted file mode 100644 index 06e802fd5..000000000 --- a/docs/content/showcase/davidrallen.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -date: 2016-02-03T11:49:07-05:00 -description: "Personal website for David Allen" -license: "MIT" -licenseLink: "https://opensource.org/licenses/MIT" -sitelink: http://davidrallen.com/ -sourceLink: https://github.com/doctorallen/davidrallen.com -tags: -- personal -- blog -- tech -thumbnail: /img/davidrallen-tn.png -title: David Allen ---- - diff --git a/docs/content/showcase/davidyates.md b/docs/content/showcase/davidyates.md deleted file mode 100644 index 0d6063ad4..000000000 --- a/docs/content/showcase/davidyates.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-09-10T07:07:39+02:00 -description: "David Yates" -license: "" -licenseLink: "" -sitelink: https://davidyat.es/ -tags: -- personal -- blog -thumbnail: /img/davidyates-tn.png -title: David Yates ---- - diff --git a/docs/content/showcase/dbzman-online.md b/docs/content/showcase/dbzman-online.md deleted file mode 100644 index f30d71491..000000000 --- a/docs/content/showcase/dbzman-online.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -date: 2017-01-02T07:32:00Z -description: "" -license: "" -licenseLink: "" -sitelink: http://dbzman-online.eu/ -sourceLink: https://github.com/Dbzman/dbzman-online.eu -tags: -- personal -- blog -- portfolio -thumbnail: /img/dbzman-online-tn.png -title: Dbzman-Online ---- - diff --git a/docs/content/showcase/devmonk.md b/docs/content/showcase/devmonk.md deleted file mode 100644 index 00a1a7572..000000000 --- a/docs/content/showcase/devmonk.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2014-08-26 -date: 2014-08-26T11:31:02-04:00 -description: "" -license: "" -licenseLink: "" -sitelink: https://devmonk.com/ -sourceLink: https://github.com/peteraba/devmonk.com -tags: -- educational -- video -thumbnail: /img/devmonk-tn.jpg -title: devmonk ---- - diff --git a/docs/content/showcase/dmitriid.com.md b/docs/content/showcase/dmitriid.com.md deleted file mode 100644 index 2a5e308ba..000000000 --- a/docs/content/showcase/dmitriid.com.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-10-19T16:52:28+02:00 -description: "Personal blog" -license: "CC BY-NC 4.0" -licenseLink: "" -sitelink: http://dmitriid.com/ -sourceLink: https://github.com/dmitriid/dmitriid.com -tags: -- personal -- blog -thumbnail: /img/dmitriid.com.png -title: dmitriid.com ---- - diff --git a/docs/content/showcase/emilyhorsman.com.md b/docs/content/showcase/emilyhorsman.com.md deleted file mode 100644 index 8e792f716..000000000 --- a/docs/content/showcase/emilyhorsman.com.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -lastmod: 2016-01-09 -date: 2016-01-09T01:00:10Z -description: Personal homepage -sitelink: https://emilyhorsman.com/ -sourceLink: https://github.com/emilyhorsman/buttercup -tags: -- personal -- blog -thumbnail: /img/emilyhorsman.com-tn.jpg -title: emilyhorsman.com ---- - diff --git a/docs/content/showcase/enjoyablerecipes.md b/docs/content/showcase/enjoyablerecipes.md deleted file mode 100644 index 7b97e6293..000000000 --- a/docs/content/showcase/enjoyablerecipes.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -date: 2017-03-07T07:32:00Z -description: "Indian Recipes Blog" -license: "" -licenseLink: "" -sitelink: https://enjoyable.recipes/ -sourceLink: https://github.com/shubhojyoti/enjoyablerecipes-hugo -tags: -- personal -- blog -- recipes -- zurb-foundation -thumbnail: /img/enjoyablerecipes-tn.png -title: Enjoyable Recipes ---- - diff --git a/docs/content/showcase/esaezgil.md b/docs/content/showcase/esaezgil.md deleted file mode 100644 index f1ae53b20..000000000 --- a/docs/content/showcase/esaezgil.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -date: 2017-04-02T07:32:00Z -description: "Personal blog of Enrique Saez Gil - esaezgil" -license: "" -licenseLink: "" -sitelink: https://esaezgil.com -sourceLink: https://github.com/esaezgil/esaezgil.github.io -tags: -- personal -- technical blog -- software -- open source -thumbnail: /img/esaezgil_com-tn.png -title: esaezgil.com ---- - diff --git a/docs/content/showcase/esolia-com.md b/docs/content/showcase/esolia-com.md deleted file mode 100644 index 58a482f51..000000000 --- a/docs/content/showcase/esolia-com.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2015-08-08 -date: 2015-07-07T04:32:00Z -description: Tokyo IT service provider eSolia Inc's Hugo-powered website. -license: MIT -licenseLink: "" -sitelink: http://esolia.com/ -sourceLink: https://github.com/eSolia/eSolia -tags: -- company -- esolia -- rickcogley -- japan -thumbnail: /img/esolia_com-tn.png -title: eSolia.com ---- diff --git a/docs/content/showcase/esolia-pro.md b/docs/content/showcase/esolia-pro.md deleted file mode 100644 index 24b06b1f8..000000000 --- a/docs/content/showcase/esolia-pro.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2015-08-08 -date: 2015-07-07T04:32:00Z -description: Tokyo IT service provider eSolia Inc's eSolia.pro blog site, powered by Hugo. -license: MIT -licenseLink: "" -sitelink: http://esolia.pro/ -sourceLink: https://github.com/eSolia/eSolia.pro -tags: -- company -- esolia -- rickcogley -- japan -thumbnail: /img/esolia_pro-tn.png -title: eSolia.pro ---- diff --git a/docs/content/showcase/eurie.md b/docs/content/showcase/eurie.md deleted file mode 100644 index 0ab5966f7..000000000 --- a/docs/content/showcase/eurie.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -date: 2016-10-15T23:30:59+09:00 -description: "User guide for euire Desk" -license: "" -licenseLink: "" -sitelink: https://docs.eurie.io -tags: -- documentation -thumbnail: /img/docs.eurie.io-tn.png -title: eurie Desk docs ---- diff --git a/docs/content/showcase/fale.md b/docs/content/showcase/fale.md deleted file mode 100644 index 449c1cc22..000000000 --- a/docs/content/showcase/fale.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2016-03-01 -date: 2016-03-01T12:38:00Z -description: Fabio Alessandro Locati personal blog. -license: AGPLv3 -licenseLink: "" -sitelink: http://fale.io/ -sourceLink: https://github.com/fale/fale.io -tags: -- personal -- blog -thumbnail: /img/fale-tn.png -title: fale.io ---- - diff --git a/docs/content/showcase/firstnameclub.md b/docs/content/showcase/firstnameclub.md deleted file mode 100644 index 573cdda0a..000000000 --- a/docs/content/showcase/firstnameclub.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2017-03-31T22:36:12+03:00 -description: "Multilingual website. Size 20GB, build time 25 mins. Cloudflare, s3, bootstrap 4" -license: "" -licenseLink: "" -sitelink: https://firstname.club -sourceLink: -tags: -- data -- website -thumbnail: /img/firstnameclub.png -title: firstname club ---- diff --git a/docs/content/showcase/fixatom.md b/docs/content/showcase/fixatom.md deleted file mode 100644 index 8ba1978d1..000000000 --- a/docs/content/showcase/fixatom.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-10-17T16:19:24+08:00 -description: "a personal blog" -license: "" -licenseLink: "" -sitelink: https://fixatom.com/ -tags: -- personal -- blog -thumbnail: /img/fixatom-tn.png -title: Atom ---- - diff --git a/docs/content/showcase/furqansoftware.md b/docs/content/showcase/furqansoftware.md deleted file mode 100644 index 4d377e642..000000000 --- a/docs/content/showcase/furqansoftware.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -date: 2017-05-24T06:19:40Z -description: "Official company website" -sitelink: https://furqansoftware.com/ -tags: -- company -- website -- blog -- tech -thumbnail: /img/furqansoftware-tn.png -title: Furqan Software ---- diff --git a/docs/content/showcase/fxsitecompat.md b/docs/content/showcase/fxsitecompat.md deleted file mode 100644 index 393b097d9..000000000 --- a/docs/content/showcase/fxsitecompat.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2015-09-08 -date: 2014-08-26T19:40:00-04:00 -description: Multilingual, community documentation and blog site -license: "" -licenseLink: "" -sitelink: https://www.fxsitecompat.com/ -sourceLink: https://github.com/fxsitecompat/www.fxsitecompat.com -tags: -- community -- documentation -- translation -thumbnail: /img/fxsitecompat-tn.png -title: Firefox Site Compatibility ---- - diff --git a/docs/content/showcase/gntech.md b/docs/content/showcase/gntech.md deleted file mode 100644 index 3d199e931..000000000 --- a/docs/content/showcase/gntech.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -date: 2016-02-13T21:47:27+01:00 -description: "Projects, music and drawings, the personal web page of Gustav Näslund" -license: "" -licenseLink: "" -sitelink: http://www.gntech.se/ -tags: -- personal -- blog -- projects -- music -- drawings -thumbnail: /img/gntech-tn.png -title: gntech.se ---- diff --git a/docs/content/showcase/gogb.md b/docs/content/showcase/gogb.md deleted file mode 100644 index d104741ba..000000000 --- a/docs/content/showcase/gogb.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -lastmod: 2015-05-25 -date: 2013-11-01T07:32:00Z -description: "" -license: MIT -licenseLink: "" -sitelink: http://getgb.io -tags: -- project -thumbnail: /img/gogb-tn.jpg -title: GoGB ---- - diff --git a/docs/content/showcase/goin5minutes.md b/docs/content/showcase/goin5minutes.md deleted file mode 100644 index ae0c61da3..000000000 --- a/docs/content/showcase/goin5minutes.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -lastmod: 2015-11-20 -date: 2015-11-20T20:46:00Z -description: "Code for Go in 5 Minutes Screencasts" -license: "Apache License 2.0" -licenseLink: "https://github.com/arschles/go-in-5-minutes/blob/master/LICENSE" -sitelink: http://www.goin5minutes.com/ -sourceLink: https://github.com/arschles/go-in-5-minutes/tree/master/www -tags: -- screencasts -thumbnail: /img/goin5minutes-tn.png -title: Go in 5 minutes ---- \ No newline at end of file diff --git a/docs/content/showcase/h10n.me.md b/docs/content/showcase/h10n.me.md deleted file mode 100644 index 0576edb1f..000000000 --- a/docs/content/showcase/h10n.me.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -date: 2016-03-05T14:30:21+01:00 -description: "Personal profile page of Horst Gutmann" -sitelink: http://h10n.me/ -sourceLink: https://github.com/zerok/h10n.me -tags: -- personal -- profile -thumbnail: /img/h10n.me-tn.png -title: h10n.me ---- diff --git a/docs/content/showcase/heimatverein-niederjosbach.md b/docs/content/showcase/heimatverein-niederjosbach.md deleted file mode 100644 index d063e9c50..000000000 --- a/docs/content/showcase/heimatverein-niederjosbach.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2017-01-02T07:32:00Z -description: "" -license: "" -licenseLink: "" -sitelink: http://heimatverein-niederjosbach.de/ -sourceLink: https://github.com/Dbzman/heimatverein-niederjosbach.de -tags: -- association -- gallery -thumbnail: /img/heimatverein-niederjosbach-tn.png -title: Niederjosbacher Heimat- und Geschichtsverein 2007 e.V. ---- - diff --git a/docs/content/showcase/hugo.md b/docs/content/showcase/hugo.md deleted file mode 100644 index 54c9ce09a..000000000 --- a/docs/content/showcase/hugo.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2013-07-01T07:32:00Z -description: This site -license: Simpl -licenseLink: "" -sitelink: http://gohugo.io/ -sourceLink: https://github.com/gohugoio/hugo/tree/master/docs -tags: -- documentation -- bootstrap -thumbnail: /img/hugo-tn.jpg -title: Hugo ---- - diff --git a/docs/content/showcase/invision.md b/docs/content/showcase/invision.md deleted file mode 100644 index baf1fc463..000000000 --- a/docs/content/showcase/invision.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2017-01-28T12:04:00Z -description: InVision Engineering Blog -license: "" -licenseLink: "" -sitelink: http://engineering.invisionapp.com -tags: -- company -- blog -- engineering -thumbnail: /img/invision-tn.png -title: InVision Engineering Blog ---- diff --git a/docs/content/showcase/jamescampbell.md b/docs/content/showcase/jamescampbell.md deleted file mode 100644 index de7fa62a2..000000000 --- a/docs/content/showcase/jamescampbell.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -date: 2016-06-06T14:42:59-04:00 -description: "" -license: "" -licenseLink: "" -sitelink: https://jamescampbell.us/ -sourceLink: https://github.com/jamesacampbell/causes-and-effects-hugo -tags: -- personal -- blog -thumbnail: /img/jamescampbell-tn.png -title: jamescampbell.us ---- - - diff --git a/docs/content/showcase/jorgennilsson.md b/docs/content/showcase/jorgennilsson.md deleted file mode 100644 index 7821eea7d..000000000 --- a/docs/content/showcase/jorgennilsson.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -date: 2016-02-11T23:41:27+01:00 -description: "Personal web site and blog of digital director Jorgen Nilsson" -license: "" -licenseLink: "" -sitelink: http://jorgennilsson.com/ -tags: -- personal -- blog -thumbnail: /img/jorgennilsson-tn.png -title: jorgennilsson.com ---- diff --git a/docs/content/showcase/kieranhealy.md b/docs/content/showcase/kieranhealy.md deleted file mode 100644 index f4f32989c..000000000 --- a/docs/content/showcase/kieranhealy.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2014-02-27T20:35:00Z -description: Kieran Healy's Website -license: "" -licenseLink: "" -sitelink: http://kieranhealy.org/ -sourceLink: https://github.com/kjhealy/kieranhealy.hugo -tags: -- personal -- blog -- academic -thumbnail: /img/kjhealy-tn.jpg -title: Kieran Healy ---- - diff --git a/docs/content/showcase/klingt-net.md b/docs/content/showcase/klingt-net.md deleted file mode 100644 index 369e44cdb..000000000 --- a/docs/content/showcase/klingt-net.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -date: 2016-05-15T23:18:16+02:00 -description: "klingt.net is the personal homepage of Andreas Linz." -license: "" -licenseLink: "" -sitelink: https://klingt.net/ -sourceLink: https://github.com/klingtnet/klingt.net -tags: -- personal -- blog -- programming -thumbnail: /img/klingt-net-tn.png -title: klingt net ---- - diff --git a/docs/content/showcase/launchcode5.md b/docs/content/showcase/launchcode5.md deleted file mode 100644 index 99bea2cfb..000000000 --- a/docs/content/showcase/launchcode5.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2014-11-01T07:32:00Z -description: Corporate Site for Launchcode Software Studios -license: Copyright Launchcode Software Studios -licenseLink: "" -sitelink: http://www.launchcode5.com/ -sourceLink: https://github.com/Launchcode5/launchcode5.com -tags: -- bootstrap -thumbnail: /img/launchcode-tn.jpg -title: Launchcode Software Studios ---- - diff --git a/docs/content/showcase/leepenney.md b/docs/content/showcase/leepenney.md deleted file mode 100644 index db8bfb45b..000000000 --- a/docs/content/showcase/leepenney.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2016-01-24 -date: 2016-01-24T16:10:00Z -description: Site of author Lee Penney -license: MIT -licenseLink: "" -sitelink: http://leepenney.com/ -tags: -- personal -- website -thumbnail: /img/leepenney-tn.jpg -title: Lee Penney ---- - diff --git a/docs/content/showcase/leowkahman.md b/docs/content/showcase/leowkahman.md deleted file mode 100644 index a7ce50418..000000000 --- a/docs/content/showcase/leowkahman.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -date: 2016-07-24T00:00:00+08:00 -description: "Leow Kah Man - Tech Blog" -license: "" -licenseLink: "" -sitelink: https://www.leowkahman.com/ -tags: -- personal -- blog -thumbnail: /img/leowkahman-tn.png -title: Leow Kah Man - Tech Blog ---- \ No newline at end of file diff --git a/docs/content/showcase/lk4d4.darth.io.md b/docs/content/showcase/lk4d4.darth.io.md deleted file mode 100644 index a35773380..000000000 --- a/docs/content/showcase/lk4d4.darth.io.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2014-08-26 -date: 2014-08-25T18:59:30-04:00 -description: Alexandr Morozov -license: "" -licenseLink: "" -sitelink: http://lk4d4.darth.io/ -sourceLink: https://github.com/LK4D4/lk4d4.darth.io -tags: -- personal -- blog -thumbnail: /img/lk4d4-tn.jpg -title: lk4d4.darth.io ---- - diff --git a/docs/content/showcase/losslesslife.md b/docs/content/showcase/losslesslife.md deleted file mode 100644 index 5e7158daa..000000000 --- a/docs/content/showcase/losslesslife.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-11-15 -date: 2015-11-15T11:20:00-08:00 -description: "Losslesslife covers everything high-end and audiophile headphones. Headphones and headphone amplifiers, accessories, how-to guides, and reviews." -sitelink: http://pages.losslesslife.com/ -tags: -- headphones -- electronics -- technical -- reviews -- education -- audiophile -thumbnail: /img/losslesslife-tn.png -title: LosslessLife ---- diff --git a/docs/content/showcase/lucumt.info.md b/docs/content/showcase/lucumt.info.md deleted file mode 100644 index 0f66b294f..000000000 --- a/docs/content/showcase/lucumt.info.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2017-03-12T13:14:14+08:00 -description: "Personal blog of Rosen Lu" -license: "" -licenseLink: "" -sitelink: http://lucumt.info/posts -sourceLink: https://github.com/lucumt/ghblog -tags: -- personal -- blog -thumbnail: /img/lucumt.info.png -title: 飞狐的部落格 ---- - diff --git a/docs/content/showcase/mariosanchez.md b/docs/content/showcase/mariosanchez.md deleted file mode 100644 index 99285f871..000000000 --- a/docs/content/showcase/mariosanchez.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2015-06-20 -date: 2015-06-20 -description: "" -license: "" -licenseLink: "" -sitelink: http://mariosanchez.org/ -sourceLink: https://github.com/mariobox/Hugo-Source -tags: -- personal -- blog -thumbnail: /img/mariosanchez-tn.jpg -title: mariosanchez.org ---- diff --git a/docs/content/showcase/mayan-edms.md b/docs/content/showcase/mayan-edms.md deleted file mode 100644 index 656a6790c..000000000 --- a/docs/content/showcase/mayan-edms.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-06-13T19:38:56-04:00 -description: "Free Open Source Document Management System" -license: "Apache 2.0" -licenseLink: "" -sitelink: http://www.mayan-edms.com/ -sourceLink: https://gitlab.com/mayan-edms/website -tags: -- paperless -- floss -thumbnail: /img/mayan-edms-tn.png -title: Mayan EDMS ---- - diff --git a/docs/content/showcase/michaelwhatcott.md b/docs/content/showcase/michaelwhatcott.md deleted file mode 100644 index 9c5bcd07f..000000000 --- a/docs/content/showcase/michaelwhatcott.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2014-08-26 -date: 2014-08-26T11:47:11-04:00 -description: "" -license: Simpl-2.0 -licenseLink: "" -sitelink: http://michaelwhatcott.com/ -sourceLink: https://bitbucket.org/mdwhatcott/michaelwhatcott.com-boilerplate/src -tags: -- personal -- blog -thumbnail: /img/michaelwhatcott-tn.jpg -title: michaelwhatcott ---- - diff --git a/docs/content/showcase/mongodb-eng-journal.md b/docs/content/showcase/mongodb-eng-journal.md deleted file mode 100644 index 9dc5ea0ad..000000000 --- a/docs/content/showcase/mongodb-eng-journal.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-03-09T14:14:16-05:00 -description: "The MongoDB Engineering Journal -- for builders, by builders." -license: "" -licenseLink: "" -sitelink: http://engineering.mongodb.com/ -tags: -- engineering -- blog -thumbnail: /img/mongodb-eng-tn.png -title: The Mongodb Engineering Journal ---- - diff --git a/docs/content/showcase/mtbhomer.md b/docs/content/showcase/mtbhomer.md deleted file mode 100644 index a98c59621..000000000 --- a/docs/content/showcase/mtbhomer.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-06-19T11:38:39+02:00 -description: "Personal website Martijn ten Bhömer" -license: "" -licenseLink: "" -sitelink: https://www.mtbhomer.com/ -sourceLink: https://github.com/mtbhomer/web-portfolio -tags: -- personal -- portfolio -- design -thumbnail: /img/mtbhomer-tn.png -title: mtbhomer.com ---- diff --git a/docs/content/showcase/myearworms.md b/docs/content/showcase/myearworms.md deleted file mode 100644 index 17d0549f3..000000000 --- a/docs/content/showcase/myearworms.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2017-03-08T07:32:00Z -description: "All the songs that get stuck in my head" -license: "" -licenseLink: "" -sitelink: https://myearworms.com/ -sourceLink: https://github.com/jaydreyer/myearworms -tags: -- personal -- blog -- music -thumbnail: /img/myearworms-tn.jpg -title: My Earworms ---- diff --git a/docs/content/showcase/neavey.net.md b/docs/content/showcase/neavey.net.md deleted file mode 100644 index 443d2b670..000000000 --- a/docs/content/showcase/neavey.net.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-12-21T21:19:46Z -description: "Adventure Miles - A personal travel blog." -license: "MIT" -licenseLink: "https://raw.githubusercontent.com/patrickn/neaveynet-hugo/master/LICENSE.md" -sitelink: http://neavey.net/ -sourceLink: https://github.com/patrickn/neaveynet-hugo -tags: -- personal -- travel -- blog -thumbnail: /img/neavey-tn.jpg -title: neavey.net ---- diff --git a/docs/content/showcase/nickoneill.md b/docs/content/showcase/nickoneill.md deleted file mode 100644 index 405a9f945..000000000 --- a/docs/content/showcase/nickoneill.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2014-08-26 -date: 2014-08-26T12:15:48-04:00 -description: "" -license: "" -licenseLink: "" -sitelink: http://blog.nickoneill.name/ -sourceLink: https://github.com/nickoneill/blog.nickoneill.name -tags: -- personal -- blog -thumbnail: /img/nickoneill-tn.jpg -title: authenticgeek ---- - diff --git a/docs/content/showcase/ninjaducks.in.md b/docs/content/showcase/ninjaducks.in.md deleted file mode 100644 index 46be436fc..000000000 --- a/docs/content/showcase/ninjaducks.in.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2015-10-24 -date: 2015-10-24T14:06:00+05:30 -description: Personal blog -license: "" -licenseLink: "" -sitelink: http://ninjaducks.in -sourceLink: https://github.com/shivanshuag/shivanshuag.github.io/tree/new -tags: -- personal -- blog -thumbnail: /img/ninjaducks-tn.png -title: ninjaducks.in ---- diff --git a/docs/content/showcase/ninya.io.md b/docs/content/showcase/ninya.io.md deleted file mode 100644 index a7ac4fe99..000000000 --- a/docs/content/showcase/ninya.io.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2014-08-26 -date: 2014-08-26T09:47:00-04:00 -description: "" -license: "" -licenseLink: "" -sitelink: http://blog.ninya.io/ -sourceLink: https://github.com/ninya-io/ninya-io.github.io/tree/dev -tags: -- project -- blog -thumbnail: /img/ninya-tn.jpg -title: ninya.io ---- - diff --git a/docs/content/showcase/nodesk.md b/docs/content/showcase/nodesk.md deleted file mode 100644 index 8656c7ec0..000000000 --- a/docs/content/showcase/nodesk.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -lastmod: 2015-08-26 -date: 2015-08-26T22:33:00Z -description: "NoDesk | All Things Digital Nomad" -sitelink: http://nodesk.co/ -tags: -- digital nomad -- web -thumbnail: /img/nodesk-tn.png -title: nodesk.co ---- diff --git a/docs/content/showcase/novelist-xyz.md b/docs/content/showcase/novelist-xyz.md deleted file mode 100644 index e0b59fb41..000000000 --- a/docs/content/showcase/novelist-xyz.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-05-22T17:54:51+08:00 -description: "Peter Y. Chuang - Novelist, Short Story Writer" -license: "" -licenseLink: "" -sitelink: https://novelist.xyz -sourceLink: https://github.com/peterychuang/peterychuang.github.io/tree/source -tags: -- personal -- blog -thumbnail: /img/novelist-xyz.png -title: Peter Y. Chuang ---- diff --git a/docs/content/showcase/npf.md b/docs/content/showcase/npf.md deleted file mode 100644 index b11f6cbc4..000000000 --- a/docs/content/showcase/npf.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2014-08-21T12:21:18-04:00 -description: "" -license: "" -licenseLink: "" -sitelink: http://npf.io/ -sourceLink: https://github.com/natefinch/npf -tags: -- personal -- blog -thumbnail: /img/npf-tn.jpg -title: npf.io ---- - diff --git a/docs/content/showcase/nutspubcrawl.md b/docs/content/showcase/nutspubcrawl.md deleted file mode 100644 index bb5ddf6d8..000000000 --- a/docs/content/showcase/nutspubcrawl.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -date: 2017-06-03T07:32:00Z -description: "" -license: "" -licenseLink: "" -sitelink: https://nutspubcrawl.com/ -sourceLink: https://github.com/jeremielondon/nuts-hugo -tags: -- company -- multilingual -- London -thumbnail: /img/nutspubcrawl.jpg -title: Nutspubcrawl.com ---- - diff --git a/docs/content/showcase/ocul-maps.md b/docs/content/showcase/ocul-maps.md deleted file mode 100644 index 516bda399..000000000 --- a/docs/content/showcase/ocul-maps.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2017-05-09T11:04:33-04:00 -description: "The Ontario Council of University Libraries Historical Topographic Maps Digitization Project" -license: "" -licenseLink: "" -sitelink: http://ocul.on.ca/topomaps -sourcelink: https://github.com/scholarsportal/historical-topos -tags: -- education -- project -- multilingual -thumbnail: /img/ocul-maps.png -title: OCUL topographic maps ---- diff --git a/docs/content/showcase/petanikode.md b/docs/content/showcase/petanikode.md deleted file mode 100644 index 7ebd51b9f..000000000 --- a/docs/content/showcase/petanikode.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -date: 2017-01-10T07:32:00Z -description: "Programmer Pengguna Linux" -license: "" -licenseLink: "" -sitelink: http://petanikode.com/ -tags: -- programming -- blog -thumbnail: /img/petanikode.png -title: Petani Kode ---- diff --git a/docs/content/showcase/peteraba.md b/docs/content/showcase/peteraba.md deleted file mode 100644 index c00373e54..000000000 --- a/docs/content/showcase/peteraba.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2014-08-26 -date: 2014-08-26T11:30:57-04:00 -description: "" -license: "" -licenseLink: "" -sitelink: https://peteraba.com/ -sourceLink: https://github.com/peteraba/peteraba.com -tags: -- personal -- blog -thumbnail: /img/peteraba-tn.jpg -title: peteraba ---- - diff --git a/docs/content/showcase/picturingjordan.md b/docs/content/showcase/picturingjordan.md deleted file mode 100644 index c0005312a..000000000 --- a/docs/content/showcase/picturingjordan.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2017-01-22T17:32:00Z -description: "Sharing Jordan with the world — one picture at a time." -license: "Creative Commons Attribution 4.0 International" -licenseLink: https://creativecommons.org/licenses/by-sa/4.0/ -sitelink: https://picturingjordan.com/ -sourceLink: https://github.com/alanorth/picturingjordan.com -tags: -- personal -- blog -thumbnail: /img/picturingjordan-tn.png -title: picturingjordan.com ---- - diff --git a/docs/content/showcase/promotive.md b/docs/content/showcase/promotive.md deleted file mode 100644 index 45e99d1a1..000000000 --- a/docs/content/showcase/promotive.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -date: 2017-02-21T12:26:26+01:00 -description: "Corporate website a event management agency" -license: "" -licenseLink: "" -sitelink: https://promotive.es -tags: -- company -- corporate -- spanish -- event management -- bootstrap -thumbnail: /img/promotive.png -title: Promotive ---- diff --git a/docs/content/showcase/rahulrai.md b/docs/content/showcase/rahulrai.md deleted file mode 100644 index 1970ad683..000000000 --- a/docs/content/showcase/rahulrai.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-10-04T21:01:18+01:00 -description: "My Take on Cloud" -license: "" -licenseLink: "" -sitelink: https://rahulrai.in -sourceLink: https://github.com/moonytheloony/Blog-Web -tags: -- personal -- blog -thumbnail: /img/rahulrai_in-tn.png -title: My Take on Cloud ---- diff --git a/docs/content/showcase/rakutentech.md b/docs/content/showcase/rakutentech.md deleted file mode 100644 index b78b3e8b1..000000000 --- a/docs/content/showcase/rakutentech.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2016-01-20 -date: 2016-01-20T07:32:00Z -description: "" -license: MIT -licenseLink: "" -sitelink: http://techblog.rakuten.co.jp/ -tags: -- company -- blog -thumbnail: /img/rakutentech-tn.png -title: Rakuten Tech Blog ---- - diff --git a/docs/content/showcase/rdegges.md b/docs/content/showcase/rdegges.md deleted file mode 100644 index 2d7589b60..000000000 --- a/docs/content/showcase/rdegges.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-08-05T15:33:56-07:00 -description: "The personal website of Randall Degges." -license: "Unlicense" -licenseLink: "http://unlicense.org/" -sitelink: https://www.rdegges.com/ -sourceLink: https://github.com/rdegges/rdegges-www -tags: -- personal -- blog -thumbnail: /img/rdegges-tn.png -title: Randall Degges ---- - diff --git a/docs/content/showcase/readtext.md b/docs/content/showcase/readtext.md deleted file mode 100644 index 330d89ca2..000000000 --- a/docs/content/showcase/readtext.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -lastmod: 2015-11-16 -date: 2015-11-16T08:36:00Z -description: Restored text files -sitelink: http://readtext.org/ -tags: -- textfiles -- reading -thumbnail: /img/readtext-tn.png -title: ReadText ---- - diff --git a/docs/content/showcase/richardsumilang.md b/docs/content/showcase/richardsumilang.md deleted file mode 100644 index 8d4e97d09..000000000 --- a/docs/content/showcase/richardsumilang.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -lastmod: 2015-09-08 -date: 2015-09-07T00:12:00-07:00 -description: "Personal website dedicated to electronics, programming, and reviews." -license: "MIT" -licenseLink: "https://opensource.org/licenses/MIT" -sitelink: http://richardsumilang.com/ -sourceLink: https://github.com/richardsumilang-blog -tags: -- personal -- blog -- technical -- electronics -- reviews -thumbnail: /img/richardsumilang-tn.png -title: Richard Sumilang - Top Secret Labs ---- diff --git a/docs/content/showcase/rick-cogley-info.md b/docs/content/showcase/rick-cogley-info.md deleted file mode 100644 index 997a45757..000000000 --- a/docs/content/showcase/rick-cogley-info.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2016-02-01 -date: 2015-05-20T04:32:00Z -description: Rick Cogley's personal site, powered by Hugo. -license: MIT -licenseLink: "" -sitelink: http://rick.cogley.info/ -sourceLink: https://github.com/RickCogley/RCC-Hugo2015 -tags: -- personal -- blog -- rickcogley -- japan -thumbnail: /img/rick_cogley_info-tn.jpg -title: rick.cogley.info ---- diff --git a/docs/content/showcase/ridingbytes.md b/docs/content/showcase/ridingbytes.md deleted file mode 100644 index 29fbb2ecf..000000000 --- a/docs/content/showcase/ridingbytes.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2015-10-01 -date: 2015-09-27T00:00:00Z -description: Official Company Website -license: "" -licenseLink: "" -sitelink: http://ridingbytes.com/ -tags: -- company -- website -- blog -- tech -thumbnail: /img/ridingbytes-tn.png -title: RIDING BYTES ---- - diff --git a/docs/content/showcase/robertbasic.md b/docs/content/showcase/robertbasic.md deleted file mode 100644 index 237fce837..000000000 --- a/docs/content/showcase/robertbasic.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2016-03-26 -date: 2016-03-26T17:47:40+01:00 -description: "Robert Basic is a web developer from Serbia." -license: "" -licenseLink: "" -sitelink: http://robertbasic.com/ -sourceLink: https://github.com/robertbasic/robertbasic.com-hugo -tags: -- personal -- blog -thumbnail: /img/robertbasic-tn.png -title: Robert Basic's blog ---- - diff --git a/docs/content/showcase/sanjay-saxena.md b/docs/content/showcase/sanjay-saxena.md deleted file mode 100644 index df869414d..000000000 --- a/docs/content/showcase/sanjay-saxena.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2017-04-13T07:32:00Z -description: "" -license: "" -licenseLink: "" -sitelink: https://sanjay-saxena.github.io -sourceLink: https://github.com/sanjay-saxena/sanjay-saxena-hugo -tags: -- personal -- blog -thumbnail: /img/sanjay-saxena-tn.png -title: sanjay-saxena.github.io ---- - diff --git a/docs/content/showcase/scottcwilson.md b/docs/content/showcase/scottcwilson.md deleted file mode 100644 index 9d07cf123..000000000 --- a/docs/content/showcase/scottcwilson.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-08-08 -date: 2015-07-21T10:00:00Z -description: Personal portfolio, created with Hugo -license: MIT -licenseLink: "" -sitelink: http://scottcwilson.github.io/ -sourceLink: https://github.com/scottcwilson/hugosite -tags: -- personal -- blog -thumbnail: /img/scottcwilson-tn.png -title: scottcwilson.com ---- - diff --git a/docs/content/showcase/shapeshed.md b/docs/content/showcase/shapeshed.md deleted file mode 100644 index 8e8908d00..000000000 --- a/docs/content/showcase/shapeshed.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-10-10T07:32:00Z -description: Personal blog. -license: "" -licenseLink: "" -sitelink: http://shapeshed.com/ -sourceLink: https://github.com/shapeshed/shapeshed.com -tags: -- personal -- blog -thumbnail: /img/shapeshed-tn.png -title: shapeshed.com ---- - diff --git a/docs/content/showcase/shelan.md b/docs/content/showcase/shelan.md deleted file mode 100644 index 230b7b04f..000000000 --- a/docs/content/showcase/shelan.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2016-02-07 -date: 2016-02-07T10:30:00Z -description: Shelan's Blog -license: MIT -licenseLink: "" -sitelink: http://shelan.org/ -sourceLink: https://github.com/shelan/my-hugo-site -tags: -- personal -- blog -thumbnail: /img/shelan-tn.png -title: shelan.org ---- \ No newline at end of file diff --git a/docs/content/showcase/siba.md b/docs/content/showcase/siba.md deleted file mode 100644 index 21f6f2a5f..000000000 --- a/docs/content/showcase/siba.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -date: 2017-08-01T08:12:00Z -description: "All-in-One Intelligent Bot for Business" -license: "" -licenseLink: "" -sitelink: http://siba.ai/ -tags: -- corporate -- saas -- software -- chatbot -- blog -thumbnail: /img/siba-tn.png -title: Siba Chatbot ---- - diff --git a/docs/content/showcase/silvergeko.md b/docs/content/showcase/silvergeko.md deleted file mode 100644 index 3e0105f30..000000000 --- a/docs/content/showcase/silvergeko.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -date: 2016-03-28T14:16:59+02:00 -description: "Custom theme of small italian software house" -license: "" -licenseLink: "" -sitelink: http://silvergeko.it/ -tags: -- profesional -thumbnail: /img/silvergeko.jpg -title: Silvergeko ---- - diff --git a/docs/content/showcase/softinio.md b/docs/content/showcase/softinio.md deleted file mode 100644 index fdbd5f364..000000000 --- a/docs/content/showcase/softinio.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2016-03-11 -date: 2015-11-29T07:16:53-05:00 -description: Salar Rahmanian Blog -license: MIT -licenseLink: https://raw.githubusercontent.com/softinio/softinio.com/master/LICENSE -sitelink: http://www.softinio.com/ -sourceLink: https://github.com/softinio/softinio.com -tags: -- personal -- technical -- blog -thumbnail: /img/softinio-tn.png -title: Salar Rahmanian ---- diff --git a/docs/content/showcase/spf13.md b/docs/content/showcase/spf13.md deleted file mode 100644 index e0b524255..000000000 --- a/docs/content/showcase/spf13.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2013-07-01T07:32:00Z -description: The first Hugo powered website. -license: MIT -licenseLink: "" -sitelink: http://spf13.com/ -sourceLink: https://github.com/spf13/spf13.com -tags: -- personal -- blog -thumbnail: /img/spf13-tn.jpg -title: spf13.com ---- - diff --git a/docs/content/showcase/steambap.md b/docs/content/showcase/steambap.md deleted file mode 100644 index 439c12e8b..000000000 --- a/docs/content/showcase/steambap.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-07-28T07:32:00Z -description: Weilin's blog -license: MIT -licenseLink: "" -sitelink: http://weilinshi.org/ -sourceLink: https://github.com/steambap/weilinshi.org -tags: -- personal -- blog -thumbnail: /img/steambap.png -title: weilinshi ---- diff --git a/docs/content/showcase/stefano.chiodino.md b/docs/content/showcase/stefano.chiodino.md deleted file mode 100644 index 5880eb9ed..000000000 --- a/docs/content/showcase/stefano.chiodino.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -date: 2016-05-21T21:25:25+01:00 -description: "Personal site + blog" -license: "" -licenseLink: "" -sitelink: https://stefano.chiodino.uk/ -sourceLink: https://github.com/Draga/go-web -tags: -- personal -- blog -thumbnail: /img/stefano.chiodino-tn.jpg -title: stefano.chiodino.uk ---- - diff --git a/docs/content/showcase/stou.md b/docs/content/showcase/stou.md deleted file mode 100644 index ddd4b313b..000000000 --- a/docs/content/showcase/stou.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2014-11-23T01:28:16+07:00 -description: "Rasmus Stougaard" -license: "" -licenseLink: "" -sitelink: http://stou.dk/ -sourceLink: "https://github.com/stou/stou.github.io" -tags: -- personal -- blog -thumbnail: /img/stou-tn.png -title: stou.dk ---- - diff --git a/docs/content/showcase/szymonkatra.md b/docs/content/showcase/szymonkatra.md deleted file mode 100644 index 1be52b94c..000000000 --- a/docs/content/showcase/szymonkatra.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-07-10 -date: 2015-07-10T16:15:00+01:00 -description: Szymon Katra -license: "" -licenseLink: "" -sitelink: http://szymonkatra.github.io/ -sourceLink: https://github.com/SzymonKatra/SzymonKatra.github.io/tree/master/hugo_project -tags: -- personal -- blog -thumbnail: /img/szymonkatra-tn.png -title: szymonkatra.github.io ---- - diff --git a/docs/content/showcase/techmadeplain.md b/docs/content/showcase/techmadeplain.md deleted file mode 100644 index 25712751d..000000000 --- a/docs/content/showcase/techmadeplain.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2015-01-27 -date: 2014-05-22T19:54:00Z -description: Tech Coaching site -license: "" -licenseLink: "" -sitelink: http://techmadeplain.com/ -tags: -- personal -- blog -thumbnail: /img/techmadeplain-tn.jpg -title: Tech Made Plain ---- - diff --git a/docs/content/showcase/tendermint.md b/docs/content/showcase/tendermint.md deleted file mode 100644 index d95e3c090..000000000 --- a/docs/content/showcase/tendermint.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2014-08-26 -date: 2014-08-26T09:34:42-04:00 -description: "" -license: "" -licenseLink: "" -sitelink: http://tendermint.com/ -sourceLink: https://github.com/tendermint/tendermint.github.io -tags: -- project -thumbnail: /img/tendermint-tn.jpg -title: tendermint ---- - diff --git a/docs/content/showcase/thecodeking.md b/docs/content/showcase/thecodeking.md deleted file mode 100644 index 86786d736..000000000 --- a/docs/content/showcase/thecodeking.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-10-09T23:06:16+01:00 -description: "Personal site for articles and projects." -license: "" -licenseLink: "" -sitelink: http://thecodeking.co.uk -tags: -- personal -- blog -thumbnail: /img/thecodeking-tn.jpg -title: thecodeking ---- - diff --git a/docs/content/showcase/thehome.md b/docs/content/showcase/thehome.md deleted file mode 100644 index 1db5706f3..000000000 --- a/docs/content/showcase/thehome.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2015-08-08 -date: 2014-12-27T20:00:00+07:00 -description: "Tom Helmer Hansen" -license: "" -licenseLink: "" -sitelink: http://www.thehome.dk/ -sourceLink: "https://github.com/tomhelmer/website-source" -tags: -- personal -- blog -thumbnail: /img/thehome-tn.png -title: thehome.dk ---- - diff --git a/docs/content/showcase/thislittleduck.md b/docs/content/showcase/thislittleduck.md deleted file mode 100644 index 295b9cd32..000000000 --- a/docs/content/showcase/thislittleduck.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -date: 2017-06-04T21:30:00+10:00 -description: "Software company website" -sitelink: https://thislittleduck.com -tags: -- business -- portfolio -thumbnail: /img/thislittleduck-tn.png -title: This Little Duck ---- - diff --git a/docs/content/showcase/tibobeijen.nl.md b/docs/content/showcase/tibobeijen.nl.md deleted file mode 100644 index 37db6491b..000000000 --- a/docs/content/showcase/tibobeijen.nl.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -date: 2017-03-18T11:30:00Z -description: "Blog of programmer Tibo Beijen" -license: "" -licenseLink: "" -sitelink: https://www.tibobeijen.nl/ -sourceLink: https://github.com/TBeijen/tbnl-hugo -tags: -- personal -- programming -- blog -thumbnail: /img/tibobeijen-nl-tn.png -title: tibobeijen.nl ---- - diff --git a/docs/content/showcase/ttsreader.md b/docs/content/showcase/ttsreader.md deleted file mode 100644 index 90f02763b..000000000 --- a/docs/content/showcase/ttsreader.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -date: 2017-05-19T07:32:00Z -description: "Online Text to Speech App and Content" -license: "" -licenseLink: "" -sitelink: http://ttsreader.com/ -tags: -- text to speech -- app -- blog -- showcase -- company -thumbnail: /img/ttsreader-tn.png -title: TTSReader ---- diff --git a/docs/content/showcase/tutorialonfly.md b/docs/content/showcase/tutorialonfly.md deleted file mode 100644 index 7c975aaa9..000000000 --- a/docs/content/showcase/tutorialonfly.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2016-04-15 -date: 2016-04-15T01:28:16+08:00 -description: "Tutorialonfly.com provide free tutorials in gitbook version online and pdf,epub,mobi etc for offline read, it's a great website built on hugo, thanks spf13 who created hugo" -license: "" -licenseLink: "" -sitelink: https://tutorialonfly.com/ -tags: -- tutorials -- free -- ebook download -- fast -thumbnail: /img/tutorialonfly-tn.jpg -title: Tutorialonfly ---- \ No newline at end of file diff --git a/docs/content/showcase/tutswiki.md b/docs/content/showcase/tutswiki.md deleted file mode 100644 index 72bd65844..000000000 --- a/docs/content/showcase/tutswiki.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -lastmod: 2017-05-23 -date: 2017-05-23T07:33:00Z -description: "Collaborative tutorials for the internet" -license: "" -licenseLink: "" -sitelink: https://tutswiki.com/ -sourceLink: https://github.com/TutsWiki/source -tags: -- tutorial -- wiki -- computer science -- programming -- documentation -- books -thumbnail: /img/tutswiki-tn.jpg -title: TutsWiki.com ---- - diff --git a/docs/content/showcase/ucsb.md b/docs/content/showcase/ucsb.md deleted file mode 100644 index 9f9ff77e7..000000000 --- a/docs/content/showcase/ucsb.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2014-11-25 -date: 2014-08-26T14:12:55-04:00 -description: "" -license: "" -licenseLink: "" -sitelink: http://philosophy.ucsb.edu/ -sourceLink: https://github.com/ucsbphil/philweb -tags: -- education -thumbnail: /img/ucsb-tn.jpg -title: ucsb ---- - diff --git a/docs/content/showcase/upbeat.md b/docs/content/showcase/upbeat.md deleted file mode 100644 index 7c5b0fe57..000000000 --- a/docs/content/showcase/upbeat.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-06-12T11:57:53+02:00 -description: "Blog by Rocchi Cesare" -license: "" -licenseLink: "" -sitelink: http://upbeat.it/ -sourceLink: -tags: -- personal -- blog -thumbnail: /img/upbeat.png -title: upbeat ---- diff --git a/docs/content/showcase/vamp.md b/docs/content/showcase/vamp.md deleted file mode 100644 index a2591dbb8..000000000 --- a/docs/content/showcase/vamp.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2015-08-08 -date: 2014-06-26T15:45:00Z -description: Vamp.io microservices platform homepage and documentation -license: "Apache 2" -licenseLink: "" -sitelink: http://vamp.io/ -tags: -- tech -- documentation -- company -- api -thumbnail: /img/vamp_landingpage-tn.png -title: Vamp.io ---- - diff --git a/docs/content/showcase/viglug.org.md b/docs/content/showcase/viglug.org.md deleted file mode 100644 index a9e78290a..000000000 --- a/docs/content/showcase/viglug.org.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2016-03-01 -date: 2016-03-01T11:20:00Z -description: ViGLug.org is the website of the Linux User Group of Milan Est (Italy) -license: "AGPLv3" -licenseLink: "" -sitelink: http://viglug.org/ -tags: -- tech -- linux -- user group -thumbnail: /img/viglug-tn.png -title: Viglug.org ---- - diff --git a/docs/content/showcase/vurt.co.md b/docs/content/showcase/vurt.co.md deleted file mode 100644 index 6da6aa09d..000000000 --- a/docs/content/showcase/vurt.co.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -lastmod: 2014-08-26 -date: 2014-08-26T12:09:39-04:00 -description: "" -license: "" -licenseLink: "" -sitelink: http://vurt.co.uk/ -sourceLink: https://github.com/gilesp/vurtcouk -tags: -- personal -- blog -thumbnail: /img/vurt.co-tn.jpg -title: vurt.co.uk ---- - diff --git a/docs/content/showcase/worldtowriters.md b/docs/content/showcase/worldtowriters.md deleted file mode 100644 index d28fc3e43..000000000 --- a/docs/content/showcase/worldtowriters.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2017-05-12 -date: 2017-05-12T22:00:00Z -description: "A translation service agency site" -license: MIT -licenseLink: "" -sitelink: https://worldtowriters.com -tags: -- company -- translation -thumbnail: /img/worldtowriters-com.jpg -title: World to Writers translation site ---- - diff --git a/docs/content/showcase/yslow-rules.md b/docs/content/showcase/yslow-rules.md deleted file mode 100644 index ccc84bfbb..000000000 --- a/docs/content/showcase/yslow-rules.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -lastmod: 2015-08-08 -date: 2014-04-07T10:45:00Z -description: Community project of YSlow rules translations -license: MIT License -licenseLink: https://raw.github.com/checkmyws/yslow-rules/master/LICENSE -sitelink: http://checkmyws.github.io/yslow-rules/ -sourceLink: https://github.com/checkmyws/yslow-rules -tags: -- community -- documentation -- translation -thumbnail: /img/yslow-rules-tn.png -title: YSlow Rules ---- - diff --git a/docs/content/showcase/ysqi.md b/docs/content/showcase/ysqi.md deleted file mode 100644 index 56bf06bd1..000000000 --- a/docs/content/showcase/ysqi.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: 2016-03-25T09:05:49+08:00 -description: "虞双齐个人博客" -license: "MIT" -licenseLink: "https://opensource.org/licenses/MIT" -sitelink: https://www.yushuangqi.com/ -sourceLink: https://github.com/ysqi/yushuangqi.com/ -tags: -- personal -- blog -thumbnail: /img/ysqi-blog.png -title: yushuangqi-blog ---- diff --git a/docs/content/showcase/yulinling.net.md b/docs/content/showcase/yulinling.net.md deleted file mode 100644 index b5a6559f1..000000000 --- a/docs/content/showcase/yulinling.net.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -lastmod: 2015-12-19 -date: 2015-09-09T21:42:00-04:00 -description: Multilingual, blog -license: "" -licenseLink: "" -sitelink: https://yulinling.net/ -sourceLink: https://bitbucket.org/lynxiayel/yulinling_source_public -tags: -- blog -- documentation -thumbnail: /img/yulinling-tn.jpg -title: 语林灵 (Yulinling) ---- diff --git a/docs/content/taxonomies/displaying.md b/docs/content/taxonomies/displaying.md deleted file mode 100644 index 43dd48ba8..000000000 --- a/docs/content/taxonomies/displaying.md +++ /dev/null @@ -1,137 +0,0 @@ ---- -aliases: -- /indexes/displaying/ -lastmod: 2016-06-29 -date: 2013-07-01 -linktitle: Displaying -menu: - main: - parent: taxonomy -next: /taxonomies/templates -prev: /taxonomies/usage -title: Displaying Taxonomies -weight: 20 -toc: true ---- - -There are four common ways you can display the data in your -taxonomies in addition to the automatic taxonomy pages created by hugo -using the [list templates](/templates/list/): - -1. For a given piece of content, you can list the terms attached -2. For a given piece of content, you can list other content with the same - term -3. You can list all terms for a taxonomy -4. You can list all taxonomies (with their terms) - -## 1. Displaying taxonomy terms assigned to this content - -Within your content templates, you may wish to display -the taxonomies that that piece of content is assigned to. - -Because we are leveraging the front matter system to -define taxonomies for content, the taxonomies assigned to -each content piece are located in the usual place -(.Params.`plural`). - -### Example - -
    - {{ range .Params.tags }} -
  • {{ . }}
  • - {{ end }} -
- -If you want to list taxonomies inline, you will have to take -care of optional plural ending in the title (if multiple taxonomies), -as well as commas. Let's say we have a taxonomy "directors" such as -`directors: [ "Joel Coen", "Ethan Coen" ]` in the TOML-format front matter. -To list such taxonomy use the following: - -### Example - - {{ if .Params.directors }} - Director{{ if gt (len .Params.directors) 1 }}s{{ end }}: - {{ range $index, $director := .Params.directors }}{{ if gt $index 0 }}, {{ end }}{{ . }}{{ end }} - {{ end }} - -Alternatively, you may use the [delimit]({{< relref "templates/functions.md#delimit" >}}) -template function as a shortcut if the taxonomies should just be listed -with a separator. See {{< gh 2143 >}} on GitHub for discussion. - -## 2. Listing content with the same taxonomy term - -First, you may be asking why you would use this. If you are using a -taxonomy for something like a series of posts, this is exactly how you -would do it. It’s also an quick and dirty way to show some related -content. - - -### Example - - - -## 3. Listing all content in a given taxonomy - -This would be very useful in a sidebar as “featured content”. You could -even have different sections of “featured content” by assigning -different terms to the content. - -### Example - - - - -## 4. Rendering a Site's Taxonomies - -If you wish to display the list of all keys for a taxonomy, you can find retrieve -them from the `.Site` variable which is available on every page. - -This may take the form of a tag cloud, a menu or simply a list. - -The following example displays all tag keys: - -### Example - -
    - {{ range $name, $taxonomy := .Site.Taxonomies.tags }} -
  • {{ $name }}
  • - {{ end }} -
- -### Complete Example -This example will list all taxonomies, each of their keys and all the content assigned to each key. - -
-
    - {{ range $taxonomyname, $taxonomy := .Site.Taxonomies }} -
  • {{ $taxonomyname }} -
      - {{ range $key, $value := $taxonomy }} -
    • {{ $key }}
    • - - {{ end }} -
    -
  • - {{ end }} -
-
diff --git a/docs/content/taxonomies/methods.md b/docs/content/taxonomies/methods.md deleted file mode 100644 index c5b9e755b..000000000 --- a/docs/content/taxonomies/methods.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -lastmod: 2015-12-23 -date: 2014-05-26 -linktitle: Structure & Methods -menu: - main: - parent: taxonomy -next: /extras/aliases -prev: /taxonomies/ordering -title: Using Taxonomies -weight: 75 ---- - -Hugo makes a set of values and methods available on the various Taxonomy structures. - -## Taxonomy Methods - -A Taxonomy is a `map[string]WeightedPages`. - -.Get(term) -: Returns the WeightedPages for a term. - -.Count(term) -: The number of pieces of content assigned to this term. - -.Alphabetical -: Returns an OrderedTaxonomy (slice) ordered by Term. - -.ByCount -: Returns an OrderedTaxonomy (slice) ordered by number of entries. - -## OrderedTaxonomy - -Since Maps are unordered, an OrderedTaxonomy is a special structure that has a defined order. - -```go -[]struct { - Name string - WeightedPages WeightedPages -} -``` - -Each element of the slice has: - -.Term -: The Term used. - -.WeightedPages -: A slice of Weighted Pages. - -.Count -: The number of pieces of content assigned to this term. - -.Pages -: All Pages assigned to this term. All [list methods](/templates/list/) are available to this. - -## WeightedPages - -WeightedPages is simply a slice of WeightedPage. - -```go -type WeightedPages []WeightedPage -``` - -.Count(term) -: The number of pieces of content assigned to this term. - -.Pages -: Returns a slice of pages, which then can be ordered using any of the [list methods](/templates/list/). diff --git a/docs/content/taxonomies/ordering.md b/docs/content/taxonomies/ordering.md deleted file mode 100644 index ac86bc69d..000000000 --- a/docs/content/taxonomies/ordering.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -aliases: -- /indexes/ordering/ -lastmod: 2015-12-23 -date: 2013-07-01 -linktitle: Ordering -menu: - main: - identifier: Ordering Taxonomies - parent: taxonomy -next: /taxonomies/methods -prev: /taxonomies/templates -title: Ordering Taxonomies -weight: 60 -toc: true ---- - -Hugo provides the ability to both: - - 1. Order the way the keys for a taxonomy are displayed - 2. Order the way taxonomyed content appears - - -## Ordering Taxonomies -Taxonomies can be ordered by either alphabetical key or by the number of content pieces assigned to that key. - -### Order Alphabetically Example - -
    - {{ $data := .Data }} - {{ range $key, $value := .Data.Taxonomy.Alphabetical }} -
  • {{ $value.Name }} {{ $value.Count }}
  • - {{ end }} -
- -### Order by Popularity Example - -
    - {{ $data := .Data }} - {{ range $key, $value := .Data.Taxonomy.ByCount }} -
  • {{ $value.Name }} {{ $value.Count }}
  • - {{ end }} -
- - -[See Also Taxonomy Lists]({{< relref "templates/list.md" >}}) - -## Ordering Content within Taxonomies - -Hugo uses both **Date** and **Weight** to order content within taxonomies. - -Each piece of content in Hugo can optionally be assigned a date. -It can also be assigned a weight for each taxonomy it is assigned to. - -When iterating over content within taxonomies the default sort is first by weight then by date. This means that if the weights for two pieces of content are the same, than the more recent content will be displayed first. The default weight for any piece of content is 0. - -### Assigning Weight - -Content can be assigned weight for each taxonomy that it's assigned to. - -```toml -+++ -tags = [ "a", "b", "c" ] -tags_weight = 22 -categories = ["d"] -title = "foo" -categories_weight = 44 -+++ -Front Matter with weighted tags and categories -``` - -The convention is `taxonomyname_weight`. - -In the above example, this piece of content has a weight of 22 which applies to the sorting when rendering the pages assigned to the "a", "b" and "c" values of the 'tag' taxonomy. - -It has also been assigned the weight of 44 when rendering the 'd' category. - -With this the same piece of content can appear in different positions in different taxonomies. - -Currently taxonomies only support the default ordering of content which is weight -> date. diff --git a/docs/content/taxonomies/overview.md b/docs/content/taxonomies/overview.md deleted file mode 100644 index a01e63980..000000000 --- a/docs/content/taxonomies/overview.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -aliases: -- /indexes/overview/ -- /doc/indexes/ -- /extras/indexes -lastmod: 2015-08-04 -date: 2013-07-01 -linktitle: Overview -menu: - main: - identifier: taxonomy overview - parent: taxonomy -next: /taxonomies/usage -prev: /templates/404 -title: Taxonomy Overview -weight: 10 ---- - -Hugo includes support for user-defined groupings of content called -taxonomies.[^1] Taxonomies give us a way to classify our content so we can -demonstrate relationships in a variety of logical ways. - -[^1]: Taxonomies were called *indexes* in Hugo prior to v0.11. - -The default taxonomies for Hugo are *tags* and *categories*. These -taxonomies are common to many website systems (e.g. WordPress, Drupal, -Jekyll). Unlike all of those systems, Hugo makes it trivial to customize -the taxonomies you will be using for your site however you wish. Another -good use for taxonomies is to group a set of posts into a series. Other -common uses would include *categories*, *tags*, *groups*, *series* and many -more. - -When taxonomies are used (and templates are provided), Hugo will -automatically create pages listing all of the taxonomies, their terms -and all of the content attached to those terms. - -## Definitions - -**Taxonomy:** A categorization that can be used to classify content - -**Term:** A key within that taxonomy - -**Value:** A piece of content assigned to that Term - -## Example - -For example, if I was writing about movies, I may want the following -taxonomies: - -* Actors -* Directors -* Studios -* Genre -* Year -* Awards - -I would then specify in each movie’s front-matter the specific terms for -each of those taxonomies. Hugo would then automatically create pages for -each Actor, Director, Studio, Genre, Year and Award listing all of the -Movies that matched that specific Actor, Director, etc. - - -### Taxonomy Organization - -Let’s use an example to demonstrate the different labels in action. -From the perspective of the taxonomy, it could be visualized as: - - Actor <- Taxonomy - Bruce Willis <- Term - The Six Sense <- Content - Unbreakable <- Content - Moonrise Kingdom <- Content - Samuel L. Jackson <- Term - Unbreakable <- Content - The Avengers <- Content - xXx <- Content - -From the perspective of the content, it would appear differently, though -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 - ... - diff --git a/docs/content/taxonomies/templates.md b/docs/content/taxonomies/templates.md deleted file mode 100644 index 0a44d5b19..000000000 --- a/docs/content/taxonomies/templates.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -aliases: -- /indexes/templates/ -lastmod: 2014-05-29 -date: 2013-07-01 -linktitle: Templates -menu: - main: - parent: taxonomy -next: /taxonomies/ordering -prev: /templates/displaying -title: Taxonomy Templates -weight: 30 ---- - -There are two different templates that the use of taxonomies will require you to provide. - -Both templates are covered in detail in the templates section. - -A [list template](/templates/list/) is any template that will be used to render multiple pieces of -content in a single html page. This template will be used to generate -all the automatically created taxonomy pages. - -A [taxonomy terms template](/templates/terms/) is a template used to -generate the list of terms for a given template. - diff --git a/docs/content/taxonomies/usage.md b/docs/content/taxonomies/usage.md deleted file mode 100644 index 9c5dc2189..000000000 --- a/docs/content/taxonomies/usage.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -lastmod: 2015-12-23 -date: 2014-05-26 -linktitle: Usage -toc: true -menu: - main: - parent: taxonomy -next: /taxonomies/displaying -prev: /taxonomies/overview -title: Using Taxonomies -weight: 15 ---- - -## Defining taxonomies for a site - -Taxonomies must be defined in the site configuration before they can be -used throughout the site. You need to provide both the plural and -singular labels for each taxonomy. - -Here is an example configuration in TOML and YAML -that specifies three taxonomies (the default two, plus `series`). - -Notice the format is singular key = "plural value" for TOML, -or singular key: "plural value" for YAML: - - - - - - - - - - - - - -
config.toml excerpt:config.yaml excerpt:
[taxonomies]
-tag = "tags"
-category = "categories"
-series = "series"
-
taxonomies:
-  tag: "tags"
-  category: "categories"
-  series: "series"
-
- -## Assigning taxonomy values to content - -Once an taxonomy is defined at the site level, any piece of content -can be assigned to it regardless of content type or section. - -Assigning content to an 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 this content. - -## Preserving taxonomy values - -By default, taxonomy names are hyphenated, lower-cased and normalized, and then -fixed and titleized on the archive page. - -However, if you want to have a taxonomy value with special characters -such as `Gérard Depardieu` instead of `Gerard Depardieu`, -you need to set the `preserveTaxonomyNames` [site configuration](/overview/configuration/) variable to `true`. -Hugo will then preserve special characters in taxonomy values -but will still titleize 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. - -## Front Matter Example (in TOML) - -```toml -+++ -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" -+++ -``` - -## Front Matter Example (in JSON) - -```json -{ - "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" -} -``` - -## Add content file with frontmatter - -See [Source Organization]({{< relref "overview/source-directory.md#content-for-home-page-and-other-list-pages" >}}). diff --git a/docs/content/templates/404.md b/docs/content/templates/404.md deleted file mode 100644 index 0dc2e2c9c..000000000 --- a/docs/content/templates/404.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -aliases: -- /layout/404/ -lastmod: 2015-12-30 -date: 2013-08-21 -linktitle: "Custom 404 page" -menu: - main: - parent: layout -next: /taxonomies/overview -notoc: true -next: /templates/debugging -prev: /templates/sitemap -title: 404.html Templates -weight: 100 ---- - -When using Hugo with [GitHub Pages](http://pages.github.com/), you can provide -your own template for a [custom 404 error page](https://help.github.com/articles/custom-404-pages/) -by creating a 404.html template file in your `/layouts` folder. -When Hugo generates your site, the `404.html` file will be placed in the root. - -404 pages will have all the regular [page -variables](/layout/variables/) available to use in the templates. - -In addition to the standard page variables, the 404 page has access to -all site content accessible from `.Data.Pages`. - - ▾ layouts/ - 404.html - -## 404.html - -This is a basic example of a 404.html template: - - {{ partial "header.html" . }} - {{ partial "subheader.html" . }} - -
-
-

{{ .Title }}

-
-
- - {{ partial "footer.html" . }} - -### Automatic Loading - -Your 404.html file can be set to load automatically when a visitor enters a mistaken URL path, dependent upon the web serving environment you are using. For example: - -* _GitHub Pages_ - it's automatic. -* _Apache_ - one way is to specify `ErrorDocument 404 /404.html` in an `.htaccess` file in the root of your site. -* _Nginx_ - you might specify `error_page 404 = /404.html;` in your `nginx.conf` file. -* _Amazon AWS S3_ - when setting a bucket up for static web serving, you can specify the error file. -* _Caddy Server_ - using `errors { 404 /404.html }`. [Details here](https://caddyserver.com/docs/errors) diff --git a/docs/content/templates/ace.md b/docs/content/templates/ace.md deleted file mode 100644 index 1bd85796a..000000000 --- a/docs/content/templates/ace.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -aliases: -- /doc/templates/ace -- /layout/templates/ace -- /layout/ace/ -lastmod: 2015-08-04 -date: 2014-04-20 -linktitle: Ace templates -menu: - main: - parent: layout -next: /templates/functions -prev: /templates/go-templates -title: Ace Templates -weight: 17 ---- - -In addition to [Go templates](/templates/go-templates) and [Amber](/templates/amber) templates, Hugo supports the powerful Ace templates. - -For template documentation, follow the links from the [Ace project](https://github.com/yosssi/ace). - -* Ace templates must be named with the ace-suffix, e.g. `list.ace` -* It's possible to use both Go templates and Ace templates side-by-side, and include one into the other -* Full Go template syntax support, including all the useful helper funcs -* Partials can be included both with the Ace and the Go template syntax: - * `= include partials/foo.html .`[^ace-theme] - * `{{ partial "foo" . }}` - - -One noticeable difference between Ace and the others is the inheritance support through [base and inner templates](https://github.com/yosssi/ace/tree/master/examples/base_inner_template). - -In Hugo the base template will be chosen with the same ruleset as for [Go templates](/templates/blocks/). - - -.: -index.ace - -./blog: -single.ace -baseof.ace - -./_default: -baseof.ace list.ace single.ace single-baseof.ace -``` - -Some examples for the layout files above: - -* Home page: `./index.ace` + `./_default/baseof.ace` -* Single page in the `blog` section: `./blog/single.ace` + `./blog/baseof.ace` -* Single page in another section: `./_default/single.ace` + `./_default/single-baseof.ace` -* Taxonomy page in any section: `./_default/list.ace` + `./_default/baseof.ace` - -**Note:** In most cases one `baseof.ace` in `_default` will suffice. -**Note:** An Ace template without a reference to a base section, e.g. `= content`, will be handled as a standalone template. - - -[^ace-theme]: Note that the `html` suffix is needed, even if the filename is suffixed `ace`. This does not work from inside a theme, see [issue 763](https://github.com/gohugoio/hugo/issues/763). - diff --git a/docs/content/templates/amber.md b/docs/content/templates/amber.md deleted file mode 100644 index 2ba84353b..000000000 --- a/docs/content/templates/amber.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -aliases: -- /doc/templates/amber -- /layout/templates/amber -- /layout/amber/ -lastmod: 2015-11-05 -date: 2015-07-20 -linktitle: Amber templates -menu: - main: - parent: layout -next: /templates/functions -prev: /templates/go-templates -title: Amber Templates -weight: 18 ---- - -Amber templates are another template type which Hugo supports, in addition to [Go templates](/templates/go-templates) and [Ace templates]({{< relref "templates/ace.md" >}}) templates. - -For template documentation, follow the links from the [Amber project](https://github.com/eknkc/amber) - -* Amber templates must be named with the amber-suffix, e.g. `list.amber` -* Partials in Amber or HTML can be included with the Amber template syntax: - * `import ../partials/test.html ` - * `import ../partials/test_a.amber ` - - diff --git a/docs/content/templates/blocks.md b/docs/content/templates/blocks.md deleted file mode 100644 index f80a3d908..000000000 --- a/docs/content/templates/blocks.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -date: 2016-03-29T21:26:20-05:00 -menu: - main: - parent: layout -prev: /templates/views/ -next: /templates/partials/ -title: Block Templates -weight: 80 ---- - -The `block` keyword in Go templates allows you to define the outer shell of your pages one or more master template(s), filling in or overriding portions as necessary. - -## Base template lookup - -In version `0.20` Hugo introduced custom [Output Formats]({{< relref "extras/output-formats.md" >}}), all of which can have their own templates that also can use a base template if needed. - -This introduced two new terms relevant in the lookup of the templates, the media type's `Suffix` and the output format's `Name`. - -Given the above, Hugo tries to use the most specific base tamplate it finds: - -1. /layouts/_current-path_/_template-name_-baseof.[output-format].[suffix], e.g. list-baseof.amp.html. -1. /layouts/_current-path_/_template-name_-baseof.[suffix], e.g. list-baseof.html. -2. /layouts/_current-path_/baseof.[output-format].[suffix], e.g baseof.amp.html -2. /layouts/_current-path_/baseof.[suffix], e.g baseof.html -3. /layouts/_default/_template-name_-baseof.[output-format].[suffix] e.g. list-baseof.amp.html. -3. /layouts/_default/_template-name_-baseof.[suffix], e.g. list-baseof.html. -4. /layouts/_default/baseof.[output-format].[suffix] -4. /layouts/_default/baseof.[suffix] - -For each of the steps above, it will first look in the project, then, if theme is set, in the theme's layouts folder. Hugo picks the first base template found. - -As an example, with a site using the theme `exampletheme`, when rendering the section list for the section `post` for the output format `Calendar`. Hugo picks the `section/post.calendar.ics` as the template and this template has a `define` section that indicates it needs a base template. This is then the lookup order: - -1. `/layouts/section/post-baseof.calendar.ics` -1. `/layouts/section/post-baseof.ics` -2. `/themes/exampletheme/layouts/section/post-baseof.calendar.ics` -2. `/themes/exampletheme/layouts/section/post-baseof.ics` -3. `/layouts/section/baseof.calendar.ics` -3. `/layouts/section/baseof.ics` -4. `/themes/exampletheme/layouts/section/baseof.calendar.ics` -4. `/themes/exampletheme/layouts/section/baseof.ics` -5. `/layouts/_default/post-baseof.calendar.ics` -5. `/layouts/_default/post-baseof.ics` -6. `/themes/exampletheme/layouts/_default/post-baseof.calendar.ics` -6. `/themes/exampletheme/layouts/_default/post-baseof.ics` -7. `/layouts/_default/baseof.calendar.ics` -7. `/layouts/_default/baseof.ics` -8. `/themes/exampletheme/layouts/_default/baseof.calendar.ics` -8. `/themes/exampletheme/layouts/_default/baseof.ics` - - -## Define the base template - -Let's define a simple base template (`_default/baseof.html`), a shell from which all our pages will start. - -```html - - - - - {{ block "title" . }} - <!-- Blocks may include default content. --> - {{ .Site.Title }} - {{ end }} - - - - - {{ block "main" . }} - - {{ end }} - - - - -``` - -## Overriding the base - -Your [default list template]({{< relref "templates/list.md" >}}) (`_default/list.html`) will inherit all of the code defined in the base template. It could then implement its own "main" block from the base template above like so: - -```html - -{{ define "main" }} -

Posts

- {{ range .Data.Pages }} -
-

{{ .Title }}

- {{ .Content }} -
- {{ end }} -{{ end }} -``` - -This replaces the contents of our (basically empty) "main" block with something useful for the list template. In this case, we didn't define a "title" block so the contents from our base template remain unchanged in lists. - -In our [default single template]({{< relref "templates/content.md" >}}) (`_default/single.html`), let's implement both blocks: - -```html -{{ define "title" }} - {{ .Title }} – {{ .Site.Title }} -{{ end }} -{{ define "main" }} -

{{ .Title }}

- {{ .Content }} -{{ end }} -``` - -This overrides both block areas from the base template with code unique to our single template. diff --git a/docs/content/templates/content.md b/docs/content/templates/content.md deleted file mode 100644 index 24d1782ad..000000000 --- a/docs/content/templates/content.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -aliases: -- /layout/content/ -lastmod: 2015-05-22 -date: 2013-07-01 -linktitle: Single Content -menu: - main: - parent: layout -next: /templates/list -prev: /templates/variables -title: Single Content Template -weight: 30 -toc: true ---- - -The primary view of content in Hugo is the single view. Hugo, for every -Markdown file provided, will render it with a single template. - - -## Which Template will be rendered? -Hugo uses a set of rules to figure out which template to use when -rendering a specific page. - -Hugo will use the following prioritized list. If a file isn’t present, -then the next one in the list will be used. This enables you to craft -specific layouts when you want to without creating more templates -than necessary. For most sites, only the `_default` file at the end of -the list will be needed. - -Users can specify the `type` and `layout` in the [front-matter](/content/front-matter/). `Section` -is determined based on the content file’s location. If `type` is provided, -it will be used instead of `section`. - -### Single Page - -* /layouts/`TYPE`/`LAYOUT`.html -* /layouts/`SECTION`/`LAYOUT`.html -* /layouts/`TYPE`/single.html -* /layouts/`SECTION`/single.html -* /layouts/_default/single.html -* /themes/`THEME`/layouts/`TYPE`/`LAYOUT`.html -* /themes/`THEME`/layouts/`SECTION`/`LAYOUT`.html -* /themes/`THEME`/layouts/`TYPE`/single.html -* /themes/`THEME`/layouts/`SECTION`/single.html -* /themes/`THEME`/layouts/_default/single.html - -## Example Single Template File - -Content pages are of the type "page" and have all the [page -variables](/layout/variables/) and [site -variables](/templates/variables/) available to use in the templates. - -In the following examples we have created two different content types as well as -a default content type. - -The default content template to be used in the event that a specific -template has not been provided for that type. The default type works the -same as the other types, but the directory must be called "\_default". - - ▾ layouts/ - ▾ _default/ - single.html - ▾ post/ - single.html - ▾ project/ - single.html - - -### post/single.html -This content template is used for [spf13.com](http://spf13.com/). -It makes use of [partial templates](/templates/partials/) - - {{ partial "header.html" . }} - {{ partial "subheader.html" . }} - {{ $baseURL := .Site.BaseURL }} - -
-

{{ .Title }}

-
-
- {{ .Content }} -
-
-
- - - - {{ partial "disqus.html" . }} - {{ partial "footer.html" . }} - - -### project/single.html -This content template is used for [spf13.com](http://spf13.com/). -It makes use of [partial templates](/templates/partials/) - - - {{ partial "header.html" . }} - {{ partial "subheader.html" . }} - {{ $baseURL := .Site.BaseURL }} - -
-

{{ .Title }}

-
-
- {{ .Content }} -
-
-
- - - - {{if isset .Params "project_url" }} - - {{ end }} - - {{ partial "footer.html" . }} - -Notice how the project/single.html template uses an additional parameter unique -to this template. This doesn't need to be defined ahead of time. If the key is -present in the front matter than it can be used in the template. To -easily generate new content of this type with these keys ready use -[content archetypes](/content/archetypes/). diff --git a/docs/content/templates/debugging.md b/docs/content/templates/debugging.md deleted file mode 100644 index ae348f533..000000000 --- a/docs/content/templates/debugging.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -aliases: -- /doc/debugging/ -- /layout/debugging/ -lastmod: 2015-05-25 -date: 2015-05-22 -linktitle: Debugging -menu: - main: - parent: layout -prev: /templates/404 -title: Template Debugging -weight: 110 ---- - - -# Template Debugging - -Here are some snippets you can add to your template to answer some common questions. -These snippets use the `printf` function available in all Go templates. This function is -an alias to the Go function, [fmt.Printf](http://golang.org/pkg/fmt/). - - -### What variables are available in this context? - -You can use the template syntax, `$.`, to get the top-level template context -from anywhere in your template. This will print out all the values under, `.Site`. - - {{ printf "%#v" $.Site }} - -This will print out the value of `.Permalink`: - - {{ printf "%#v" .Permalink }} - -This will print out a list of all the variables scoped to the current context -(a.k.a. The dot, "`.`"). - - {{ printf "%#v" . }} - -When writing a [Homepage](/templates/homepage), what does one of the pages -you're looping through look like? - -``` -{{ range .Data.Pages }} - {{/* The context, ".", is now a Page */}} - {{ printf "%#v" . }} -{{ end }} -``` - -### Why do I have no variables defined? - -Check that you are passing variables in the `partial` function. For example - -``` -{{ partial "header" }} -``` - -will render the header partial, but the header partial will not have access to any variables. You need to pass variables explicitly. For example: - -``` -{{ partial "header" . }} -``` diff --git a/docs/content/templates/functions.md b/docs/content/templates/functions.md deleted file mode 100644 index 0c6968bd2..000000000 --- a/docs/content/templates/functions.md +++ /dev/null @@ -1,1088 +0,0 @@ ---- -aliases: -- /layout/functions/ -lastmod: 2015-09-20 -date: 2013-07-01 -linktitle: Functions -toc: true -menu: - main: - parent: layout -next: /templates/variables -prev: /templates/go-templates -title: Hugo Template Functions -weight: 20 ---- - -Hugo uses the excellent Go html/template library for its template engine. -It is an extremely lightweight engine that provides a very small amount of -logic. In our experience, it is just the right amount of logic to be able -to create a good static website. - -Go templates are lightweight but extensible. Hugo has added the following -functions to the basic template logic. - -(Go itself supplies built-in functions, including comparison operators -and other basic tools; these are listed in the -[Go template documentation](http://golang.org/pkg/text/template/#hdr-Functions).) - -## General - -### default -Checks whether a given value is set and returns a default value if it is not. -"Set" in this context means non-zero for numeric types and times; -non-zero length for strings, arrays, slices, and maps; -any boolean or struct value; or non-nil for any other types. - -e.g. - - {{ index .Params "font" | default "Roboto" }} → default is "Roboto" - {{ default "Roboto" (index .Params "font") }} → default is "Roboto" - -### delimit -Loops through any array, slice or map and returns a string of all the values separated by the delimiter. There is an optional third parameter that lets you choose a different delimiter to go between the last two values. -Maps will be sorted by the keys, and only a slice of the values will be returned, keeping a consistent output order. - -Works on [lists](/templates/list/), [taxonomies](/taxonomies/displaying/), [terms](/templates/terms/), [groups](/templates/list/) - -e.g. - - // Front matter - +++ - tags: [ "tag1", "tag2", "tag3" ] - +++ - - // Used anywhere in a template - Tags: {{ delimit .Params.tags ", " }} - - // Outputs Tags: tag1, tag2, tag3 - - // Example with the optional "last" parameter - Tags: {{ delimit .Params.tags ", " " and " }} - - // Outputs Tags: tag1, tag2 and tag3 - -### dict -Creates a dictionary `(map[string, interface{})`, expects parameters added in value:object fashion. -Invalid combinations like keys that are not strings or uneven number of parameters, will result in an exception thrown. -Useful for passing maps to partials when adding to a template. - -e.g. Pass into "foo.html" a map with the keys "important, content" - - {{$important := .Site.Params.SomethingImportant }} - {{range .Site.Params.Bar}} - {{partial "foo" (dict "content" . "important" $important)}} - {{end}} - -"foo.html" - - Important {{.important}} - {{.content}} - -or create a map on the fly to pass into - - {{partial "foo" (dict "important" "Smiles" "content" "You should do more")}} - - - -### slice - -`slice` allows you to create an array (`[]interface{}`) of all arguments that you pass to this function. - -One use case is the concatenation of elements in combination with `delimit`: - -```html -{{ delimit (slice "foo" "bar" "buzz") ", " }} - -``` - - -### shuffle - -`shuffle` returns a random permutation of a given array or slice, e.g. - -```html -{{ shuffle (seq 1 5) }} - - -{{ shuffle (slice "foo" "bar" "buzz") }} - -``` - -### echoParam -Prints a parameter if it is set. - -e.g. `{{ echoParam .Params "project_url" }}` - - -### eq -Returns true if the parameters are equal. - -e.g. - - {{ if eq .Section "blog" }}current{{ end }} - - -### first -Slices an array to only the first _N_ elements. - -Works on [lists](/templates/list/), [taxonomies](/taxonomies/displaying/), [terms](/templates/terms/), [groups](/templates/list/) - -e.g. - - {{ range first 10 .Data.Pages }} - {{ .Render "summary" }} - {{ end }} - - -### jsonify -Encodes a given object to JSON. - -e.g. - - {{ dict "title" .Title "content" .Plain | jsonify }} - -### last -Slices an array to only the last _N_ elements. - -Works on [lists](/templates/list/), [taxonomies](/taxonomies/displaying/), [terms](/templates/terms/), [groups](/templates/list/) - -e.g. - - {{ range last 10 .Data.Pages }} - {{ .Render "summary" }} - {{ end }} - -### after -Slices an array to only the items after the Nth item. Use this in combination -with `first` to use both halves of an array split at item _N_. - -Works on [lists](/templates/list/), [taxonomies](/taxonomies/displaying/), [terms](/templates/terms/), [groups](/templates/list/) - -e.g. - - {{ range after 10 .Data.Pages }} - {{ .Render "title" }} - {{ end }} - -### getenv -Returns the value of an environment variable. - -Takes a string containing the name of the variable as input. Returns -an empty string if the variable is not set, otherwise returns the -value of the variable. Note that in Unix-like environments, the -variable must also be exported in order to be seen by `hugo`. - -e.g. - - {{ getenv "HOME" }} - - -### in -Checks if an element is in an array (or slice) and returns a boolean. -The elements supported are strings, integers and floats (only float64 will match as expected). -In addition, it can also check if a substring exists in a string. - -e.g. - - {{ if in .Params.tags "Git" }}Follow me on GitHub!{{ end }} - -or - - {{ if in "this string contains a substring" "substring" }}Substring found!{{ end }} - - -### intersect -Given two arrays (or slices), this function will return the common elements in the arrays. -The elements supported are strings, integers and floats (only float64). - -A useful example of this functionality is a 'similar posts' block. -Create a list of links to posts where any of the tags in the current post match any tags in other posts. - -e.g. - -
    - {{ $page_link := .Permalink }} - {{ $tags := .Params.tags }} - {{ range .Site.Pages }} - {{ $page := . }} - {{ $has_common_tags := intersect $tags .Params.tags | len | lt 0 }} - {{ if and $has_common_tags (ne $page_link $page.Permalink) }} -
  • {{ $page.Title }}
  • - {{ end }} - {{ end }} -
- - -### union -Given two arrays (or slices) A and B, this function will return a new array that contains the elements or objects that belong to either A or to B or to both. The elements supported are strings, integers and floats (only float64). - -``` -{{ union (slice 1 2 3) (slice 3 4 5) }} - - -{{ union (slice 1 2 3) nil }} - - -{{ union nil (slice 1 2 3) }} - - -{{ union nil nil }} - -``` - -### isset -Returns true if the parameter is set. -Takes either a slice, array or channel and an index or a map and a key as input. - -e.g. `{{ if isset .Params "project_url" }} {{ index .Params "project_url" }}{{ end }}` - -### seq - -Creates a sequence of integers. It's named and used as GNU's seq. - -Some examples: - -* `3` => `1, 2, 3` -* `1 2 4` => `1, 3` -* `-3` => `-1, -2, -3` -* `1 4` => `1, 2, 3, 4` -* `1 -2` => `1, 0, -1, -2` - -### sort -Sorts maps, arrays and slices, returning a sorted slice. -A sorted array of map values will be returned, with the keys eliminated. -There are two optional arguments, which are `sortByField` and `sortAsc`. -If left blank, sort will sort by keys (for maps) in ascending order. - -Works on [lists](/templates/list/), [taxonomies](/taxonomies/displaying/), [terms](/templates/terms/), [groups](/templates/list/) - -e.g. - - // Front matter - +++ - tags: [ "tag3", "tag1", "tag2" ] - +++ - - // Site config - +++ - [params.authors] - [params.authors.Derek] - "firstName" = "Derek" - "lastName" = "Perkins" - [params.authors.Joe] - "firstName" = "Joe" - "lastName" = "Bergevin" - [params.authors.Tanner] - "firstName" = "Tanner" - "lastName" = "Linsley" - +++ - - // Use default sort options - sort by key / ascending - Tags: {{ range sort .Params.tags }}{{ . }} {{ end }} - - // Outputs Tags: tag1 tag2 tag3 - - // Sort by value / descending - Tags: {{ range sort .Params.tags "value" "desc" }}{{ . }} {{ end }} - - // Outputs Tags: tag3 tag2 tag1 - - // Use default sort options - sort by value / descending - Authors: {{ range sort .Site.Params.authors }}{{ .firstName }} {{ end }} - - // Outputs Authors: Derek Joe Tanner - - // Use default sort options - sort by value / descending - Authors: {{ range sort .Site.Params.authors "lastName" "desc" }}{{ .lastName }} {{ end }} - - // Outputs Authors: Perkins Linsley Bergevin - - -### where -Filters an array to only elements containing a matching value for a given field. - -Works on [lists](/templates/list/), [taxonomies](/taxonomies/displaying/), [terms](/templates/terms/), [groups](/templates/list/) - -e.g. - - {{ range where .Data.Pages "Section" "post" }} - {{ .Content }} - {{ end }} - -It can be used with dot chaining second argument to refer a nested element of a value. - -e.g. - - // Front matter on some pages - +++ - series: golang - +++ - - {{ range where .Site.Pages "Params.series" "golang" }} - {{ .Content }} - {{ end }} - -It can also be used with an operator like `!=`, `>=`, `in` etc. Without an operator (like above), `where` compares a given field with a matching value in a way like `=` is specified. - -e.g. - - {{ range where .Data.Pages "Section" "!=" "post" }} - {{ .Content }} - {{ end }} - -Following operators are now available - -- `=`, `==`, `eq`: True if a given field value equals a matching value -- `!=`, `<>`, `ne`: True if a given field value doesn't equal a matching value -- `>=`, `ge`: True if a given field value is greater than or equal to a matching value -- `>`, `gt`: True if a given field value is greater than a matching value -- `<=`, `le`: True if a given field value is lesser than or equal to a matching value -- `<`, `lt`: True if a given field value is lesser than a matching value -- `in`: True if a given field value is included in a matching value. A matching value must be an array or a slice -- `not in`: True if a given field value isn't included in a matching value. A matching value must be an array or a slice -- `intersect`: True if a given field value that is a slice / array of strings or integers contains elements in common with the matching value. It follows the same rules as the intersect function. - -*`intersect` operator, e.g.:* - - {{ range where .Site.Pages ".Params.tags" "intersect" .Params.tags }} - {{ if ne .Permalink $.Permalink }} - {{ .Render "summary" }} - {{ end }} - {{ end }} - -*`where` and `first` can be stacked, e.g.:* - - {{ range first 5 (where .Data.Pages "Section" "post") }} - {{ .Content }} - {{ end }} - -### Unset field -Filter only work for set fields. To check whether a field is set or exist, use operand `nil`. - -This can be useful to filter a small amount of pages from a large pool. Instead of set field on all pages, you can set field on required pages only. - -Only following operators are available for `nil` - -- `=`, `==`, `eq`: True if the given field is not set. -- `!=`, `<>`, `ne`: True if the given field is set. - -e.g. - - {{ range where .Data.Pages ".Params.specialpost" "!=" nil }} - {{ .Content }} - {{ end }} - - -### uniq - -Takes in a slice or array and returns a slice with subsequent duplicate elements removed. - - {{ uniq (slice 1 2 3 2) }} - {{ slice 1 2 3 2 | uniq }} - - -## Files - -### readDir - -Gets a directory listing from a directory relative to the current project working dir. - -So, If the project working dir has a single file named `README.txt`: - -`{{ range (readDir ".") }}{{ .Name }}{{ end }}` → "README.txt" - -### readFile -Reads a file from disk and converts it into a string. Note that the filename must be relative to the current project working dir. - So, if you have a file with the name `README.txt` in the root of your project with the content `Hugo Rocks!`: - - `{{readFile "README.txt"}}` → `"Hugo Rocks!"` - -### imageConfig -Parses the image and returns the height, width and color model. - -e.g. -``` -{{ with (imageConfig "favicon.ico") }} -favicon.ico: {{.Width}} x {{.Height}} -{{ end }} -``` - -## Math - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FunctionDescriptionExample
addAdds two integers.{{add 1 2}} → 3
divDivides two integers.{{div 6 3}} → 2
modModulus of two integers.{{mod 15 3}} → 0
modBoolBoolean of modulus of two integers. true if modulus is 0.{{modBool 15 3}} → true
mulMultiplies two integers.{{mul 2 3}} → 6
subSubtracts two integers.{{sub 3 2}} → 1
- -## Numbers - -### int - -Creates an `int`. - -e.g. - -* `{{ int "123" }}` → 123 - -### lang.NumFmt - -`NumFmt` formats a number with the given precision using the *decimal*, -*grouping*, and *negative* options. The `options` parameter is a -string consisting of ` `. The default -`options` value is `- . ,`. - -Note that numbers are rounded up at 5 or greater. -So, with precision set to 0, 1.5 becomes `2`, and 1.4 becomes `1`. - -``` -{{ lang.NumFmt 2 12345.6789 }} → 12,345.68 -{{ lang.NumFmt 2 12345.6789 "- , ." }} → 12.345,68 -{{ lang.NumFmt 0 -12345.6789 "- . ," }} → -12,346 -{{ lang.NumFmt 6 -12345.6789 "- ." }} → -12345.678900 -{{ -98765.4321 | lang.NumFmt 2 }} → -98,765.43 -``` - -## Strings - -### printf - -Format a string using the standard `fmt.Sprintf` function. See [the go -doc](https://golang.org/pkg/fmt/) for reference. -A -e.g., `{{ i18n ( printf "combined_%s" $var ) }}` or `{{ printf "formatted %.2f" 3.1416 }}` - -### chomp -Removes any trailing newline characters. Useful in a pipeline to remove newlines added by other processing (including `markdownify`). - -e.g., `{{chomp "

Blockhead

\n"}}` → `"

Blockhead

"` - - -### dateFormat -Converts the textual representation of the datetime into the other form or returns it of Go `time.Time` type value. -These are formatted with the layout string. - -e.g. `{{ dateFormat "Monday, Jan 2, 2006" "2015-01-21" }}` → "Wednesday, Jan 21, 2015" - - -### emojify - -Runs the string through the Emoji emoticons processor. The result will be declared as "safe" so Go templates will not filter it. - -See the [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) for available emoticons. - -e.g. `{{ "I :heart: Hugo" | emojify }}` - -### highlight -Takes a string of code and a language, uses Pygments to return the syntax highlighted code in HTML. -Used in the [highlight shortcode](/extras/highlighting/). - -### htmlEscape -HtmlEscape returns the given string with the critical reserved HTML codes escaped, -such that `&` becomes `&` and so on. It escapes only: `<`, `>`, `&`, `'` and `"`. - -Bear in mind that, unless content is passed to `safeHTML`, output strings are escaped -usually by the processor anyway. - -e.g. -`{{ htmlEscape "Hugo & Caddy > Wordpress & Apache" }} → "Hugo & Caddy > Wordpress & Apache"` - -### htmlUnescape -HtmlUnescape returns the given string with html escape codes un-escaped. This -un-escapes more codes than `htmlEscape` escapes, including `#` codes and pre-UTF8 -escapes for accented characters. It defers completely to the Go `html.UnescapeString` -function, so functionality is consistent with that codebase. - -Remember to pass the output of this to `safeHTML` if fully unescaped characters -are desired, or the output will be escaped again as normal. - -e.g. -`{{ htmlUnescape "Hugo & Caddy > Wordpress & Apache" }} → "Hugo & Caddy > Wordpress & Apache"` - -### humanize -Humanize returns the humanized version of an argument with the first letter capitalized. -If the input is either an int64 value or the string representation of an integer, humanize returns the number with the proper ordinal appended. - -e.g. -``` -{{humanize "my-first-post"}} → "My first post" -{{humanize "myCamelPost"}} → "My camel post" -{{humanize "52"}} → "52nd" -{{humanize 103}} → "103rd" -``` - - -### lower -Converts all characters in string to lowercase. - -e.g. `{{lower "BatMan"}}` → "batman" - - -### markdownify - -Runs the string through the Markdown processor. The result will be declared as "safe" so Go templates will not filter it. - -e.g. `{{ .Title | markdownify }}` - -### plainify - -Strips any HTML and returns the plain text version. - -e.g. `{{ "BatMan" | plainify }}` → "BatMan" - -### pluralize -Pluralize the given word with a set of common English pluralization rules. - -e.g. `{{ "cat" | pluralize }}` → "cats" - -### findRE -Returns a list of strings that match the regular expression. By default all matches will be included. The number of matches can be limited with an optional third parameter. - -The example below returns a list of all second level headers (`

`) in the content: - - {{ findRE "(.|\n)*?

" .Content }} - -We can limit the number of matches in that list with a third parameter. Let's say we want to have at most one match (or none if no substring matched): - - {{ findRE "(.|\n)*?" .Content 1 }} - - -`findRE` allows us to build an automatically generated table of contents that could be used for a simple scrollspy: - - {{ $headers := findRE "(.|\n)*?" .Content }} - - {{ if ge (len $headers) 1 }} - - {{ end }} - -First, we try to find all second-level headers and generate a list if at least one header was found. `plainify` strips the HTML and `urlize` converts the header into a valid URL. - -### replace -Replaces all occurrences of the search string with the replacement string. - -e.g. `{{ replace "Batman and Robin" "Robin" "Catwoman" }}` → "Batman and Catwoman" - - -### replaceRE -Replaces all occurrences of a regular expression with the replacement pattern. - -e.g. `{{ replaceRE "^https?://([^/]+).*" "$1" "http://gohugo.io/docs" }}` → "gohugo.io" -e.g. `{{ "http://gohugo.io/docs" | replaceRE "^https?://([^/]+).*" "$1" }}` → "gohugo.io" - - -### safeHTML -Declares the provided string as a "safe" HTML document fragment -so Go html/template will not filter it. It should not be used -for HTML from a third-party, or HTML with unclosed tags or comments. - -Example: Given a site-wide `config.toml` that contains this line: - - copyright = "© 2015 Jane Doe. Some rights reserved." - -`{{ .Site.Copyright | safeHTML }}` would then output: - -> © 2015 Jane Doe. Some rights reserved. - -However, without the `safeHTML` function, html/template assumes -`.Site.Copyright` to be unsafe, escaping all HTML tags, -rendering the whole string as plain-text like this: - -
-

© 2015 Jane Doe. <a href="http://creativecommons.org/licenses/by/4.0/">Some rights reserved</a>.

-
- -### safeHTMLAttr -Declares the provided string as a "safe" HTML attribute -from a trusted source, for example, ` dir="ltr"`, -so Go html/template will not filter it. - -Example: Given a site-wide `config.toml` that contains this menu entry: - - [[menu.main]] - name = "IRC: #golang at freenode" - url = "irc://irc.freenode.net/#golang" - -* `` ⇒ `` (Bad!) -* `` ⇒ `` (Good!) - -### safeCSS -Declares the provided string as a known "safe" CSS string -so Go html/templates will not filter it. -"Safe" means CSS content that matches any of: - -1. The CSS3 stylesheet production, such as `p { color: purple }`. -2. The CSS3 rule production, such as `a[href=~"https:"].foo#bar`. -3. CSS3 declaration productions, such as `color: red; margin: 2px`. -4. The CSS3 value production, such as `rgba(0, 0, 255, 127)`. - -Example: Given `style = "color: red;"` defined in the front matter of your `.md` file: - -* `

` ⇒ `

` (Good!) -* `

` ⇒ `

` (Bad!) - -Note: "ZgotmplZ" is a special value that indicates that unsafe content reached a -CSS or URL context. - -### safeJS - -Declares the provided string as a known "safe" Javascript string so Go -html/templates will not escape it. "Safe" means the string encapsulates a known -safe EcmaScript5 Expression, for example, `(x + y * z())`. Template authors -are responsible for ensuring that typed expressions do not break the intended -precedence and that there is no statement/expression ambiguity as when passing -an expression like `{ foo:bar() }\n['foo']()`, which is both a valid Expression -and a valid Program with a very different meaning. - -Example: Given `hash = "619c16f"` defined in the front matter of your `.md` file: - -* `` ⇒ `` (Good!) -* `` ⇒ `` (Bad!) - -### singularize -Singularize the given word with a set of common English singularization rules. - -e.g. `{{ "cats" | singularize }}` → "cat" - -### slicestr - -Slicing in `slicestr` is done by specifying a half-open range with two indices, `start` and `end`. -For example, 1 and 4 creates a slice including elements 1 through 3. -The `end` index can be omitted; it defaults to the string's length. - -e.g. - -* `{{slicestr "BatMan" 3}}` → "Man" -* `{{slicestr "BatMan" 0 3}}` → "Bat" - -### truncate - -Truncate a text to a max length without cutting words or leaving unclosed HTML tags. Since Go templates are HTML-aware, truncate will handle normal strings vs HTML strings intelligently. It's important to note that if you have a raw string that contains HTML tags that you want treated as HTML, you will need to convert the string to HTML using the safeHTML template function before sending the value to truncate; otherwise, the HTML tags will be escaped by truncate. - -e.g. - -* `{{ "this is a text" | truncate 10 " ..." }}` → `this is a ...` -* `{{ "Keep my HTML" | safeHTML | truncate 10 }}` → `Keep my …` -* `{{ "With [Markdown](#markdown) inside." | markdownify | truncate 10 }}` → `With
Markdown …` - -### split - -Split a string into substrings separated by a delimiter. - -e.g. - -* `{{split "tag1,tag2,tag3" "," }}` → ["tag1" "tag2" "tag3"] - -### string - -Creates a `string`. - -e.g. - -* `{{string "BatMan"}}` → "BatMan" - -### substr - -Extracts parts of a string, beginning at the character at the specified -position, and returns the specified number of characters. - -It normally takes two parameters: `start` and `length`. -It can also take one parameter: `start`, i.e. `length` is omitted, in which case -the substring starting from start until the end of the string will be returned. - -To extract characters from the end of the string, use a negative start number. - -In addition, borrowing from the extended behavior described at http://php.net/substr, -if `length` is given and is negative, then that many characters will be omitted from -the end of string. - -e.g. - -* `{{substr "BatMan" 0 -3}}` → "Bat" -* `{{substr "BatMan" 3 3}}` → "Man" - -### hasPrefix - -HasPrefix tests whether a string begins with prefix. - -* `{{ hasPrefix "Hugo" "Hu" }}` → true - -### title -Converts all characters in string to titlecase. - -e.g. `{{title "BatMan"}}` → "Batman" - - -### trim -Returns a slice of the string with all leading and trailing characters contained in cutset removed. - -e.g. `{{ trim "++Batman--" "+-" }}` → "Batman" - - -### upper -Converts all characters in string to uppercase. - -e.g. `{{upper "BatMan"}}` → "BATMAN" - - -### countwords - -`countwords` tries to convert the passed content to a string and counts each word -in it. The template functions works similar to [.WordCount]({{< relref "templates/variables.md#page-variables" >}}). - -```html -{{ "Hugo is a static site generator." | countwords }} - -``` - - -### countrunes - -Alternatively to counting all words , `countrunes` determines the number of runes in the content and excludes any whitespace. This can become useful if you have to deal with -CJK-like languages. - -```html -{{ "Hello, 世界" | countrunes }} - -``` - -### md5 - -`md5` hashes the given input and returns its MD5 checksum. - -```html -{{ md5 "Hello world, gophers!" }} - -``` - -This can be useful if you want to use Gravatar for generating a unique avatar: - -```html - -``` - - -### sha1 - -`sha1` hashes the given input and returns its SHA1 checksum. - -```html -{{ sha1 "Hello world, gophers!" }} - -``` - - -### sha256 - -`sha256` hashes the given input and returns its SHA256 checksum. - -```html -{{ sha256 "Hello world, gophers!" }} - -``` - - -## Internationalization - -### i18n - -This translates a piece of content based on your `i18n/en-US.yaml` -(and friends) files. You can use the [go-i18n](https://github.com/nicksnyder/go-i18n) tools to manage your translations. The translations can exist in both the theme and at the root of your repository. - -e.g.: `{{ i18n "translation_id" }}` - -For more information about string translations, see [Translation of strings]({{< relref "content/multilingual.md#translation-of-strings">}}). - -### T - -`T` is an alias to `i18n`. E.g. `{{ T "translation_id" }}`. - -## Times - -### time - -`time` converts a timestamp string into a [`time.Time`](https://godoc.org/time#Time) structure so you can access its fields. E.g. - -* `{{ time "2016-05-28" }}` → "2016-05-28T00:00:00Z" -* `{{ (time "2016-05-28").YearDay }}` → 149 -* `{{ mul 1000 (time "2016-05-28T10:30:00.00+10:00").Unix }}` → 1464395400000 (Unix time in milliseconds) - -### now - -`now` returns the current local time as a [`time.Time`](https://godoc.org/time#Time). - -## URLs -### absLangURL, relLangURL -These are similar to the `absURL` and `relURL` relatives below, but will add the correct language prefix when the site is configured with more than one language. - -So for a site `baseURL` set to `http://mysite.com/hugo/` and the current language is `en`: - -* `{{ "blog/" | absLangURL }}` → "http://mysite.com/hugo/en/blog/" -* `{{ "blog/" | relLangURL }}` → "/hugo/en/blog/" - -### absURL, relURL - -Both `absURL` and `relURL` considers the configured value of `baseURL`, so given a `baseURL` set to `http://mysite.com/hugo/`: - -* `{{ "mystyle.css" | absURL }}` → "http://mysite.com/hugo/mystyle.css" -* `{{ "mystyle.css" | relURL }}` → "/hugo/mystyle.css" -* `{{ "http://gohugo.io/" | relURL }}` → "http://gohugo.io/" -* `{{ "http://gohugo.io/" | absURL }}` → "http://gohugo.io/" - -The last two examples may look funky, but is useful if you, say, have a list of images, some of them hosted externally, some locally: - -``` - -``` - -The above also exploits the fact that the Go template parser JSON-encodes objects inside `script` tags. - - - -**Note:** These functions are smart about missing slashes, but will not add one to the end if not present. - - -### ref, relref -Looks up a content page by relative path or logical name to return the permalink (`ref`) or relative permalink (`relref`). Requires a `Page` object (usually satisfied with `.`). Used in the [`ref` and `relref` shortcodes]({{% ref "extras/crossreferences.md" %}}). - -e.g. {{ ref . "about.md" }} - -### safeURL -Declares the provided string as a "safe" URL or URL substring (see [RFC 3986][]). -A URL like `javascript:checkThatFormNotEditedBeforeLeavingPage()` from a trusted -source should go in the page, but by default dynamic `javascript:` URLs are -filtered out since they are a frequently exploited injection vector. - -[RFC 3986]: http://tools.ietf.org/html/rfc3986 - -Without `safeURL`, only the URI schemes `http:`, `https:` and `mailto:` -are considered safe by Go. If any other URI schemes, e.g. `irc:` and -`javascript:`, are detected, the whole URL would be replaced with -`#ZgotmplZ`. This is to "defang" any potential attack in the URL, -rendering it useless. - -Example: Given a site-wide `config.toml` that contains this menu entry: - - [[menu.main]] - name = "IRC: #golang at freenode" - url = "irc://irc.freenode.net/#golang" - -The following template: - - - -would produce `
  • IRC: #golang at freenode
  • ` -for the `irc://…` URL. - -To fix this, add ` | safeURL` after `.URL` on the 3rd line, like this: - -
  • {{ .Name }}
  • - -With this change, we finally get `
  • IRC: #golang at freenode
  • ` -as intended. - - -### urlize -Takes a string and sanitizes it for usage in URLs, converts spaces to "-". - -e.g. `{{ . }}` - - -### querify - -Takes a set of key-value pairs and returns a [query string](https://en.wikipedia.org/wiki/Query_string) that can be appended to a URL. E.g. - - Search - -will be rendered as - - Search - - -## Content Views - -### Render -Takes a view to render the content with. The view is an alternate layout, and should be a file name that points to a template in one of the locations specified in the documentation for [Content Views](/templates/views). - -This function is only available on a piece of content, and in list context. - -This example could render a piece of content using the content view located at `/layouts/_default/summary.html`: - - {{ range .Data.Pages }} - {{ .Render "summary"}} - {{ end }} - - - -## Advanced - -### apply - -Given a map, array, or slice, returns a new slice with a function applied over it. Expects at least three parameters, depending on the function being applied. The first parameter is the sequence to operate on; the second is the name of the function as a string, which must be in the Hugo function map (generally, it is these functions documented here). After that, the parameters to the applied function are provided, with the string `"."` standing in for each element of the sequence the function is to be applied against. An example is in order: - - +++ - names: [ "Derek Perkins", "Joe Bergevin", "Tanner Linsley" ] - +++ - - {{ apply .Params.names "urlize" "." }} → [ "derek-perkins", "joe-bergevin", "tanner-linsley" ] - -This is roughly equivalent to: - - {{ range .Params.names }}{{ . | urlize }}{{ end }} - -However, it isn’t possible to provide the output of a range to the `delimit` function, so you need to `apply` it. A more complete example should explain this. Let's say you have two partials for displaying tag links in a post, "post/tag/list.html" and "post/tag/link.html", as shown below. - - - {{ with .Params.tags }} -
    - Tags: - {{ $len := len . }} - {{ if eq $len 1 }} - {{ partial "post/tag/link" (index . 0) }} - {{ else }} - {{ $last := sub $len 1 }} - {{ range first $last . }} - {{ partial "post/tag/link" . }}, - {{ end }} - {{ partial "post/tag/link" (index . $last) }} - {{ end }} -
    - {{ end }} - - - - - -This works, but the complexity of "post/tag/list.html" is fairly high; the Hugo template needs to perform special behaviour for the case where there’s only one tag, and it has to treat the last tag as special. Additionally, the tag list will be rendered something like "Tags: tag1 , tag2 , tag3" because of the way that the HTML is generated and it is interpreted by a browser. - -This is Hugo. We have a better way. If this were your "post/tag/list.html" instead, all of those problems are fixed automatically (this first version separates all of the operations for ease of reading; the combined version will be shown after the explanation). - - - {{ with .Params.tags }} -
    - Tags: - {{ $sort := sort . }} - {{ $links := apply $sort "partial" "post/tag/link" "." }} - {{ $clean := apply $links "chomp" "." }} - {{ delimit $clean ", " }} -
    - {{ end }} - -In this version, we are now sorting the tags, converting them to links with "post/tag/link.html", cleaning off stray newlines, and joining them together in a delimited list for presentation. That can also be written as: - - - {{ with .Params.tags }} -
    - Tags: - {{ delimit (apply (apply (sort .) "partial" "post/tag/link" ".") "chomp" ".") ", " }} -
    - {{ end }} - -`apply` does not work when receiving the sequence as an argument through a pipeline. - -*** - -### base64Encode and base64Decode - -`base64Encode` and `base64Decode` let you easily decode content with a base64 encoding and vice versa through pipes. Let's take a look at an example: - - - {{ "Hello world" | base64Encode }} - - - {{ "SGVsbG8gd29ybGQ=" | base64Decode }} - - -You can also pass other datatypes as argument to the template function which tries -to convert them. Now we use an integer instead of a string: - - - {{ 42 | base64Encode | base64Decode }} - - -**Tip:** Using base64 to decode and encode becomes really powerful if we have to handle -responses of APIs. - - {{ $resp := getJSON "https://api.github.com/repos/gohugoio/hugo/readme" }} - {{ $resp.content | base64Decode | markdownify }} - -The response of the GitHub API contains the base64-encoded version of the [README.md](https://github.com/gohugoio/hugo/blob/master/README.md) in the Hugo repository. Now we can decode it and parse the Markdown. The final output will look similar to the rendered version on GitHub. - -*** - -### partialCached - -See [Template Partials]({{< relref "templates/partials.md#cached-partials" >}}) for an explanation of the `partialCached` template function. - - -## .Site.GetPage -Every `Page` has a `Kind` attribute that shows what kind of page it is. While this attribute can be used to list pages of a certain `kind` using `where`, often it can be useful to fetch a single page by its path. - -`GetPage` looks up an index page of a given `Kind` and `path`. This method may support regular pages in the future, but currently it is a convenient way of getting the index pages, such as the home page or a section, from a template: - - {{ with .Site.GetPage "section" "blog" }}{{ .Title }}{{ end }} - -This method wil return `nil` when no page could be found, so the above will not print anything if the blog section isn't found. - -The valid page kinds are: *home, section, taxonomy and taxonomyTerm.* diff --git a/docs/content/templates/go-templates.md b/docs/content/templates/go-templates.md deleted file mode 100644 index bb7c71606..000000000 --- a/docs/content/templates/go-templates.md +++ /dev/null @@ -1,443 +0,0 @@ ---- -aliases: -- /layout/go-templates/ -- /layouts/go-templates/ -lastmod: 2015-11-30 -date: 2013-07-01 -menu: - main: - parent: layout -next: /templates/ace -prev: /templates/overview -title: Go Template Primer -weight: 15 -toc: true ---- - -Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for -its template engine. It is an extremely lightweight engine that provides a very -small amount of logic. In our experience it is just the right amount of -logic to be able to create a good static website. If you have used other -template systems from different languages or frameworks, you will find a lot of -similarities in Go templates. - -This document is a brief primer on using Go templates. The [Go docs][gohtmltemplate] -go into more depth and cover features that aren't mentioned here. - -## Introduction to Go Templates - -Go templates provide an extremely simple template language. It adheres to the -belief that only the most basic of logic belongs in the template or view layer. -One consequence of this simplicity is that Go templates parse very quickly. - -A unique characteristic of Go templates is they are content aware. Variables and -content will be sanitized depending on the context of where they are used. More -details can be found in the [Go docs][gohtmltemplate]. - -## Basic Syntax - -Go lang templates are HTML files with the addition of variables and -functions. - -**Go variables and functions are accessible within {{ }}** - -Accessing a predefined variable "foo": - - {{ foo }} - -**Parameters are separated using spaces** - -Calling the `add` function with input of 1, 2: - - {{ add 1 2 }} - -**Methods and fields are accessed via dot notation** - -Accessing the Page Parameter "bar" - - {{ .Params.bar }} - -**Parentheses can be used to group items together** - - {{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }} - - -## Variables - -Each Go template has a struct (object) made available to it. In Hugo, each -template is passed page struct. More details are available on the -[variables](/layout/variables/) page. - -A variable is accessed by referencing the variable name. - - {{ .Title }} - -Variables can also be defined and referenced. - - {{ $address := "123 Main St."}} - {{ $address }} - - -## Functions - -Go template ships with a few functions which provide basic functionality. The Go -template system also provides a mechanism for applications to extend the -available functions with their own. [Hugo template -functions](/layout/functions/) provide some additional functionality we believe -are useful for building websites. Functions are called by using their name -followed by the required parameters separated by spaces. Template -functions cannot be added without recompiling Hugo. - -**Example 1: Adding numbers** - - {{ add 1 2 }} - -**Example 2: Comparing numbers** - - {{ lt 1 2 }} - -(There are more boolean operators, detailed in the -[template documentation](http://golang.org/pkg/text/template/#hdr-Functions).) - -## Includes - -When including another template, you will pass to it the data it will be -able to access. To pass along the current context, please remember to -include a trailing dot. The templates location will always be starting at -the /layout/ directory within Hugo. - -**Example:** - - {{ template "partials/header.html" . }} - -And, starting with Hugo v0.12, you may also use the `partial` call -for [partial templates](/templates/partials/): - - {{ partial "header.html" . }} - - -## Logic - -Go templates provide the most basic iteration and conditional logic. - -### Iteration - -Just like in Go, the Go templates make heavy use of `range` to iterate over -a map, array or slice. The following are different examples of how to use -range. - -**Example 1: Using Context** - - {{ range array }} - {{ . }} - {{ end }} - -**Example 2: Declaring value variable name** - - {{range $element := array}} - {{ $element }} - {{ end }} - -**Example 2: Declaring key and value variable name** - - {{range $index, $element := array}} - {{ $index }} - {{ $element }} - {{ end }} - -### Conditionals - -`if`, `else`, `with`, `or` & `and` provide the framework for handling conditional -logic in Go Templates. Like `range`, each statement is closed with `end`. - -Go Templates treat the following values as false: - -* false -* 0 -* any array, slice, map, or string of length zero - -**Example 1: `if`** - - {{ if isset .Params "title" }}

    {{ index .Params "title" }}

    {{ end }} - -**Example 2: `if` … `else`** - - {{ if isset .Params "alt" }} - {{ index .Params "alt" }} - {{else}} - {{ index .Params "caption" }} - {{ end }} - -**Example 3: `and` & `or`** - - {{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} - -**Example 4: `with`** - -An alternative way of writing "`if`" and then referencing the same value -is to use "`with`" instead. `with` rebinds the context `.` within its scope, -and skips the block if the variable is absent. - -The first example above could be simplified as: - - {{ with .Params.title }}

    {{ . }}

    {{ end }} - -**Example 5: `if` … `else if`** - - {{ if isset .Params "alt" }} - {{ index .Params "alt" }} - {{ else if isset .Params "caption" }} - {{ index .Params "caption" }} - {{ end }} - -## Pipes - -One of the most powerful components of Go templates is the ability to -stack actions one after another. This is done by using pipes. Borrowed -from Unix pipes, the concept is simple, each pipeline's output becomes the -input of the following pipe. - -Because of the very simple syntax of Go templates, the pipe is essential -to being able to chain together function calls. One limitation of the -pipes is that they only can work with a single value and that value -becomes the last parameter of the next pipeline. - -A few simple examples should help convey how to use the pipe. - -**Example 1:** - - {{ shuffle (seq 1 5) }} - -is the same as - - {{ (seq 1 5) | shuffle }} - -**Example 2:** - - {{ index .Params "disqus_url" | html }} - -Access the page parameter called "disqus_url" and escape the HTML. - -The `index` function is a [Go][] built-in, and you can read about it [here][gostdlibpkgtexttemplate]. `index`: - -> ...returns the result of indexing its first argument by the following arguments. Thus "index x 1 2 3" is, in Go syntax, `x[1][2][3]`. Each indexed item must be a map, slice, or array. - -**Example 3:** - - {{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr") }} - Stuff Here - {{ end }} - -Could be rewritten as - - {{ if isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" }} - Stuff Here - {{ end }} - -### Internet Explorer conditional comments using Pipes - -By default, Go Templates remove HTML comments from output. This has the unfortunate side effect of removing Internet Explorer conditional comments. As a workaround, use something like this: - - {{ "" | safeHTML }} - -Alternatively, use the backtick (`` ` ``) to quote the IE conditional comments, avoiding the tedious task of escaping every double quotes (`"`) inside, as demonstrated in the [examples](http://golang.org/pkg/text/template/#hdr-Examples) in the Go text/template documentation, e.g.: - -``` -{{ `` | safeHTML }} -``` - -## Context (a.k.a. the dot) - -The most easily overlooked concept to understand about Go templates is that `{{ . }}` -always refers to the current context. In the top level of your template, this -will be the data set made available to it. Inside of a iteration, however, it will have -the value of the current item. When inside of a loop, the context has changed: -`{{ . }}` will no longer refer to the data available to the entire page. If you need -to -access this from within the loop, you will likely want to do one of the following: - -1. Set it to a variable instead of depending on the context. For example: - - {{ $title := .Site.Title }} - {{ range .Params.tags }} -
  • - {{ . }} - - {{ $title }} -
  • - {{ end }} - - Notice how once we have entered the loop the value of `{{ . }}` has changed. We - have defined a variable outside of the loop so we have access to it from within - the loop. - -2. Use `$.` to access the global context from anywhere. - Here is an equivalent example: - - {{ range .Params.tags }} -
  • - {{ . }} - - {{ $.Site.Title }} -
  • - {{ end }} - - This is because `$`, a special variable, is set to the starting value - of `.` the dot by default, - a [documented feature](http://golang.org/pkg/text/template/#hdr-Variables) - of Go text/template. Very handy, eh? - - > However, this little magic would cease to work if someone were to - > mischievously redefine `$`, e.g. `{{ $ := .Site }}`. - > *(No, don't do it!)* - > You may, of course, recover from this mischief by using `{{ $ := . }}` - > in a global context to reset `$` to its default value. - -## Whitespace - -Go 1.6 includes the ability to trim the whitespace from either side of a Go tag by including a hyphen (`-`) and space immediately beside the corresponding `{{` or `}}` delimiter. - -For instance, the following Go template: - -```html -
    - {{ .Title }} -
    -``` - -will include the newlines and horizontal tab in its HTML output: - -```html -
    - Hello, World! -
    -``` - -whereas using - -```html -
    - {{- .Title -}} -
    -``` - -in that case will output simply `
    Hello, World!
    `. - -Go considers the following characters as whitespace: space, horizontal tab, carriage return and newline. - -# Hugo Parameters - -Hugo provides the option of passing values to the template language -through the site configuration (for sitewide values), or through the meta -data of each specific piece of content. You can define any values of any -type (supported by your front matter/config format) and use them however -you want to inside of your templates. - - -## Using Content (page) Parameters - -In each piece of content, you can provide variables to be used by the -templates. This happens in the [front matter](/content/front-matter/). - -An example of this is used in this documentation site. Most of the pages -benefit from having the table of contents provided. Sometimes the TOC just -doesn't make a lot of sense. We've defined a variable in our front matter -of some pages to turn off the TOC from being displayed. - -Here is the example front matter: - -``` ---- -title: "Permalinks" -lastmod: 2015-11-30 -date: "2013-11-18" -aliases: - - "/doc/permalinks/" -groups: ["extras"] -groups_weight: 30 -notoc: true ---- -``` - -Here is the corresponding code inside of the template: - - {{ if not .Params.notoc }} -
    - {{ .TableOfContents }} -
    - {{ end }} - - - -## Using Site (config) Parameters -In your top-level configuration file (e.g., `config.yaml`) you can define site -parameters, which are values which will be available to you in partials. - -For instance, you might declare: - -```yaml -params: - CopyrightHTML: "Copyright © 2013 John Doe. All Rights Reserved." - TwitterUser: "spf13" - SidebarRecentLimit: 5 -``` - -Within a footer layout, you might then declare a `