diff --git a/docs/archetypes/showcase/bio.md b/docs/archetypes/showcase/bio.md new file mode 100644 index 000000000..2443c2f35 --- /dev/null +++ b/docs/archetypes/showcase/bio.md @@ -0,0 +1,8 @@ + +Add some **general info** about {{ replace .Name "-" " " | title }} here. + +The site is built by: + +* [Person 1](https://example.com) +* [Person 1](https://example.com) + diff --git a/docs/archetypes/showcase/featured.png b/docs/archetypes/showcase/featured.png new file mode 100644 index 000000000..4f390132e Binary files /dev/null and b/docs/archetypes/showcase/featured.png differ diff --git a/docs/archetypes/showcase/index.md b/docs/archetypes/showcase/index.md new file mode 100644 index 000000000..a21bb9726 --- /dev/null +++ b/docs/archetypes/showcase/index.md @@ -0,0 +1,37 @@ +--- + +title: {{ replace .Name "-" " " | title }} +date: {{ now.Format "2006-01-02" }} + +description: "A short description of this page." + +# The URL to the site on the internet. +siteURL: https://gohugo.io/ + +# Link to the site's Hugo source code if public and you can/want to share. +# Remove or leave blank if not needed/wanted. +siteSource: https://github.com/gohugoio/hugoDocs + +# Add credit to the article author. Leave blank or remove if not needed/wanted. +byline: "[bep](https://github.com/bep), Hugo Lead" + +--- + +To complete this showcase: + +1. Write the story about your site in this file. +2. Add a summary to the `bio.md` file in this folder. +3. Replace the `featured-template.png` with a screenshot of your site. You can rename it, but it must contain the word `featured`. +4. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls + +The content of this bundle explained: + +index.md +: The main content file. Fill in required front matter metadata and write your story. I does not have to be a novel. It can even be self-promotional, but it should include Hugo in some form. + +bio.md +: A short summary of the website. Site credits (who built it) fits nicely here. + +featured.png +: A reasonably sized screenshot of your website. It can be named anything, but the name must start with "featured". The sample image is `1500x750` (2:1 aspect ratio). + diff --git a/docs/config.toml b/docs/config.toml index 054ccab56..98dcf0865 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -107,7 +107,7 @@ twitter = "GoHugoIO" # Note that you can also set this per image processing. resampleFilter = "CatmullRom" -# Defatult JPEG quality setting. Default is 75. +# Default JPEG quality setting. Default is 75. quality = 75 anchor = "smart" diff --git a/docs/content/en/about/new-in-032/index.md b/docs/content/en/about/new-in-032/index.md index 5ae688fc6..f3e56dc6b 100644 --- a/docs/content/en/about/new-in-032/index.md +++ b/docs/content/en/about/new-in-032/index.md @@ -199,7 +199,7 @@ You can configure an `imaging` section in `config.toml` with default image proce # See https://github.com/disintegration/imaging resampleFilter = "box" -# Defatult JPEG quality setting. Default is 75. +# Default JPEG quality setting. Default is 75. quality = 68 ``` diff --git a/docs/content/en/commands/hugo.md b/docs/content/en/commands/hugo.md index fd4884c90..add644e1c 100644 --- a/docs/content/en/commands/hugo.md +++ b/docs/content/en/commands/hugo.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo" slug: hugo url: /commands/hugo/ @@ -74,4 +74,4 @@ hugo [flags] * [hugo server](/commands/hugo_server/) - A high performance webserver * [hugo version](/commands/hugo_version/) - Print the version number of Hugo -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_benchmark.md b/docs/content/en/commands/hugo_benchmark.md index f299305cf..3a8c58846 100644 --- a/docs/content/en/commands/hugo_benchmark.md +++ b/docs/content/en/commands/hugo_benchmark.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo benchmark" slug: hugo_benchmark url: /commands/hugo_benchmark/ @@ -66,4 +66,4 @@ hugo benchmark [flags] * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_check.md b/docs/content/en/commands/hugo_check.md index a820de6e5..ef982f32d 100644 --- a/docs/content/en/commands/hugo_check.md +++ b/docs/content/en/commands/hugo_check.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 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 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_check_ulimit.md b/docs/content/en/commands/hugo_check_ulimit.md index a87640468..5c2f1a5d2 100644 --- a/docs/content/en/commands/hugo_check_ulimit.md +++ b/docs/content/en/commands/hugo_check_ulimit.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo check ulimit" slug: hugo_check_ulimit url: /commands/hugo_check_ulimit/ @@ -39,4 +39,4 @@ hugo check ulimit [flags] * [hugo check](/commands/hugo_check/) - Contains some verification checks -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_config.md b/docs/content/en/commands/hugo_config.md index f016b4f6f..a7b47fbbe 100644 --- a/docs/content/en/commands/hugo_config.md +++ b/docs/content/en/commands/hugo_config.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo config" slug: hugo_config url: /commands/hugo_config/ @@ -39,4 +39,4 @@ hugo config [flags] * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_convert.md b/docs/content/en/commands/hugo_convert.md index 0a906eb62..18bce9182 100644 --- a/docs/content/en/commands/hugo_convert.md +++ b/docs/content/en/commands/hugo_convert.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 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 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_convert_toJSON.md b/docs/content/en/commands/hugo_convert_toJSON.md index f73dbc70c..cd3fa68a1 100644 --- a/docs/content/en/commands/hugo_convert_toJSON.md +++ b/docs/content/en/commands/hugo_convert_toJSON.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo convert toJSON" slug: hugo_convert_toJSON url: /commands/hugo_convert_tojson/ @@ -42,4 +42,4 @@ hugo convert toJSON [flags] * [hugo convert](/commands/hugo_convert/) - Convert your content to different formats -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_convert_toTOML.md b/docs/content/en/commands/hugo_convert_toTOML.md index e0a7c8bee..78f5591a4 100644 --- a/docs/content/en/commands/hugo_convert_toTOML.md +++ b/docs/content/en/commands/hugo_convert_toTOML.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo convert toTOML" slug: hugo_convert_toTOML url: /commands/hugo_convert_totoml/ @@ -42,4 +42,4 @@ hugo convert toTOML [flags] * [hugo convert](/commands/hugo_convert/) - Convert your content to different formats -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_convert_toYAML.md b/docs/content/en/commands/hugo_convert_toYAML.md index 81e81d1d5..75b0990ea 100644 --- a/docs/content/en/commands/hugo_convert_toYAML.md +++ b/docs/content/en/commands/hugo_convert_toYAML.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo convert toYAML" slug: hugo_convert_toYAML url: /commands/hugo_convert_toyaml/ @@ -42,4 +42,4 @@ hugo convert toYAML [flags] * [hugo convert](/commands/hugo_convert/) - Convert your content to different formats -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_env.md b/docs/content/en/commands/hugo_env.md index c3c507ea4..8721b7f51 100644 --- a/docs/content/en/commands/hugo_env.md +++ b/docs/content/en/commands/hugo_env.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo env" slug: hugo_env url: /commands/hugo_env/ @@ -38,4 +38,4 @@ hugo env [flags] * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_gen.md b/docs/content/en/commands/hugo_gen.md index d2aef23b4..5d06b3c9d 100644 --- a/docs/content/en/commands/hugo_gen.md +++ b/docs/content/en/commands/hugo_gen.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 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 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_gen_autocomplete.md b/docs/content/en/commands/hugo_gen_autocomplete.md index f725ee322..906b58c82 100644 --- a/docs/content/en/commands/hugo_gen_autocomplete.md +++ b/docs/content/en/commands/hugo_gen_autocomplete.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo gen autocomplete" slug: hugo_gen_autocomplete url: /commands/hugo_gen_autocomplete/ @@ -56,4 +56,4 @@ hugo gen autocomplete [flags] * [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_gen_chromastyles.md b/docs/content/en/commands/hugo_gen_chromastyles.md index 912ec5d14..7e6b8dada 100644 --- a/docs/content/en/commands/hugo_gen_chromastyles.md +++ b/docs/content/en/commands/hugo_gen_chromastyles.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo gen chromastyles" slug: hugo_gen_chromastyles url: /commands/hugo_gen_chromastyles/ @@ -43,4 +43,4 @@ hugo gen chromastyles [flags] * [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_gen_doc.md b/docs/content/en/commands/hugo_gen_doc.md index d1e598304..b2d5b6afe 100644 --- a/docs/content/en/commands/hugo_gen_doc.md +++ b/docs/content/en/commands/hugo_gen_doc.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo gen doc" slug: hugo_gen_doc url: /commands/hugo_gen_doc/ @@ -45,4 +45,4 @@ hugo gen doc [flags] * [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_gen_man.md b/docs/content/en/commands/hugo_gen_man.md index 9586c02de..a3ef86306 100644 --- a/docs/content/en/commands/hugo_gen_man.md +++ b/docs/content/en/commands/hugo_gen_man.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo gen man" slug: hugo_gen_man url: /commands/hugo_gen_man/ @@ -41,4 +41,4 @@ hugo gen man [flags] * [hugo gen](/commands/hugo_gen/) - A collection of several useful generators. -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_import.md b/docs/content/en/commands/hugo_import.md index 5dfa2844b..21dc4b2bd 100644 --- a/docs/content/en/commands/hugo_import.md +++ b/docs/content/en/commands/hugo_import.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 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 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_import_jekyll.md b/docs/content/en/commands/hugo_import_jekyll.md index 6e07d80d5..7103000a3 100644 --- a/docs/content/en/commands/hugo_import_jekyll.md +++ b/docs/content/en/commands/hugo_import_jekyll.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo import jekyll" slug: hugo_import_jekyll url: /commands/hugo_import_jekyll/ @@ -41,4 +41,4 @@ hugo import jekyll [flags] * [hugo import](/commands/hugo_import/) - Import your site from others. -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_list.md b/docs/content/en/commands/hugo_list.md index 2cf839a21..538c362e4 100644 --- a/docs/content/en/commands/hugo_list.md +++ b/docs/content/en/commands/hugo_list.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 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 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_list_drafts.md b/docs/content/en/commands/hugo_list_drafts.md index 4e01709c1..8e5d461bd 100644 --- a/docs/content/en/commands/hugo_list_drafts.md +++ b/docs/content/en/commands/hugo_list_drafts.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo list drafts" slug: hugo_list_drafts url: /commands/hugo_list_drafts/ @@ -39,4 +39,4 @@ hugo list drafts [flags] * [hugo list](/commands/hugo_list/) - Listing out various types of content -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_list_expired.md b/docs/content/en/commands/hugo_list_expired.md index d435341b7..c276640dc 100644 --- a/docs/content/en/commands/hugo_list_expired.md +++ b/docs/content/en/commands/hugo_list_expired.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo list expired" slug: hugo_list_expired url: /commands/hugo_list_expired/ @@ -40,4 +40,4 @@ hugo list expired [flags] * [hugo list](/commands/hugo_list/) - Listing out various types of content -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_list_future.md b/docs/content/en/commands/hugo_list_future.md index 97bf5fd6b..c5c887636 100644 --- a/docs/content/en/commands/hugo_list_future.md +++ b/docs/content/en/commands/hugo_list_future.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo list future" slug: hugo_list_future url: /commands/hugo_list_future/ @@ -40,4 +40,4 @@ hugo list future [flags] * [hugo list](/commands/hugo_list/) - Listing out various types of content -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_new.md b/docs/content/en/commands/hugo_new.md index faf918e3d..0ff1076ec 100644 --- a/docs/content/en/commands/hugo_new.md +++ b/docs/content/en/commands/hugo_new.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo new" slug: hugo_new url: /commands/hugo_new/ @@ -17,8 +17,6 @@ You can also specify the kind with `-k KIND`. If archetypes are provided in your theme or site, they will be used. -Ensure you run this within the root directory of your site. - ``` hugo new [path] [flags] ``` @@ -50,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 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_new_site.md b/docs/content/en/commands/hugo_new_site.md index 812edda89..a2d054913 100644 --- a/docs/content/en/commands/hugo_new_site.md +++ b/docs/content/en/commands/hugo_new_site.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo new site" slug: hugo_new_site url: /commands/hugo_new_site/ @@ -43,4 +43,4 @@ hugo new site [path] [flags] * [hugo new](/commands/hugo_new/) - Create new content for your site -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_new_theme.md b/docs/content/en/commands/hugo_new_theme.md index 575687d01..6395b11da 100644 --- a/docs/content/en/commands/hugo_new_theme.md +++ b/docs/content/en/commands/hugo_new_theme.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo new theme" slug: hugo_new_theme url: /commands/hugo_new_theme/ @@ -42,4 +42,4 @@ hugo new theme [name] [flags] * [hugo new](/commands/hugo_new/) - Create new content for your site -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_server.md b/docs/content/en/commands/hugo_server.md index 94410be8e..ffb3ee280 100644 --- a/docs/content/en/commands/hugo_server.md +++ b/docs/content/en/commands/hugo_server.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo server" slug: hugo_server url: /commands/hugo_server/ @@ -40,7 +40,6 @@ hugo server [flags] --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 - --disableBrowserError do not show build errors in the browser --disableFastRender enables full re-renders on changes --disableKinds strings disable different kind of pages (home, RSS etc.) --disableLiveReload watch without enabling live browser reload on rebuild @@ -85,4 +84,4 @@ hugo server [flags] * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/commands/hugo_version.md b/docs/content/en/commands/hugo_version.md index bbf69c5c1..9a573ae4f 100644 --- a/docs/content/en/commands/hugo_version.md +++ b/docs/content/en/commands/hugo_version.md @@ -1,5 +1,5 @@ --- -date: 2018-10-26 +date: 2018-09-24 title: "hugo version" slug: hugo_version url: /commands/hugo_version/ @@ -38,4 +38,4 @@ hugo version [flags] * [hugo](/commands/hugo/) - hugo builds your site -###### Auto generated by spf13/cobra on 26-Oct-2018 +###### Auto generated by spf13/cobra on 24-Sep-2018 diff --git a/docs/content/en/content-management/cross-references.md b/docs/content/en/content-management/cross-references.md index 00f6ad1c1..59733555b 100644 --- a/docs/content/en/content-management/cross-references.md +++ b/docs/content/en/content-management/cross-references.md @@ -42,7 +42,7 @@ You will get an error if you document could not be uniquely resolved. The error Link to another language version of a document, you need to use this syntax: ```go-html-template -{{}} +{{}} ``` ### Get another Output Format diff --git a/docs/content/en/content-management/formats.md b/docs/content/en/content-management/formats.md index f7a466c3c..e666351a1 100644 --- a/docs/content/en/content-management/formats.md +++ b/docs/content/en/content-management/formats.md @@ -1,7 +1,7 @@ --- title: Supported Content Formats linktitle: Supported Content Formats -description: Markdown and Emacs Org-Mode have native support, and additional formats (e.g. Asciidoc) come via external helpers. +description: Both HTML and Markdown are supported content formats. date: 2017-01-10 publishdate: 2017-01-10 lastmod: 2017-04-06 @@ -19,7 +19,19 @@ toc: true **Markdown is the main content format** and comes in two flavours: The excellent [Blackfriday project][blackfriday] (name your files `*.md` or set `markup = "markdown"` in front matter) or its fork [Mmark][mmark] (name your files `*.mmark` or set `markup = "mmark"` in front matter), both very fast markdown engines written in Go. -For Emacs users, [goorgeous](https://github.com/chaseadamsio/goorgeous) provides built-in native support for Org-mode (name your files `*.org` or set `markup = "org"` in front matter) +For Emacs users, [goorgeous](https://github.com/chaseadamsio/goorgeous) provides built-in native support for Org-mode (name your files `*.org` or set `markup = "org"` in front matter) + +But in many situations, plain HTML is what you want. Just name your files with `.html` or `.htm` extension inside your content folder. Note that if you want your HTML files to have a layout, they need front matter. It can be empty, but it has to be there: + +```html +--- +title: "This is a content file in HTML" +--- + +
+

Hello, Hugo!

+
+``` {{% note "Deeply Nested Lists" %}} Before you begin writing your content in markdown, Blackfriday has a known issue [(#329)](https://github.com/russross/blackfriday/issues/329) with handling deeply nested lists. Luckily, there is an easy workaround. Use 4-spaces (i.e., tab) rather than 2-space indentations. diff --git a/docs/content/en/content-management/front-matter.md b/docs/content/en/content-management/front-matter.md index 9ad1d3804..4cf6825da 100644 --- a/docs/content/en/content-management/front-matter.md +++ b/docs/content/en/content-management/front-matter.md @@ -59,6 +59,9 @@ There are a few predefined variables that Hugo is aware of. See [Page Variables] aliases : an array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details. +audio +: an array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`. + date : the datetime at which the content was created; note this value is auto-populated according to Hugo's built-in [archetype][]. @@ -74,6 +77,9 @@ expiryDate headless : if `true`, sets a leaf bundle to be [headless][headless-bundle]. +images +: an array of paths to images related to the page; used by [internal templates](/templates/internal) such as `_internal/twitter_cards.html`. + isCJKLanguage : if `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages. @@ -101,6 +107,9 @@ publishDate resources : used for configuring page bundle resources. See [Page Resources][page-resources]. +series +: an array of series this page belongs to, as a subset of the `series` [taxonomy](/content-management/taxonomies/); used by the `opengraph` [internal template](/templates/internal) to populate `og:see_also`. + slug : appears as the tail of the output URL. A value specified in front matter will override the segment of the URL based on the filename. @@ -114,6 +123,9 @@ 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. +videos +: an array of paths to videos related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:video`. + weight : used for [ordering your content in lists][ordering]. Lower weight gets higher precedence. So content with lower weight will come first. diff --git a/docs/content/en/content-management/image-processing/index.md b/docs/content/en/content-management/image-processing/index.md index b26a9c059..b83a6c103 100644 --- a/docs/content/en/content-management/image-processing/index.md +++ b/docs/content/en/content-management/image-processing/index.md @@ -151,7 +151,7 @@ You can configure an `imaging` section in `config.toml` with default image proce # See https://github.com/disintegration/imaging resampleFilter = "box" -# Defatult JPEG quality setting. Default is 75. +# Default JPEG quality setting. Default is 75. quality = 75 # Anchor used when cropping pictures. diff --git a/docs/content/en/content-management/multilingual.md b/docs/content/en/content-management/multilingual.md index 45b614351..c72cb50ce 100644 --- a/docs/content/en/content-management/multilingual.md +++ b/docs/content/en/content-management/multilingual.md @@ -29,6 +29,7 @@ The following is an example of a site configuration for a multilingual Hugo proj DefaultContentLanguage = "en" copyright = "Everything is mine" +[params] [params.navigation] help = "Help" @@ -48,8 +49,7 @@ linkedin = "https://linkedin.com/fr/whoever" help = "Aide" {{< /code-toggle >}} -Anything not defined in a `[languages]` block will fall back to the global -value for that key (e.g., `copyright` for the English [`en`] language). +Anything not defined in a `[languages]` block will fall back to the global value for that key (e.g., `copyright` for the English [`en`] language). This also works for `params`, as demonstrated witgh `help` above: You will get the value `Aide` in French and `Help` in all the languages without this parameter set. With the configuration above, all content, sitemap, RSS feeds, paginations, and taxonomy pages will be rendered below `/` in English (your default content language) and then below `/fr` in French. @@ -67,7 +67,7 @@ Only the obvious non-global options can be overridden per language. Examples of You can disable one or more languages. This can be useful when working on a new translation. ```toml -disableLanguages = ["fr", "jp"] +disableLanguages = ["fr", "ja"] ``` Note that you cannot disable the default content language. @@ -75,7 +75,7 @@ Note that you cannot disable the default content language. We kept this as a standalone setting to make it easier to set via [OS environment](/getting-started/configuration/#configure-with-environment-variables): ```bash -HUGO_DISABLELANGUAGES="fr jp" hugo +HUGO_DISABLELANGUAGES="fr ja" hugo ``` If you have already a list of disabled languages in `config.toml`, you can enable them in development like this: diff --git a/docs/content/en/content-management/page-resources.md b/docs/content/en/content-management/page-resources.md index f45cf4b01..c3c29e452 100644 --- a/docs/content/en/content-management/page-resources.md +++ b/docs/content/en/content-management/page-resources.md @@ -17,7 +17,7 @@ menu: ## Properties ResourceType -: The main type of the resource. For example, a file of MIME type `image/jpg` has for ResourceType `image`. +: The main type of the resource. For example, a file of MIME type `image/jpg` has the ResourceType `image`. Name : Default value is the filename (relative to the owning page). Can be set in front matter. @@ -31,6 +31,21 @@ Permalink RelPermalink : The relative URL to the resource. Resources of type `page` will have no value. +Content +: The content of the resource itself. For most resources, this returns a string with the contents of the file. This can be used to inline some resources, such as `` or ``. + +MediaType +: The MIME type of the resource, such as `image/jpg`. + +MediaType.MainType +: The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`. + +MediaType.SubType +: The subtype of the resource's MIME type. For example, a file of MIME type `application/pdf` has for SubType `pdf`. Note that this is not the same as the file extension - PowerPoint files have a subtype of `vnd.mspowerpoint`. + +MediaType.Suffixes +: A slice of possible suffixes for the resource's MIME type. + ## Methods ByType : Returns the page resources of the given type. diff --git a/docs/content/en/content-management/related.md b/docs/content/en/content-management/related.md index 636e95970..e87aecca4 100644 --- a/docs/content/en/content-management/related.md +++ b/docs/content/en/content-management/related.md @@ -42,14 +42,14 @@ Here is the list of "Related" methods available on a page collection such `.Regu Returns a collection of pages related the given one. ``` -{{ $related := .RegularPages.Related . }} +{{ $related := .Site.RegularPages.Related . }} ``` #### .RelatedIndices PAGE INDICE1 [INDICE2 ...] Returns a collection of pages related to a given one restricted to a list of indices. ``` -{{ $related := .RegularPages.RelatedIndices . "tags" "date" }} +{{ $related := .Site.RegularPages.RelatedIndices . "tags" "date" }} ``` #### .RelatedTo KEYVALS [KEYVALS2 ...] @@ -58,7 +58,7 @@ Returns a collection of pages related together by a set of indices and their mat In order to build those set and pass them as argument, one must use the `keyVals` function where the first agrument would be the `indice` and the consective ones its potential `matches`. ``` -{{ $related := .RegularPages.RelatedTo ( keyVals "tags" "hugo" "rocks") ( keyVals "date" .Date ) }} +{{ $related := .Site.RegularPages.RelatedTo ( keyVals "tags" "hugo" "rocks") ( keyVals "date" .Date ) }} ``` {{% note %}} diff --git a/docs/content/en/contribute/development.md b/docs/content/en/contribute/development.md index e9e1cd10f..93b31ee8c 100644 --- a/docs/content/en/contribute/development.md +++ b/docs/content/en/contribute/development.md @@ -83,7 +83,7 @@ If you're going to contribute code, you'll need to have an account on GitHub. Go ## Install Git on Your System -You will need to have Git installed on your computer to contribute to Hugo development. Teaching Git is outside the scope of the Hugo docs, but if you're looking for an excellent reference to learn the basics of Git, we recommend the [Git book][gitbook] if you are not sure where to begin. We will include short explainations of the Git commands in this document. +You will need to have Git installed on your computer to contribute to Hugo development. Teaching Git is outside the scope of the Hugo docs, but if you're looking for an excellent reference to learn the basics of Git, we recommend the [Git book][gitbook] if you are not sure where to begin. We will include short explanations of the Git commands in this document. Git is a [version control system](https://en.wikipedia.org/wiki/Version_control) to track the changes of source code. Hugo depends on smaller third-party packages that are used to extend the functionality. We use them because we don't want to reinvent the wheel. @@ -242,7 +242,7 @@ Sometimes changes on the codebase can cause unintended side effects. Or they don Make sure the commands `go test ./...` passes, and `go build` completes. ### Formatting -The Go code styleguide maybe is opinionated but it ensures that the codebase looks the same, regardless who wrote the code. Go comes with its own formatting tool. Let's apply the styleguide to our addtions: +The Go code styleguide maybe is opinionated but it ensures that the codebase looks the same, regardless who wrote the code. Go comes with its own formatting tool. Let's apply the styleguide to our additions: ``` go fmt ./... diff --git a/docs/content/en/functions/anchorize.md b/docs/content/en/functions/anchorize.md new file mode 100644 index 000000000..a0745edaf --- /dev/null +++ b/docs/content/en/functions/anchorize.md @@ -0,0 +1,26 @@ +--- +title: anchorize +description: Takes a string and sanitizes it the same way as Blackfriday does for markdown headers. +date: 2018-10-13 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [markdown,strings] +signature: ["anchorize INPUT"] +hugoversion: "0.39" +workson: [] +relatedfuncs: [humanize] +--- + +The template function uses the [`SanitizedAnchorName` logic from Blackfriday](https://github.com/russross/blackfriday#sanitized-anchor-names). +Since the same sanitizing logic is used as the markdown parser, you can determine the ID of a header for linking with anchor tags. + +``` +{{anchorize "This is a header"}} → "this-is-a-header" +{{anchorize "This is also a header"}} → "this-is-also-a-header" +{{anchorize "main.go"}} → "main-go" +{{anchorize "Article 123"}} → "article-123" +{{anchorize "<- Let's try this, shall we?"}} → "let-s-try-this-shall-we" +{{anchorize "Hello, 世界"}} → "hello-世界" +``` diff --git a/docs/content/en/functions/humanize.md b/docs/content/en/functions/humanize.md index 2b9a98132..fe06de3a7 100644 --- a/docs/content/en/functions/humanize.md +++ b/docs/content/en/functions/humanize.md @@ -14,7 +14,7 @@ keywords: [strings,casing] signature: ["humanize INPUT"] workson: [] hugoversion: -relatedfuncs: [] +relatedfuncs: [anchorize] deprecated: false aliases: [] --- @@ -28,4 +28,3 @@ If the input is either an int64 value or the string representation of an integer {{humanize "52"}} → "52nd" {{humanize 103}} → "103rd" ``` - diff --git a/docs/content/en/functions/range.md b/docs/content/en/functions/range.md index 6f007e93d..f80967c41 100644 --- a/docs/content/en/functions/range.md +++ b/docs/content/en/functions/range.md @@ -22,4 +22,4 @@ aliases: [] Just like in the Go programming language, Go and Hugo templates make heavy use of `range` to iterate over a map, array or slice. -`range` is fundamental to templating in Hugo. (See the [Introduction to Hugo Templates](/templates/introduction/) for more examples. +`range` is fundamental to templating in Hugo. (See the [Introduction to Hugo Templates](/templates/introduction/) for more examples.) diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md index f43c51b9b..77ef30e4f 100644 --- a/docs/content/en/getting-started/configuration.md +++ b/docs/content/en/getting-started/configuration.md @@ -126,6 +126,9 @@ languages languageCode ("") : The site's language code. +languageName ("") +: The site's language name. + disableLanguages : See [Disable a Language](/content-management/multilingual/#disable-a-language) diff --git a/docs/content/en/getting-started/installing.md b/docs/content/en/getting-started/installing.md index b5b210d3e..e73511c5b 100644 --- a/docs/content/en/getting-started/installing.md +++ b/docs/content/en/getting-started/installing.md @@ -86,10 +86,10 @@ mkdir $HOME/src cd $HOME/src git clone https://github.com/gohugoio/hugo.git cd hugo -go install +go install --tags extended {{< /code >}} -Remove `HUGO_BUILD_TAGS=extended` if you do not want Sass/SCSS support. +Remove `--tags extended` if you do not want/need Sass/SCSS support. {{% note %}} If you are a Windows user, substitute the `$HOME` environment variable above with `%USERPROFILE%`. diff --git a/docs/content/en/news/0.45-relnotes/index.md b/docs/content/en/news/0.45-relnotes/index.md index b67a24de6..83051c058 100644 --- a/docs/content/en/news/0.45-relnotes/index.md +++ b/docs/content/en/news/0.45-relnotes/index.md @@ -39,7 +39,7 @@ You can also use the `..` to refer to a page one level up etc.: We have now also added language support to `ref` and `relref`, so you can link to a page in another language: ```go-html-template -{{}} +{{}} ``` To link to a given Output Format of a document, you can use this syntax: diff --git a/docs/content/en/news/0.49-relnotes/featured-hugo-49-poster.png b/docs/content/en/news/0.49-relnotes/featured-hugo-49-poster.png new file mode 100644 index 000000000..6f0f42ed4 Binary files /dev/null and b/docs/content/en/news/0.49-relnotes/featured-hugo-49-poster.png differ diff --git a/docs/content/en/news/0.49-relnotes/index.md b/docs/content/en/news/0.49-relnotes/index.md index 83784cf21..6bb272c33 100644 --- a/docs/content/en/news/0.49-relnotes/index.md +++ b/docs/content/en/news/0.49-relnotes/index.md @@ -1,8 +1,8 @@ --- date: 2018-09-24 -title: "0.49" -description: "0.49" +title: "Hugo 0.49: Directory Based Archetypes" +description: "Hugo 0.49 brings archetype bundle support and collection goodness." categories: ["Releases"] --- diff --git a/docs/content/en/news/0.49.1-relnotes/index.md b/docs/content/en/news/0.49.1-relnotes/index.md index 9327a7060..a3858a9e1 100644 --- a/docs/content/en/news/0.49.1-relnotes/index.md +++ b/docs/content/en/news/0.49.1-relnotes/index.md @@ -1,17 +1,15 @@ --- date: 2018-10-10 -title: "0.49.1" -description: "0.49.1" +title: "Hugo 0.49.1: Bug Fix" +description: "This release fixes an issue where resources.Concat would sometimes fail." categories: ["Releases"] images: - images/blog/hugo-bug-poster.png --- - - -This is a bug-fix release with a 2 related fixed. This was introduced in Hugo 0.49. The most notable error situation was that `resources.Concat` could fail in some situations. +This is a bug-fix release with 2 related fixes. This was introduced in Hugo 0.49. The most notable error situation was that `resources.Concat` could fail in some situations. * Fix handling of different interface types in Slice [e2201ef1](https://github.com/gohugoio/hugo/commit/e2201ef15fdefe257ad284b2df4ccc8f8c38fac2) [@bep](https://github.com/bep) [#5269](https://github.com/gohugoio/hugo/issues/5269) diff --git a/docs/content/en/news/0.49.2-relnotes/index.md b/docs/content/en/news/0.49.2-relnotes/index.md index a4bfc979c..1d24cd624 100644 --- a/docs/content/en/news/0.49.2-relnotes/index.md +++ b/docs/content/en/news/0.49.2-relnotes/index.md @@ -1,17 +1,13 @@ - --- date: 2018-10-11 -title: "0.49.2" -description: "0.49.2" +title: "Hugo 0.49.2: One Bug Fix" +description: "Fixes a type issue in append and Scratch.Add" categories: ["Releases"] images: - images/blog/hugo-bug-poster.png - --- - - -This is fixes one regression from Hugo `0.42.1`: +This fixes one regression from Hugo `0.42.1`: * Fix type checking in Append [2159d77f](https://github.com/gohugoio/hugo/commit/2159d77f368eb1f78e51dd94133554f88052d85f) [@bep](https://github.com/bep) [#5303](https://github.com/gohugoio/hugo/issues/5303) diff --git a/docs/content/en/showcase/template/index.md b/docs/content/en/showcase/template/index.md index 4210269c8..a0d83955e 100644 --- a/docs/content/en/showcase/template/index.md +++ b/docs/content/en/showcase/template/index.md @@ -1,21 +1,10 @@ --- -# A suitable title for this article. title: Hugo Showcase Template - -# Set this to the current date. date: 2018-02-07 - description: "A short description of this page." - -# The URL to the site on the internet. siteURL: https://gohugo.io/ - -# Link to the site's Hugo source code if public and you can/want to share. -# Remove or leave blank if not needed/wanted. siteSource: https://github.com/gohugoio/hugoDocs - -# Add credit to the article author. Leave blank or remove if not needed/wanted. byline: "[bep](https://github.com/bep), Hugo Lead" --- @@ -25,25 +14,9 @@ Have a **notable Hugo site[^1]**? We would love to feature it in this **Showcase We would really appreciate if you could: 1. Fork https://github.com/gohugoio/hugoDocs -1. Create a copy of the [content/showcase/template](https://github.com/gohugoio/hugoDocs/tree/master/content/showcase/template) directory with a suitable name. If you now run `hugo server`, your site should show up in [http://localhost:1313/showcase/](http://localhost:1313/showcase/) and on the front page. -2. Adjust the [files](#files) and write a story about your site +2. Run `hugo new showcase/your-site` (this requires >= Hugo 0.49). This will use the archetype bundle in the [docs repo](https://github.com/gohugoio/hugoDocs/tree/master/archetypes). +3. Follow the instructions in the newly created page bundle. 3. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls -**Note:** The Showcase section uses the latest bells and whistles from Hugo, [resources](/content-management/page-resources/) with [image processing](/content-management/image-processing/), so you need a reasonable up-to-date [Hugo version](https://github.com/gohugoio/hugo/releases). -## Files - -The content of the [content/showcase/template](https://github.com/gohugoio/hugoDocs/tree/master/content/showcase/template) directory explained: - -index.md -: The main content file. Fill in required front matter metadata and write your story. I does not have to be a novel. It can even be self-promotional, but it should include Hugo in some form. - -bio.md -: A short summary of the website. Site credits (who built it) fits nicely here. - -featured-template.png -: A reasonably sized screenshot of your website. It can be named anything, but the name must start with "featured". The sample image is `1500x750` (2:1 aspect ratio). - - - -[^1]: We want this to show Hugo in its best light, so this is not for the average Hugo blog. In most cases the answer to "Is my site [notabable](http://www.dictionary.com/browse/notable)?" will be obvious, but if in doubt, create an [issue](https://github.com/gohugoio/hugoDocs/issues) with a link and some words, and we can discuss it. But if you have a site with an interesting Hugo story or a company site where the company itself is notable, you are most welcome. +[^1]: We want this to show Hugo in its best light, so this is not for the average Hugo blog. In most cases the answer to "Is my site [notable](http://www.dictionary.com/browse/notable)?" will be obvious, but if in doubt, create an [issue](https://github.com/gohugoio/hugoDocs/issues) with a link and some words, and we can discuss it. But if you have a site with an interesting Hugo story or a company site where the company itself is notable, you are most welcome. diff --git a/docs/content/en/templates/internal.md b/docs/content/en/templates/internal.md index 7fbfec43c..fdec63c57 100644 --- a/docs/content/en/templates/internal.md +++ b/docs/content/en/templates/internal.md @@ -50,6 +50,8 @@ You can then include the Google Analytics internal template: {{ template "_internal/google_analytics_async.html" . }} ``` +A `.Site.GoogleAnalytics` variable is also exposed from the config. + ## Disqus Hugo also ships with an internal template for [Disqus comments][disqus], a popular commenting system for both static and dynamic websites. In order to effectively use Disqus, you will need to secure a Disqus "shortname" by [signing up for the free service][disqussignup]. @@ -76,6 +78,8 @@ To add Disqus, include the following line in templates where you want your comme {{ template "_internal/disqus.html" . }} ``` +A `.Site.DisqusShortname` variable is also exposed from the config. + ### Conditional Loading of Disqus Comments Users have noticed that enabling Disqus comments when running the Hugo web server on `localhost` (i.e. via `hugo server`) causes the creation of unwanted discussions on the associated Disqus account. @@ -110,6 +114,85 @@ You can then render your custom Disqus partial template as follows: {{ partial "disqus.html" . }} ``` +## Open Graph +An internal template for the [Open Graph protocol](http://ogp.me/), metadata that enables a page to become a rich object in a social graph. +This format is used for Facebook and some other sites. + +### Configure Open Graph + +Hugo's Open Graph template is configured using a mix of configuration variables and [front-matter](/content-management/front-matter/) on individual pages. + +{{< code-toggle file="config" >}} +[params] + title = "My cool site" + images = ["site-feature-image.jpg"] + description = "Text about my cool site" +[taxonomies] + series = "series" +{{}} + +{{< code-toggle file="content/blog/my-post" >}} +title = "Post title" +description = "Text about this post" +date = "2006-01-02" +images = ["post-cover.png"] +audio = [] +video = [] +series = [] +tags = [] +{{}} + +Hugo uses the page title and description for the title and description metadata. +The first 6 URLs from the `images` array are used for image metadata. + +Various optional metadata can also be set: +- Date, published date, and last modified data are used to set the published time metadata if specified. +- `audio` and `video` are URL arrays like `images` for the audio and video metadata tags, respectively. +- The first 6 `tags` on the page are used for the tags metadata. +- The `series` taxonomy is used to specify related "see also" pages by placing them in the same series. + +### Use the Open Graph Template + +To add Open Graph metadata, include the following line between the `` tags in your templates: + +``` +{{ template "_internal/opengraph.html" . }} +``` + +## Twitter Cards +An internal template for [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards), +metadata used to attach rich media to Tweets linking to your site. + +### Configure Twitter Cards + +Hugo's Twitter Card template is configured using a mix of configuration variables and [front-matter](/content-management/front-matter/) on individual pages. + +{{< code-toggle file="config" >}} +[params] + images = ["site-feature-image.jpg"] + description = "Text about my cool site" +{{}} + +{{< code-toggle file="content/blog/my-post" >}} +title = "Post title" +description = "Text about this post" +images = ["post-cover.png"] +{{}} + +If `images` aren't specified in the page front-matter, then hugo searches for [image page resources](/content-management/image-processing/) with `feature`, `cover`, or `thumbnail` in their name. +If no image resources with those names are found, the images defined in the [site config](getting-started/configuration/) are used instead. +If no images are found at all, then an image-less Twitter `summary` card is used instead of `summary_large_image`. + +Hugo uses the page title and description for the card's title and description fields. The page summary is used if no description is given. + +### Use the Twitter Cards Template + +To add Twitter card metadata, include the following line between the `` tags in your templates: + +``` +{{ template "_internal/twitter_cards.html" . }} +``` + ## The Internal Templates * `_internal/disqus.html` diff --git a/docs/content/en/templates/output-formats.md b/docs/content/en/templates/output-formats.md index ff286c9d2..37c48b75e 100644 --- a/docs/content/en/templates/output-formats.md +++ b/docs/content/en/templates/output-formats.md @@ -143,7 +143,7 @@ This can be changed by defining an `outputs` list of output formats in either the `Page` front matter or in the site configuration (either for all sites or per language). -Example from site config file`: +Example from site config file: {{< code-toggle file="config" >}} [outputs] diff --git a/docs/content/en/templates/shortcode-templates.md b/docs/content/en/templates/shortcode-templates.md index 67e54089f..ce58c686e 100644 --- a/docs/content/en/templates/shortcode-templates.md +++ b/docs/content/en/templates/shortcode-templates.md @@ -34,6 +34,14 @@ Hugo's built-in shortcodes cover many common, but not all, use cases. Luckily, H To create a shortcode, place an HTML template in the `layouts/shortcodes` directory of your [source organization][]. Consider the file name carefully since the shortcode name will mirror that of the file but without the `.html` extension. For example, `layouts/shortcodes/myshortcode.html` will be called with either `{{}}` or `{{%/* myshortcode /*/%}}` depending on the type of parameters you choose. +You can organize your shortcodes in subfolders, e.g. in `layouts/shortcodes/boxes`. These shortcodes would then be accessible with their relative path, e.g: + +``` +{{< boxes/square >}} +``` + +Note the forward slash. + ### Shortcode Template Lookup Order Shortcode templates have a simple [lookup order][]: @@ -71,6 +79,12 @@ To access a parameter by position, use the `.Get` followed by a numeric position {{ .Get 0 }} ``` +For the second position, you would just use: + +``` +{{ .Get 1 }} +``` + `with` is great when the output depends on a parameter being set: ``` diff --git a/docs/content/en/tools/frontends.md b/docs/content/en/tools/frontends.md index f41751b49..1cdc18e7c 100644 --- a/docs/content/en/tools/frontends.md +++ b/docs/content/en/tools/frontends.md @@ -22,6 +22,7 @@ toc: false * [caddy-hugo](https://github.com/hacdias/caddy-hugo). `caddy-hugo` is an add-on for [Caddy](https://caddyserver.com/) that delivers a good UI to edit the content of your Hugo website. * [Lipi](https://github.com/SohanChy/Lipi). Lipi is a native GUI frontend written in Java to manage your Hugo websites. * [Netlify CMS](https://netlifycms.org). Netlify CMS is an open source, serverless solution for managing Git based content in static sites, and it works on any platform that can host static sites. A [Hugo/Netlify CMS starter](https://github.com/netlify-templates/one-click-hugo-cms) is available to get new projects running quickly. +* [Hokus CMS](https://www.hokus.io). Hokus CMS is an open source, multiplatform, easy to use, desktop application for Hugo. Build from simple to complex user interfaces for Hugo websites by choosing from a dozen ready-to-use components — all for free, with no vendor lock-in. ## Commercial Services diff --git a/docs/content/en/tools/search.md b/docs/content/en/tools/search.md index 2145c187c..93f330a28 100644 --- a/docs/content/en/tools/search.md +++ b/docs/content/en/tools/search.md @@ -21,10 +21,11 @@ toc: true A static website with a dynamic search function? Yes. As alternatives to embeddable scripts from Google or other search engines, you can provide your visitors a custom search by indexing your content files directly. * [GitHub Gist for Hugo Workflow](https://gist.github.com/sebz/efddfc8fdcb6b480f567). This gist contains a simple workflow to create a search index for your static website. It uses a simple Grunt script to index all your content files and [lunr.js](http://lunrjs.com/) to serve the search results. +* [hugo-elasticsearch](https://www.npmjs.com/package/hugo-elasticsearch). Generate [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html) indexes for Hugo static sites by parsing front matter. Hugo-Elasticsearch will generate a newline delimited JSON (NDJSON) file that can be bulk uploaded into Elasticsearch using any one of the available [clients](https://www.elastic.co/guide/en/elasticsearch/client/index.html). * [hugo-lunr](https://www.npmjs.com/package/hugo-lunr). A simple way to add site search to your static Hugo site using [lunr.js](http://lunrjs.com/). Hugo-lunr will create an index file of any html and markdown documents in your Hugo project. * [hugo-lunr-zh](https://www.npmjs.com/package/hugo-lunr-zh). A bit like Hugo-lunr, but Hugo-lunr-zh can help you separate the Chinese keywords. * [Github Gist for Fuse.js integration](https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae). This gist demonstrates how to leverage Hugo's existing build time processing to generate a searchable JSON index used by [Fuse.js](http://fusejs.io/) on the client side. Although this gist uses Fuse.js for fuzzy matching, any client side search tool capable of reading JSON indexes will work. Does not require npm, grunt or other build-time tools except Hugo! -* [hugo-search-index](https://www.npmjs.com/package/hugo-search-index). A library containing Gulp tasks and a prebuilt browser script that implements search. Gulp generates a search index from project markdown files. +* [hugo-search-index](https://www.npmjs.com/package/hugo-search-index). A library containing Gulp tasks and a prebuilt browser script that implements search. Gulp generates a search index from project markdown files. ## Commercial Search Services diff --git a/docs/content/en/troubleshooting/faq.md b/docs/content/en/troubleshooting/faq.md index 392d7a8df..4cf248eac 100644 --- a/docs/content/en/troubleshooting/faq.md +++ b/docs/content/en/troubleshooting/faq.md @@ -17,6 +17,10 @@ aliases: [/faq/] **Note:** The answers/solutions presented below are short, and may not be note be enough to solve your problem. Visit [Hugo Discourse](https://discourse.gohugo.io/) and use the search. It that does not help, start a new topic and ask your questions. {{% /note %}} +## I can't see my content! + +Is your markdown file [in draft mode](https://gohugo.io/content-management/front-matter/#front-matter-variables)? When testing, run `hugo server` with the `-D` or `--buildDrafts` [switch](https://gohugo.io/getting-started/usage/#draft-future-and-expired-content). + ## Can I set configuration variables via OS environment? Yes you can! See [Configure with Environment Variables](/getting-started/configuration/#configure-with-environment-variables). diff --git a/docs/netlify.toml b/docs/netlify.toml index 86d67ce08..42d2eb0c5 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -3,7 +3,7 @@ publish = "public" command = "hugo" [context.production.environment] -HUGO_VERSION = "0.48" +HUGO_VERSION = "0.49.2" HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" @@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true" command = "hugo --enableGitInfo" [context.split1.environment] -HUGO_VERSION = "0.48" +HUGO_VERSION = "0.49.2" HUGO_ENV = "production" [context.deploy-preview] command = "hugo --buildFuture -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] -HUGO_VERSION = "0.48" +HUGO_VERSION = "0.49.2" [context.branch-deploy] command = "hugo -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] -HUGO_VERSION = "0.48" +HUGO_VERSION = "0.49.2" [context.next.environment] HUGO_ENABLEGITINFO = "true" diff --git a/docs/resources/_gen/images/news/0.49-relnotes/featured-hugo-49-poster_hud9cdb0f9aa2ec95d28fc3f49c81e7940_66352_480x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/0.49-relnotes/featured-hugo-49-poster_hud9cdb0f9aa2ec95d28fc3f49c81e7940_66352_480x0_resize_catmullrom_2.png new file mode 100644 index 000000000..2d9179ad9 Binary files /dev/null and b/docs/resources/_gen/images/news/0.49-relnotes/featured-hugo-49-poster_hud9cdb0f9aa2ec95d28fc3f49c81e7940_66352_480x0_resize_catmullrom_2.png differ diff --git a/docs/resources/_gen/images/news/0.49-relnotes/featured-hugo-49-poster_hud9cdb0f9aa2ec95d28fc3f49c81e7940_66352_640x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/0.49-relnotes/featured-hugo-49-poster_hud9cdb0f9aa2ec95d28fc3f49c81e7940_66352_640x0_resize_catmullrom_2.png new file mode 100644 index 000000000..e4f918db7 Binary files /dev/null and b/docs/resources/_gen/images/news/0.49-relnotes/featured-hugo-49-poster_hud9cdb0f9aa2ec95d28fc3f49c81e7940_66352_640x0_resize_catmullrom_2.png differ