diff --git a/config.toml b/config.toml index c950b1687..07ba5d1c1 100644 --- a/config.toml +++ b/config.toml @@ -70,7 +70,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.39" + release = "0.40.2" ## Setting this to true will add a "noindex" to *EVERY* page on the site removefromexternalsearch = false ## Gh repo for site footer (include trailing slash) @@ -271,3 +271,139 @@ anchor = "smart" identifier = "github" post = "external" url = "https://github.com/gohugoio/hugo" + +### LANGUAGES ### + +[languages] + [languages.en] + contentDir = "content/en" + languageName = "English" + weight = 1 + [languages.zh] + contentDir = "content/zh" + languageName = "中文" + weight = 2 + + +### LANGUAGE-SPECIFIC MENUS ### + +# Chinese menus + +[[languages.zh.menu.docs]] + name = "关于 Hugo" + weight = 1 + identifier = "about" + url = "/zh/about/" + +[[languages.zh.menu.docs]] + name = "入门" + weight = 5 + identifier = "getting-started" + url = "/zh/getting-started/" + +[[languages.zh.menu.docs]] + name = "主题" + weight = 15 + identifier = "themes" + post = "break" + url = "/zh/themes/" + +# Core languages.zh.menus + +[[languages.zh.menu.docs]] + name = "内容管理" + weight = 20 + identifier = "content-management" + post = "expanded" + url = "/zh/content-management/" + +[[languages.zh.menu.docs]] + name = "模板" + weight = 25 + identifier = "templates" + url = "/zh/templates/" + +[[languages.zh.menu.docs]] + name = "函数" + weight = 30 + identifier = "functions" + url = "/zh/functions/" + +[[languages.zh.menu.docs]] + name = "变量" + weight = 35 + identifier = "variables" + url = "/zh/variables/" + +[[languages.zh.menu.docs]] + name = "CLI" + weight = 40 + post = "break" + identifier = "commands" + url = "/commands/" + +# LOW LEVEL ITEMS +[[languages.zh.menu.docs]] + name = "故障排除" + weight = 60 + identifier = "troubleshooting" + url = "/zh/troubleshooting/" + +[[languages.zh.menu.docs]] + name = "工具" + weight = 70 + identifier = "tools" + url = "/zh/tools/" + +[[languages.zh.menu.docs]] + name = "托管与部署" + weight = 80 + identifier = "hosting-and-deployment" + url = "/zh/hosting-and-deployment/" + +[[languages.zh.menu.docs]] + name = "贡献" + weight = 100 + post = "break" + identifier = "contribute" + url = "/zh/contribute/" + +[[languages.zh.menu.global]] + name = "新闻" + weight = 1 + identifier = "news" + url = "/zh/news/" + +[[languages.zh.menu.global]] + name = "文档" + weight = 5 + identifier = "docs" + url = "/zh/documentation/" + +[[languages.zh.menu.global]] + name = "主题" + weight = 10 + identifier = "themes" + url = "https://themes.gohugo.io/" + +[[languages.zh.menu.global]] + name = "作品展示" + weight = 20 + identifier = "showcase" + url = "/zh/showcase/" + +# Anything with a weight > 100 gets an external icon +[[languages.zh.menu.global]] + name = "社区" + weight = 150 + icon = true + identifier = "community" + post = "external" + url = "https://discourse.gohugo.io/" + +[[languages.zh.menu.global]] + name = "GitHub" + weight = 200 + identifier = "github" + post = "external" + url = "https://github.com/gohugoio/hugo" diff --git a/content/_index.md b/content/en/_index.md similarity index 100% rename from content/_index.md rename to content/en/_index.md diff --git a/content/about/_index.md b/content/en/about/_index.md similarity index 100% rename from content/about/_index.md rename to content/en/about/_index.md diff --git a/content/about/benefits.md b/content/en/about/benefits.md similarity index 100% rename from content/about/benefits.md rename to content/en/about/benefits.md diff --git a/content/about/features.md b/content/en/about/features.md similarity index 100% rename from content/about/features.md rename to content/en/about/features.md diff --git a/content/about/license.md b/content/en/about/license.md similarity index 100% rename from content/about/license.md rename to content/en/about/license.md diff --git a/content/about/new-in-032/index.md b/content/en/about/new-in-032/index.md similarity index 100% rename from content/about/new-in-032/index.md rename to content/en/about/new-in-032/index.md diff --git a/content/about/new-in-032/sunset.jpg b/content/en/about/new-in-032/sunset.jpg similarity index 100% rename from content/about/new-in-032/sunset.jpg rename to content/en/about/new-in-032/sunset.jpg diff --git a/content/about/what-is-hugo.md b/content/en/about/what-is-hugo.md similarity index 100% rename from content/about/what-is-hugo.md rename to content/en/about/what-is-hugo.md diff --git a/content/commands/hugo.md b/content/en/commands/hugo.md similarity index 100% rename from content/commands/hugo.md rename to content/en/commands/hugo.md diff --git a/content/commands/hugo_benchmark.md b/content/en/commands/hugo_benchmark.md similarity index 100% rename from content/commands/hugo_benchmark.md rename to content/en/commands/hugo_benchmark.md diff --git a/content/commands/hugo_check.md b/content/en/commands/hugo_check.md similarity index 100% rename from content/commands/hugo_check.md rename to content/en/commands/hugo_check.md diff --git a/content/commands/hugo_check_ulimit.md b/content/en/commands/hugo_check_ulimit.md similarity index 100% rename from content/commands/hugo_check_ulimit.md rename to content/en/commands/hugo_check_ulimit.md diff --git a/content/commands/hugo_config.md b/content/en/commands/hugo_config.md similarity index 100% rename from content/commands/hugo_config.md rename to content/en/commands/hugo_config.md diff --git a/content/commands/hugo_convert.md b/content/en/commands/hugo_convert.md similarity index 100% rename from content/commands/hugo_convert.md rename to content/en/commands/hugo_convert.md diff --git a/content/commands/hugo_convert_toJSON.md b/content/en/commands/hugo_convert_toJSON.md similarity index 100% rename from content/commands/hugo_convert_toJSON.md rename to content/en/commands/hugo_convert_toJSON.md diff --git a/content/commands/hugo_convert_toTOML.md b/content/en/commands/hugo_convert_toTOML.md similarity index 100% rename from content/commands/hugo_convert_toTOML.md rename to content/en/commands/hugo_convert_toTOML.md diff --git a/content/commands/hugo_convert_toYAML.md b/content/en/commands/hugo_convert_toYAML.md similarity index 100% rename from content/commands/hugo_convert_toYAML.md rename to content/en/commands/hugo_convert_toYAML.md diff --git a/content/commands/hugo_env.md b/content/en/commands/hugo_env.md similarity index 100% rename from content/commands/hugo_env.md rename to content/en/commands/hugo_env.md diff --git a/content/commands/hugo_gen.md b/content/en/commands/hugo_gen.md similarity index 100% rename from content/commands/hugo_gen.md rename to content/en/commands/hugo_gen.md diff --git a/content/commands/hugo_gen_autocomplete.md b/content/en/commands/hugo_gen_autocomplete.md similarity index 100% rename from content/commands/hugo_gen_autocomplete.md rename to content/en/commands/hugo_gen_autocomplete.md diff --git a/content/commands/hugo_gen_chromastyles.md b/content/en/commands/hugo_gen_chromastyles.md similarity index 100% rename from content/commands/hugo_gen_chromastyles.md rename to content/en/commands/hugo_gen_chromastyles.md diff --git a/content/commands/hugo_gen_doc.md b/content/en/commands/hugo_gen_doc.md similarity index 100% rename from content/commands/hugo_gen_doc.md rename to content/en/commands/hugo_gen_doc.md diff --git a/content/commands/hugo_gen_man.md b/content/en/commands/hugo_gen_man.md similarity index 100% rename from content/commands/hugo_gen_man.md rename to content/en/commands/hugo_gen_man.md diff --git a/content/commands/hugo_import.md b/content/en/commands/hugo_import.md similarity index 100% rename from content/commands/hugo_import.md rename to content/en/commands/hugo_import.md diff --git a/content/commands/hugo_import_jekyll.md b/content/en/commands/hugo_import_jekyll.md similarity index 100% rename from content/commands/hugo_import_jekyll.md rename to content/en/commands/hugo_import_jekyll.md diff --git a/content/commands/hugo_list.md b/content/en/commands/hugo_list.md similarity index 100% rename from content/commands/hugo_list.md rename to content/en/commands/hugo_list.md diff --git a/content/commands/hugo_list_drafts.md b/content/en/commands/hugo_list_drafts.md similarity index 100% rename from content/commands/hugo_list_drafts.md rename to content/en/commands/hugo_list_drafts.md diff --git a/content/commands/hugo_list_expired.md b/content/en/commands/hugo_list_expired.md similarity index 100% rename from content/commands/hugo_list_expired.md rename to content/en/commands/hugo_list_expired.md diff --git a/content/commands/hugo_list_future.md b/content/en/commands/hugo_list_future.md similarity index 100% rename from content/commands/hugo_list_future.md rename to content/en/commands/hugo_list_future.md diff --git a/content/commands/hugo_new.md b/content/en/commands/hugo_new.md similarity index 100% rename from content/commands/hugo_new.md rename to content/en/commands/hugo_new.md diff --git a/content/commands/hugo_new_site.md b/content/en/commands/hugo_new_site.md similarity index 100% rename from content/commands/hugo_new_site.md rename to content/en/commands/hugo_new_site.md diff --git a/content/commands/hugo_new_theme.md b/content/en/commands/hugo_new_theme.md similarity index 100% rename from content/commands/hugo_new_theme.md rename to content/en/commands/hugo_new_theme.md diff --git a/content/commands/hugo_server.md b/content/en/commands/hugo_server.md similarity index 100% rename from content/commands/hugo_server.md rename to content/en/commands/hugo_server.md diff --git a/content/commands/hugo_version.md b/content/en/commands/hugo_version.md similarity index 100% rename from content/commands/hugo_version.md rename to content/en/commands/hugo_version.md diff --git a/content/content-management/_index.md b/content/en/content-management/_index.md similarity index 100% rename from content/content-management/_index.md rename to content/en/content-management/_index.md diff --git a/content/content-management/archetypes.md b/content/en/content-management/archetypes.md similarity index 96% rename from content/content-management/archetypes.md rename to content/en/content-management/archetypes.md index 902373d83..904ca8c31 100644 --- a/content/content-management/archetypes.md +++ b/content/en/content-management/archetypes.md @@ -32,8 +32,8 @@ The above will create a new content file in `content/posts/my-first-post.md` usi 1. `archetypes/posts.md` 2. `archetypes/default.md` -3. `themes/my-theme/posts.md` -4. `themes/my-theme/default.md` +3. `themes/my-theme/archetypes/posts.md` +4. `themes/my-theme/archetypes/default.md` The last two list items is only applicable if you use a theme and it uses the `my-theme` theme name as an example. diff --git a/content/content-management/authors.md b/content/en/content-management/authors.md similarity index 100% rename from content/content-management/authors.md rename to content/en/content-management/authors.md diff --git a/content/content-management/comments.md b/content/en/content-management/comments.md similarity index 100% rename from content/content-management/comments.md rename to content/en/content-management/comments.md diff --git a/content/content-management/cross-references.md b/content/en/content-management/cross-references.md similarity index 100% rename from content/content-management/cross-references.md rename to content/en/content-management/cross-references.md diff --git a/content/content-management/formats.md b/content/en/content-management/formats.md similarity index 99% rename from content/content-management/formats.md rename to content/en/content-management/formats.md index be6fb40e4..6c53ab467 100644 --- a/content/content-management/formats.md +++ b/content/en/content-management/formats.md @@ -29,7 +29,7 @@ Before you begin writing your content in markdown, Blackfriday has a known issue You can configure multiple aspects of Blackfriday as show in the following list. See the docs on [Configuration][config] for the full list of explicit directions you can give to Hugo when rendering your site. -{{< readfile file="/content/readfiles/bfconfig.md" markdown="true" >}} +{{< readfile file="/content/en/readfiles/bfconfig.md" markdown="true" >}} ## Extend Markdown diff --git a/content/content-management/front-matter.md b/content/en/content-management/front-matter.md similarity index 100% rename from content/content-management/front-matter.md rename to content/en/content-management/front-matter.md diff --git a/content/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md similarity index 100% rename from content/content-management/image-processing/index.md rename to content/en/content-management/image-processing/index.md diff --git a/content/content-management/image-processing/sunset.jpg b/content/en/content-management/image-processing/sunset.jpg similarity index 100% rename from content/content-management/image-processing/sunset.jpg rename to content/en/content-management/image-processing/sunset.jpg diff --git a/content/content-management/menus.md b/content/en/content-management/menus.md similarity index 100% rename from content/content-management/menus.md rename to content/en/content-management/menus.md diff --git a/content/content-management/multilingual.md b/content/en/content-management/multilingual.md similarity index 100% rename from content/content-management/multilingual.md rename to content/en/content-management/multilingual.md diff --git a/content/content-management/organization/1-featured-content-bundles.png b/content/en/content-management/organization/1-featured-content-bundles.png similarity index 100% rename from content/content-management/organization/1-featured-content-bundles.png rename to content/en/content-management/organization/1-featured-content-bundles.png diff --git a/content/content-management/organization/index.md b/content/en/content-management/organization/index.md similarity index 100% rename from content/content-management/organization/index.md rename to content/en/content-management/organization/index.md diff --git a/content/content-management/page-bundles.md b/content/en/content-management/page-bundles.md similarity index 59% rename from content/content-management/page-bundles.md rename to content/en/content-management/page-bundles.md index 34620a5e2..639d81eff 100644 --- a/content/content-management/page-bundles.md +++ b/content/en/content-management/page-bundles.md @@ -21,13 +21,16 @@ A Page Bundle can be one of: - Leaf Bundle (leaf means it has no children) - Branch Bundle (home page, section, taxonomy terms, taxonomy list) -| | Leaf Bundle | Branch Bundle | -|-----------------|--------------------------------------------------------|---------------------------------------------------------| -| Usage           | Collection of resources (pages, images etc.) for single pages | Collection of non-page resources (images etc.)for list pages | -| Index file name | `index.md` [^fn:1] | `_index.md` [^fn:1] | -| Layout type | `single` | `list` | -| Nesting | Doesn't allow nesting of more bundles under it | Allows nesting of leaf/branch bundles under it | -| Example | `content/posts/my-post/index.md` | `content/posts/_index.md` | +| | Leaf Bundle | Branch Bundle | +|-------------------------------------|----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Usage | Collection of content and attachments for single pages | Collection of attachments for section pages (home page, section, taxonomy terms, taxonomy list) | +| Index file name | `index.md` [^fn:1] | `_index.md` [^fn:1] | +| Allowed Resources | Page and non-page (like images, pdf, etc.) types | Only non-page (like images, pdf, etc.) types | +| Where can the Resources live? | At any directory level within the leaf bundle directory. | Only in the directory level **of** the branch bundle directory i.e. the directory containing the `_index.md` ([ref](https://discourse.gohugo.io/t/question-about-content-folder-structure/11822/4?u=kaushalmodi)). | +| Layout type | `single` | `list` | +| Nesting | Does not allow nesting of more bundles under it | Allows nesting of leaf or branch bundles under it | +| Example | `content/posts/my-post/index.md` | `content/posts/_index.md` | +| Content from non-index page files .. | Accessed only as page resources | Accessed only as regular pages | ## Leaf Bundles {#leaf-bundles} diff --git a/content/content-management/page-resources.md b/content/en/content-management/page-resources.md similarity index 100% rename from content/content-management/page-resources.md rename to content/en/content-management/page-resources.md diff --git a/content/content-management/related.md b/content/en/content-management/related.md similarity index 100% rename from content/content-management/related.md rename to content/en/content-management/related.md diff --git a/content/content-management/sections.md b/content/en/content-management/sections.md similarity index 97% rename from content/content-management/sections.md rename to content/en/content-management/sections.md index e53e0feb7..79ae201d4 100644 --- a/content/content-management/sections.md +++ b/content/en/content-management/sections.md @@ -81,7 +81,7 @@ With the available [section variables and methods](#section-page-variables-and-m Also see [Page Variables](/variables/page/). -{{< readfile file="/content/readfiles/sectionvars.md" markdown="true" >}} +{{< readfile file="/content/en/readfiles/sectionvars.md" markdown="true" >}} ## Content Section Lists diff --git a/content/content-management/shortcodes.md b/content/en/content-management/shortcodes.md similarity index 98% rename from content/content-management/shortcodes.md rename to content/en/content-management/shortcodes.md index e5bc85265..e56873312 100644 --- a/content/content-management/shortcodes.md +++ b/content/en/content-management/shortcodes.md @@ -235,7 +235,7 @@ By adding the preceding `hidecaption` example, the following HTML will be added #### Example `instagram` Display -Using the preceding `instagram` with hidecaption` example above, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup. +Using the preceding `instagram` with `hidecaption` example above, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup. {{< instagram BWNjjyYFxVx hidecaption >}} diff --git a/content/content-management/static-files.md b/content/en/content-management/static-files.md similarity index 100% rename from content/content-management/static-files.md rename to content/en/content-management/static-files.md diff --git a/content/content-management/summaries.md b/content/en/content-management/summaries.md similarity index 100% rename from content/content-management/summaries.md rename to content/en/content-management/summaries.md diff --git a/content/content-management/syntax-highlighting.md b/content/en/content-management/syntax-highlighting.md similarity index 98% rename from content/content-management/syntax-highlighting.md rename to content/en/content-management/syntax-highlighting.md index e7eb011c8..b2d7a4552 100644 --- a/content/content-management/syntax-highlighting.md +++ b/content/en/content-management/syntax-highlighting.md @@ -1,6 +1,6 @@ --- title: Syntax Highlighting -description: Hugo comes with reallly fast syntax highlighting from Chroma. +description: Hugo comes with really fast syntax highlighting from Chroma. date: 2017-02-01 publishdate: 2017-02-01 keywords: [highlighting,pygments,chroma,code blocks,syntax] @@ -18,7 +18,7 @@ toc: true From Hugo 0.28, the default syntax hightlighter in Hugo is [Chroma](https://github.com/alecthomas/chroma); it is built in Go and is really, really fast -- and for the most important parts compatible with Pygments. -If you want to continue to use Pygments (see below), set `pygmentsUseClassic=true` in your site config. +If you want to continue to use Pygments (see below), set `pygmentsUseClasses=true` in your site config. The example below shows a simple code snippet from the Hugo source highlighted with the `highlight` shortcode. Note that the gohugo.io site is generated with `pygmentsUseClasses=true` (see [Generate Syntax Highlighter CSS](#generate-syntax-highlighter-css)). diff --git a/content/content-management/taxonomies.md b/content/en/content-management/taxonomies.md similarity index 100% rename from content/content-management/taxonomies.md rename to content/en/content-management/taxonomies.md diff --git a/content/content-management/toc.md b/content/en/content-management/toc.md similarity index 100% rename from content/content-management/toc.md rename to content/en/content-management/toc.md diff --git a/content/content-management/types.md b/content/en/content-management/types.md similarity index 100% rename from content/content-management/types.md rename to content/en/content-management/types.md diff --git a/content/content-management/urls.md b/content/en/content-management/urls.md similarity index 100% rename from content/content-management/urls.md rename to content/en/content-management/urls.md diff --git a/content/contribute/_index.md b/content/en/contribute/_index.md similarity index 100% rename from content/contribute/_index.md rename to content/en/contribute/_index.md diff --git a/content/contribute/development.md b/content/en/contribute/development.md similarity index 100% rename from content/contribute/development.md rename to content/en/contribute/development.md diff --git a/content/contribute/documentation.md b/content/en/contribute/documentation.md similarity index 100% rename from content/contribute/documentation.md rename to content/en/contribute/documentation.md diff --git a/content/contribute/themes.md b/content/en/contribute/themes.md similarity index 100% rename from content/contribute/themes.md rename to content/en/contribute/themes.md diff --git a/content/documentation.md b/content/en/documentation.md similarity index 100% rename from content/documentation.md rename to content/en/documentation.md diff --git a/content/functions/GetPage.md b/content/en/functions/GetPage.md similarity index 100% rename from content/functions/GetPage.md rename to content/en/functions/GetPage.md diff --git a/content/functions/NumFmt.md b/content/en/functions/NumFmt.md similarity index 100% rename from content/functions/NumFmt.md rename to content/en/functions/NumFmt.md diff --git a/content/functions/_index.md b/content/en/functions/_index.md similarity index 100% rename from content/functions/_index.md rename to content/en/functions/_index.md diff --git a/content/functions/abslangurl.md b/content/en/functions/abslangurl.md similarity index 100% rename from content/functions/abslangurl.md rename to content/en/functions/abslangurl.md diff --git a/content/functions/absurl.md b/content/en/functions/absurl.md similarity index 100% rename from content/functions/absurl.md rename to content/en/functions/absurl.md diff --git a/content/functions/adddate.md b/content/en/functions/adddate.md similarity index 100% rename from content/functions/adddate.md rename to content/en/functions/adddate.md diff --git a/content/functions/after.md b/content/en/functions/after.md similarity index 100% rename from content/functions/after.md rename to content/en/functions/after.md diff --git a/content/functions/apply.md b/content/en/functions/apply.md similarity index 100% rename from content/functions/apply.md rename to content/en/functions/apply.md diff --git a/content/functions/base64.md b/content/en/functions/base64.md similarity index 100% rename from content/functions/base64.md rename to content/en/functions/base64.md diff --git a/content/functions/chomp.md b/content/en/functions/chomp.md similarity index 100% rename from content/functions/chomp.md rename to content/en/functions/chomp.md diff --git a/content/functions/cond.md b/content/en/functions/cond.md similarity index 100% rename from content/functions/cond.md rename to content/en/functions/cond.md diff --git a/content/functions/countrunes.md b/content/en/functions/countrunes.md similarity index 100% rename from content/functions/countrunes.md rename to content/en/functions/countrunes.md diff --git a/content/functions/countwords.md b/content/en/functions/countwords.md similarity index 100% rename from content/functions/countwords.md rename to content/en/functions/countwords.md diff --git a/content/functions/dateformat.md b/content/en/functions/dateformat.md similarity index 100% rename from content/functions/dateformat.md rename to content/en/functions/dateformat.md diff --git a/content/functions/default.md b/content/en/functions/default.md similarity index 100% rename from content/functions/default.md rename to content/en/functions/default.md diff --git a/content/functions/delimit.md b/content/en/functions/delimit.md similarity index 98% rename from content/functions/delimit.md rename to content/en/functions/delimit.md index 5a92f76e0..083e8baf8 100644 --- a/content/functions/delimit.md +++ b/content/en/functions/delimit.md @@ -36,7 +36,7 @@ The examples of `delimit` that follow all use the same front matter: {{< code file="delimit-example-front-matter.toml" nocopy="true" >}} +++ title: I love Delimit -keywords: [ "tag1", "tag2", "tag3" ] +tags: [ "tag1", "tag2", "tag3" ] +++ {{< /code >}} diff --git a/content/functions/dict.md b/content/en/functions/dict.md similarity index 100% rename from content/functions/dict.md rename to content/en/functions/dict.md diff --git a/content/functions/echoparam.md b/content/en/functions/echoparam.md similarity index 100% rename from content/functions/echoparam.md rename to content/en/functions/echoparam.md diff --git a/content/functions/emojify.md b/content/en/functions/emojify.md similarity index 100% rename from content/functions/emojify.md rename to content/en/functions/emojify.md diff --git a/content/functions/eq.md b/content/en/functions/eq.md similarity index 100% rename from content/functions/eq.md rename to content/en/functions/eq.md diff --git a/content/functions/errorf.md b/content/en/functions/errorf.md similarity index 100% rename from content/functions/errorf.md rename to content/en/functions/errorf.md diff --git a/content/functions/fileExists.md b/content/en/functions/fileExists.md similarity index 100% rename from content/functions/fileExists.md rename to content/en/functions/fileExists.md diff --git a/content/functions/findRe.md b/content/en/functions/findRe.md similarity index 100% rename from content/functions/findRe.md rename to content/en/functions/findRe.md diff --git a/content/functions/first.md b/content/en/functions/first.md similarity index 100% rename from content/functions/first.md rename to content/en/functions/first.md diff --git a/content/functions/float.md b/content/en/functions/float.md similarity index 100% rename from content/functions/float.md rename to content/en/functions/float.md diff --git a/content/functions/format.md b/content/en/functions/format.md similarity index 100% rename from content/functions/format.md rename to content/en/functions/format.md diff --git a/content/functions/ge.md b/content/en/functions/ge.md similarity index 100% rename from content/functions/ge.md rename to content/en/functions/ge.md diff --git a/content/en/functions/get.md b/content/en/functions/get.md new file mode 100644 index 000000000..f6d6a6e31 --- /dev/null +++ b/content/en/functions/get.md @@ -0,0 +1,35 @@ +--- +title: .Get +description: Accesses positional and ordered parameters in shortcode declaration. +godocref: +date: 2017-02-01 +publishdate: 2017-02-01 +lastmod: 2017-02-01 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [shortcodes] +signature: [".Get INDEX", ".Get KEY"] +workson: [] +hugoversion: +relatedfuncs: [] +deprecated: false +aliases: [] +needsexample: true +--- + + +`.Get` is specifically used when creating your own [shortcode template][sc], to access the [positional and named](/templates/shortcode-templates/#positional-vs-named-parameters) parameters passed to it. When used with a numeric INDEX, it queries positional parameters (starting with 0). With a string KEY, it queries named parameters. + +When accessing a named parameter that does not exist, `.Get` returns an empty string instead of interrupting the build. The same goes with positional parameters in hugo version 0.40 and after. This allows you to chain `.Get` with `if`, `with`, `default` or `cond` to check for parameter existence. For example, you may now use: + +``` +{{ $quality := default "100" (.Get 1) }} +``` + +[sc]: /templates/shortcode-templates/ + + + + diff --git a/content/functions/getenv.md b/content/en/functions/getenv.md similarity index 100% rename from content/functions/getenv.md rename to content/en/functions/getenv.md diff --git a/content/functions/gt.md b/content/en/functions/gt.md similarity index 100% rename from content/functions/gt.md rename to content/en/functions/gt.md diff --git a/content/functions/hasPrefix.md b/content/en/functions/hasPrefix.md similarity index 100% rename from content/functions/hasPrefix.md rename to content/en/functions/hasPrefix.md diff --git a/content/functions/haschildren.md b/content/en/functions/haschildren.md similarity index 100% rename from content/functions/haschildren.md rename to content/en/functions/haschildren.md diff --git a/content/functions/hasmenucurrent.md b/content/en/functions/hasmenucurrent.md similarity index 100% rename from content/functions/hasmenucurrent.md rename to content/en/functions/hasmenucurrent.md diff --git a/content/functions/highlight.md b/content/en/functions/highlight.md similarity index 100% rename from content/functions/highlight.md rename to content/en/functions/highlight.md diff --git a/content/functions/htmlEscape.md b/content/en/functions/htmlEscape.md similarity index 100% rename from content/functions/htmlEscape.md rename to content/en/functions/htmlEscape.md diff --git a/content/functions/htmlUnescape.md b/content/en/functions/htmlUnescape.md similarity index 100% rename from content/functions/htmlUnescape.md rename to content/en/functions/htmlUnescape.md diff --git a/content/functions/humanize.md b/content/en/functions/humanize.md similarity index 100% rename from content/functions/humanize.md rename to content/en/functions/humanize.md diff --git a/content/functions/i18n.md b/content/en/functions/i18n.md similarity index 100% rename from content/functions/i18n.md rename to content/en/functions/i18n.md diff --git a/content/functions/imageConfig.md b/content/en/functions/imageConfig.md similarity index 100% rename from content/functions/imageConfig.md rename to content/en/functions/imageConfig.md diff --git a/content/functions/in.md b/content/en/functions/in.md similarity index 100% rename from content/functions/in.md rename to content/en/functions/in.md diff --git a/content/functions/index-function.md b/content/en/functions/index-function.md similarity index 100% rename from content/functions/index-function.md rename to content/en/functions/index-function.md diff --git a/content/functions/int.md b/content/en/functions/int.md similarity index 100% rename from content/functions/int.md rename to content/en/functions/int.md diff --git a/content/functions/intersect.md b/content/en/functions/intersect.md similarity index 100% rename from content/functions/intersect.md rename to content/en/functions/intersect.md diff --git a/content/functions/ismenucurrent.md b/content/en/functions/ismenucurrent.md similarity index 100% rename from content/functions/ismenucurrent.md rename to content/en/functions/ismenucurrent.md diff --git a/content/functions/isset.md b/content/en/functions/isset.md similarity index 100% rename from content/functions/isset.md rename to content/en/functions/isset.md diff --git a/content/functions/jsonify.md b/content/en/functions/jsonify.md similarity index 100% rename from content/functions/jsonify.md rename to content/en/functions/jsonify.md diff --git a/content/functions/lang.Merge.md b/content/en/functions/lang.Merge.md similarity index 100% rename from content/functions/lang.Merge.md rename to content/en/functions/lang.Merge.md diff --git a/content/functions/last.md b/content/en/functions/last.md similarity index 100% rename from content/functions/last.md rename to content/en/functions/last.md diff --git a/content/functions/le.md b/content/en/functions/le.md similarity index 100% rename from content/functions/le.md rename to content/en/functions/le.md diff --git a/content/functions/len.md b/content/en/functions/len.md similarity index 100% rename from content/functions/len.md rename to content/en/functions/len.md diff --git a/content/functions/lower.md b/content/en/functions/lower.md similarity index 100% rename from content/functions/lower.md rename to content/en/functions/lower.md diff --git a/content/functions/lt.md b/content/en/functions/lt.md similarity index 100% rename from content/functions/lt.md rename to content/en/functions/lt.md diff --git a/content/functions/markdownify.md b/content/en/functions/markdownify.md similarity index 100% rename from content/functions/markdownify.md rename to content/en/functions/markdownify.md diff --git a/content/functions/math.md b/content/en/functions/math.md similarity index 100% rename from content/functions/math.md rename to content/en/functions/math.md diff --git a/content/functions/md5.md b/content/en/functions/md5.md similarity index 100% rename from content/functions/md5.md rename to content/en/functions/md5.md diff --git a/content/functions/ne.md b/content/en/functions/ne.md similarity index 100% rename from content/functions/ne.md rename to content/en/functions/ne.md diff --git a/content/functions/now.md b/content/en/functions/now.md similarity index 59% rename from content/functions/now.md rename to content/en/functions/now.md index fcd86231e..8c706835b 100644 --- a/content/functions/now.md +++ b/content/en/functions/now.md @@ -21,7 +21,7 @@ aliases: [] See [`time.Time`](https://godoc.org/time#Time). -For example, building your site on June 24, 2017 with the following templating: +For example, building your site on June 24, 2017, with the following templating: ```
@@ -29,7 +29,7 @@ For example, building your site on June 24, 2017 with the following templating:
``` -Which will produce the following: +would produce the following: ```
@@ -40,5 +40,11 @@ Which will produce the following: The above example uses the [`.Format` function](/functions/format), which page includes a full listing of date formatting using Golang's layout string. {{% note %}} -Older Hugo themes may use the deprecated `.Now` (uppercase). Be sure to use the lowercase `.now` in your templating. +Older Hugo themes may still be using the obsolete Page’s `.Now` (uppercase with leading dot), which causes build error that looks like the following: + + ERROR ... Error while rendering "..." in "...": ... + executing "..." at <.Now.Format>: + can't evaluate field Now in type *hugolib.PageOutput + +Be sure to use `now` (lowercase with _**no**_ leading dot) in your templating. {{% /note %}} diff --git a/content/functions/param.md b/content/en/functions/param.md similarity index 100% rename from content/functions/param.md rename to content/en/functions/param.md diff --git a/content/functions/partialCached.md b/content/en/functions/partialCached.md similarity index 100% rename from content/functions/partialCached.md rename to content/en/functions/partialCached.md diff --git a/content/functions/plainify.md b/content/en/functions/plainify.md similarity index 100% rename from content/functions/plainify.md rename to content/en/functions/plainify.md diff --git a/content/functions/pluralize.md b/content/en/functions/pluralize.md similarity index 100% rename from content/functions/pluralize.md rename to content/en/functions/pluralize.md diff --git a/content/functions/print.md b/content/en/functions/print.md similarity index 100% rename from content/functions/print.md rename to content/en/functions/print.md diff --git a/content/functions/printf.md b/content/en/functions/printf.md similarity index 100% rename from content/functions/printf.md rename to content/en/functions/printf.md diff --git a/content/functions/println.md b/content/en/functions/println.md similarity index 100% rename from content/functions/println.md rename to content/en/functions/println.md diff --git a/content/functions/querify.md b/content/en/functions/querify.md similarity index 100% rename from content/functions/querify.md rename to content/en/functions/querify.md diff --git a/content/functions/range.md b/content/en/functions/range.md similarity index 100% rename from content/functions/range.md rename to content/en/functions/range.md diff --git a/content/functions/readdir.md b/content/en/functions/readdir.md similarity index 100% rename from content/functions/readdir.md rename to content/en/functions/readdir.md diff --git a/content/functions/readfile.md b/content/en/functions/readfile.md similarity index 100% rename from content/functions/readfile.md rename to content/en/functions/readfile.md diff --git a/content/functions/ref.md b/content/en/functions/ref.md similarity index 100% rename from content/functions/ref.md rename to content/en/functions/ref.md diff --git a/content/functions/relLangURL.md b/content/en/functions/relLangURL.md similarity index 100% rename from content/functions/relLangURL.md rename to content/en/functions/relLangURL.md diff --git a/content/functions/relref.md b/content/en/functions/relref.md similarity index 100% rename from content/functions/relref.md rename to content/en/functions/relref.md diff --git a/content/functions/relurl.md b/content/en/functions/relurl.md similarity index 100% rename from content/functions/relurl.md rename to content/en/functions/relurl.md diff --git a/content/functions/render.md b/content/en/functions/render.md similarity index 100% rename from content/functions/render.md rename to content/en/functions/render.md diff --git a/content/functions/replace.md b/content/en/functions/replace.md similarity index 100% rename from content/functions/replace.md rename to content/en/functions/replace.md diff --git a/content/functions/replacere.md b/content/en/functions/replacere.md similarity index 100% rename from content/functions/replacere.md rename to content/en/functions/replacere.md diff --git a/content/functions/safeCSS.md b/content/en/functions/safeCSS.md similarity index 100% rename from content/functions/safeCSS.md rename to content/en/functions/safeCSS.md diff --git a/content/functions/safeHTML.md b/content/en/functions/safeHTML.md similarity index 100% rename from content/functions/safeHTML.md rename to content/en/functions/safeHTML.md diff --git a/content/functions/safeHTMLAttr.md b/content/en/functions/safeHTMLAttr.md similarity index 100% rename from content/functions/safeHTMLAttr.md rename to content/en/functions/safeHTMLAttr.md diff --git a/content/functions/safeJS.md b/content/en/functions/safeJS.md similarity index 100% rename from content/functions/safeJS.md rename to content/en/functions/safeJS.md diff --git a/content/functions/safeURL.md b/content/en/functions/safeURL.md similarity index 100% rename from content/functions/safeURL.md rename to content/en/functions/safeURL.md diff --git a/content/functions/scratch.md b/content/en/functions/scratch.md similarity index 100% rename from content/functions/scratch.md rename to content/en/functions/scratch.md diff --git a/content/functions/seq.md b/content/en/functions/seq.md similarity index 100% rename from content/functions/seq.md rename to content/en/functions/seq.md diff --git a/content/functions/sha.md b/content/en/functions/sha.md similarity index 100% rename from content/functions/sha.md rename to content/en/functions/sha.md diff --git a/content/functions/shuffle.md b/content/en/functions/shuffle.md similarity index 100% rename from content/functions/shuffle.md rename to content/en/functions/shuffle.md diff --git a/content/functions/singularize.md b/content/en/functions/singularize.md similarity index 100% rename from content/functions/singularize.md rename to content/en/functions/singularize.md diff --git a/content/functions/slice.md b/content/en/functions/slice.md similarity index 100% rename from content/functions/slice.md rename to content/en/functions/slice.md diff --git a/content/functions/slicestr.md b/content/en/functions/slicestr.md similarity index 100% rename from content/functions/slicestr.md rename to content/en/functions/slicestr.md diff --git a/content/functions/sort.md b/content/en/functions/sort.md similarity index 100% rename from content/functions/sort.md rename to content/en/functions/sort.md diff --git a/content/functions/split.md b/content/en/functions/split.md similarity index 100% rename from content/functions/split.md rename to content/en/functions/split.md diff --git a/content/functions/string.md b/content/en/functions/string.md similarity index 100% rename from content/functions/string.md rename to content/en/functions/string.md diff --git a/content/functions/strings.TrimLeft.md b/content/en/functions/strings.TrimLeft.md similarity index 100% rename from content/functions/strings.TrimLeft.md rename to content/en/functions/strings.TrimLeft.md diff --git a/content/functions/strings.TrimPrefix.md b/content/en/functions/strings.TrimPrefix.md similarity index 100% rename from content/functions/strings.TrimPrefix.md rename to content/en/functions/strings.TrimPrefix.md diff --git a/content/functions/strings.TrimRight.md b/content/en/functions/strings.TrimRight.md similarity index 100% rename from content/functions/strings.TrimRight.md rename to content/en/functions/strings.TrimRight.md diff --git a/content/functions/strings.TrimSuffix.md b/content/en/functions/strings.TrimSuffix.md similarity index 100% rename from content/functions/strings.TrimSuffix.md rename to content/en/functions/strings.TrimSuffix.md diff --git a/content/functions/substr.md b/content/en/functions/substr.md similarity index 100% rename from content/functions/substr.md rename to content/en/functions/substr.md diff --git a/content/functions/time.md b/content/en/functions/time.md similarity index 100% rename from content/functions/time.md rename to content/en/functions/time.md diff --git a/content/functions/title.md b/content/en/functions/title.md similarity index 100% rename from content/functions/title.md rename to content/en/functions/title.md diff --git a/content/functions/trim.md b/content/en/functions/trim.md similarity index 100% rename from content/functions/trim.md rename to content/en/functions/trim.md diff --git a/content/functions/truncate.md b/content/en/functions/truncate.md similarity index 100% rename from content/functions/truncate.md rename to content/en/functions/truncate.md diff --git a/content/functions/union.md b/content/en/functions/union.md similarity index 100% rename from content/functions/union.md rename to content/en/functions/union.md diff --git a/content/functions/uniq.md b/content/en/functions/uniq.md similarity index 100% rename from content/functions/uniq.md rename to content/en/functions/uniq.md diff --git a/content/functions/unix.md b/content/en/functions/unix.md similarity index 100% rename from content/functions/unix.md rename to content/en/functions/unix.md diff --git a/content/functions/upper.md b/content/en/functions/upper.md similarity index 100% rename from content/functions/upper.md rename to content/en/functions/upper.md diff --git a/content/functions/urlize.md b/content/en/functions/urlize.md similarity index 100% rename from content/functions/urlize.md rename to content/en/functions/urlize.md diff --git a/content/functions/urls.Parse.md b/content/en/functions/urls.Parse.md similarity index 100% rename from content/functions/urls.Parse.md rename to content/en/functions/urls.Parse.md diff --git a/content/functions/where.md b/content/en/functions/where.md similarity index 100% rename from content/functions/where.md rename to content/en/functions/where.md diff --git a/content/functions/with.md b/content/en/functions/with.md similarity index 100% rename from content/functions/with.md rename to content/en/functions/with.md diff --git a/content/getting-started/_index.md b/content/en/getting-started/_index.md similarity index 100% rename from content/getting-started/_index.md rename to content/en/getting-started/_index.md diff --git a/content/getting-started/code-toggle.md b/content/en/getting-started/code-toggle.md similarity index 100% rename from content/getting-started/code-toggle.md rename to content/en/getting-started/code-toggle.md diff --git a/content/getting-started/configuration.md b/content/en/getting-started/configuration.md similarity index 99% rename from content/getting-started/configuration.md rename to content/en/getting-started/configuration.md index 23fceb56f..518e4a2cc 100644 --- a/content/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -369,7 +369,7 @@ Hugo typically configures Blackfriday with sane default values that should fit m However, if you have specific needs with respect to Markdown, Hugo exposes some of its Blackfriday behavior options for you to alter. The following table lists these Hugo options, paired with the corresponding flags from Blackfriday's source code ( [html.go](https://github.com/russross/blackfriday/blob/master/html.go) and [markdown.go](https://github.com/russross/blackfriday/blob/master/markdown.go)). -{{< readfile file="/content/readfiles/bfconfig.md" markdown="true" >}} +{{< readfile file="/content/en/readfiles/bfconfig.md" markdown="true" >}} {{% note %}} 1. Blackfriday flags are *case sensitive* as of Hugo v0.15. diff --git a/content/getting-started/directory-structure.md b/content/en/getting-started/directory-structure.md similarity index 100% rename from content/getting-started/directory-structure.md rename to content/en/getting-started/directory-structure.md diff --git a/content/getting-started/installing.md b/content/en/getting-started/installing.md similarity index 100% rename from content/getting-started/installing.md rename to content/en/getting-started/installing.md diff --git a/content/getting-started/quick-start.md b/content/en/getting-started/quick-start.md similarity index 100% rename from content/getting-started/quick-start.md rename to content/en/getting-started/quick-start.md diff --git a/content/getting-started/usage.md b/content/en/getting-started/usage.md similarity index 100% rename from content/getting-started/usage.md rename to content/en/getting-started/usage.md diff --git a/content/hosting-and-deployment/_index.md b/content/en/hosting-and-deployment/_index.md similarity index 100% rename from content/hosting-and-deployment/_index.md rename to content/en/hosting-and-deployment/_index.md diff --git a/content/hosting-and-deployment/deployment-with-nanobox.md b/content/en/hosting-and-deployment/deployment-with-nanobox.md similarity index 100% rename from content/hosting-and-deployment/deployment-with-nanobox.md rename to content/en/hosting-and-deployment/deployment-with-nanobox.md diff --git a/content/hosting-and-deployment/deployment-with-rsync.md b/content/en/hosting-and-deployment/deployment-with-rsync.md similarity index 100% rename from content/hosting-and-deployment/deployment-with-rsync.md rename to content/en/hosting-and-deployment/deployment-with-rsync.md diff --git a/content/hosting-and-deployment/deployment-with-wercker.md b/content/en/hosting-and-deployment/deployment-with-wercker.md similarity index 100% rename from content/hosting-and-deployment/deployment-with-wercker.md rename to content/en/hosting-and-deployment/deployment-with-wercker.md diff --git a/content/hosting-and-deployment/hosting-on-bitbucket.md b/content/en/hosting-and-deployment/hosting-on-bitbucket.md similarity index 100% rename from content/hosting-and-deployment/hosting-on-bitbucket.md rename to content/en/hosting-and-deployment/hosting-on-bitbucket.md diff --git a/content/hosting-and-deployment/hosting-on-firebase.md b/content/en/hosting-and-deployment/hosting-on-firebase.md similarity index 100% rename from content/hosting-and-deployment/hosting-on-firebase.md rename to content/en/hosting-and-deployment/hosting-on-firebase.md diff --git a/content/hosting-and-deployment/hosting-on-github.md b/content/en/hosting-and-deployment/hosting-on-github.md similarity index 100% rename from content/hosting-and-deployment/hosting-on-github.md rename to content/en/hosting-and-deployment/hosting-on-github.md diff --git a/content/hosting-and-deployment/hosting-on-gitlab.md b/content/en/hosting-and-deployment/hosting-on-gitlab.md similarity index 100% rename from content/hosting-and-deployment/hosting-on-gitlab.md rename to content/en/hosting-and-deployment/hosting-on-gitlab.md diff --git a/content/hosting-and-deployment/hosting-on-keycdn.md b/content/en/hosting-and-deployment/hosting-on-keycdn.md similarity index 100% rename from content/hosting-and-deployment/hosting-on-keycdn.md rename to content/en/hosting-and-deployment/hosting-on-keycdn.md diff --git a/content/hosting-and-deployment/hosting-on-netlify.md b/content/en/hosting-and-deployment/hosting-on-netlify.md similarity index 100% rename from content/hosting-and-deployment/hosting-on-netlify.md rename to content/en/hosting-and-deployment/hosting-on-netlify.md diff --git a/content/maintenance/_index.md b/content/en/maintenance/_index.md similarity index 100% rename from content/maintenance/_index.md rename to content/en/maintenance/_index.md diff --git a/content/news/0-16.md b/content/en/news/0.16-relnotes/index.md similarity index 99% rename from content/news/0-16.md rename to content/en/news/0.16-relnotes/index.md index e33f8e546..72839eea5 100644 --- a/content/news/0-16.md +++ b/content/en/news/0.16-relnotes/index.md @@ -3,6 +3,7 @@ date: 2016-06-06T13:54:06-04:00 description: "Hugo 0.16 is our best and biggest release ever. The Hugo community has outdone itself with continued performance improvements, beautiful themes and increased stability." title: "Hugo 0.16" categories: ["Releases"] +aliases: [/0-16/] --- Hugo 0.16 is our best and biggest release ever. The Hugo community has diff --git a/content/news/0-17.md b/content/en/news/0.17-relnotes/index.md similarity index 99% rename from content/news/0-17.md rename to content/en/news/0.17-relnotes/index.md index 6c5245592..034e8e891 100644 --- a/content/news/0-17.md +++ b/content/en/news/0.17-relnotes/index.md @@ -6,6 +6,7 @@ description: "Hugo now supports multilingual sites with the most simple and eleg link: "" title: "0.17: Hugo is going global" draft: false +aliases: [/0-17/] --- Hugo is going global with our 0.17 release. We put a lot of thought into how we could extend Hugo to support multilingual websites with the most simple and elegant experience. Hugo's multilingual diff --git a/content/news/0-18.md b/content/en/news/0.18-relnotes/index.md similarity index 99% rename from content/news/0-18.md rename to content/en/news/0.18-relnotes/index.md index 085d7fa0f..5aaab9ffe 100644 --- a/content/news/0-18.md +++ b/content/en/news/0.18-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.18" draft: false author: bep +aliases: [/0-18/] --- Hugo 0.18.1 is a bug fix release fixing some issues introduced in Hugo 0.18: diff --git a/content/news/0-19.md b/content/en/news/0.19-relnotes/index.md similarity index 99% rename from content/news/0-19.md rename to content/en/news/0.19-relnotes/index.md index 5ccc94ca0..5c53b057d 100644 --- a/content/news/0-19.md +++ b/content/en/news/0.19-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.19" draft: false author: budparr +aliases: [/0-19/] --- We're happy to announce the first release of Hugo in 2017. diff --git a/content/news/0-20.md b/content/en/news/0.20-relnotes/index.md similarity index 99% rename from content/news/0-20.md rename to content/en/news/0.20-relnotes/index.md index 7afd02135..75e944a6c 100644 --- a/content/news/0-20.md +++ b/content/en/news/0.20-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.20" draft: false author: bep +aliases: [/0-20/] --- Hugo `0.20` introduces the powerful and long sought after feature [Custom Output Formats](http://gohugo.io/extras/output-formats/); Hugo isn’t just that “static HTML with an added RSS feed” anymore. _Say hello_ to calendars, e-book formats, Google AMP, and JSON search indexes, to name a few ( [#2828](//github.com/gohugoio/hugo/issues/2828) ). diff --git a/content/news/0-20-1.md b/content/en/news/0.20.1-relnotes/index.md similarity index 96% rename from content/news/0-20-1.md rename to content/en/news/0.20.1-relnotes/index.md index 53350d741..109737bb3 100644 --- a/content/news/0-20-1.md +++ b/content/en/news/0.20.1-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.20.1" draft: false author: bep +aliases: [/0-20-1/] --- * Fix logic for base template in work dir vs in the theme [#3323](//github.com/gohugoio/hugo/issues/3323) diff --git a/content/news/0-20-2.md b/content/en/news/0.20.2-relnotes/index.md similarity index 98% rename from content/news/0-20-2.md rename to content/en/news/0.20.2-relnotes/index.md index c4aaf9d5b..3ee08411d 100644 --- a/content/news/0-20-2.md +++ b/content/en/news/0.20.2-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.20.2" draft: false author: bep +aliases: [/0-20-2/] --- Hugo `0.20.2` adds support for plain text partials included into `HTML` templates. This was a side-effect of the big new [Custom Output Format](https://gohugo.io/extras/output-formats/) feature in `0.20`, and while the change was intentional and there was an ongoing discussion about fixing it in [#3273](//github.com/gohugoio/hugo/issues/3273), it did break some themes. There were valid workarounds for these themes, but we might as well get it right. diff --git a/content/news/0-20-3.md b/content/en/news/0.20.3-relnotes/index.md similarity index 98% rename from content/news/0-20-3.md rename to content/en/news/0.20.3-relnotes/index.md index 98176f3c4..c79d9b202 100644 --- a/content/news/0-20-3.md +++ b/content/en/news/0.20.3-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.20.3" draft: false author: bep +aliases: [/0-20-3/] --- This is a bug-fix release with one important fix. But it also adds some harness around [GoReleaser](https://github.com/goreleaser/goreleaser) to automate the Hugo release process. Big thanks to [@caarlos0](https://github.com/caarlos0) for great and super-fast support fixing issues along the way. diff --git a/content/news/0-20-4.md b/content/en/news/0.20.4-relnotes/index.md similarity index 98% rename from content/news/0-20-4.md rename to content/en/news/0.20.4-relnotes/index.md index f67939faf..2fde30e14 100644 --- a/content/news/0-20-4.md +++ b/content/en/news/0.20.4-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.20.4" draft: false author: bep +aliases: [/0-20-4/] --- This is the second bug-fix release of the day, fixing a couple of issues related to the new release scripts. diff --git a/content/news/0-20-5.md b/content/en/news/0.20.5-relnotes/index.md similarity index 93% rename from content/news/0-20-5.md rename to content/en/news/0.20.5-relnotes/index.md index dd6863982..eaed27832 100644 --- a/content/news/0-20-5.md +++ b/content/en/news/0.20.5-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.20.5" draft: false author: bep +aliases: [/0-20-5/] --- This is a bug-fix release which fixes the version number of `0.20.4` (which wrongly shows up as `0.21-DEV`) ([#3388](https://github.com/gohugoio/hugo/issues/3388)). \ No newline at end of file diff --git a/content/news/0-20-6.md b/content/en/news/0.20.6-relnotes/index.md similarity index 98% rename from content/news/0-20-6.md rename to content/en/news/0.20.6-relnotes/index.md index 53e4cd812..52189092a 100644 --- a/content/news/0-20-6.md +++ b/content/en/news/0.20.6-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.20.6" draft: false author: bep +aliases: [/0-20-6/] --- There have been some [shouting on discuss.gohugo.io](https://discuss.gohugo.io/t/index-md-is-generated-in-subfolder-index-index-html-hugo-0-20/6338/15) about some broken sites after the release of Hugo `0.20`. This release reintroduces the old behaviour, making `/my-blog-post/index.md` work as expected. diff --git a/content/news/0-20-7.md b/content/en/news/0.20.7-relnotes/index.md similarity index 97% rename from content/news/0-20-7.md rename to content/en/news/0.20.7-relnotes/index.md index 5b6675806..50ac365d5 100644 --- a/content/news/0-20-7.md +++ b/content/en/news/0.20.7-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.20.7" draft: false author: bep +aliases: [/0-20-7/] --- This just fixes an issue with the release scripts, no change in the binaries. diff --git a/content/news/0-21.md b/content/en/news/0.21-relnotes/index.md similarity index 99% rename from content/news/0-21.md rename to content/en/news/0.21-relnotes/index.md index ce4764341..aae1fd0b4 100644 --- a/content/news/0-21.md +++ b/content/en/news/0.21-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.21" draft: false author: bep +aliases: [/0-21/] --- Hugo `0.21` brings full support for shortcodes per [Output Format](https://gohugo.io/extras/output-formats/) ([#3220](https://github.com/gohugoio/hugo/issues/3220)), the last vital piece of that puzzle. This is especially useful for `Google AMP` with its many custom media tags. diff --git a/content/news/0-22.md b/content/en/news/0.22-relnotes/index.md similarity index 99% rename from content/news/0-22.md rename to content/en/news/0.22-relnotes/index.md index d3af64c35..8a9e8d5f5 100644 --- a/content/news/0-22.md +++ b/content/en/news/0.22-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.22" draft: false author: bep +aliases: [/0-22/] --- diff --git a/content/news/0-22-1.md b/content/en/news/0.22.1-relnotes/index.md similarity index 98% rename from content/news/0-22-1.md rename to content/en/news/0.22.1-relnotes/index.md index 1efbba650..ceb207d70 100644 --- a/content/news/0-22-1.md +++ b/content/en/news/0.22.1-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.22.1" draft: false author: bep +aliases: [/0-22-1/] --- Hugo `0.22.1` fixes a couple of issues reported after the [0.22 release](https://github.com/gohugoio/hugo/releases/tag/v0.22) Monday. Most importantly a fix for detecting regular subfolders below the root-sections. diff --git a/content/news/0-23.md b/content/en/news/0.23-relnotes/index.md similarity index 99% rename from content/news/0-23.md rename to content/en/news/0.23-relnotes/index.md index 0e14bceed..fdf6e9e73 100644 --- a/content/news/0-23.md +++ b/content/en/news/0.23-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.23" draft: false author: bep +aliases: [/0-23/] --- Hugo `0.23` is mainly a release that handles all the small changes needed to get Hugo moved to a GitHub organisation: [gohugoio](https://github.com/gohugoio), but it also contains a couple of important fixes that makes this an update worth-while for all. diff --git a/content/news/0-24.md b/content/en/news/0.24-relnotes/index.md similarity index 99% rename from content/news/0-24.md rename to content/en/news/0.24-relnotes/index.md index 2d598b79b..ec71e246f 100644 --- a/content/news/0-24.md +++ b/content/en/news/0.24-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.24" draft: false author: bep +aliases: [/0-24/] --- > "A feature that could be the name of the next Indiana Jones movie deserves its own release," says [@bep](https://github.com/bep). diff --git a/content/news/0-24-1.md b/content/en/news/0.24.1-relnotes/index.md similarity index 98% rename from content/news/0-24-1.md rename to content/en/news/0.24.1-relnotes/index.md index 559e1e252..2ec2cef55 100644 --- a/content/news/0-24-1.md +++ b/content/en/news/0.24.1-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.24.1" draft: false author: bep +aliases: [/0-24-1/] --- This release fixes some important **archetype-related regressions** from the recent Hugo 0.24-release. diff --git a/content/news/0-25.md b/content/en/news/0.25-relnotes/index.md similarity index 99% rename from content/news/0-25.md rename to content/en/news/0.25-relnotes/index.md index fa0f0a544..9527c911a 100644 --- a/content/news/0-25.md +++ b/content/en/news/0.25-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.25" draft: false author: bep +aliases: [/0-25/] --- Hugo `0.25` is the **Kinder Surprise**: It automatically opens the page you're working on in the browser, it adds full `AND` and `OR` support in page queries, and you can now have templates per language. diff --git a/content/news/0-25-1.md b/content/en/news/0.25.1-relnotes/index.md similarity index 98% rename from content/news/0-25-1.md rename to content/en/news/0.25.1-relnotes/index.md index 40e2124a3..7d70d87a5 100644 --- a/content/news/0-25-1.md +++ b/content/en/news/0.25.1-relnotes/index.md @@ -6,6 +6,7 @@ link: "" title: "Hugo 0.25.1" draft: false author: bep +aliases: [/0-25-1/] --- This is a bug-fix release with a couple of important fixes. diff --git a/content/news/0.26-relnotes.md b/content/en/news/0.26-relnotes/index.md similarity index 100% rename from content/news/0.26-relnotes.md rename to content/en/news/0.26-relnotes/index.md diff --git a/content/news/0.27-relnotes.md b/content/en/news/0.27-relnotes/index.md similarity index 100% rename from content/news/0.27-relnotes.md rename to content/en/news/0.27-relnotes/index.md diff --git a/content/news/0.27.1-relnotes.md b/content/en/news/0.27.1-relnotes/index.md similarity index 96% rename from content/news/0.27.1-relnotes.md rename to content/en/news/0.27.1-relnotes/index.md index ae15973d4..1184cc175 100644 --- a/content/news/0.27.1-relnotes.md +++ b/content/en/news/0.27.1-relnotes/index.md @@ -1,7 +1,7 @@ --- date: 2017-09-13 -title: "0.27.1: One bugfix" +title: "Hugo 0.27.1: One bugfix" description: "Hugo 0.27.1 fixes an issue introduced in Go 1.9 with HTML escaping of shortcodes in multi output sites." categories: ["Releases"] images: diff --git a/content/news/0.28-relnotes-ready.md b/content/en/news/0.28-relnotes/index.md similarity index 99% rename from content/news/0.28-relnotes-ready.md rename to content/en/news/0.28-relnotes/index.md index ac4537d8d..91128e48e 100644 --- a/content/news/0.28-relnotes-ready.md +++ b/content/en/news/0.28-relnotes/index.md @@ -4,7 +4,6 @@ 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 --- diff --git a/content/news/0.29-relnotes-ready.md b/content/en/news/0.29-relnotes/index.md similarity index 99% rename from content/news/0.29-relnotes-ready.md rename to content/en/news/0.29-relnotes/index.md index 53551886f..810781dda 100644 --- a/content/news/0.29-relnotes-ready.md +++ b/content/en/news/0.29-relnotes/index.md @@ -4,7 +4,6 @@ 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 --- diff --git a/content/news/0.30-relnotes-ready.md b/content/en/news/0.30-relnotes/index.md similarity index 99% rename from content/news/0.30-relnotes-ready.md rename to content/en/news/0.30-relnotes/index.md index 7c2632ae6..db49a1bf3 100644 --- a/content/news/0.30-relnotes-ready.md +++ b/content/en/news/0.30-relnotes/index.md @@ -4,7 +4,6 @@ date: 2017-10-16 title: "Hugo 0.30: Race Car Edition!" description: "Fast Render Mode boosts live reloading!" categories: ["Releases"] -slug: "0.30-relnotes" images: - images/blog/hugo-30-poster.png --- diff --git a/content/news/0.30.1-relnotes-ready.md b/content/en/news/0.30.1-relnotes/index.md similarity index 93% rename from content/news/0.30.1-relnotes-ready.md rename to content/en/news/0.30.1-relnotes/index.md index 208e9f3cd..68165e877 100644 --- a/content/news/0.30.1-relnotes-ready.md +++ b/content/en/news/0.30.1-relnotes/index.md @@ -1,10 +1,9 @@ --- date: 2017-10-19T00:00:00+02:00 -title: "0.30.1: Two Important Bugfixes!" +title: "Hugo 0.30.1: Two Important Bugfixes!" description: "Fixes `hugo -w` and validator-broken Sitemap." categories: ["Releases"] -slug: 0.30.1-relnotes images: - images/blog/hugo-bug-poster.png --- diff --git a/content/news/0.30.2-relnotes-ready.md b/content/en/news/0.30.2-relnotes/index.md similarity index 89% rename from content/news/0.30.2-relnotes-ready.md rename to content/en/news/0.30.2-relnotes/index.md index 28fac1aaf..1d4bcd946 100644 --- a/content/news/0.30.2-relnotes-ready.md +++ b/content/en/news/0.30.2-relnotes/index.md @@ -1,9 +1,8 @@ --- date: 2017-10-19T12:00:00+02:00 -title: "0.30.2: One More Bugfix" +title: "Hugo 0.30.2: One More Bugfix" description: "Fixes Fast Render mode when having sub-path in `baseURL`." -slug: "0.30.2" categories: ["Releases"] images: - images/blog/hugo-bug-poster.png diff --git a/content/news/0.31-relnotes-ready.md b/content/en/news/0.31-relnotes/index.md similarity index 99% rename from content/news/0.31-relnotes-ready.md rename to content/en/news/0.31-relnotes/index.md index 138ecc08c..ba16dfacb 100644 --- a/content/news/0.31-relnotes-ready.md +++ b/content/en/news/0.31-relnotes/index.md @@ -3,7 +3,6 @@ date: 2017-11-20 title: "Hugo 0.31: Language Multihost Edition!" description: "Hugo 0.31: Multihost, smart union static dirs, and more ..." -slug: "0.31-relnotes" categories: ["Releases"] images: - images/blog/hugo-31-poster.png diff --git a/content/news/0.31.1-relnotes-ready.md b/content/en/news/0.31.1-relnotes/index.md similarity index 96% rename from content/news/0.31.1-relnotes-ready.md rename to content/en/news/0.31.1-relnotes/index.md index 9c6be6281..a74470d64 100644 --- a/content/news/0.31.1-relnotes-ready.md +++ b/content/en/news/0.31.1-relnotes/index.md @@ -3,7 +3,6 @@ date: 2017-11-27 title: "Hugo 0.31.1: One Bugfix!" description: "Fixes broken `--appendPort=false`." -slug: "0.31.1" categories: ["Releases"] images: - images/blog/hugo-bug-poster.png diff --git a/content/news/0.32-relnotes-ready.md b/content/en/news/0.32-relnotes/index.md similarity index 99% rename from content/news/0.32-relnotes-ready.md rename to content/en/news/0.32-relnotes/index.md index c0a93d8e9..c3f36fe64 100644 --- a/content/news/0.32-relnotes-ready.md +++ b/content/en/news/0.32-relnotes/index.md @@ -3,7 +3,6 @@ date: 2017-12-31 title: "Hugo 0.32: Page Bundles and Image Processing!" description: "Images and other resources with page-relative links, resize, scale and crop images, and much more." -slug: "0.32-relnotes" categories: ["Releases"] images: - images/blog/hugo-32-poster.png diff --git a/content/news/0.32.1-relnotes-ready.md b/content/en/news/0.32.1-relnotes/index.md similarity index 92% rename from content/news/0.32.1-relnotes-ready.md rename to content/en/news/0.32.1-relnotes/index.md index 80e90e6ed..867e3413e 100644 --- a/content/news/0.32.1-relnotes-ready.md +++ b/content/en/news/0.32.1-relnotes/index.md @@ -1,9 +1,8 @@ --- date: 2018-01-02 -title: "0.32.1: Two bugfixes" +title: "Hugo 0.32.1: Two bugfixes" description: "Fixes image processing in shortcodes." -slug: "0.32.1-relnotes" categories: ["Releases"] images: - images/blog/hugo-bug-poster.png diff --git a/content/news/0.32.2-relnotes-ready.md b/content/en/news/0.32.2-relnotes/index.md similarity index 91% rename from content/news/0.32.2-relnotes-ready.md rename to content/en/news/0.32.2-relnotes/index.md index 5d33df6ef..7453a2678 100644 --- a/content/news/0.32.2-relnotes-ready.md +++ b/content/en/news/0.32.2-relnotes/index.md @@ -1,9 +1,8 @@ --- date: 2018-01-03 -title: "0.32.2: One bugfix" +title: "Hugo 0.32.2: One bugfix" description: "Fixes one issue with publishing of processed images when no cache." -slug: "0.32.2-relnotes" categories: ["Releases"] images: - images/blog/hugo-bug-poster.png diff --git a/content/news/0.32.3-relnotes-ready.md b/content/en/news/0.32.3-relnotes/index.md similarity index 99% rename from content/news/0.32.3-relnotes-ready.md rename to content/en/news/0.32.3-relnotes/index.md index c22bbc83b..ad795a183 100644 --- a/content/news/0.32.3-relnotes-ready.md +++ b/content/en/news/0.32.3-relnotes/index.md @@ -3,7 +3,6 @@ date: 2018-01-08 title: "Hugo 0.32.3: Some important bug fixes" description: "Fixes multilingual resource (images etc.) handling etc." -slug: "0.32.3-relnotes" categories: ["Releases"] images: - images/blog/hugo-bug-poster.png diff --git a/content/news/0.32.4-relnotes-ready.md b/content/en/news/0.32.4-relnotes/index.md similarity index 93% rename from content/news/0.32.4-relnotes-ready.md rename to content/en/news/0.32.4-relnotes/index.md index 2e1fc3757..bd8163e0d 100644 --- a/content/news/0.32.4-relnotes-ready.md +++ b/content/en/news/0.32.4-relnotes/index.md @@ -1,9 +1,8 @@ --- date: 2018-01-11 -title: "0.32.4: Two bugfixes" +title: "Hugo 0.32.4: Two bugfixes" description: "Fixes non-ASCII path handling for Page resources." -slug: "0.32.4-relnotes" categories: ["Releases"] images: - images/blog/hugo-bug-poster.png diff --git a/content/news/0.33-relnotes/featured-hugo-33-poster.png b/content/en/news/0.33-relnotes/featured-hugo-33-poster.png similarity index 100% rename from content/news/0.33-relnotes/featured-hugo-33-poster.png rename to content/en/news/0.33-relnotes/featured-hugo-33-poster.png diff --git a/content/news/0.33-relnotes/index.md b/content/en/news/0.33-relnotes/index.md similarity index 100% rename from content/news/0.33-relnotes/index.md rename to content/en/news/0.33-relnotes/index.md diff --git a/content/news/0.34-relnotes/featured-34-poster.png b/content/en/news/0.34-relnotes/featured-34-poster.png similarity index 100% rename from content/news/0.34-relnotes/featured-34-poster.png rename to content/en/news/0.34-relnotes/featured-34-poster.png diff --git a/content/news/0.34-relnotes/index.md b/content/en/news/0.34-relnotes/index.md similarity index 100% rename from content/news/0.34-relnotes/index.md rename to content/en/news/0.34-relnotes/index.md diff --git a/content/news/0.35-relnotes/featured-hugo-35-poster.png b/content/en/news/0.35-relnotes/featured-hugo-35-poster.png similarity index 100% rename from content/news/0.35-relnotes/featured-hugo-35-poster.png rename to content/en/news/0.35-relnotes/featured-hugo-35-poster.png diff --git a/content/news/0.35-relnotes/index.md b/content/en/news/0.35-relnotes/index.md similarity index 100% rename from content/news/0.35-relnotes/index.md rename to content/en/news/0.35-relnotes/index.md diff --git a/content/news/0.36-relnotes/featured-hugo-36-poster.png b/content/en/news/0.36-relnotes/featured-hugo-36-poster.png similarity index 100% rename from content/news/0.36-relnotes/featured-hugo-36-poster.png rename to content/en/news/0.36-relnotes/featured-hugo-36-poster.png diff --git a/content/news/0.36-relnotes/index.md b/content/en/news/0.36-relnotes/index.md similarity index 100% rename from content/news/0.36-relnotes/index.md rename to content/en/news/0.36-relnotes/index.md diff --git a/content/news/0.36.1-relnotes-ready.md b/content/en/news/0.36.1-relnotes/index.md similarity index 98% rename from content/news/0.36.1-relnotes-ready.md rename to content/en/news/0.36.1-relnotes/index.md index 0e94f20e6..59bf56297 100644 --- a/content/news/0.36.1-relnotes-ready.md +++ b/content/en/news/0.36.1-relnotes/index.md @@ -3,7 +3,6 @@ date: 2018-02-15 title: "Hugo 0.36.1: One Bugfix" description: "Fixes a multi-thread image processing issue." -slug: "0.36.1-relnotes" categories: ["Releases"] images: - images/blog/hugo-bug-poster.png diff --git a/content/news/0.37-relnotes/featured-hugo-37-poster.png b/content/en/news/0.37-relnotes/featured-hugo-37-poster.png similarity index 100% rename from content/news/0.37-relnotes/featured-hugo-37-poster.png rename to content/en/news/0.37-relnotes/featured-hugo-37-poster.png diff --git a/content/news/0.37-relnotes/index.md b/content/en/news/0.37-relnotes/index.md similarity index 100% rename from content/news/0.37-relnotes/index.md rename to content/en/news/0.37-relnotes/index.md diff --git a/content/news/0.37.1-relnotes/index.md b/content/en/news/0.37.1-relnotes/index.md similarity index 100% rename from content/news/0.37.1-relnotes/index.md rename to content/en/news/0.37.1-relnotes/index.md diff --git a/content/news/0.38-relnotes/featured-poster.png b/content/en/news/0.38-relnotes/featured-poster.png similarity index 100% rename from content/news/0.38-relnotes/featured-poster.png rename to content/en/news/0.38-relnotes/featured-poster.png diff --git a/content/news/0.38-relnotes/index.md b/content/en/news/0.38-relnotes/index.md similarity index 99% rename from content/news/0.38-relnotes/index.md rename to content/en/news/0.38-relnotes/index.md index 88ef88872..71d167cd5 100644 --- a/content/news/0.38-relnotes/index.md +++ b/content/en/news/0.38-relnotes/index.md @@ -1,7 +1,7 @@ --- date: 2018-04-02 -title: "The Easter Egg Edition" +title: "Hugo 0.38: The Easter Egg Edition" description: "Hugo 0.38: Date and slug from filenames, multiple content dirs, config from themes, language merge func …" categories: ["Releases"] --- diff --git a/content/news/0.38.1-relnotes/index.md b/content/en/news/0.38.1-relnotes/index.md similarity index 97% rename from content/news/0.38.1-relnotes/index.md rename to content/en/news/0.38.1-relnotes/index.md index b900b6fb0..a025b5415 100644 --- a/content/news/0.38.1-relnotes/index.md +++ b/content/en/news/0.38.1-relnotes/index.md @@ -1,7 +1,7 @@ --- date: 2018-04-05 -title: "Some Live Reload Fixes" +title: "Hugo 0.38.1: Some Live Reload Fixes" description: "Hugo 0.38.1 fixes some live reload issues introduced in 0.38." categories: ["Releases"] images: diff --git a/content/news/0.38.2-relnotes/index.md b/content/en/news/0.38.2-relnotes/index.md similarity index 91% rename from content/news/0.38.2-relnotes/index.md rename to content/en/news/0.38.2-relnotes/index.md index d69c5f5b3..0a045eee8 100644 --- a/content/news/0.38.2-relnotes/index.md +++ b/content/en/news/0.38.2-relnotes/index.md @@ -2,7 +2,7 @@ --- date: 2018-04-09 title: "Hugo 0.38.2: Two Bugfixes" -description: "0.38.2 fixes --contentDir flag handling and \".\" in content filenames." +description: "0.38.2 fixes `--contentDir` flag handling and \".\" in content filenames." categories: ["Releases"] images: - images/blog/hugo-bug-poster.png diff --git a/content/news/0.39-relnotes/featured-hugo-39-poster.png b/content/en/news/0.39-relnotes/featured-hugo-39-poster.png similarity index 100% rename from content/news/0.39-relnotes/featured-hugo-39-poster.png rename to content/en/news/0.39-relnotes/featured-hugo-39-poster.png diff --git a/content/news/0.39-relnotes/index.md b/content/en/news/0.39-relnotes/index.md similarity index 99% rename from content/news/0.39-relnotes/index.md rename to content/en/news/0.39-relnotes/index.md index a114e4820..d1c28252a 100644 --- a/content/news/0.39-relnotes/index.md +++ b/content/en/news/0.39-relnotes/index.md @@ -1,7 +1,7 @@ --- date: 2018-04-16 -title: "The Nat King Cole Stabilizer Edition" +title: "Hugo 0.39: The Nat King Cole Stabilizer Edition" description: "Hugo 0.39: Rewrite of the /commands package, `Resource.Content`, several new template funcs, and more …" categories: ["Releases"] --- diff --git a/content/en/news/0.40-relnotes/featured-hugo-40-poster.png b/content/en/news/0.40-relnotes/featured-hugo-40-poster.png new file mode 100644 index 000000000..9a7f36d1f Binary files /dev/null and b/content/en/news/0.40-relnotes/featured-hugo-40-poster.png differ diff --git a/content/en/news/0.40-relnotes/index.md b/content/en/news/0.40-relnotes/index.md new file mode 100644 index 000000000..9a45c1c09 --- /dev/null +++ b/content/en/news/0.40-relnotes/index.md @@ -0,0 +1,76 @@ + +--- +date: 2018-04-23 +title: "Hugo 0.40: The Revival of the Shortcodes" +description: "Hugo 0.40: Shortcodes with `.Content` (almost) always available, processed in order of appearance, several new template funcs …" +categories: ["Releases"] +--- + +Hugo `0.40` is **The Revival of the Shortcodes**. Shortcodes is one of the prime features in Hugo. Really useful, but it has had some known shortcomings. [@bep](https://github.com/bep) has been really busy the last week to address those. + +In summary: + +* `.Content` for a page retrieved in a query in a shortcode is now _almost_ always available. Note that shortcodes can include content that can include shortcodes that can include content... It is possible to bite your tail. See more below. +* Shortcodes are now processed and rendered in their order of appearance. +* Related to the above, we have now added a zero-based `.Ordinal` to the shortcode. + + +The first bullet above resolves some surprising behaviour when reading other pages' content from shortcodes. Before this release, that behaviour was undefined. Note that this has never been an issue from regular templates. + +It will still not be possible to get **the current shortcode's page's rendered content**. That would have impressed Einstein. + +The new and well defined rules are: + +* `.Page.Content` from a shortcode will be empty. The related `.Page.Truncated` `.Page.Summary`, `.Page.WordCount`, `.Page.ReadingTime`, `.Page.Plain` and `.Page.PlainWords` will also have empty values. +* For _other pages_ (retrieved via `.Page.Site.GetPage`, `.Site.Pages` etc.) the `.Content` is there to use as you please as long as you don't have infinite content recursion in your shortcode/content setup. See below. +* `.Page.TableOfContents` is good to go (but does not support shortcodes in headlines; this is unchanged) + +If you get into a situation of infinite recursion, the `.Content` will be empty. Run `hugo -v` for more information. + +This release represents **19 contributions by 3 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 **13 contributions by 6 contributors**. A special thanks to [@kaushalmodi](https://github.com/kaushalmodi), [@anthonyfok](https://github.com/anthonyfok), [@bep](https://github.com/bep), and [@regisphilibert](https://github.com/regisphilibert) for their work on the documentation site. + + +Hugo now has: + +* 25071+ [stars](https://github.com/gohugoio/hugo/stargazers) +* 446+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) +* 222+ [themes](http://themes.gohugo.io/) + +## Notes + +* We have added a `timeout` configuration setting. This is currently only used to time out the `.Content` creation, to bail out of recursive recursions. Run `hugo -v` to see potential warnings about this. The `timeout` is set default to `10000` (10 seconds). + +## Enhancements + +### Templates + +* Add `path.Ext`, `path.Dir` and `path.Base` [47e7788b](https://github.com/gohugoio/hugo/commit/47e7788b3c30de6fb895522096baf2c13598c317) [@bep](https://github.com/bep) +* Make `fileExist` use the same filesystem as `readFile` [51af1d2e](https://github.com/gohugoio/hugo/commit/51af1d2eadcad89e8c2906c05549352ef69ab016) [@bep](https://github.com/bep) [#4633](https://github.com/gohugoio/hugo/issues/4633) + +### Other + +* Add `.Page.BundleType` [402f6788](https://github.com/gohugoio/hugo/commit/402f6788ee955ad2aace84e8fba1625db7b356d9) [@bep](https://github.com/bep) [#4662](https://github.com/gohugoio/hugo/issues/4662) +* Add zero-based `Ordinal` to shortcode [3decf4a3](https://github.com/gohugoio/hugo/commit/3decf4a327157e98d3da3502b6d777de63437c39) [@bep](https://github.com/bep) [#3359](https://github.com/gohugoio/hugo/issues/3359) +* Process and render shortcodes in their order of appearance [85535084](https://github.com/gohugoio/hugo/commit/85535084dea4d3e3adf1ebd08ae57b39d76e1904) [@bep](https://github.com/bep) [#3359](https://github.com/gohugoio/hugo/issues/3359) +* Init the content and shortcodes early [19084eaf](https://github.com/gohugoio/hugo/commit/19084eaf74246feac61d618c55031369520dfa8e) [@bep](https://github.com/bep) [#4632](https://github.com/gohugoio/hugo/issues/4632) +* Prepare child page resources before the page itself [3238e14f](https://github.com/gohugoio/hugo/commit/3238e14fdfeedf189a5af122e20bff040ac059bd) [@bep](https://github.com/bep) [#4632](https://github.com/gohugoio/hugo/issues/4632) +* Make .Content (almost) always available in shortcodes [4d26ab33](https://github.com/gohugoio/hugo/commit/4d26ab33dcef704086f43828d1dfb4b8beae2593) [@bep](https://github.com/bep) [#4632](https://github.com/gohugoio/hugo/issues/4632)[#4653](https://github.com/gohugoio/hugo/issues/4653)[#4655](https://github.com/gohugoio/hugo/issues/4655) +* Add language merge support for Pages in resource.Resources [47c05c47](https://github.com/gohugoio/hugo/commit/47c05c47e0b663632a649ee5d256acc1a32fe9e4) [@bep](https://github.com/bep) [#4644](https://github.com/gohugoio/hugo/issues/4644) +* Improve .Content vs shortcodes [e590cc26](https://github.com/gohugoio/hugo/commit/e590cc26eb1363a4b84603f051b20bd43fd1f7bd) [@bep](https://github.com/bep) [#4632](https://github.com/gohugoio/hugo/issues/4632) +* Improve .Get docs [74520d2c](https://github.com/gohugoio/hugo/commit/74520d2cfd39bb4428182e26c57afa9df83ce7b5) [@paulcmal](https://github.com/paulcmal) +* Update missing positional parameter test for .Get [e2b277bb](https://github.com/gohugoio/hugo/commit/e2b277bba5935c0686cb83f132eae021ef2dc5e1) [@paulcmal](https://github.com/paulcmal) +* Improve error message in metadata parse [d681ea55](https://github.com/gohugoio/hugo/commit/d681ea55a0a59b7096dacd194ee0cb8fe15b0757) [@bep](https://github.com/bep) [#3696](https://github.com/gohugoio/hugo/issues/3696) +* Add some context to front matter parse error [159bed34](https://github.com/gohugoio/hugo/commit/159bed34c3a850d58d08a36ddc40372ed96af2db) [@bep](https://github.com/bep) [#4638](https://github.com/gohugoio/hugo/issues/4638) +* Updated GetCSV error message (#4636) [5cc944ff](https://github.com/gohugoio/hugo/commit/5cc944ffd77289ab0b8efd69d628fb11d1280993) [@CubeLuke](https://github.com/CubeLuke) +* .Get doesn't crash on missing positional param fixes #4619 [236f0c84](https://github.com/gohugoio/hugo/commit/236f0c840b45e0c41fcbb2fb6ee556c0fb2d4859) [@paulcmal](https://github.com/paulcmal) +* fix syntax signature [cd6a2612](https://github.com/gohugoio/hugo/commit/cd6a261242b63555ac2c3ca7a8462b874b490701) [@paulcmal](https://github.com/paulcmal) + + + + + + + diff --git a/content/en/news/0.40.1-relnotes/index.md b/content/en/news/0.40.1-relnotes/index.md new file mode 100644 index 000000000..3352f164b --- /dev/null +++ b/content/en/news/0.40.1-relnotes/index.md @@ -0,0 +1,19 @@ + +--- +date: 2018-04-25 +title: "Hugo 0.40.1: One Bug Fix" +description: "Fixes some shortcode vs .Content corner cases." +categories: ["Releases"] +images: +- images/blog/hugo-bug-poster.png + +--- + + + +This release fixes some shortcode vs `.Content` corner cases introduced in Hugo `0.40` [288c3964](https://github.com/gohugoio/hugo/commit/288c39643906b4194a0a6acfbaf87cb0fbdeb361) [@bep](https://github.com/bep) [#4632](https://github.com/gohugoio/hugo/issues/4632)[#4664](https://github.com/gohugoio/hugo/issues/4664). + + + + + diff --git a/content/en/news/0.40.2-relnotes/index.md b/content/en/news/0.40.2-relnotes/index.md new file mode 100644 index 000000000..50b9c3842 --- /dev/null +++ b/content/en/news/0.40.2-relnotes/index.md @@ -0,0 +1,20 @@ + +--- +date: 2018-04-30 +title: "Hugo 0.40.2: Two Bug fixes" +description: "Fixes some regressions introduced in 0.40." +categories: ["Releases"] +images: +- images/blog/hugo-bug-poster.png + +--- + +This release fixes some regressions introduced in Hugo `0.40`. See the [milestone](https://github.com/gohugoio/hugo/milestone/62?closed=1) for an issue list. + +* Reset .Page.Scratch on live-reload [655983a2](https://github.com/gohugoio/hugo/commit/655983a22dc35b2ee5119dcc4acb9918498d2d68) [@bep](https://github.com/bep) [#4683](https://github.com/gohugoio/hugo/issues/4683) +* Fix .WordCount, .FuzzyWordCount, .ReadingTime when summary marker is set [001a28c2](https://github.com/gohugoio/hugo/commit/001a28c2f9ed121b33df18fe792859ab378784c6) [@bep](https://github.com/bep) [#4675](https://github.com/gohugoio/hugo/issues/4675)[#4682](https://github.com/gohugoio/hugo/issues/4682) + + + + + diff --git a/content/news/_index.md b/content/en/news/_index.md similarity index 100% rename from content/news/_index.md rename to content/en/news/_index.md diff --git a/content/news/http2-server-push-in-hugo.md b/content/en/news/http2-server-push-in-hugo.md similarity index 100% rename from content/news/http2-server-push-in-hugo.md rename to content/en/news/http2-server-push-in-hugo.md diff --git a/content/readfiles/README.md b/content/en/readfiles/README.md similarity index 100% rename from content/readfiles/README.md rename to content/en/readfiles/README.md diff --git a/content/readfiles/bfconfig.md b/content/en/readfiles/bfconfig.md similarity index 100% rename from content/readfiles/bfconfig.md rename to content/en/readfiles/bfconfig.md diff --git a/content/readfiles/dateformatting.md b/content/en/readfiles/dateformatting.md similarity index 100% rename from content/readfiles/dateformatting.md rename to content/en/readfiles/dateformatting.md diff --git a/content/readfiles/index.md b/content/en/readfiles/index.md similarity index 100% rename from content/readfiles/index.md rename to content/en/readfiles/index.md diff --git a/content/readfiles/menuvars.md b/content/en/readfiles/menuvars.md similarity index 100% rename from content/readfiles/menuvars.md rename to content/en/readfiles/menuvars.md diff --git a/content/readfiles/sectionvars.md b/content/en/readfiles/sectionvars.md similarity index 100% rename from content/readfiles/sectionvars.md rename to content/en/readfiles/sectionvars.md diff --git a/content/readfiles/testing.txt b/content/en/readfiles/testing.txt similarity index 100% rename from content/readfiles/testing.txt rename to content/en/readfiles/testing.txt diff --git a/content/showcase/1password-support/bio.md b/content/en/showcase/1password-support/bio.md similarity index 100% rename from content/showcase/1password-support/bio.md rename to content/en/showcase/1password-support/bio.md diff --git a/content/showcase/1password-support/featured.png b/content/en/showcase/1password-support/featured.png similarity index 100% rename from content/showcase/1password-support/featured.png rename to content/en/showcase/1password-support/featured.png diff --git a/content/showcase/1password-support/index.md b/content/en/showcase/1password-support/index.md similarity index 100% rename from content/showcase/1password-support/index.md rename to content/en/showcase/1password-support/index.md diff --git a/content/en/showcase/flesland-flis/bio.md b/content/en/showcase/flesland-flis/bio.md new file mode 100644 index 000000000..c1a4e8187 --- /dev/null +++ b/content/en/showcase/flesland-flis/bio.md @@ -0,0 +1,8 @@ + +A business page for Flesland Flis AS. A Norwegian Tiler located in Bergen. + +The page is designed and developed by Sindre Gusdal: + +* [Absoluttweb AS](http://www.absoluttweb.no) +* [Sindre Gusdal](https://www.linkedin.com/in/sindregusdal/) + diff --git a/content/en/showcase/flesland-flis/featured.png b/content/en/showcase/flesland-flis/featured.png new file mode 100644 index 000000000..a6dae684e Binary files /dev/null and b/content/en/showcase/flesland-flis/featured.png differ diff --git a/content/en/showcase/flesland-flis/index.md b/content/en/showcase/flesland-flis/index.md new file mode 100644 index 000000000..5e18f040c --- /dev/null +++ b/content/en/showcase/flesland-flis/index.md @@ -0,0 +1,24 @@ +--- + +title: Flesland Flis AS +date: 2018-04-24 +description: "showcase: Business Page for a tile shop in Bergen, Norway" +siteURL: https://www.fleslandflis.no +byline: "[Sindre Gusdal](http://www.absoluttweb.no), Absoluttweb AS" + +--- + +For **Flesland Flis** I use a combination of **Hugo, Forestry.io and Netlify**. Static Site Generators and Hugo has been on my radar for a long time, and with all the nice features released in Hugo the last years, it's now my preferred solution for new clients. Also a huge thanks to the guys at [Forestry.io](https://forestry.io), for making such a smooth CMS for Hugo. + +The #1 reason why I love Hugo is the logic between content and layout, and of course the speed. Compared to solutions like Jekyll, Hugo is just better at all the stuff I value the most - speed, flexibility, theming and more. + +### Thanks, Hugo! + +Today I use Hugo in a combination with GULP and Foundation 6 + my own Hugo starter theme. This works great for me, and gives me all the flexibility I need. Then I can include FancyBox, Responsive Text and other Node Modules when needed. + +In the past I had to do a lot of changes to layout, content and css, if the client f.ex needed an extra PDF or an image-gallery to a certain page. Just small details not fitting in the template, would be a hassle. So updating existing webpages was boring and time consuming. + +Today I just copy-paste a new layout file, adds some frontmatter, Pushes to GIT and that special page is done. + +**Gotta love it:)** + diff --git a/content/showcase/forestry/bio.md b/content/en/showcase/forestry/bio.md similarity index 100% rename from content/showcase/forestry/bio.md rename to content/en/showcase/forestry/bio.md diff --git a/content/showcase/forestry/featured.png b/content/en/showcase/forestry/featured.png similarity index 100% rename from content/showcase/forestry/featured.png rename to content/en/showcase/forestry/featured.png diff --git a/content/showcase/forestry/index.md b/content/en/showcase/forestry/index.md similarity index 100% rename from content/showcase/forestry/index.md rename to content/en/showcase/forestry/index.md diff --git a/content/showcase/hartwell-insurance/bio.md b/content/en/showcase/hartwell-insurance/bio.md similarity index 100% rename from content/showcase/hartwell-insurance/bio.md rename to content/en/showcase/hartwell-insurance/bio.md diff --git a/content/showcase/hartwell-insurance/featured.png b/content/en/showcase/hartwell-insurance/featured.png similarity index 100% rename from content/showcase/hartwell-insurance/featured.png rename to content/en/showcase/hartwell-insurance/featured.png diff --git a/content/showcase/hartwell-insurance/hartwell-columns.png b/content/en/showcase/hartwell-insurance/hartwell-columns.png similarity index 100% rename from content/showcase/hartwell-insurance/hartwell-columns.png rename to content/en/showcase/hartwell-insurance/hartwell-columns.png diff --git a/content/showcase/hartwell-insurance/hartwell-lighthouse.png b/content/en/showcase/hartwell-insurance/hartwell-lighthouse.png similarity index 100% rename from content/showcase/hartwell-insurance/hartwell-lighthouse.png rename to content/en/showcase/hartwell-insurance/hartwell-lighthouse.png diff --git a/content/showcase/hartwell-insurance/hartwell-webpagetest.png b/content/en/showcase/hartwell-insurance/hartwell-webpagetest.png similarity index 100% rename from content/showcase/hartwell-insurance/hartwell-webpagetest.png rename to content/en/showcase/hartwell-insurance/hartwell-webpagetest.png diff --git a/content/showcase/hartwell-insurance/index.md b/content/en/showcase/hartwell-insurance/index.md similarity index 100% rename from content/showcase/hartwell-insurance/index.md rename to content/en/showcase/hartwell-insurance/index.md diff --git a/content/showcase/letsencrypt/bio.md b/content/en/showcase/letsencrypt/bio.md similarity index 100% rename from content/showcase/letsencrypt/bio.md rename to content/en/showcase/letsencrypt/bio.md diff --git a/content/showcase/letsencrypt/featured.png b/content/en/showcase/letsencrypt/featured.png similarity index 100% rename from content/showcase/letsencrypt/featured.png rename to content/en/showcase/letsencrypt/featured.png diff --git a/content/showcase/letsencrypt/index.md b/content/en/showcase/letsencrypt/index.md similarity index 100% rename from content/showcase/letsencrypt/index.md rename to content/en/showcase/letsencrypt/index.md diff --git a/content/showcase/linode/bio.md b/content/en/showcase/linode/bio.md similarity index 100% rename from content/showcase/linode/bio.md rename to content/en/showcase/linode/bio.md diff --git a/content/showcase/linode/featured.png b/content/en/showcase/linode/featured.png similarity index 100% rename from content/showcase/linode/featured.png rename to content/en/showcase/linode/featured.png diff --git a/content/showcase/linode/index.md b/content/en/showcase/linode/index.md similarity index 100% rename from content/showcase/linode/index.md rename to content/en/showcase/linode/index.md diff --git a/content/showcase/pace-revenue-management/bio.md b/content/en/showcase/pace-revenue-management/bio.md similarity index 100% rename from content/showcase/pace-revenue-management/bio.md rename to content/en/showcase/pace-revenue-management/bio.md diff --git a/content/showcase/pace-revenue-management/featured.png b/content/en/showcase/pace-revenue-management/featured.png similarity index 100% rename from content/showcase/pace-revenue-management/featured.png rename to content/en/showcase/pace-revenue-management/featured.png diff --git a/content/showcase/pace-revenue-management/index.md b/content/en/showcase/pace-revenue-management/index.md similarity index 100% rename from content/showcase/pace-revenue-management/index.md rename to content/en/showcase/pace-revenue-management/index.md diff --git a/content/showcase/quiply-employee-communications-app/bio.md b/content/en/showcase/quiply-employee-communications-app/bio.md similarity index 100% rename from content/showcase/quiply-employee-communications-app/bio.md rename to content/en/showcase/quiply-employee-communications-app/bio.md diff --git a/content/showcase/quiply-employee-communications-app/featured.png b/content/en/showcase/quiply-employee-communications-app/featured.png similarity index 100% rename from content/showcase/quiply-employee-communications-app/featured.png rename to content/en/showcase/quiply-employee-communications-app/featured.png diff --git a/content/showcase/quiply-employee-communications-app/index.md b/content/en/showcase/quiply-employee-communications-app/index.md similarity index 100% rename from content/showcase/quiply-employee-communications-app/index.md rename to content/en/showcase/quiply-employee-communications-app/index.md diff --git a/content/showcase/small-multiples/bio.md b/content/en/showcase/small-multiples/bio.md similarity index 100% rename from content/showcase/small-multiples/bio.md rename to content/en/showcase/small-multiples/bio.md diff --git a/content/showcase/small-multiples/featured-small-multiples.png b/content/en/showcase/small-multiples/featured-small-multiples.png similarity index 100% rename from content/showcase/small-multiples/featured-small-multiples.png rename to content/en/showcase/small-multiples/featured-small-multiples.png diff --git a/content/showcase/small-multiples/index.md b/content/en/showcase/small-multiples/index.md similarity index 100% rename from content/showcase/small-multiples/index.md rename to content/en/showcase/small-multiples/index.md diff --git a/content/showcase/stackimpact/bio.md b/content/en/showcase/stackimpact/bio.md similarity index 100% rename from content/showcase/stackimpact/bio.md rename to content/en/showcase/stackimpact/bio.md diff --git a/content/showcase/stackimpact/featured.png b/content/en/showcase/stackimpact/featured.png similarity index 100% rename from content/showcase/stackimpact/featured.png rename to content/en/showcase/stackimpact/featured.png diff --git a/content/showcase/stackimpact/index.md b/content/en/showcase/stackimpact/index.md similarity index 100% rename from content/showcase/stackimpact/index.md rename to content/en/showcase/stackimpact/index.md diff --git a/content/showcase/template/bio.md b/content/en/showcase/template/bio.md similarity index 100% rename from content/showcase/template/bio.md rename to content/en/showcase/template/bio.md diff --git a/content/showcase/template/featured-template.png b/content/en/showcase/template/featured-template.png similarity index 100% rename from content/showcase/template/featured-template.png rename to content/en/showcase/template/featured-template.png diff --git a/content/showcase/template/index.md b/content/en/showcase/template/index.md similarity index 100% rename from content/showcase/template/index.md rename to content/en/showcase/template/index.md diff --git a/content/templates/404.md b/content/en/templates/404.md similarity index 100% rename from content/templates/404.md rename to content/en/templates/404.md diff --git a/content/templates/_index.md b/content/en/templates/_index.md similarity index 100% rename from content/templates/_index.md rename to content/en/templates/_index.md diff --git a/content/templates/alternatives.md b/content/en/templates/alternatives.md similarity index 100% rename from content/templates/alternatives.md rename to content/en/templates/alternatives.md diff --git a/content/templates/base.md b/content/en/templates/base.md similarity index 100% rename from content/templates/base.md rename to content/en/templates/base.md diff --git a/content/templates/data-templates.md b/content/en/templates/data-templates.md similarity index 100% rename from content/templates/data-templates.md rename to content/en/templates/data-templates.md diff --git a/content/templates/files.md b/content/en/templates/files.md similarity index 94% rename from content/templates/files.md rename to content/en/templates/files.md index b7fbf66a2..6e6f3ec4e 100644 --- a/content/templates/files.md +++ b/content/en/templates/files.md @@ -85,24 +85,24 @@ Here is the templating for our new `readfile` shortcode: This `readfile` shortcode is [also part of the Hugo docs][readfilesource]. So is [`testing.txt`][testfile], which we will call in this example by passing it into our new `readfile` shortcode as follows: ``` -{{}} +{{}} ``` The output "string" for this shortcode declaration will be the following: ``` -{{< readfile file="/content/readfiles/testing.txt" >}} +{{< readfile file="/content/en/readfiles/testing.txt" >}} ``` However, if we want Hugo to pass this string through Blackfriday, we should add the `markdown="true"` optional parameter: ``` -{{}} +{{}} ``` And here is the result as [called directly in the Hugo docs][] and rendered for display: -{{< readfile file="/content/readfiles/testing.txt" markdown="true">}} +{{< readfile file="/content/en/readfiles/testing.txt" markdown="true">}} [called directly in the Hugo docs]: https://github.com/gohugoio/hugo/blob/master/docs/content/templates/files.md [dirindex]: https://github.com/gohugoio/hugo/blob/master/docs/layouts/shortcodes/directoryindex.html diff --git a/content/templates/homepage.md b/content/en/templates/homepage.md similarity index 100% rename from content/templates/homepage.md rename to content/en/templates/homepage.md diff --git a/content/templates/internal.md b/content/en/templates/internal.md similarity index 100% rename from content/templates/internal.md rename to content/en/templates/internal.md diff --git a/content/templates/introduction.md b/content/en/templates/introduction.md similarity index 100% rename from content/templates/introduction.md rename to content/en/templates/introduction.md diff --git a/content/templates/lists.md b/content/en/templates/lists.md similarity index 100% rename from content/templates/lists.md rename to content/en/templates/lists.md diff --git a/content/templates/lookup-order.md b/content/en/templates/lookup-order.md similarity index 100% rename from content/templates/lookup-order.md rename to content/en/templates/lookup-order.md diff --git a/content/templates/menu-templates.md b/content/en/templates/menu-templates.md similarity index 100% rename from content/templates/menu-templates.md rename to content/en/templates/menu-templates.md diff --git a/content/templates/ordering-and-grouping.md b/content/en/templates/ordering-and-grouping.md similarity index 100% rename from content/templates/ordering-and-grouping.md rename to content/en/templates/ordering-and-grouping.md diff --git a/content/templates/output-formats.md b/content/en/templates/output-formats.md similarity index 100% rename from content/templates/output-formats.md rename to content/en/templates/output-formats.md diff --git a/content/templates/pagination.md b/content/en/templates/pagination.md similarity index 100% rename from content/templates/pagination.md rename to content/en/templates/pagination.md diff --git a/content/templates/partials.md b/content/en/templates/partials.md similarity index 100% rename from content/templates/partials.md rename to content/en/templates/partials.md diff --git a/content/templates/robots.md b/content/en/templates/robots.md similarity index 100% rename from content/templates/robots.md rename to content/en/templates/robots.md diff --git a/content/templates/rss.md b/content/en/templates/rss.md similarity index 85% rename from content/templates/rss.md rename to content/en/templates/rss.md index 9acbeea47..7162597aa 100644 --- a/content/templates/rss.md +++ b/content/en/templates/rss.md @@ -98,22 +98,30 @@ Hugo will automatically add the following header line to this file on render. Pl In your `header.html` template, you can specify your RSS feed in your `` tag using Hugo's [Output Formats][Output Formats] like this: -``` +```go-html-template {{ range .AlternativeOutputFormats -}} - + {{ printf `` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }} {{ end -}} ``` -If you only want the RSS link, you can query the formats: +If you only want the RSS link, you can query the formats: -``` +```go-html-template {{ with .OutputFormats.Get "rss" -}} - -{{ end -} + {{ printf `` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }} +{{ end -}} ``` - + +Either of the two snippets above will generate the below `link` tag on the site homepage for RSS output: + +```html + +``` + +_We are assuming `BaseURL` to be `https://example.com/` and `$.Site.Title` to be `"Site Title"` in this example._ + [config]: /getting-started/configuration/ [embedded]: #the-embedded-rss-xml [RSS 2.0]: http://cyber.law.harvard.edu/rss/rss.html "RSS 2.0 Specification" [section]: /content-management/sections/ -[Output Formats]: /templates/output-formats/#link-to-output-formats \ No newline at end of file +[Output Formats]: /templates/output-formats/#link-to-output-formats diff --git a/content/templates/section-templates.md b/content/en/templates/section-templates.md similarity index 100% rename from content/templates/section-templates.md rename to content/en/templates/section-templates.md diff --git a/content/templates/shortcode-templates.md b/content/en/templates/shortcode-templates.md similarity index 100% rename from content/templates/shortcode-templates.md rename to content/en/templates/shortcode-templates.md diff --git a/content/templates/single-page-templates.md b/content/en/templates/single-page-templates.md similarity index 100% rename from content/templates/single-page-templates.md rename to content/en/templates/single-page-templates.md diff --git a/content/templates/sitemap-template.md b/content/en/templates/sitemap-template.md similarity index 100% rename from content/templates/sitemap-template.md rename to content/en/templates/sitemap-template.md diff --git a/content/templates/taxonomy-templates.md b/content/en/templates/taxonomy-templates.md similarity index 100% rename from content/templates/taxonomy-templates.md rename to content/en/templates/taxonomy-templates.md diff --git a/content/templates/template-debugging.md b/content/en/templates/template-debugging.md similarity index 100% rename from content/templates/template-debugging.md rename to content/en/templates/template-debugging.md diff --git a/content/templates/views.md b/content/en/templates/views.md similarity index 100% rename from content/templates/views.md rename to content/en/templates/views.md diff --git a/content/themes/_index.md b/content/en/themes/_index.md similarity index 100% rename from content/themes/_index.md rename to content/en/themes/_index.md diff --git a/content/themes/creating.md b/content/en/themes/creating.md similarity index 100% rename from content/themes/creating.md rename to content/en/themes/creating.md diff --git a/content/themes/customizing.md b/content/en/themes/customizing.md similarity index 100% rename from content/themes/customizing.md rename to content/en/themes/customizing.md diff --git a/content/themes/installing-and-using-themes.md b/content/en/themes/installing-and-using-themes.md similarity index 100% rename from content/themes/installing-and-using-themes.md rename to content/en/themes/installing-and-using-themes.md diff --git a/content/tools/_index.md b/content/en/tools/_index.md similarity index 100% rename from content/tools/_index.md rename to content/en/tools/_index.md diff --git a/content/tools/editors.md b/content/en/tools/editors.md similarity index 100% rename from content/tools/editors.md rename to content/en/tools/editors.md diff --git a/content/tools/frontends.md b/content/en/tools/frontends.md similarity index 100% rename from content/tools/frontends.md rename to content/en/tools/frontends.md diff --git a/content/tools/migrations.md b/content/en/tools/migrations.md similarity index 100% rename from content/tools/migrations.md rename to content/en/tools/migrations.md diff --git a/content/tools/other.md b/content/en/tools/other.md similarity index 100% rename from content/tools/other.md rename to content/en/tools/other.md diff --git a/content/tools/search.md b/content/en/tools/search.md similarity index 100% rename from content/tools/search.md rename to content/en/tools/search.md diff --git a/content/tools/starter-kits.md b/content/en/tools/starter-kits.md similarity index 100% rename from content/tools/starter-kits.md rename to content/en/tools/starter-kits.md diff --git a/content/troubleshooting/_index.md b/content/en/troubleshooting/_index.md similarity index 100% rename from content/troubleshooting/_index.md rename to content/en/troubleshooting/_index.md diff --git a/content/troubleshooting/build-performance.md b/content/en/troubleshooting/build-performance.md similarity index 100% rename from content/troubleshooting/build-performance.md rename to content/en/troubleshooting/build-performance.md diff --git a/content/troubleshooting/faq.md b/content/en/troubleshooting/faq.md similarity index 100% rename from content/troubleshooting/faq.md rename to content/en/troubleshooting/faq.md diff --git a/content/variables/_index.md b/content/en/variables/_index.md similarity index 100% rename from content/variables/_index.md rename to content/en/variables/_index.md diff --git a/content/variables/files.md b/content/en/variables/files.md similarity index 100% rename from content/variables/files.md rename to content/en/variables/files.md diff --git a/content/variables/git.md b/content/en/variables/git.md similarity index 100% rename from content/variables/git.md rename to content/en/variables/git.md diff --git a/content/variables/hugo.md b/content/en/variables/hugo.md similarity index 100% rename from content/variables/hugo.md rename to content/en/variables/hugo.md diff --git a/content/variables/menus.md b/content/en/variables/menus.md similarity index 100% rename from content/variables/menus.md rename to content/en/variables/menus.md diff --git a/content/variables/page.md b/content/en/variables/page.md similarity index 99% rename from content/variables/page.md rename to content/en/variables/page.md index f3a50d21d..4e3673559 100644 --- a/content/variables/page.md +++ b/content/en/variables/page.md @@ -183,7 +183,7 @@ http://remarkjs.com) Also see [Sections](/content-management/sections/). -{{< readfile file="/content/readfiles/sectionvars.md" markdown="true" >}} +{{< readfile file="/content/en/readfiles/sectionvars.md" markdown="true" >}} ## Page-level Params diff --git a/content/variables/shortcodes.md b/content/en/variables/shortcodes.md similarity index 100% rename from content/variables/shortcodes.md rename to content/en/variables/shortcodes.md diff --git a/content/variables/site.md b/content/en/variables/site.md similarity index 100% rename from content/variables/site.md rename to content/en/variables/site.md diff --git a/content/variables/sitemap.md b/content/en/variables/sitemap.md similarity index 100% rename from content/variables/sitemap.md rename to content/en/variables/sitemap.md diff --git a/content/variables/taxonomy.md b/content/en/variables/taxonomy.md similarity index 100% rename from content/variables/taxonomy.md rename to content/en/variables/taxonomy.md diff --git a/content/functions/get.md b/content/functions/get.md deleted file mode 100644 index 4c01571a4..000000000 --- a/content/functions/get.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: .Get -description: Accesses positional and ordered parameters in shortcode declaration. -godocref: -date: 2017-02-01 -publishdate: 2017-02-01 -lastmod: 2017-02-01 -categories: [functions] -menu: - docs: - parent: "functions" -keywords: [shortcodes] -signature: ["Get INDEX", "Get KEY"] -workson: [] -hugoversion: -relatedfuncs: [] -deprecated: false -aliases: [] -needsexample: true ---- - - -`.Get` is specifically used when creating your own [shortcode template][sc]. - - - - -[sc]: /templates/shortcode-templates/ - - - - diff --git a/content/news/0.27-relnotes-ready.md b/content/news/0.27-relnotes-ready.md deleted file mode 100644 index 9251c3768..000000000 --- a/content/news/0.27-relnotes-ready.md +++ /dev/null @@ -1,93 +0,0 @@ - ---- -date: 2017-09-11 -title: "0.27" -description: "0.27" -categories: ["Releases"] ---- - - -Hugo `0.27`comes with fast and flexible **Related Content** ([3b4f17bb](https://github.com/gohugoio/hugo/commit/3b4f17bbc9ff789faa581ac278ad109d1ac5b816) [@bep](https://github.com/bep) [#98](https://github.com/gohugoio/hugo/issues/98)). To add this to your site, put something like this in your single page template: - -```go-html-template -{{ $related := .Site.RegularPages.Related . | first 5 }} -{{ with $related }} -

See Also

- -{{ end }} -``` - -The above translates to _list the five regular pages mostly related to the current page_. See the [Related Content Documentation](https://gohugo.io/content-management/related/) for details and configuration options. - -This release represents **37 contributions by 9 contributors** to the main Hugo code base. - -[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@moorereason](https://github.com/moorereason), [@yihui](https://github.com/yihui), and [@oneleaftea](https://github.com/oneleaftea) for their ongoing contributions. - -And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition. - -Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs), -which has received **44 contributions by 30 contributors**. A special thanks to [@bep](https://github.com/bep), [@sdomino](https://github.com/sdomino), [@gotgenes](https://github.com/gotgenes), and [@digitalcraftsman](https://github.com/digitalcraftsman) for their work on the documentation site. - - -Hugo now has: - -* 19464+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 455+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 178+ [themes](http://themes.gohugo.io/) - -## Notes - -* We now only strip p tag in `markdownify` if there is only one paragraph. This allows blocks of paragraphs to be "markdownified" [33ae10b6](https://github.com/gohugoio/hugo/commit/33ae10b6ade67cd9618970121d7de5fd2ce7d781) [@bep](https://github.com/bep) [#3040](https://github.com/gohugoio/hugo/issues/3040) - -## Enhancements - -### Templates - -* Add `time.Duration` and `time.ParseDuration` template funcs [f4bf2141](https://github.com/gohugoio/hugo/commit/f4bf214137ebd24a0d12f16d3a98d9038e6eabd3) [@bep](https://github.com/bep) [#3828](https://github.com/gohugoio/hugo/issues/3828) -* Add `cond` (ternary) template func [0462c96a](https://github.com/gohugoio/hugo/commit/0462c96a5a9da3e8adc78d96acd39575a8b46c40) [@bep](https://github.com/bep) [#3860](https://github.com/gohugoio/hugo/issues/3860) -* Prepare for template metrics [d000cf60](https://github.com/gohugoio/hugo/commit/d000cf605091c6999b72d6c632752289bc680223) [@bep](https://github.com/bep) -* Add `strings.TrimLeft` and `TrimRight` [7674ad73](https://github.com/gohugoio/hugo/commit/7674ad73825c61eecc4003475fe0577f225fe579) [@moorereason](https://github.com/moorereason) -* compare, hugolib, tpl: Add `Eqer` interface [08f48b91](https://github.com/gohugoio/hugo/commit/08f48b91d68d3002b887ddf737456ff0cc4e786d) [@bep](https://github.com/bep) [#3807](https://github.com/gohugoio/hugo/issues/3807) -* Only strip p tag in `markdownify` if only one paragraph [33ae10b6](https://github.com/gohugoio/hugo/commit/33ae10b6ade67cd9618970121d7de5fd2ce7d781) [@bep](https://github.com/bep) [#3040](https://github.com/gohugoio/hugo/issues/3040) -* Cleanup `strings.TrimPrefix` and `TrimSuffix` [29a2da05](https://github.com/gohugoio/hugo/commit/29a2da0593b081cdd61b93c6328af2c9ea4eb20f) [@moorereason](https://github.com/moorereason) - -### Output - -* Improve the base template (aka `baseof.html`) identification [0019ce00](https://github.com/gohugoio/hugo/commit/0019ce002449d671a20a69406da37b10977f9493) [@bep](https://github.com/bep) - -### Core - -* Implement "related content" [3b4f17bb](https://github.com/gohugoio/hugo/commit/3b4f17bbc9ff789faa581ac278ad109d1ac5b816) [@bep](https://github.com/bep) [#98](https://github.com/gohugoio/hugo/issues/98) -* Add `Page.Equals` [f0f49ed9](https://github.com/gohugoio/hugo/commit/f0f49ed9b0c9b4545a45c95d56340fcbf4aafbef) [@bep](https://github.com/bep) -* Rewrite `replaceDivider` to reduce memory allocation [71ae9b45](https://github.com/gohugoio/hugo/commit/71ae9b4533083be185c5314c9c5b273cc3bd07bd) [@bep](https://github.com/bep) - - -### Other - -* Set up Hugo release flow on `CircleCI` [d2249c50](https://github.com/gohugoio/hugo/commit/d2249c50991ba7b00b092aca6e315ca1a4de75a1) [@bep](https://github.com/bep) [#3779](https://github.com/gohugoio/hugo/issues/3779) -* Maintain the scroll position if possible [7231d5a8](https://github.com/gohugoio/hugo/commit/7231d5a829f8d97336a2120afde1260db6ee6541) [@yihui](https://github.com/yihui) [#3824](https://github.com/gohugoio/hugo/issues/3824) -* Add an `iFrame` title to the `YouTube` shortcode [919bc921](https://github.com/gohugoio/hugo/commit/919bc9210a69c801c7304c0b529df93d1dca27aa) [@nraboy](https://github.com/nraboy) -* Remove the theme submodule from /docs [ea2cc26b](https://github.com/gohugoio/hugo/commit/ea2cc26b390476f1c605405604f8c92afd09b6ee) [@bep](https://github.com/bep) [#3791](https://github.com/gohugoio/hugo/issues/3791) -* Add support for multiple config files via `--config a.toml,b.toml,c.toml` [0f9f73cc](https://github.com/gohugoio/hugo/commit/0f9f73cce5c3f1f05be20bcf1d23b2332623d7f9) [@jgielstra](https://github.com/jgielstra) -* Render task list item inside `label` for correct accessibility [c8257f8b](https://github.com/gohugoio/hugo/commit/c8257f8b726478ca70dc8984cdcc17b31e4bdc0c) [@danieka](https://github.com/danieka) [#3303](https://github.com/gohugoio/hugo/issues/3303) -* Normalize `UniqueID` between Windows & Linux [0abdeeef](https://github.com/gohugoio/hugo/commit/0abdeeef6740a3cbba0db95374853d040f2022b8) [@Shywim](https://github.com/Shywim) - - -## Fixes - -### Output - -* Fix taxonomy term base template lookup [f88fe312](https://github.com/gohugoio/hugo/commit/f88fe312cb35f7de1615c095edd2f898303dd23b) [@bep](https://github.com/bep) [#3856](https://github.com/gohugoio/hugo/issues/3856) -* Fix `published` front matter handling [202510fd](https://github.com/gohugoio/hugo/commit/202510fdc92d52a20baeaa7edb1091f6882bd95f) [@bep](https://github.com/bep) [#3867](https://github.com/gohugoio/hugo/issues/3867) - - - - - - - - diff --git a/content/news/0.27.1-relnotes-ready.md b/content/news/0.27.1-relnotes-ready.md deleted file mode 100644 index fa202f495..000000000 --- a/content/news/0.27.1-relnotes-ready.md +++ /dev/null @@ -1,19 +0,0 @@ - ---- -date: 2017-09-13 -title: "0.27.1" -description: "0.27.1" -categories: ["Releases"] ---- - - - -This fixes a regression introduced in [Go 1.9](https://github.com/golang/go/issues/21844) which lead to HTML in shortcodes in multi output Hugo sites being wrongly escaped in some cases. - -* Fix escaped HTML Go 1.9 multioutput issue (#3880) [2d613dd9](https://github.com/gohugoio/hugo/commit/2d613dd905bb8eeb8af57e30ddd749a0f04fbd3c) [@bep](https://github.com/bep) [#3876](https://github.com/gohugoio/hugo/issues/3876) - -* Bump to Go 1.9 in the Snap build [642ba6ca](https://github.com/gohugoio/hugo/commit/642ba6cab24c558b16378178fe829cbc45845424) [@bep](https://github.com/bep) - - - - diff --git a/content/news/0.35-relnotes-ready.md b/content/news/0.35-relnotes-ready.md deleted file mode 100644 index 3788c0326..000000000 --- a/content/news/0.35-relnotes-ready.md +++ /dev/null @@ -1,102 +0,0 @@ - ---- -date: 2018-01-31 -title: "0.35" -description: "0.35" -slug: "0.35" -categories: ["Releases"] ---- - - The most notable new feature in Hugo `0.35` is perhaps **Headless Bundles**. - -This means that you in your `index.md` front matter can say: - -```yaml -headless: true -``` -And -* it will have no `Permalink` and no rendered HTML in `/public` -* it will not be part of `.Site.RegularPages` etc. - -But you can get it by: - -* `.Site.GetPage ...` - -The use cases are many: - -* Shared media libraries -* Reusable page content "snippets" -* ... - -But this release contains more goodies than possible to sum up in one paragraph, so study the release notes carefully. It represents **42 contributions by 8 contributors** to the main Hugo code base. - -[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@vassudanagunta](https://github.com/vassudanagunta), [@yanzay](https://github.com/yanzay), and [@robertbasic](https://github.com/robertbasic) for their ongoing contributions. - -And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition. - -Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs), -which has received **28 contributions by 5 contributors**. A special thanks to [@bep](https://github.com/bep), [@kaushalmodi](https://github.com/kaushalmodi), [@regisphilibert](https://github.com/regisphilibert), and [@salim-b](https://github.com/salim-b) for their work on the documentation site. - - -Hugo now has: - -* 22967+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 448+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 197+ [themes](http://themes.gohugo.io/) - - -## Notes - -* Deprecate `useModTimeAsFallback` [adfd4370](https://github.com/gohugoio/hugo/commit/adfd4370b67fd7181178bd6b3b1d07356beaac71) [@bep](https://github.com/bep) [#4351](https://github.com/gohugoio/hugo/issues/4351) -* Deprecate CLI flags `canonifyURLs`, `pluralizeListTitles`, `preserveTaxonomyNames`, `uglyURLs` [f08ea02d](https://github.com/gohugoio/hugo/commit/f08ea02d24d42929676756950f3affaca7fd8c01) [@bep](https://github.com/bep) [#4347](https://github.com/gohugoio/hugo/issues/4347) -* Remove undraft command [2fa70c93](https://github.com/gohugoio/hugo/commit/2fa70c9344b231c9d999bbafdfa4acbf27ed9f6e) [@robertbasic](https://github.com/robertbasic) [#4353](https://github.com/gohugoio/hugo/issues/4353) - -## Enhancements - -### Templates - -* Update Twitter card to also consider images in `.Resources` [25d691da](https://github.com/gohugoio/hugo/commit/25d691daff57d7c6d7d0f63af3991d22e3f788fe) [@bep](https://github.com/bep) [#4349](https://github.com/gohugoio/hugo/issues/4349) -* Seed random on init only [83c761b7](https://github.com/gohugoio/hugo/commit/83c761b71a980aee6331179b271c7e24e999e8eb) [@liguoqinjim](https://github.com/liguoqinjim) -* Remove duplicate layout lookup layouts [b2fcbb1f](https://github.com/gohugoio/hugo/commit/b2fcbb1f9774aa1e929b8575c0e1ac366ab2fb73) [@bep](https://github.com/bep) [#4319](https://github.com/gohugoio/hugo/issues/4319) -* Add "removable-media" interface to `snapcraft.yaml` [f0c0ece4](https://github.com/gohugoio/hugo/commit/f0c0ece44d55b6c2997cbd106d1bc099ea1a2fa7) [@anthonyfok](https://github.com/anthonyfok) [#3837](https://github.com/gohugoio/hugo/issues/3837) - -### Other - -* Add a way to disable one or more languages [6413559f](https://github.com/gohugoio/hugo/commit/6413559f7575e2653d76227a8037a7edbaae82aa) [@bep](https://github.com/bep) [#4297](https://github.com/gohugoio/hugo/issues/4297)[#4329](https://github.com/gohugoio/hugo/issues/4329) -* Handle newly created files in Fast Render Mode [1707dae8](https://github.com/gohugoio/hugo/commit/1707dae8d3634006017eb6d040df4dbafc53d92f) [@yanzay](https://github.com/yanzay) [#4339](https://github.com/gohugoio/hugo/issues/4339) -* Extract the Fast Render Mode logic into a method [94e736c5](https://github.com/gohugoio/hugo/commit/94e736c5e167a0ee70a528e1c19d64a47e7929c2) [@bep](https://github.com/bep) [#4339](https://github.com/gohugoio/hugo/issues/4339) -* Remove unused code [ae5a45be](https://github.com/gohugoio/hugo/commit/ae5a45be6f0ee4d5c52b38fd28b22b55d9cd7b2d) [@bep](https://github.com/bep) -* Add the last lookup variant for the `GetPage` index [3446fe9b](https://github.com/gohugoio/hugo/commit/3446fe9b8937610b8b628b2c212eb25888a7c1bb) [@bep](https://github.com/bep) [#4312](https://github.com/gohugoio/hugo/issues/4312) -* Simplify bundle lookup via `.Site.GetPage`, `ref`, `relref` [517b6b62](https://github.com/gohugoio/hugo/commit/517b6b62389d23bfe41fe3ae551a691b11bdcaa7) [@bep](https://github.com/bep) [#4312](https://github.com/gohugoio/hugo/issues/4312) -* Remove some now superflous Fast Render Mode code [feeed073](https://github.com/gohugoio/hugo/commit/feeed073c3320b09fb38168ce272ac88b987f1d2) [@bep](https://github.com/bep) [#4339](https://github.com/gohugoio/hugo/issues/4339) -* Make resource counters for `name` and `title` independent [df20b054](https://github.com/gohugoio/hugo/commit/df20b05463fef42aba93d5208e410a7ecc56da5d) [@bep](https://github.com/bep) [#4335](https://github.com/gohugoio/hugo/issues/4335) -* Provide .Name to the archetype templates [863a812e](https://github.com/gohugoio/hugo/commit/863a812e07193541b42732b0e227f3d320433f01) [@bep](https://github.com/bep) [#4348](https://github.com/gohugoio/hugo/issues/4348) -* Only set `url` if permalink in metadata and remove duplicate confirm msg [3752348e](https://github.com/gohugoio/hugo/commit/3752348ef13ced8f6f528b42ee7d76a12a97ae5c) [@lildude](https://github.com/lildude) [#1887](https://github.com/gohugoio/hugo/issues/1887) -* Start Resources :counter first time they're used [7b472e46](https://github.com/gohugoio/hugo/commit/7b472e46084b603045b87cea870ffc73ac1cf7e7) [@bep](https://github.com/bep) [#4335](https://github.com/gohugoio/hugo/issues/4335) -* Update to Go 1.9.3 [a91aba1c](https://github.com/gohugoio/hugo/commit/a91aba1c1562259dffd321a608f38c38dd4d5aeb) [@bep](https://github.com/bep) [#4328](https://github.com/gohugoio/hugo/issues/4328) -* Support pages without front matter [91bb774a](https://github.com/gohugoio/hugo/commit/91bb774ae4e129f7ed0624754b31479c960ef774) [@vassudanagunta](https://github.com/vassudanagunta) [#4320](https://github.com/gohugoio/hugo/issues/4320)[#4320](https://github.com/gohugoio/hugo/issues/4320) -* Add page metadata dates tests [3f0379ad](https://github.com/gohugoio/hugo/commit/3f0379adb72389954ca2be6a9f2ebfcd65c6c440) [@vassudanagunta](https://github.com/vassudanagunta) -* Re-generate CLI docs [1e27d058](https://github.com/gohugoio/hugo/commit/1e27d0589118a114e49c032e4bd68b4798e44a5b) [@bep](https://github.com/bep) -* Remove and update deprecation status [d418c2c2](https://github.com/gohugoio/hugo/commit/d418c2c2eacdc1dc6fffe839e0a90600867878ca) [@bep](https://github.com/bep) -* Shorten the stale setup [4a7c2b36](https://github.com/gohugoio/hugo/commit/4a7c2b3695fe7b88861f2155ea7ef635fe425cd4) [@bep](https://github.com/bep) -* Add a `GetPage` to the site benchmarks [a1956391](https://github.com/gohugoio/hugo/commit/a19563910eec5fed08f3b02563b9a7b38026183d) [@bep](https://github.com/bep) -* Add headless bundle support [0432c64d](https://github.com/gohugoio/hugo/commit/0432c64dd22e4610302162678bb93661ba68d758) [@bep](https://github.com/bep) [#4311](https://github.com/gohugoio/hugo/issues/4311) -* Merge matching resources params maps [5a0819b9](https://github.com/gohugoio/hugo/commit/5a0819b9b5eb9e79826cfa0a65f235d9821b1ac4) [@bep](https://github.com/bep) [#4315](https://github.com/gohugoio/hugo/issues/4315) -* Add some general code contribution criterias [78c86330](https://github.com/gohugoio/hugo/commit/78c863305f337ed4faf3cf0a23675f28b0ae5641) [@bep](https://github.com/bep) -* Tighten page kind logic, introduce tests [8125b4b0](https://github.com/gohugoio/hugo/commit/8125b4b03d10eb73f8aea3f9ea41172aba8df082) [@vassudanagunta](https://github.com/vassudanagunta) - -## Fixes -* Fix `robots.txt` in multihost mode [4d912e2a](https://github.com/gohugoio/hugo/commit/4d912e2aad39bfe8d76672cf53b01317792e02c5) [@bep](https://github.com/bep) [#4193](https://github.com/gohugoio/hugo/issues/4193) -* Fix `--uglyURLs` from comand line regression [016398ff](https://github.com/gohugoio/hugo/commit/016398ffe2e0a073453cf46a9d6bf72d693c11e5) [@bep](https://github.com/bep) [#4343](https://github.com/gohugoio/hugo/issues/4343) -* Avoid unescape in `highlight` [ebdd8cba](https://github.com/gohugoio/hugo/commit/ebdd8cba3f5965a8ac897833f313d772271de649) [@bep](https://github.com/bep) [#4219](https://github.com/gohugoio/hugo/issues/4219) -* Fix Docker build [a34213f0](https://github.com/gohugoio/hugo/commit/a34213f0b5624de101272aab469ca9b6fe0c273f) [@skoblenick](https://github.com/skoblenick) [#4076](https://github.com/gohugoio/hugo/issues/4076)[#4077](https://github.com/gohugoio/hugo/issues/4077) -* Fix language params handling [ae742cb1](https://github.com/gohugoio/hugo/commit/ae742cb1bdf35b81aa0ede5453da6b0c4a4fccf2) [@bep](https://github.com/bep) [#4356](https://github.com/gohugoio/hugo/issues/4356)[#4352](https://github.com/gohugoio/hugo/issues/4352) -* Fix handling of top-level page bundles [4eb2fec6](https://github.com/gohugoio/hugo/commit/4eb2fec67c3a72a3ac98aa834dc56fd4504626d8) [@bep](https://github.com/bep) [#4332](https://github.com/gohugoio/hugo/issues/4332) -* Fix `baseURL` server regression for multilingual sites [ed4a00e4](https://github.com/gohugoio/hugo/commit/ed4a00e46f2344320a22f07febe5aec4075cb3fb) [@bep](https://github.com/bep) [#4333](https://github.com/gohugoio/hugo/issues/4333) -* Fix "date" page param [322c5672](https://github.com/gohugoio/hugo/commit/322c567220aa4123a5d707629c1bebd375599912) [@vassudanagunta](https://github.com/vassudanagunta) [#4323](https://github.com/gohugoio/hugo/issues/4323) -* Fix typo in comment [912147ab](https://github.com/gohugoio/hugo/commit/912147ab896e69a450b7100c3d6bf81a7bf78b5a) [@yanzay](https://github.com/yanzay) - - - - - diff --git a/content/release-notes/0.25-relnotes.md b/content/release-notes/0.25-relnotes.md deleted file mode 100644 index 8f4e47227..000000000 --- a/content/release-notes/0.25-relnotes.md +++ /dev/null @@ -1,78 +0,0 @@ - ---- -date: 2017-07-07 -title: 0.25 ---- - - Hugo `0.25` is the **Kinder Surprise**: It automatically opens the page you're working on in the browser, it adds full `AND` and `OR` support in page queries, and you can now have templates per language. - -![Hugo Open on Save](https://cdn-standard5.discourse.org/uploads/gohugo/optimized/2X/6/622088d4a8eacaf62bbbaa27dab19d789e10fe09_1_690x345.gif "Hugo Open on Save") - -If you start with `hugo server --navigateToChanged`, Hugo will navigate to the relevant page on save (see animated GIF). This is extremely useful for site-wide edits. Another very useful feature in this version is the added support for `AND` (`intersect`) and `OR` (`union`) filters when combined with `where`. - -Example: - -```go -{{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }} -{{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }} -{{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }} -``` - -The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page params. - -This release represents **36 contributions by 12 contributors** to the main Hugo code base. [@bep](https://github.com/bep) still leads the Hugo development with his witty Norwegian humor, and once again contributed a significant amount of additions. But also a big shoutout to [@yihui](https://github.com/yihui), [@anthonyfok](https://github.com/anthonyfok), and [@kropp](https://github.com/kropp) for their ongoing contributions. And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition. - -Hugo now has: - -* 18209+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 455+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 168+ [themes](http://themes.gohugo.io/) - -## Enhancements - -### Templates - -* Add `Pages` support to `intersect` (`AND`) and `union`(`ÒR`). This makes the `where` template func even more powerful. [ccdd08d5](https://github.com/gohugoio/hugo/commit/ccdd08d57ab64441e93d6861ae126b5faacdb92f) [@bep](https://github.com/bep) [#3174](https://github.com/gohugoio/hugo/issues/3174) -* Add `math.Log` function. This is very handy for creating tag clouds. [34c56677](https://github.com/gohugoio/hugo/commit/34c566773a1364077e1397daece85b22948dc721) [@artem-sidorenko](https://github.com/artem-sidorenko) -* Add `WebP` images support [8431c8d3](https://github.com/gohugoio/hugo/commit/8431c8d39d878c18c6b5463d9091a953608df10b) [@bep](https://github.com/bep) [#3529](https://github.com/gohugoio/hugo/issues/3529) -* Only show post's own keywords in schema.org [da72805a](https://github.com/gohugoio/hugo/commit/da72805a4304a57362e8e79a01cc145767b027c5) [@brunoamaral](https://github.com/brunoamaral) [#2635](https://github.com/gohugoio/hugo/issues/2635)[#2646](https://github.com/gohugoio/hugo/issues/2646) -* Simplify the `Disqus` template a little bit (#3655) [eccb0647](https://github.com/gohugoio/hugo/commit/eccb0647821e9db20ba9800da1b4861807cc5205) [@yihui](https://github.com/yihui) -* Improve the built-in Disqus template (#3639) [2e1e4934](https://github.com/gohugoio/hugo/commit/2e1e4934b60ce8081a7f3a79191ed204f3098481) [@yihui](https://github.com/yihui) - -### Output - -* Support templates per site/language. This is for both regular templates and shortcode templates. [aa6b1b9b](https://github.com/gohugoio/hugo/commit/aa6b1b9be7c9d7322333893b642aaf8c7a5f2c2e) [@bep](https://github.com/bep) [#3360](https://github.com/gohugoio/hugo/issues/3360) - -### Core - -* Extend the sections API [a1d260b4](https://github.com/gohugoio/hugo/commit/a1d260b41a6673adef679ec4e262c5f390432cf5) [@bep](https://github.com/bep) [#3591](https://github.com/gohugoio/hugo/issues/3591) -* Make `.Site.Sections` return the top level sections [dd9b1baa](https://github.com/gohugoio/hugo/commit/dd9b1baab0cb860a3eb32fd9043bac18cab3f9f0) [@bep](https://github.com/bep) [#3591](https://github.com/gohugoio/hugo/issues/3591) -* Render `404.html` for all languages [41805dca](https://github.com/gohugoio/hugo/commit/41805dca9e40e9b0952e04d06074e6fc91140495) [@mitchchn](https://github.com/mitchchn) [#3598](https://github.com/gohugoio/hugo/issues/3598) - -### Other - -* Support human-readable `YAML` boolean values in `undraft` [1039356e](https://github.com/gohugoio/hugo/commit/1039356edf747f044c989a5bc0e85d792341ed5d) [@kropp](https://github.com/kropp) -* `hugo import jekyll` support nested `_posts` directories [7ee1f25e](https://github.com/gohugoio/hugo/commit/7ee1f25e9ef3be8f99c171e8e7982f4f82c13e16) [@coderzh](https://github.com/coderzh) [#1890](https://github.com/gohugoio/hugo/issues/1890)[#1911](https://github.com/gohugoio/hugo/issues/1911) -* Update `Dockerfile` and add Docker optimizations [118f8f7c](https://github.com/gohugoio/hugo/commit/118f8f7cf22d756d8a894ff93551974a806f2155) [@ellerbrock](https://github.com/ellerbrock) -* Add Blackfriday `joinLines` extension support (#3574) [a5440496](https://github.com/gohugoio/hugo/commit/a54404968a4b36579797f2e7ff7f5eada94866d9) [@choueric](https://github.com/choueric) -* add `--initial-header-level=2` to rst2html (#3528) [bfce30d8](https://github.com/gohugoio/hugo/commit/bfce30d85972c27c27e8a2caac9db6315f813298) [@frankbraun](https://github.com/frankbraun) -* Support open "current content page" in browser [c825a731](https://github.com/gohugoio/hugo/commit/c825a7312131b4afa67ee90d593640dee3525d98) [@bep](https://github.com/bep) [#3643](https://github.com/gohugoio/hugo/issues/3643) -* Make `--navigateToChanged` more robust on Windows [30e14cc3](https://github.com/gohugoio/hugo/commit/30e14cc31678ddc204b082ab362f86b6b8063881) [@anthonyfok](https://github.com/anthonyfok) [#3645](https://github.com/gohugoio/hugo/issues/3645) -* Remove the docs submodule [31393f60](https://github.com/gohugoio/hugo/commit/31393f6024416ea1b2e61d1080dfd7104df36eda) [@bep](https://github.com/bep) [#3647](https://github.com/gohugoio/hugo/issues/3647) -* Use `example.com` as homepage for new theme [aff1ac32](https://github.com/gohugoio/hugo/commit/aff1ac3235b6c075d01f7237addf44fecdd36d82) [@anthonyfok](https://github.com/anthonyfok) - -## Fixes - -### Templates - -* Fix `in` function for JSON arrays [d12cf5a2](https://github.com/gohugoio/hugo/commit/d12cf5a25df00fa16c59f0b2ae282187a398214c) [@bep](https://github.com/bep) [#1468](https://github.com/gohugoio/hugo/issues/1468) - -### Other - -* Fix handling of `JSON` front matter with escaped quotes [e10e51a0](https://github.com/gohugoio/hugo/commit/e10e51a00827b9fdc1bee51439fef05afc529831) [@bep](https://github.com/bep) [#3661](https://github.com/gohugoio/hugo/issues/3661) -* Fix typo in code comment [56d82aa0](https://github.com/gohugoio/hugo/commit/56d82aa025f4d2edb1dc6315132cd7ab52df649a) [@dvic](https://github.com/dvic) - - - - - diff --git a/content/release-notes/0.25.1-relnotes.md b/content/release-notes/0.25.1-relnotes.md deleted file mode 100644 index cf0c6a51b..000000000 --- a/content/release-notes/0.25.1-relnotes.md +++ /dev/null @@ -1,28 +0,0 @@ - ---- -date: 2017-07-10 -title: 0.25.1 ---- - - - -This is a bug-fix release with a couple of important fixes. - - -Hugo now has: - -* 18277+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 456+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 170+ [themes](http://themes.gohugo.io/) - -## Fixes - -* Fix union when the first slice is empty [dbbc5c48](https://github.com/gohugoio/hugo/commit/dbbc5c4810a04ac06fad7500d88cf5c3bfe0c7fd) [@bep](https://github.com/bep) [#3686](https://github.com/gohugoio/hugo/issues/3686) -* Navigate to changed on CREATE When working with content from IntelliJ IDE, like WebStorm, every file save is followed by two events: "RENAME" and then "CREATE". [7bcc1ce6](https://github.com/gohugoio/hugo/commit/7bcc1ce659710f2220b400ce3b76e50d2e48b241) [@miltador](https://github.com/miltador) -* Final (!) fix for issue with escaped JSON front matter [7f82b41a](https://github.com/gohugoio/hugo/commit/7f82b41a24af0fd04d28fbfebf9254766a3c6e6f) [@bep](https://github.com/bep) [#3682](https://github.com/gohugoio/hugo/issues/3682) -* Fix issue with escaped JSON front matter [84db6c74](https://github.com/gohugoio/hugo/commit/84db6c74a084d2b52117b999d4ec343cd3389a68) [@bep](https://github.com/bep) [#3682](https://github.com/gohugoio/hugo/issues/3682) - - - - - diff --git a/content/zh/_index.md b/content/zh/_index.md new file mode 100644 index 000000000..78f9ef15f --- /dev/null +++ b/content/zh/_index.md @@ -0,0 +1,49 @@ +--- +title: "世界上最快的网站构建框架 The world’s fastest framework for building websites" +date: 2017-03-02T12:00:00-05:00 +features: + - heading: Blistering Speed + image_path: /images/icon-fast.svg + tagline: What's modern about waiting for your site to build? + copy: Hugo is the fastest tool of its kind. At <1 ms per page, the average site builds in less than a second. + + - heading: Robust Content Management + image_path: /images/icon-content-management.svg + tagline: Flexibility rules. Hugo is a content strategist's dream. + copy: Hugo supports unlimited content types, taxonomies, menus, dynamic API-driven content, and more, all without plugins. + + - heading: Shortcodes + image_path: /images/icon-shortcodes.svg + tagline: Hugo's shortcodes are Markdown's hidden superpower. + copy: We love the beautiful simplicity of markdown’s syntax, but there are times when we want more flexibility. Hugo shortcodes allow for both beauty and flexibility. + + - heading: Built-in Templates + image_path: /images/icon-built-in-templates.svg + tagline: Hugo has common patterns to get your work done quickly. + copy: Hugo ships with pre-made templates to make quick work of SEO, commenting, analytics and other functions. One line of code, and you're done. + + - heading: Multilingual and i18n + image_path: /images/icon-multilingual2.svg + tagline: Polyglot baked in. + copy: Hugo provides full i18n support for multi-language sites with the same straightforward development experience Hugo users love in single-language sites. + + - heading: Custom Outputs + image_path: /images/icon-custom-outputs.svg + tagline: HTML not enough? + copy: Hugo allows you to output your content in multiple formats, including JSON or AMP, and makes it easy to create your own. +sections: + - heading: "100s of Themes" + cta: Check out the Hugo's themes. + link: http://themes.gohugo.io/ + color_classes: bg-accent-color white + image: /images/homepage-screenshot-hugo-themes.jpg + copy: "Hugo provides a robust theming system that is easy to implement but capable of producing even the most complicated websites." + - heading: "Capable Templating" + cta: Get Started. + link: templates/ + color_classes: bg-primary-color-light black + image: /images/home-page-templating-example.png + copy: "Hugo's Go-based templating provides just the right amount of logic to build anything from the simple to complex. If you prefer Jade/Pug-like syntax, you can also use Amber, Ace, or any combination of the three." +--- + +Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. diff --git a/content/zh/about/_index.md b/content/zh/about/_index.md new file mode 100644 index 000000000..bf19807d9 --- /dev/null +++ b/content/zh/about/_index.md @@ -0,0 +1,20 @@ +--- +title: 关于 Hugo +linktitle: 概览 +description: Hugo 的特色、规划、许可和动力。 +date: 2018-04-26 +publishdate: 2018-04-26 +lastmod: 2018-04-26 +categories: [] +keywords: [] +menu: + docs: + parent: "about" + weight: 1 +weight: 1 +draft: false +aliases: [/about-hugo/,/docs/] +toc: false +--- + +Hugo 不是一般的静态网站生成器。 diff --git a/content/zh/content-management/_index.md b/content/zh/content-management/_index.md new file mode 100644 index 000000000..8c088dc57 --- /dev/null +++ b/content/zh/content-management/_index.md @@ -0,0 +1,21 @@ +--- +title: 内容管理 +linktitle: 内容管理概览 +description: Hugo 可以管理大型的静态网站,支持骨架、内容类型、菜单、引用、概要等等。 +date: 2018-04-23 +publishdate: 2018-04-23 +lastmod: 2018-04-23 +menu: + docs: + parent: "content-management" + weight: 1 +keywords: [source, organization] +categories: [content management] +weight: 01 #rem +draft: false +aliases: [/content/,/content/organization] +toc: false +isCJKLanguage: true +--- + +一个实用的静态网站生成器,需要超越“文件头” (front matter) 和模板的等基本功能,才能兼备可伸缩性和可管理性,满足用户所需。Hugo 不仅是给开发者设计的,也同样适用于内容管理员和写作人员。 diff --git a/content/zh/documentation.md b/content/zh/documentation.md new file mode 100644 index 000000000..1639bbcd2 --- /dev/null +++ b/content/zh/documentation.md @@ -0,0 +1,21 @@ +--- +title: Hugo 说明文档 +linktitle: Hugo +description: Hugo is the world's fastest static website engine. It's written in Go (aka Golang) and developed by bep, spf13 and friends. +date: 2017-02-01 +publishdate: 2017-02-01 +menu: + main: + parent: "section name" + weight: 01 +weight: 01 #rem +draft: false +slug: +aliases: [] +toc: false +layout: documentation-home +isCJKLanguage: true +--- +Hugo 号称**世界上最快的静态网站引擎**。它是以 Go (即 Golang) 编程语言所写成,并由 [bep](https://github.com/bep)、[spf13](https://github.com/spf13) 和[朋友们](https://github.com/gohugoio/hugo/graphs/contributors) 共同开发。 + +下面是我们说明文档中最常用和实用的章节: diff --git a/content/zh/news/_index.md b/content/zh/news/_index.md new file mode 100644 index 000000000..286d32e19 --- /dev/null +++ b/content/zh/news/_index.md @@ -0,0 +1,4 @@ +--- +title: "Hugo 新闻" +aliases: [/release-notes/] +--- diff --git a/content/zh/templates/_index.md b/content/zh/templates/_index.md new file mode 100644 index 000000000..3cd8df436 --- /dev/null +++ b/content/zh/templates/_index.md @@ -0,0 +1,19 @@ +--- +title: 模板 Templates +linktitle: 模板概览 +description: Go templating, template types and lookup order, shortcodes, and data. +date: 2017-02-01 +publishdate: 2017-02-01 +lastmod: 2017-02-01 +menu: + docs: + parent: "templates" + weight: 01 +weight: 01 #rem +categories: [templates] +keywords: [] +draft: false +aliases: [/templates/overview/,/templates/content] +toc: false +notesforauthors: +--- diff --git a/content/zh/templates/base.md b/content/zh/templates/base.md new file mode 100644 index 000000000..8f98cfdfe --- /dev/null +++ b/content/zh/templates/base.md @@ -0,0 +1,132 @@ +--- +title: Base 模板 and Blocks +linktitle: +description: The base and block constructs allow you to define the outer shell of your master templates (i.e., the chrome of the page). +godocref: https://golang.org/pkg/text/template/#example_Template_block +date: 2017-02-01 +publishdate: 2017-02-01 +lastmod: 2017-02-01 +categories: [templates,fundamentals] +keywords: [blocks,base] +menu: + docs: + parent: "templates" + weight: 20 +weight: 20 +sections_weight: 20 +draft: false +aliases: [/templates/blocks/,/templates/base-templates-and-blocks/] +toc: true +--- + +The `block` keyword allows you to define the outer shell of your pages' one or more master template(s) and then fill in or override portions as necessary. + +{{< youtube QVOMCYitLEc >}} + +## Base Template Lookup Order + +The [lookup order][lookup] for base templates is as follows: + +1. `/layouts/section/-baseof.html` +2. `/themes//layouts/section/-baseof.html` +3. `/layouts//baseof.html` +4. `/themes//layouts//baseof.html` +5. `/layouts/section/baseof.html` +6. `/themes//layouts/section/baseof.html` +7. `/layouts/_default/-baseof.html` +8. `/themes//layouts/_default/-baseof.html` +9. `/layouts/_default/baseof.html` +10. `/themes//layouts/_default/baseof.html` + +Variables are denoted by capitalized text set within `<>`. Note that Hugo's default behavior is for `type` to inherit from `section` unless otherwise specified. + +### Example Base Template Lookup Order + +As an example, let's assume your site is using a theme called "mytheme" when rendering the section list for a `post` section. Hugo picks `layout/section/post.html` as the template for [rendering the section][]. The `{{define}}` block in this template tells Hugo that the template is an extension of a base template. + +Here is the lookup order for the `post` base template: + +1. `/layouts/section/post-baseof.html` +2. `/themes/mytheme/layouts/section/post-baseof.html` +3. `/layouts/post/baseof.html` +4. `/themes/mytheme/layouts/post/baseof.html` +5. `/layouts/section/baseof.html` +6. `/themes/mytheme/layouts/section/baseof.html` +7. `/layouts/_default/post-baseof.html` +8. `/themes/mytheme/layouts/_default/post-baseof.html` +9. `/layouts/_default/baseof.html` +10. `/themes/mytheme/layouts/_default/baseof.html` + +## Define the Base Template + +The following defines a simple base template at `_default/baseof.html`. As a default template, it is the shell from which all your pages will be rendered unless you specify another `*baseof.html` closer to the beginning of the lookup order. + +{{< code file="layouts/_default/baseof.html" download="baseof.html" >}} + + + + + {{ block "title" . }} + <!-- Blocks may include default content. --> + {{ .Site.Title }} + {{ end }} + + + + {{ block "main" . }} + + {{ end }} + {{ block "footer" . }} + + {{ end }} + + +{{< /code >}} + +## Override the Base Template + +From the above base template, you can define a [default list template][hugolists]. The default list template will inherit all of the code defined above and can then implement its own `"main"` block from: + +{{< code file="layouts/_default/list.html" download="list.html" >}} +{{ define "main" }} +

Posts

+ {{ range .Data.Pages }} +
+

{{ .Title }}

+ {{ .Content }} +
+ {{ end }} +{{ end }} +{{< /code >}} + +This replaces the contents of our (basically empty) "main" block with something useful for the list template. In this case, we didn't define a `"title"` block, so the contents from our base template remain unchanged in lists. + +{{% warning %}} +Code that you put outside the block definitions *can* break your layout. This even includes HTML comments. For example: + +``` + +{{ define "main" }} +...your code here +{{ end }} +``` +[See this thread from the Hugo discussion forums.](https://discourse.gohugo.io/t/baseof-html-block-templates-and-list-types-results-in-empty-pages/5612/6) +{{% /warning %}} + +The following shows how you can override both the `"main"` and `"title"` block areas from the base template with code unique to your [default single page template][singletemplate]: + +{{< code file="layouts/_default/single.html" download="single.html" >}} +{{ define "title" }} + + {{ .Title }} – {{ .Site.Title }} +{{ end }} +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} +{{ end }} +{{< /code >}} + +[hugolists]: /templates/lists +[lookup]: /templates/lookup-order/ +[rendering the section]: /templates/section-templates/ +[singletemplate]: /templates/single-page-templates/ diff --git a/netlify.toml b/netlify.toml index caf6bc3e8..ee649cf62 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,7 +3,7 @@ publish = "public" command = "hugo" [context.production.environment] -HUGO_VERSION = "0.39" +HUGO_VERSION = "0.40.2" HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" @@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true" command = "hugo --enableGitInfo" [context.split1.environment] -HUGO_VERSION = "0.39" +HUGO_VERSION = "0.40.2" HUGO_ENV = "production" [context.deploy-preview] command = "hugo -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] -HUGO_VERSION = "0.39" +HUGO_VERSION = "0.40.2" [context.branch-deploy] command = "hugo -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] -HUGO_VERSION = "0.39" +HUGO_VERSION = "0.40.2" [context.next.environment] HUGO_ENABLEGITINFO = "true" diff --git a/resources/_gen/images/news/0.39-relnotes/featured-hugo-39-poster_hu2a1fdf8d3d53aa00bce401a32585d7ec_216872_640x0_resize_catmullrom_2.png b/resources/_gen/images/news/0.39-relnotes/featured-hugo-39-poster_hu2a1fdf8d3d53aa00bce401a32585d7ec_216872_640x0_resize_catmullrom_2.png deleted file mode 100644 index 18d992dfe..000000000 Binary files a/resources/_gen/images/news/0.39-relnotes/featured-hugo-39-poster_hu2a1fdf8d3d53aa00bce401a32585d7ec_216872_640x0_resize_catmullrom_2.png and /dev/null differ diff --git a/resources/_gen/images/news/0.40-relnotes/featured-hugo-40-poster_hu20c69e2a166f65e329d8fbabe8d2cc58_69238_480x0_resize_catmullrom_2.png b/resources/_gen/images/news/0.40-relnotes/featured-hugo-40-poster_hu20c69e2a166f65e329d8fbabe8d2cc58_69238_480x0_resize_catmullrom_2.png new file mode 100644 index 000000000..656e02b34 Binary files /dev/null and b/resources/_gen/images/news/0.40-relnotes/featured-hugo-40-poster_hu20c69e2a166f65e329d8fbabe8d2cc58_69238_480x0_resize_catmullrom_2.png differ diff --git a/resources/_gen/images/news/0.40-relnotes/featured-hugo-40-poster_hu20c69e2a166f65e329d8fbabe8d2cc58_69238_640x0_resize_catmullrom_2.png b/resources/_gen/images/news/0.40-relnotes/featured-hugo-40-poster_hu20c69e2a166f65e329d8fbabe8d2cc58_69238_640x0_resize_catmullrom_2.png new file mode 100644 index 000000000..0939f8d0f Binary files /dev/null and b/resources/_gen/images/news/0.40-relnotes/featured-hugo-40-poster_hu20c69e2a166f65e329d8fbabe8d2cc58_69238_640x0_resize_catmullrom_2.png differ diff --git a/resources/_gen/images/showcase/flesland-flis/featured_hue4fd3c0e7519777bd75019750a0f5391_309284_1024x512_fill_catmullrom_top_2.png b/resources/_gen/images/showcase/flesland-flis/featured_hue4fd3c0e7519777bd75019750a0f5391_309284_1024x512_fill_catmullrom_top_2.png new file mode 100644 index 000000000..755f765ac Binary files /dev/null and b/resources/_gen/images/showcase/flesland-flis/featured_hue4fd3c0e7519777bd75019750a0f5391_309284_1024x512_fill_catmullrom_top_2.png differ diff --git a/resources/_gen/images/showcase/flesland-flis/featured_hue4fd3c0e7519777bd75019750a0f5391_309284_640x0_resize_catmullrom_2.png b/resources/_gen/images/showcase/flesland-flis/featured_hue4fd3c0e7519777bd75019750a0f5391_309284_640x0_resize_catmullrom_2.png new file mode 100644 index 000000000..950b2e08b Binary files /dev/null and b/resources/_gen/images/showcase/flesland-flis/featured_hue4fd3c0e7519777bd75019750a0f5391_309284_640x0_resize_catmullrom_2.png differ diff --git a/resources/_gen/images/showcase/flesland-flis/featured_hue4fd3c0e7519777bd75019750a0f5391_309284_f66ed2dc2e475b0cb21d76296890c5a2.png b/resources/_gen/images/showcase/flesland-flis/featured_hue4fd3c0e7519777bd75019750a0f5391_309284_f66ed2dc2e475b0cb21d76296890c5a2.png new file mode 100644 index 000000000..3056bc376 Binary files /dev/null and b/resources/_gen/images/showcase/flesland-flis/featured_hue4fd3c0e7519777bd75019750a0f5391_309284_f66ed2dc2e475b0cb21d76296890c5a2.png differ diff --git a/static/css/hugofont.css b/static/css/hugofont.css new file mode 100644 index 000000000..09d6ce070 --- /dev/null +++ b/static/css/hugofont.css @@ -0,0 +1,184 @@ +@font-face { + font-family: 'hugo'; + src:url('../fonts/hugo.eot'); + src:url('../fonts/hugo.eot?#iefix') format('embedded-opentype'), + url('../fonts/hugo.woff') format('woff'), + url('../fonts/hugo.ttf') format('truetype'), + url('../fonts/hugo.svg#hugo') format('svg'); + font-weight: normal; + font-style: normal; +} + +[class^="icon-"], [class*=" icon-"] { + font-family: 'hugo'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-home:before { + content: "\21"; +} +.icon-html5:before { + content: "\23"; +} +.icon-css3:before { + content: "\24"; +} +.icon-console:before { + content: "\25"; +} +.icon-link:before { + content: "\26"; +} +.icon-fire:before { + content: "\28"; +} +.icon-check-alt:before { + content: "\29"; +} +.icon-hugo_serif:before { + content: "\e600"; +} +.icon-x-altx-alt:before { + content: "\2a"; +} +.icon-circlestar:before { + content: "\2b"; +} +.icon-file-css:before { + content: "\2c"; +} +.icon-radio-checked:before { + content: "\2e"; +} +.icon-quote:before { + content: "\44"; +} +.icon-airplane2:before { + content: "\45"; +} +.icon-heart:before { + content: "\46"; +} +.icon-rocket:before { + content: "\47"; +} +.icon-house:before { + content: "\48"; +} +.icon-arrow-right:before { + content: "\e001"; +} +.icon-arrow-left:before { + content: "\e002"; +} +.icon-flow-branch:before { + content: "\e004"; +} +.icon-pen:before { + content: "\e005"; +} +.icon-idea:before { + content: "\3b"; +} +.icon-gears:before { + content: "\3c"; +} +.icon-talking:before { + content: "\3d"; +} +.icon-tag:before { + content: "\3e"; +} +.icon-rocket2:before { + content: "\3f"; +} +.icon-octocat:before { + content: "\41"; +} +.icon-announce:before { + content: "\42"; +} +.icon-edit:before { + content: "\43"; +} +.icon-power-cord:before { + content: "\50"; +} +.icon-apple:before { + content: "\51"; +} +.icon-windows8:before { + content: "\52"; +} +.icon-tux:before { + content: "\53"; +} +.icon-file-xml:before { + content: "\54"; +} +.icon-fork:before { + content: "\55"; +} +.icon-arrow-down:before { + content: "\56"; +} +.icon-pacman:before { + content: "\e000"; +} +.icon-embed:before { + content: "\2f"; +} +.icon-code:before { + content: "\30"; +} +.icon-cc:before { + content: "\31"; +} +.icon-cc-by:before { + content: "\32"; +} +.icon-cc-nc:before { + content: "\33"; +} +.icon-beaker-alt:before { + content: "\39"; +} +.icon-w3c:before { + content: "\3a"; +} +.icon-bolt:before { + content: "\49"; +} +.icon-flow-tree:before { + content: "\4a"; +} +.icon-twitter:before { + content: "\4b"; +} +.icon-beaker:before { + content: "\4c"; +} +.icon-images:before { + content: "\4d"; +} +.icon-bubbles:before { + content: "\4e"; +} +.icon-meter2:before { + content: "\4f"; +} +.icon-hugo_sans:before { + content: "\68"; +} +.icon-spf13:before { + content: "\27"; +} diff --git a/static/fonts/hugo.eot b/static/fonts/hugo.eot new file mode 100644 index 000000000..b92f00f93 Binary files /dev/null and b/static/fonts/hugo.eot differ diff --git a/static/fonts/hugo.svg b/static/fonts/hugo.svg new file mode 100644 index 000000000..7913f7c1f --- /dev/null +++ b/static/fonts/hugo.svg @@ -0,0 +1,63 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/fonts/hugo.ttf b/static/fonts/hugo.ttf new file mode 100644 index 000000000..962914d33 Binary files /dev/null and b/static/fonts/hugo.ttf differ diff --git a/static/fonts/hugo.woff b/static/fonts/hugo.woff new file mode 100644 index 000000000..4693fbe7f Binary files /dev/null and b/static/fonts/hugo.woff differ diff --git a/static/img/hugo-logo-med.png b/static/img/hugo-logo-med.png new file mode 100644 index 000000000..dcc141690 Binary files /dev/null and b/static/img/hugo-logo-med.png differ diff --git a/static/img/hugo-logo.png b/static/img/hugo-logo.png new file mode 100644 index 000000000..a4f1321b0 Binary files /dev/null and b/static/img/hugo-logo.png differ diff --git a/static/img/hugo.png b/static/img/hugo.png new file mode 100644 index 000000000..48acf346c Binary files /dev/null and b/static/img/hugo.png differ diff --git a/static/img/hugoSM.png b/static/img/hugoSM.png new file mode 100644 index 000000000..f64f43088 Binary files /dev/null and b/static/img/hugoSM.png differ diff --git a/themes/gohugoioTheme/layouts/_default/list.html b/themes/gohugoioTheme/layouts/_default/list.html index a0835342a..3b7a2307e 100755 --- a/themes/gohugoioTheme/layouts/_default/list.html +++ b/themes/gohugoioTheme/layouts/_default/list.html @@ -1,4 +1,5 @@ {{ define "main" }} - {{ $section_to_display := .Sections | default .Paginator.Pages }} + {{ $paginator := .Paginate (.Pages | lang.Merge (where .Sites.First.RegularPages "Section" .Section)) }} + {{ $section_to_display := .Sections | default $paginator.Pages }} {{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} {{ end }} diff --git a/themes/gohugoioTheme/layouts/news/list.html b/themes/gohugoioTheme/layouts/news/list.html index 716966e17..5a5284658 100644 --- a/themes/gohugoioTheme/layouts/news/list.html +++ b/themes/gohugoioTheme/layouts/news/list.html @@ -28,7 +28,8 @@ {{ $interior_classes := $.Site.Params.flex_box_interior_classes }}
- {{ range .Paginator.Pages }} + {{ $paginator := .Paginate (.Pages | lang.Merge (where .Sites.First.RegularPages "Section" .Section)) -}} + {{ range $paginator.Pages }} {{ partial "boxes-section-summaries" (dict "context" . "classes" $interior_classes "fullcontent" false) }} {{ end }}
diff --git a/themes/gohugoioTheme/layouts/page/documentation-home.html b/themes/gohugoioTheme/layouts/page/documentation-home.html index 04b57d4ca..91f744c30 100644 --- a/themes/gohugoioTheme/layouts/page/documentation-home.html +++ b/themes/gohugoioTheme/layouts/page/documentation-home.html @@ -1,4 +1,4 @@ {{ define "main" }} -{{ $section_to_display := (.Site.Taxonomies.categories.fundamentals).Pages }} +{{ $section_to_display := (.Site.Taxonomies.categories.fundamentals).Pages | lang.Merge (.Sites.First.Taxonomies.categories.fundamentals).Pages }} {{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} {{ end }} diff --git a/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html b/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html index 774c10e0f..c73cfa5e9 100644 --- a/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html +++ b/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html @@ -5,10 +5,12 @@
{{ $showcasePages := where .Site.RegularPages "Section" "showcase" }} + {{ if $showcasePages }} {{ template "home_showcase_item" (index $showcasePages 0) }} {{ range $p := first 10 ($showcasePages | after 1 | shuffle) }} {{template "home_showcase_item" $p }} {{end}} + {{end}}
diff --git a/themes/gohugoioTheme/layouts/partials/nav-links-docs.html b/themes/gohugoioTheme/layouts/partials/nav-links-docs.html index d695008c7..61aa11dde 100644 --- a/themes/gohugoioTheme/layouts/partials/nav-links-docs.html +++ b/themes/gohugoioTheme/layouts/partials/nav-links-docs.html @@ -4,20 +4,20 @@ {{ range .Site.Menus.docs.ByWeight }} {{ $post := printf "%s" .Post }}
  • - {{ .Name }} + {{ .Name }} - {{ if .HasChildren }} - - {{end}} -
  • - {{end}} + {{- if .HasChildren }} + + {{- end}} + + {{- end}} diff --git a/themes/gohugoioTheme/theme.toml b/themes/gohugoioTheme/theme.toml index 7334c0e2e..fe55ec76e 100644 --- a/themes/gohugoioTheme/theme.toml +++ b/themes/gohugoioTheme/theme.toml @@ -8,7 +8,7 @@ description = "" homepage = "https://github.com/budparr/gohugo.io" tags = ["website"] features = ["", ""] -min_version = 0.18 +min_version = 0.38 [author] name = "Bud Parr"