diff --git a/.gitignore b/.gitignore index 665360d49..dd088ba8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /.idea /public +nohup.out diff --git a/config.toml b/config.toml index b7e13667d..55a921d03 100644 --- a/config.toml +++ b/config.toml @@ -71,7 +71,7 @@ twitter = "GoHugoIO" [params] description = "The world’s fastest framework for building websites" ## Used for views in rendered HTML (i.e., rather than using the .Hugo variable) - release = "0.27.1" + release = "0.29" ## Setting this to true will add a "noindex" to *EVERY* page on the site removefromexternalsearch = false ## Gh repo for site footer (include trailing slash) diff --git a/content/commands/hugo.md b/content/commands/hugo.md index 1062291bf..d3b0b3581 100644 --- a/content/commands/hugo.md +++ b/content/commands/hugo.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo" slug: hugo url: /commands/hugo/ @@ -56,6 +56,7 @@ hugo [flags] --renderToMemory render to memory (only useful for benchmark testing) -s, --source string filesystem path to read files relative from --stepAnalysis display memory and timing of different steps of the program + --templateMetrics display metrics about template executions -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/ @@ -78,4 +79,4 @@ hugo [flags] * [hugo undraft](/commands/hugo_undraft/) - Undraft resets the content's draft status * [hugo version](/commands/hugo_version/) - Print the version number of Hugo -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_benchmark.md b/content/commands/hugo_benchmark.md index c05cc71b5..dbf7bee1e 100644 --- a/content/commands/hugo_benchmark.md +++ b/content/commands/hugo_benchmark.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo benchmark" slug: hugo_benchmark url: /commands/hugo_benchmark/ @@ -50,6 +50,7 @@ hugo benchmark [flags] --renderToMemory render to memory (only useful for benchmark testing) -s, --source string filesystem path to read files relative from --stepAnalysis display memory and timing of different steps of the program + --templateMetrics display metrics about template executions -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/ @@ -70,4 +71,4 @@ hugo benchmark [flags] ### SEE ALSO * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_check.md b/content/commands/hugo_check.md index bfda906c1..2c00589ec 100644 --- a/content/commands/hugo_check.md +++ b/content/commands/hugo_check.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo check" slug: hugo_check url: /commands/hugo_check/ @@ -35,4 +35,4 @@ Contains some verification checks * [hugo](/commands/hugo/) - hugo builds your site * [hugo check ulimit](/commands/hugo_check_ulimit/) - Check system ulimit settings -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_check_ulimit.md b/content/commands/hugo_check_ulimit.md index ac14c24ae..15cdc0b2a 100644 --- a/content/commands/hugo_check_ulimit.md +++ b/content/commands/hugo_check_ulimit.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo check ulimit" slug: hugo_check_ulimit url: /commands/hugo_check_ulimit/ @@ -39,4 +39,4 @@ hugo check ulimit [flags] ### SEE ALSO * [hugo check](/commands/hugo_check/) - Contains some verification checks -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_config.md b/content/commands/hugo_config.md index abe089bd8..431f9150b 100644 --- a/content/commands/hugo_config.md +++ b/content/commands/hugo_config.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo config" slug: hugo_config url: /commands/hugo_config/ @@ -38,4 +38,4 @@ hugo config [flags] ### SEE ALSO * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_convert.md b/content/commands/hugo_convert.md index 27a50bc3e..491ece860 100644 --- a/content/commands/hugo_convert.md +++ b/content/commands/hugo_convert.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo convert" slug: hugo_convert url: /commands/hugo_convert/ @@ -42,4 +42,4 @@ See convert's subcommands toJSON, toTOML and toYAML for more information. * [hugo convert toTOML](/commands/hugo_convert_totoml/) - Convert front matter to TOML * [hugo convert toYAML](/commands/hugo_convert_toyaml/) - Convert front matter to YAML -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_convert_toJSON.md b/content/commands/hugo_convert_toJSON.md index 877be7477..7c27a6385 100644 --- a/content/commands/hugo_convert_toJSON.md +++ b/content/commands/hugo_convert_toJSON.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo convert toJSON" slug: hugo_convert_toJSON url: /commands/hugo_convert_tojson/ @@ -42,4 +42,4 @@ hugo convert toJSON [flags] ### SEE ALSO * [hugo convert](/commands/hugo_convert/) - Convert your content to different formats -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_convert_toTOML.md b/content/commands/hugo_convert_toTOML.md index e33e5d043..35a6d80b7 100644 --- a/content/commands/hugo_convert_toTOML.md +++ b/content/commands/hugo_convert_toTOML.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo convert toTOML" slug: hugo_convert_toTOML url: /commands/hugo_convert_totoml/ @@ -42,4 +42,4 @@ hugo convert toTOML [flags] ### SEE ALSO * [hugo convert](/commands/hugo_convert/) - Convert your content to different formats -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_convert_toYAML.md b/content/commands/hugo_convert_toYAML.md index a8667d2fa..968a0e0b2 100644 --- a/content/commands/hugo_convert_toYAML.md +++ b/content/commands/hugo_convert_toYAML.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo convert toYAML" slug: hugo_convert_toYAML url: /commands/hugo_convert_toyaml/ @@ -42,4 +42,4 @@ hugo convert toYAML [flags] ### SEE ALSO * [hugo convert](/commands/hugo_convert/) - Convert your content to different formats -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_env.md b/content/commands/hugo_env.md index 649bee682..aa90ae681 100644 --- a/content/commands/hugo_env.md +++ b/content/commands/hugo_env.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo env" slug: hugo_env url: /commands/hugo_env/ @@ -38,4 +38,4 @@ hugo env [flags] ### SEE ALSO * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_gen.md b/content/commands/hugo_gen.md index 722275714..bbb23fec9 100644 --- a/content/commands/hugo_gen.md +++ b/content/commands/hugo_gen.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo gen" slug: hugo_gen url: /commands/hugo_gen/ @@ -38,4 +38,4 @@ A collection of several useful generators. * [hugo gen doc](/commands/hugo_gen_doc/) - Generate Markdown documentation for the Hugo CLI. * [hugo gen man](/commands/hugo_gen_man/) - Generate man pages for the Hugo CLI -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_gen_autocomplete.md b/content/commands/hugo_gen_autocomplete.md index 6e0674bf7..d42d28bbc 100644 --- a/content/commands/hugo_gen_autocomplete.md +++ b/content/commands/hugo_gen_autocomplete.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo gen autocomplete" slug: hugo_gen_autocomplete url: /commands/hugo_gen_autocomplete/ @@ -56,4 +56,4 @@ hugo gen autocomplete [flags] ### SEE ALSO * [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_gen_chromastyles.md b/content/commands/hugo_gen_chromastyles.md index a070a213a..0e0843d72 100644 --- a/content/commands/hugo_gen_chromastyles.md +++ b/content/commands/hugo_gen_chromastyles.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo gen chromastyles" slug: hugo_gen_chromastyles url: /commands/hugo_gen_chromastyles/ @@ -43,4 +43,4 @@ hugo gen chromastyles [flags] ### SEE ALSO * [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_gen_doc.md b/content/commands/hugo_gen_doc.md index b5daf3d9d..c614f135c 100644 --- a/content/commands/hugo_gen_doc.md +++ b/content/commands/hugo_gen_doc.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo gen doc" slug: hugo_gen_doc url: /commands/hugo_gen_doc/ @@ -45,4 +45,4 @@ hugo gen doc [flags] ### SEE ALSO * [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_gen_man.md b/content/commands/hugo_gen_man.md index 52b062fc3..a75123acf 100644 --- a/content/commands/hugo_gen_man.md +++ b/content/commands/hugo_gen_man.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo gen man" slug: hugo_gen_man url: /commands/hugo_gen_man/ @@ -41,4 +41,4 @@ hugo gen man [flags] ### SEE ALSO * [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_import.md b/content/commands/hugo_import.md index 3af546640..d4d61c166 100644 --- a/content/commands/hugo_import.md +++ b/content/commands/hugo_import.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo import" slug: hugo_import url: /commands/hugo_import/ @@ -37,4 +37,4 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p * [hugo](/commands/hugo/) - hugo builds your site * [hugo import jekyll](/commands/hugo_import_jekyll/) - hugo import from Jekyll -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_import_jekyll.md b/content/commands/hugo_import_jekyll.md index 156ac79ec..7c30f8cc6 100644 --- a/content/commands/hugo_import_jekyll.md +++ b/content/commands/hugo_import_jekyll.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo import jekyll" slug: hugo_import_jekyll url: /commands/hugo_import_jekyll/ @@ -41,4 +41,4 @@ hugo import jekyll [flags] ### SEE ALSO * [hugo import](/commands/hugo_import/) - Import your site from others. -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_list.md b/content/commands/hugo_list.md index cbd745ac5..962c0f0ab 100644 --- a/content/commands/hugo_list.md +++ b/content/commands/hugo_list.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo list" slug: hugo_list url: /commands/hugo_list/ @@ -40,4 +40,4 @@ List requires a subcommand, e.g. `hugo list drafts`. * [hugo list expired](/commands/hugo_list_expired/) - List all posts already expired * [hugo list future](/commands/hugo_list_future/) - List all posts dated in the future -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_list_drafts.md b/content/commands/hugo_list_drafts.md index d703a7d96..080be07f3 100644 --- a/content/commands/hugo_list_drafts.md +++ b/content/commands/hugo_list_drafts.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo list drafts" slug: hugo_list_drafts url: /commands/hugo_list_drafts/ @@ -39,4 +39,4 @@ hugo list drafts [flags] ### SEE ALSO * [hugo list](/commands/hugo_list/) - Listing out various types of content -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_list_expired.md b/content/commands/hugo_list_expired.md index dafffc4b1..7dfb00713 100644 --- a/content/commands/hugo_list_expired.md +++ b/content/commands/hugo_list_expired.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo list expired" slug: hugo_list_expired url: /commands/hugo_list_expired/ @@ -40,4 +40,4 @@ hugo list expired [flags] ### SEE ALSO * [hugo list](/commands/hugo_list/) - Listing out various types of content -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_list_future.md b/content/commands/hugo_list_future.md index 95b5ba6de..f0e884245 100644 --- a/content/commands/hugo_list_future.md +++ b/content/commands/hugo_list_future.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo list future" slug: hugo_list_future url: /commands/hugo_list_future/ @@ -40,4 +40,4 @@ hugo list future [flags] ### SEE ALSO * [hugo list](/commands/hugo_list/) - Listing out various types of content -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_new.md b/content/commands/hugo_new.md index 281a1143c..aae5ff77a 100644 --- a/content/commands/hugo_new.md +++ b/content/commands/hugo_new.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo new" slug: hugo_new url: /commands/hugo_new/ @@ -48,4 +48,4 @@ hugo new [path] [flags] * [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton) * [hugo new theme](/commands/hugo_new_theme/) - Create a new theme -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_new_site.md b/content/commands/hugo_new_site.md index df9df1951..a0ce812a3 100644 --- a/content/commands/hugo_new_site.md +++ b/content/commands/hugo_new_site.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo new site" slug: hugo_new_site url: /commands/hugo_new_site/ @@ -43,4 +43,4 @@ hugo new site [path] [flags] ### SEE ALSO * [hugo new](/commands/hugo_new/) - Create new content for your site -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_new_theme.md b/content/commands/hugo_new_theme.md index f12935df3..79b729f64 100644 --- a/content/commands/hugo_new_theme.md +++ b/content/commands/hugo_new_theme.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo new theme" slug: hugo_new_theme url: /commands/hugo_new_theme/ @@ -42,4 +42,4 @@ hugo new theme [name] [flags] ### SEE ALSO * [hugo new](/commands/hugo_new/) - Create new content for your site -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_server.md b/content/commands/hugo_server.md index 082b223b2..87ccd9465 100644 --- a/content/commands/hugo_server.md +++ b/content/commands/hugo_server.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo server" slug: hugo_server url: /commands/hugo_server/ @@ -58,7 +58,7 @@ hugo server [flags] --memstats string log memory usage to this file --navigateToChanged navigate to changed content file on live browser reload --noChmod don't sync permission mode of files - --noHTTPCache prevent HTTP caching (default true) + --noHTTPCache prevent HTTP caching --noTimes don't sync modification time of files --pluralizeListTitles pluralize titles in lists using inflect (default true) -p, --port int port on which the server will listen (default 1313) @@ -66,6 +66,7 @@ hugo server [flags] --renderToDisk render to Destination path (default is render to memory & serve from there) -s, --source string filesystem path to read files relative from --stepAnalysis display memory and timing of different steps of the program + --templateMetrics display metrics about template executions -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/ @@ -87,4 +88,4 @@ hugo server [flags] ### SEE ALSO * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_undraft.md b/content/commands/hugo_undraft.md index 601463cd0..f13df1b86 100644 --- a/content/commands/hugo_undraft.md +++ b/content/commands/hugo_undraft.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo undraft" slug: hugo_undraft url: /commands/hugo_undraft/ @@ -40,4 +40,4 @@ hugo undraft path/to/content [flags] ### SEE ALSO * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/commands/hugo_version.md b/content/commands/hugo_version.md index fc999196a..f92a899b7 100644 --- a/content/commands/hugo_version.md +++ b/content/commands/hugo_version.md @@ -1,5 +1,5 @@ --- -date: 2017-09-25T08:30:15+02:00 +date: 2017-09-26T21:11:49+02:00 title: "hugo version" slug: hugo_version url: /commands/hugo_version/ @@ -38,4 +38,4 @@ hugo version [flags] ### SEE ALSO * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 25-Sep-2017 +###### Auto generated by spf13/cobra on 26-Sep-2017 diff --git a/content/content-management/sections.md b/content/content-management/sections.md index 14fc04d64..411379224 100644 --- a/content/content-management/sections.md +++ b/content/content-management/sections.md @@ -43,12 +43,12 @@ The following example shows a content directory structure for a website that has | ├── event-2.md // <- example.com/events/event-2/ | └── event-3.md // <- example.com/events/event-3/ └── posts - | ├── _index.md // <- example.com/posts/ - | ├── event-1.md // <- example.com/posts/event-1/ - | ├── event-2.md // <- example.com/posts/event-2/ - | ├── event-3.md // <- example.com/posts/event-3/ - | ├── event-4.md // <- example.com/posts/event-4/ - | └── event-5.md // <- example.com/posts/event-5/ + | ├── _index.md // <- example.com/posts/ + | ├── post-1.md // <- example.com/posts/post-1/ + | ├── post-2.md // <- example.com/posts/post-2/ + | ├── post-3.md // <- example.com/posts/post-3/ + | ├── post-4.md // <- example.com/posts/post-4/ + | └── post-5.md // <- example.com/posts/post-5/ ``` ## Content Section Lists diff --git a/content/functions/highlight.md b/content/functions/highlight.md index 0ea73cf0f..f0845227d 100644 --- a/content/functions/highlight.md +++ b/content/functions/highlight.md @@ -25,4 +25,4 @@ See [Installing Hugo][installpygments] for more information on Pygments or [Synt [highlight]: /content-management/shortcodes/#highlight [installpygments]: /getting-started/installing/#installing-pygments-optional -[syntax]: /tools/syntax-highlighting/ +[syntax]: /content-management/syntax-highlighting/ diff --git a/content/functions/math.md b/content/functions/math.md index a8b3bbcd7..2ef7a5d23 100644 --- a/content/functions/math.md +++ b/content/functions/math.md @@ -1,6 +1,6 @@ --- title: Math -description: Hugo provides six mathematical operators in templates. +description: Hugo provides nine mathematical operators in templates. godocref: date: 2017-02-01 publishdate: 2017-02-01 @@ -20,14 +20,14 @@ draft: false aliases: [] --- -There are 6 basic mathematical operators that can be used in Hugo templates: - -| Function | Description | Example | -| -------- | ------------------------ | ----------------------------- | -| `add` | Adds two integers. | `{{add 1 2}}` → 3 | -| `div` | Divides two integers. | `{{div 6 3}}` → 2 | -| `mod` | Modulus of two integers. | `{{mod 15 3}}` → 0 | -| `modBool`| Boolean of modulus of two integers. Evaluates to `true` if = 0. | `{{modBool 15 3}}` → true | -| `mul` | Multiplies two integers. | `{{mul 2 3}}` → 6 | -| `sub` | Subtracts two integers. | `{{sub 3 2}}` → 1 | - +| Function | Description | Example | +|----------------|-------------------------------------------------------------------------------|----------------------------------| +| `add` | Adds two integers. | `{{add 1 2}}` → 3 | +| `div` | Divides two integers. | `{{div 6 3}}` → 2 | +| `mod` | Modulus of two integers. | `{{mod 15 3}}` → 0 | +| `modBool` | Boolean of modulus of two integers. Evaluates to `true` if result equals 0. | `{{modBool 15 3}}` → true | +| `mul` | Multiplies two integers. | `{{mul 2 3}}` → 6 | +| `sub` | Subtracts two integers. | `{{sub 3 2}}` → 1 | +| `math.Ceil` | Returns the least integer value greater than or equal to the given number. | `{{math.Ceil 2.1}}` → 3 | +| `math.Floor` | Returns the greatest integer value less than or equal to the given number. | `{{math.Floor 1.9}}` → 1 | +| `math.Round` | Returns the nearest integer, rounding half away from zero. | `{{math.Round 1.5}}` → 2 | diff --git a/content/functions/print.md b/content/functions/print.md new file mode 100644 index 000000000..fffbb79dc --- /dev/null +++ b/content/functions/print.md @@ -0,0 +1,26 @@ +--- +title: print +linktitle: print +description: Prints the default representation of the given argument using the standard `fmt.Print` function. +godocref: https://golang.org/pkg/fmt/ +date: 2017-02-01 +publishdate: 2017-02-01 +lastmod: 2017-02-01 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [strings] +signature: ["print INPUT"] +workson: [] +hugoversion: +relatedfuncs: [] +deprecated: false +--- + +See [the go doc](https://golang.org/pkg/fmt/) for additional information. + +``` +{{ print "foo" }} → "foo" +{{ print (slice 1 2 3) }} → [1 2 3] +``` diff --git a/content/functions/println.md b/content/functions/println.md new file mode 100644 index 000000000..36dbfaed6 --- /dev/null +++ b/content/functions/println.md @@ -0,0 +1,25 @@ +--- +title: println +linktitle: println +description: Prints the default representation of the given argument using the standard `fmt.Print` function and enforces a linebreak. +godocref: https://golang.org/pkg/fmt/ +date: 2017-02-01 +publishdate: 2017-02-01 +lastmod: 2017-02-01 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [strings] +signature: ["println INPUT"] +workson: [] +hugoversion: +relatedfuncs: [] +deprecated: false +--- + +See [the go doc](https://golang.org/pkg/fmt/) for additional information. `\n` denotes the linebreak but isn't printed in the templates as seen below: + +``` +{{ println "foo" }} → "foo\n" +``` diff --git a/content/functions/strings.TrimLeft.md b/content/functions/strings.TrimLeft.md new file mode 100644 index 000000000..246facd62 --- /dev/null +++ b/content/functions/strings.TrimLeft.md @@ -0,0 +1,28 @@ +--- +title: strings.TrimLeft +description: Returns a slice of a given string with all leading characters contained in the cutset removed. +godocref: +date: 2017-02-01 +publishdate: 2017-02-01 +lastmod: 2017-02-01 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [strings] +signature: ["strings.TrimLeft CUTSET STRING"] +workson: [] +hugoversion: +relatedfuncs: [strings.TrimRight] +deprecated: false +aliases: [] +--- + +Given the string `"abba"`, leading `"a"`'s can be removed a follows: + + {{ strings.TrimLeft "abba" "a" }} → "bba" + +Numbers can be handled as well: + + {{ strings.TrimLeft 1221 "12" }} → "" + diff --git a/content/functions/strings.TrimPrefix.md b/content/functions/strings.TrimPrefix.md new file mode 100644 index 000000000..eeeecf76e --- /dev/null +++ b/content/functions/strings.TrimPrefix.md @@ -0,0 +1,25 @@ +--- +title: strings.TrimPrefix +description: Returns a given string s without the provided leading prefix string. If s doesn't start with prefix, s is returned unchanged. +godocref: +date: 2017-02-01 +publishdate: 2017-02-01 +lastmod: 2017-02-01 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [strings] +signature: ["strings.TrimPrefix PREFIX STRING"] +workson: [] +hugoversion: +relatedfuncs: [strings.TrimSuffix] +deprecated: false +aliases: [] +--- + +Given the string `"aabbaa"`, the specified prefix is only removed if `"aabbaa"` starts with it: + + {{ strings.TrimPrefix "a" "aabbaa" }} → "abbaa" + {{ strings.TrimPrefix "aa" "aabbaa" }} → "bbaa" + {{ strings.TrimPrefix "aaa" "aabbaa" }} → "aabbaa" \ No newline at end of file diff --git a/content/functions/strings.TrimRight.md b/content/functions/strings.TrimRight.md new file mode 100644 index 000000000..44cb9edcf --- /dev/null +++ b/content/functions/strings.TrimRight.md @@ -0,0 +1,28 @@ +--- +title: strings.TrimRight +description: Returns a slice of a given string with all trailing characters contained in the cutset removed. +godocref: +date: 2017-02-01 +publishdate: 2017-02-01 +lastmod: 2017-02-01 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [strings] +signature: ["strings.TrimRight CUTSET STRING"] +workson: [] +hugoversion: +relatedfuncs: [strings.TrimRight] +deprecated: false +aliases: [] +--- + +Given the string `"abba"`, trailing `"a"`'s can be removed a follows: + + {{ strings.TrimRight "abba" "a" }} → "abb" + +Numbers can be handled as well: + + {{ strings.TrimRight 1221 "12" }} → "" + diff --git a/content/functions/strings.TrimSuffix.md b/content/functions/strings.TrimSuffix.md new file mode 100644 index 000000000..208e0968d --- /dev/null +++ b/content/functions/strings.TrimSuffix.md @@ -0,0 +1,25 @@ +--- +title: strings.TrimSuffix +description: Returns a given string s without the provided trailing suffix string. If s doesn't end with suffix, s is returned unchanged. +godocref: +date: 2017-02-01 +publishdate: 2017-02-01 +lastmod: 2017-02-01 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [strings] +signature: ["strings.TrimSuffix SUFFIX STRING"] +workson: [] +hugoversion: +relatedfuncs: [strings.TrimPrefix] +deprecated: false +aliases: [] +--- + +Given the string `"aabbaa"`, the specified suffix is only removed if `"aabbaa"` ends with it: + + {{ strings.TrimSuffix "a" "aabbaa" }} → "aabba" + {{ strings.TrimSuffix "aa" "aabbaa" }} → "aabb" + {{ strings.TrimSuffix "aaa" "aabbaa" }} → "aabbaa" \ No newline at end of file diff --git a/content/functions/urls.Parse.md b/content/functions/urls.Parse.md new file mode 100644 index 000000000..6d0ade0f8 --- /dev/null +++ b/content/functions/urls.Parse.md @@ -0,0 +1,32 @@ +--- +title: urls.Parse +description: Parse parses a given url, which may be relative or absolute, into a URL structure. +godocref: https://godoc.org/net/url#URL +date: 2017-09-25 +publishdate: 2017-09-25 +lastmod: 2017-09-25 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [urls] +signature: ["urls.Parse URL"] +workson: [] +hugoversion: +deprecated: false +aliases: [] +--- + +`urls.Parse` takes a url as input + + +``` +{{ $url := urls.Parse "http://www.gohugo.io" }} +``` + +and returns a [URL](https://godoc.org/net/url#URL) structure. The struct fields are accessed via the `.` notation: + +``` +{{ $url.Scheme }} → "http" +{{ $url.Host }} → "www.gohugo.io" +``` \ No newline at end of file diff --git a/content/news/0.28-relnotes-ready.md b/content/news/0.28-relnotes-ready.md new file mode 100644 index 000000000..ac4537d8d --- /dev/null +++ b/content/news/0.28-relnotes-ready.md @@ -0,0 +1,65 @@ + +--- +date: 2017-09-25 +title: "Hugo 0.28: High-speed Syntax Highlighting!" +description: "Chroma is the new default syntax highlighter in Hugo." +categories: ["Releases"] +slug: "0.28-relnotes" +images: +- images/blog/hugo-28-poster.png +--- + + Hugo `0.28` brings **blistering fast and native syntax highlighting** from [Chroma](https://github.com/alecthomas/chroma) ([fb33d828](https://github.com/gohugoio/hugo/commit/fb33d8286d78a78a74deb44355b621852a1c4033) [@bep](https://github.com/bep) [#3888](https://github.com/gohugoio/hugo/issues/3888)). A big thank you to [Alec Thomas](https://github.com/alecthomas) for taking on this massive task of porting the popular python highlighter Pygments to Go. + +Hugo has been caching the highlighter output to disk, so for repeated builds it has been fine, but this little snippet, showing a build of the [gohugo.io](https://gohugo.io/) site without cache and with both Pygments and Chroma, should illustrate the improvement: + +{{< asciicast Lc5iwTVny2kuUC8lqvNnL6oDU >}} + +See the [Updated Documentation](https://gohugo.io/content-management/syntax-highlighting/) for more information about how this works. + +Worth mentioning is also the `liveReloadPort` flag on `hugo server`, which makes it possible to do "live reloads" behind a HTTPS proxy, which makes for very cool remote customer demos. + +One example would be a Hugo server running behind a [ngrok](https://ngrok.com) tunnel: + +```bash +ngrok http 1313 +``` +Then start the Hugo server with: + +```bash +hugo server -b https://youridhere.ngrok.io --appendPort=false --liveReloadPort=443 --navigateToChanged +``` + +The `navigateToChanged` flag is slightly unrelated, but it is super cool ... + +This release represents **15 contributions by 2 contributors** to the main Hugo code base. + +Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs), +which has received **9 contributions by 7 contributors**. A special thanks to [@bep](https://github.com/bep), [@i-give-up](https://github.com/i-give-up), [@muhajirframe](https://github.com/muhajirframe), and [@icannotfly](https://github.com/icannotfly) for their work on the documentation site. + +Hugo now has: + +* 19771+ [stars](https://github.com/gohugoio/hugo/stargazers) +* 454+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) +* 180+ [themes](http://themes.gohugo.io/) + +## Notes +* Hugo now uses Chroma as new default syntax highlighter. This should in most cases work out-of-the box or with very little adjustments. But if you want to continue to use Pygments, set `pygmentsUseClassic=true` in your site config. +* We now add a set of "no cache" headers to the responses for `hugo server`, which makes the most sense in most development scenarios. Run with `hugo server --noHTTPCache=false` to get the old behaviour. + +## Enhancements + +### Templates + +* Add `urls.Parse` function [81ed5647](https://github.com/gohugoio/hugo/commit/81ed564793609a32be20a569cc15da2cc02dd734) [@moorereason](https://github.com/moorereason) [#3849](https://github.com/gohugoio/hugo/issues/3849) +* Add `math.Ceil`, `Floor`, and `Round` [19c59104](https://github.com/gohugoio/hugo/commit/19c5910485242838d6678c2aacd8501f7e646a53) [@moorereason](https://github.com/moorereason) [#3883](https://github.com/gohugoio/hugo/issues/3883) + +### Other + +* Use Chroma as new default syntax highlighter [fb33d828](https://github.com/gohugoio/hugo/commit/fb33d8286d78a78a74deb44355b621852a1c4033) [@bep](https://github.com/bep) [#3888](https://github.com/gohugoio/hugo/issues/3888) +* Trim newlines in the hightlight shortcode [0d29a0f7](https://github.com/gohugoio/hugo/commit/0d29a0f7819e8d73149701052c29f090cd6db42b) [@bep](https://github.com/bep) [#3898](https://github.com/gohugoio/hugo/issues/3898) +* Update `goorgeous` [b8fabce2](https://github.com/gohugoio/hugo/commit/b8fabce217fcb52e3f273491bef95c7977058732) [@bep](https://github.com/bep) [#3899](https://github.com/gohugoio/hugo/issues/3899) +* Add `liveReloadPort` flag to server [b1804776](https://github.com/gohugoio/hugo/commit/b180477631555824a06293053e2b6e63c5f07361) [@bep](https://github.com/bep) [#3882](https://github.com/gohugoio/hugo/issues/3882) +* Add `noHTTPCache` flag to hugo server (default on) [0b34af21](https://github.com/gohugoio/hugo/commit/0b34af216154367af7f53ce93d44e6b3d58c3f34) [@bep](https://github.com/bep) [#3897](https://github.com/gohugoio/hugo/issues/3897) +* Make `noHTTPCache` default on [80c7ea60](https://github.com/gohugoio/hugo/commit/80c7ea60a0e0f488563a6b7311f3d4c23457aac7) [@bep](https://github.com/bep) [#3897](https://github.com/gohugoio/hugo/issues/3897) + diff --git a/content/news/0.29-relnotes-ready.md b/content/news/0.29-relnotes-ready.md new file mode 100644 index 000000000..53551886f --- /dev/null +++ b/content/news/0.29-relnotes-ready.md @@ -0,0 +1,47 @@ + +--- +date: 2017-09-26 +title: "Hugo 0.29: Template Metrics" +description: "Makes it easy to find template bottle necks." +categories: ["Releases"] +slug: "0.29-relnotes" +images: +- images/blog/hugo-29-poster.png +--- + +Hugo `0.29` brings Template Metrics by [@moorereason](https://github.com/moorereason). Hugo is very fast, but it is still possible to write ineffective templates. Now these should be easy to identify. Just run: + +```bash +hugo --templateMetrics +``` +Now, that was the tasty carrot. The real reason this release comes so fast after the last one is to change the default value for the new `noHTTPCache` flag, which gives away too much performance to make sense as a default value. + +Hugo now has: + +* 19817+ [stars](https://github.com/gohugoio/hugo/stargazers) +* 454+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) +* 180+ [themes](http://themes.gohugo.io/) + +## Notes +* Make `noHTTPCache` default false [e94d4f01](https://github.com/gohugoio/hugo/commit/e94d4f0177852b357f40fb9686a0ff3667d86351) [@bep](https://github.com/bep) + +## Enhancements + +### Templates +* Add simple template metrics feature [b4a14c25](https://github.com/gohugoio/hugo/commit/b4a14c25fe85c41b79497be27ead128502a4dd7b) [@moorereason](https://github.com/moorereason) +* Set Metrics at creation time [b5e1dc58](https://github.com/gohugoio/hugo/commit/b5e1dc5892f81da798d0d4e964a1f3328532f45e) [@bep](https://github.com/bep) +* Fix sort order [d3681f51](https://github.com/gohugoio/hugo/commit/d3681f51c08fb11e8addcf9f0b484848d20d46cc) [@bep](https://github.com/bep) +* Add math.Ceil, Floor, and Round to method mappings [8a69d235](https://github.com/gohugoio/hugo/commit/8a69d2356703d9f2fcb75bce0ae514e70ebd8e01) [@moorereason](https://github.com/moorereason) + +### Other +* Split go build in Dockerfile [d9697e27](https://github.com/gohugoio/hugo/commit/d9697e275ecb038958b3dcea2b43e11dcba28fc9) [@tjamet](https://github.com/tjamet) +* Update Dockerfile to benefit build cache [09d960f1](https://github.com/gohugoio/hugo/commit/09d960f17396eb7fd2c8fe6527db9503d59f0b4f) [@tjamet](https://github.com/tjamet) +* Add git to snap package for GitInfo [a3a3f5b8](https://github.com/gohugoio/hugo/commit/a3a3f5b86114213a23337499551f000662b26022) [@ghalse](https://github.com/ghalse) + + + + + + + + diff --git a/content/templates/internal.md b/content/templates/internal.md index 20390c2f5..6f8d4e864 100644 --- a/content/templates/internal.md +++ b/content/templates/internal.md @@ -129,3 +129,5 @@ You can then render your custom Disqus partial template as follows: * `_internal/schema.html` * `_internal/twitter_cards.html` +[disqus]: https://disqus.com +[disqussignup]: https://disqus.com/profile/signup/ diff --git a/content/templates/rss.md b/content/templates/rss.md index 7e2b662c4..e7d64f3f5 100644 --- a/content/templates/rss.md +++ b/content/templates/rss.md @@ -31,7 +31,7 @@ You can use a single RSS template to generate all of your RSS feeds or create a Hugo ships with its own [RSS 2.0 template](#the-embedded-rss-xml). The embedded template will be sufficient for most use cases. {{% /note %}} -RSS pages are of the type `Page` and have all the [page variables](/layout/variables/) available to use in the templates. +RSS pages are of the type `Page` and have all the [page variables](/variables/page/) available to use in the templates. ### Section RSS diff --git a/content/tools/editors.md b/content/tools/editors.md index 351ee84c7..0a4c34951 100644 --- a/content/tools/editors.md +++ b/content/tools/editors.md @@ -31,6 +31,7 @@ The Hugo community uses a wide range of preferred tools and has developed plug-i ## Emacs * [hugo.el](https://github.com/yewton/hugo.el). Some helper functions for creating a Website with Hugo. Note that Hugo also supports [Org-mode][formats]. +* [ox-hugo.el](https://ox-hugo.netlify.com). Native Org-mode exporter that exports to Blackfriday Markdown with Hugo front-matter. `ox-hugo` supports two common Org blogging flows --- exporting multiple Org sub-trees in a single file to multiple Hugo posts, and exporting a single Org file to a single Hugo post. It also leverages the Org tag and property inheritance features. See [*Why ox-hugo?*](https://ox-hugo.netlify.com/doc/why-ox-hugo/) for more. ## Vim @@ -41,4 +42,4 @@ The Hugo community uses a wide range of preferred tools and has developed plug-i * [Hugofy](https://atom.io/packages/hugofy). A Hugo Static Website Generator package for Atom. * [language-hugo](https://atom.io/packages/language-hugo). Adds syntax highlighting to Hugo files. -[formats]: /content-management/formats/ \ No newline at end of file +[formats]: /content-management/formats/ diff --git a/content/tools/migrations.md b/content/tools/migrations.md index e739db9f9..2e546ca9f 100644 --- a/content/tools/migrations.md +++ b/content/tools/migrations.md @@ -23,7 +23,7 @@ This section highlights some projects around Hugo that are independently develop Do you know or maintain a similar project around Hugo? Feel free to open a [pull request](https://github.com/gohugoio/hugo/pulls) on GitHub if you think it should be added. {{% /note %}} -Take a look at this list of migration tools if you currently use other logging tools like Jekyll or WordPress but intend to switch to Hugo instead. They'll take care to export your content into Hugo-friendly formats. +Take a look at this list of migration tools if you currently use other blogging tools like Jekyll or WordPress but intend to switch to Hugo instead. They'll take care to export your content into Hugo-friendly formats. ## Jekyll diff --git a/netlify.toml b/netlify.toml index d7d7971b1..91c00be1c 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,15 +3,15 @@ command = "hugo" [context.production.environment] - HUGO_VERSION = "0.27.1" + HUGO_VERSION = "0.29" HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" [context.deploy-preview.environment] - HUGO_VERSION = "0.27.1" + HUGO_VERSION = "0.29" [context.branch-deploy.environment] - HUGO_VERSION = "0.27.1" + HUGO_VERSION = "0.29" [context.next.environment] HUGO_BASEURL = "https://next--gohugoio.netlify.com/" diff --git a/static/images/blog/hugo-28-poster.png b/static/images/blog/hugo-28-poster.png new file mode 100644 index 000000000..ae3d6ac16 Binary files /dev/null and b/static/images/blog/hugo-28-poster.png differ diff --git a/static/images/blog/hugo-29-poster.png b/static/images/blog/hugo-29-poster.png new file mode 100644 index 000000000..dbe2d434f Binary files /dev/null and b/static/images/blog/hugo-29-poster.png differ