Squashed 'docs/' changes from bd0e15bb6..16753a78d

16753a78d remove kaiju from comments.md
25906f6ad Hugo 0.64.0
aacc7a130 releaser: Add release notes to /docs for release of 0.64.0
2243afe90 Explain Ace/Amber support has been removed
293c9496a Document the hugo function
479890f9b Update comments.md
ceab41097 Update theme
9a95876c7 Remove note
696543e13 Update usage.md
a04bab2b9 Release 0.63.2
ccaed74b5 Merge branch 'temp632'
623b363c5 releaser: Add release notes to /docs for release of 0.63.2
39ce6f50e releaser: Add release notes to /docs for release of 0.63.2
9175ac2ca Another theme fix
88c264251 Rebuild _vendor
e739dc3a8 Release 0.63.1
129ecac84 Merge branch 'temp631'
bcd7c1154 releaser: Add release notes to /docs for release of 0.63.1
e4f0d9285 releaser: Add release notes to /docs for release of 0.63.1
6a40124d6 Update theme
c486747de Params cleanup
c408c4334 netlify: Bump to 0.63.0
7e8a48be8 Adjust base template docs
a5920e9aa Adjust release notes
d4d25c524 Merge branch 'temp63'
16d981721 releaser: Add release notes to /docs for release of 0.63.0
08ab681d1 releaser: Add release notes to /docs for release of 0.63.0
90feaac39 docs, output: Add base template lookup variant to docs.json
afe2b4399 docs, output: Add base template lookup variant to docs.json
1f7466a76 docs: Regen docs helper
7ceefb94a docs: Regen docs helper
ee14087cd Remove typo from RenderString.md
6daf333d3 Remove the calibreapp action
682f710d7 docs: Updating 'submodule add' command in "Host on GitHub" to use https instead of ssh.
ef57b2dae Improve documentation on slug behavior
835ddd9c2 Fix broken link
137a32f90 Fixed typo in content-management/page-resources
936633e25 Fixed spelling error, "wich" -> "which"
a559d41e3 Using a Different Version of Hugo in AWS Amplify
2ee83402d Update rss.md
f900a2ce0 Add render-image code example and edit wording
bd0a0207c Change wording on Page Resources documentation
d213b4599 linuxbrew was renamed to homebrew (#1004)
dcb0925f8 Update index.md
789416a08 Release 0.62.2
2dc66f13c releaser: Add release notes to /docs for release of 0.62.2
813fbc865 releaser: Add release notes to /docs for release of 0.62.2
ed5b07df3 docs: Document the new autoHeadingIDType setting
02d4747e5 docs: Document the new autoHeadingIDType setting
406a8a9a6 docs: Regenerate docshelper
065319786 docs: Regenerate docshelper
61d540021 Merge commit '26f1458a2df6b55eee3a5de46f5fec23a43a7c7d'
7cac5909b releaser: Add release notes to /docs for release of 0.62.1
6e30e01a2 releaser: Add release notes to /docs for release of 0.62.0
2694dcdd8 Merge commit '8a4005cf2b0ef34265ff8051a6b76226685fc226'
115dd6782 docs: More on hooks
f4460fd54 tpl: Do not return any value in errorf
3587d2998 tpl: Add a warnf template func
7c9b02e30 docs: Regen docshelper
a7bfdeb24 Fix incorrect MIME type from image/jpg to image/jpeg
1a6089cfe Preserve HTML Text for link render hooks
4544a998c docs: Footnote
c42733258 Add render template hooks for links and images
0d8bec78a Merge commit '2e711a28c71e8667258e5ab824f9b9a71c261b0a'
3974c326c markup/tableofcontents: Add config option for ordered list
8c2bd1a62 releaser: Add release notes to /docs for release of 0.61.0
f00b2d507 releaser: Add release notes to /docs for release of 0.60.1
9a5109838 releaser: Add release notes to /docs for release of 0.60.0
d2c222f71 Add Goldmark as the new default markdown handler
df96f9efa Update homepage.md
f17e67b4b tpl/collections: Allow dict to create nested structures
5f923768a Merge commit 'efc0b1bb6c6564f54d596467dbc6a18cb206954e'
8a861bf16 Support Go time format strings in permalinks
bbb8c4fea releaser: Add release notes to /docs for release of 0.59.1
9d9070dda releaser: Add release notes to /docs for release of 0.59.0
98716176b Merge commit '5ac0f751aa47e52625662215f66efa99a6abfc2e'
2057ba4c5 Merge commit '5070ba6c9e6c492deade3c30cfe769b9dbf7151d'
c98bcff07 Merge commit 'b9bd35d72e14932fb6588ff62b90cddef0a060fc' as 'docs'

git-subtree-dir: docs
git-subtree-split: 16753a78d85e05c4a2cea94e263dda2e0047d155
This commit is contained in:
Bjørn Erik Pedersen 2020-02-06 13:02:49 +01:00
parent 26f1458a2d
commit 3c0036805d
94 changed files with 501 additions and 218 deletions

View file

@ -1,4 +1,3 @@
{{/* {{ define "header" }}{{ partial "page-header" . }}{{ end }} */}}
{{ define "main" }}
{{ $section_to_display := .Pages }}
<div class="w-100 ph4 pb5 pb6-ns pt1 pt3-ns">

View file

@ -1,5 +1,3 @@
{{/* TODO: think about adding these tags back in, but they need to be limited to news
{{ define "header" }}{{ partial "page-header" . }}{{ end }} */}}
{{ define "main" }}
<div class="w-100 ph4 ph5-ns pb5 pb6-ns pt1 pt3-ns ">

View file

@ -1 +1 @@
# github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d
# github.com/gohugoio/gohugoioTheme v0.0.0-20200128164921-1d0bc5482051

View file

@ -58,33 +58,6 @@ pattern = "2006"
[social]
twitter = "GoHugoIO"
#CUSTOM PARAMS
[params]
description = "The worlds fastest framework for building websites"
## Used for views in rendered HTML (i.e., rather than using the .Hugo variable)
release = "0.55.0-DEV"
## Setting this to true will add a "noindex" to *EVERY* page on the site
removefromexternalsearch = false
## Gh repo for site footer (include trailing slash)
ghrepo = "https://github.com/gohugoio/hugoDocs/"
## GH Repo for filing a new issue
github_repo = "https://github.com/gohugoio/hugo/issues/new"
### Edit content repo (set to automatically enter "edit" mode; this is good for "improve this page" links)
ghdocsrepo = "https://github.com/gohugoio/hugoDocs/tree/master/docs"
## Gitter URL
gitter = "https://gitter.im/spf13/hugo"
## Discuss Forum URL
forum = "https://discourse.gohugo.io/"
## Google Tag Manager
gtmid = ""
# First one is picked as the Twitter card image if not set on page.
images = ["images/gohugoio-card.png"]
flex_box_interior_classes = "flex-auto w-100 w-40-l mr3 mb3 bg-white ba b--moon-gray nested-copy-line-height"
#sidebar_direction = "sidebar_left"
# MARKDOWN
## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
[blackfriday]

View file

@ -1,7 +1,5 @@
description = "The worlds fastest framework for building websites"
## Used for views in rendered HTML (i.e., rather than using the .Hugo variable)
release = "0.52"
## Setting this to true will add a "noindex" to *EVERY* page on the site..
removefromexternalsearch = false
## Gh repo for site footer (include trailing slash)

View file

@ -53,7 +53,6 @@ There are a few alternatives to commenting on static sites for those who do not
* [Static Man](https://staticman.net/)
* [Talkyard](https://www.talkyard.io/blog-comments) (Open source, & serverless hosting)
* [txtpen](https://txtpen.github.io/hn/)
* [IntenseDebate](https://intensedebate.com/)
* [Graph Comment][]
* [Muut](https://muut.com/)
@ -64,16 +63,6 @@ There are a few alternatives to commenting on static sites for those who do not
* [Commento](https://commento.io/) (Open Source, available as a service, local install, or docker image)
* [JustComments](https://just-comments.com) (Open Source, available as a service, can be self-hosted)
<!-- I don't think this is worth including in the documentation since it seems that Steve is no longer supporting or developing this project. rdwatters - 2017-02-29.-->
<!-- * [Kaiju](https://github.com/spf13/kaiju) -->
<!-- ## Kaiju
[Kaiju](https://github.com/spf13/kaiju) is an open-source project started by [spf13](https://spf13.com/) (Hugos author) to bring easy and fast real time discussions to the web.
Written using Go, Socket.io, and [MongoDB][], Kaiju is very fast and easy to deploy.
It is in early development but shows promise. If you have interest, please help by contributing via pull request, [opening an issue in the Kaiju GitHub repository][kaijuissue], or [Tweeting about it][tweet]. Every bit helps. -->
[configuration]: /getting-started/configuration/
[disquspartial]: /templates/partials/#disqus

View file

@ -173,7 +173,7 @@ When defined in the front matter, the `slug` can take the place of the filename
{{< code file="content/posts/old-post.md" >}}
---
title: New Post
title: A new post with the filename old-post.md
slug: "new-post"
---
{{< /code >}}

View file

@ -67,7 +67,7 @@ GetMatch
```go
// Using Match/GetMatch to find this images/sunset.jpg ?
.Resources.Match "images/sun*" ✅
.Resources.Match "**/Sunset.jpg" ✅
.Resources.Match "**/sunset.jpg" ✅
.Resources.Match "images/*.jpg" ✅
.Resources.Match "**.jpg" ✅
.Resources.Match "*" 🚫
@ -78,7 +78,7 @@ GetMatch
## Page Resources Metadata
Page Resources' metadata is managed from their page's front matter with an array/table parameter named `resources`. You can batch assign values using a [wildcards](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
{{% note %}}
Resources of type `page` get `Title` etc. from their own front matter.
@ -135,7 +135,7 @@ From the example above:
- Every docx in the bundle will receive the `word` icon.
{{% warning %}}
The __order matters__ --- Only the **first set** values of the `title`, `name` and `params`-**keys** will be used. Consecutive parameters will be set only for the ones not already set. For example, in the above example, `.Params.icon` is already first set to `"photo"` in `src = "documents/photo_specs.pdf"`. So that would not get overridden to `"pdf"` by the later set `src = "**.pdf"` rule.
The __order matters__ --- Only the **first set** values of the `title`, `name` and `params`-**keys** will be used. Consecutive parameters will be set only for the ones not already set. In the above example, `.Params.icon` is first set to `"photo"` in `src = "documents/photo_specs.pdf"`. So that would not get overridden to `"pdf"` by the later set `src = "**.pdf"` rule.
{{%/ warning %}}
### The `:counter` placeholder in `name` and `title`

View file

@ -32,7 +32,7 @@ Some examples:
{{ $optOrg := dict "markup" "org" }}
{{ "**Bold Markdown**" | $p.RenderString }}
{{ "**Bold Block Markdown**" | $p.RenderString $optBlock }}
{{ "/italic org mode/" | $p.RenderString $optOrg }}:REND
{{ "/italic org mode/" | $p.RenderString $optOrg }}
```

View file

@ -0,0 +1,49 @@
---
title: hugo
linktitle: hugo
description: The `hugo` function provides easy access to Hugo-related data.
godocref:
date: 2019-01-31
publishdate: 2019-01-31
lastmod: 2019-01-31
keywords: []
categories: [functions]
menu:
docs:
parent: "functions"
toc:
signature: ["hugo"]
workson: []
hugoversion:
relatedfuncs: []
deprecated: false
draft: false
aliases: []
---
`hugo` returns an instance that contains the following functions:
hugo.Generator
: `<meta>` tag for the version of Hugo that generated the site. `hugo.Generator` outputs a *complete* HTML tag; e.g. `<meta name="generator" content="Hugo 0.63.2" />`
hugo.Version
: the current version of the Hugo binary you are using e.g. `0.63.2`
`hugo` returns an instance that contains the following functions:
hugo.Environment
: the current running environment as defined through the `--environment` cli tag.
hugo.CommitHash
: the git commit hash of the current Hugo binary e.g. `0e8bed9ccffba0df554728b46c5bbf6d78ae5247`
hugo.BuildDate
: the compile date of the current Hugo binary formatted with RFC 3339 e.g. `2002-10-02T10:00:00-05:00`
{{% note "Use the Hugo Generator Tag" %}}
We highly recommend using `hugo.Generator` in your website's `<head>`. `hugo.Generator` is included by default in all themes hosted on [themes.gohugo.io](https://themes.gohugo.io). The generator tag allows the Hugo team to track the usage and popularity of Hugo.
{{% /note %}}

View file

@ -37,7 +37,3 @@ A more practical example is to fill in the missing translations from the other l
{{ $pages = $pages | lang.Merge .Site.RegularPages }}
{{ end }}
```
{{% note %}}
Note that the slightly ugly `.Scratch` construct will not be needed once this is fixed: https://github.com/golang/go/issues/10608
{{% /note %}}

View file

@ -38,6 +38,9 @@ unsafe
typographer
: This extension substitutes punctuations with typographic entities like [smartypants](https://daringfireball.net/projects/smartypants/).
autoHeadingIDType ("github") {{< new-in "0.62.2" >}}
: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs work as with [Blackfriday](#blackfriday), the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/anchorize/) template func.
### Blackfriday
@ -122,17 +125,31 @@ Text
PlainText
: The plain variant of the above.
A Markdown example for an inline-style link with title:
#### Link with title Markdown example :
```md
[Text](https://www.gohugo.io "Title")
```
A very simple template example given the above:
Here is a code example for how the render-link.html template could look:
{{< code file="layouts/_default/_markup/render-link.html" >}}
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text }}</a>
{{< /code >}}
#### Image Markdown example:
```md
![Text](https://d33wubrfki0l68.cloudfront.net/c38c7334cc3f23585738e40334284fddcaf03d5e/2e17c/images/hugo-logo-wide.svg "Title")
```
Here is a code example for how the render-image.html template could look:
{{< code file="layouts/_default/_markup/render-image.html" >}}
<p class="md__image">
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
</p>
{{< /code >}}
[^hooktemplate]: It's currently only possible to have one set of render hook templates, e.g. not per `Type` or `Section`. We may consider that in a future version.

View file

@ -85,7 +85,7 @@ baseURL
: Hostname (and path) to the root, e.g. https://bep.is/
blackfriday
: See [Configure Blackfriday](/getting-started/configuration/#configure-blackfriday)
: See [Configure Blackfriday](/getting-started/configuration-markup#blackfriday)
buildDrafts (false)
: Include drafts when building.

View file

@ -54,15 +54,15 @@ brew install hugo
For more detailed explanations, read the installation guides that follow for installing on macOS and Windows.
### Linuxbrew (Linux)
### Homebrew (Linux)
If you are on Linux and using [Linuxbrew][linuxbrew], you can install Hugo with the following one-liner:
If you are using [Homebrew][linuxbrew] on Linux, you can install Hugo with the following one-liner:
{{< code file="install-with-linuxbrew.sh" >}}
brew install hugo
{{< /code >}}
Installation guides for Linuxbrew are available on their [website][linuxbrew].
Installation guides for Homebrew on Linux are available on their [website][linuxbrew].
### Chocolatey (Windows)
@ -518,7 +518,7 @@ Now that you've installed Hugo, read the [Quick Start guide][quickstart] and exp
[highlight shortcode]: /content-management/shortcodes/#highlight
[installgit]: https://git-scm.com/
[installgo]: https://golang.org/dl/
[linuxbrew]: https://linuxbrew.sh/
[linuxbrew]: https://docs.brew.sh/Homebrew-on-Linux
[Path Editor]: https://patheditor2.codeplex.com/
[pygments]: http://pygments.org
[quickstart]: /getting-started/quick-start/

View file

@ -203,23 +203,6 @@ Since Hugo generates a static website, your site can be hosted *anywhere* using
Running `hugo` *does not* remove generated files before building. This means that you should delete your `public/` directory (or the publish directory you specified via flag or configuration file) before running the `hugo` command. If you do not remove these files, you run the risk of the wrong files (e.g., drafts or future posts) being left in the generated site.
{{% /warning %}}
### Dev vs Deploy Destinations
Hugo does not remove generated files before building. An easy workaround is to use different directories for development and production.
To start a server that builds draft content (helpful for editing), you can specify a different destination; e.g., a `dev/` directory:
```
hugo server -wDs ~/Code/hugo/docs -d dev
```
When the content is ready for publishing, use the default `public/` dir:
```
hugo -s ~/Code/hugo/docs
```
This prevents draft content from accidentally becoming available.
[commands]: /commands/
[config]: /getting-started/configuration/

View file

@ -42,4 +42,31 @@ AWS Amplify is a combination of client library, CLI toolchain, and a Console for
1. Review your changes and then choose **Save and deploy**. The Amplify Console will pull code from your repository, build changes to the backend and frontend, and deploy your build artifacts at `https://master.unique-id.amplifyapp.com`. Bonus: Screenshots of your app on different devices to find layout issues.
## Using a Newer Version of Hugo
If you need to use a different, perhaps newer, version of Hugo than the version currently supported by AWS Amplify, you can modify your build commands to include the downloading of Hugo itself. Here's an example of a build definition that includes the downloading of Hugo. Note that in ths example the "extended" version of Hugo is being used which includes support for SASS/SCSS.
```
version: 0.1
frontend:
phases:
# IMPORTANT - Please verify your build commands
build:
commands:
- wget https://github.com/gohugoio/hugo/releases/download/v0.62.2/hugo_extended_0.62.2_Linux-64bit.tar.gz
- tar -xf hugo_extended_0.62.2_Linux-64bit.tar.gz
- mv hugo /usr/bin/hugo
- rm -rf hugo_extended_0.62.2_Linux-64bit.tar.gz
- hugo version
- hugo
artifacts:
# IMPORTANT - Please verify your build output directory
baseDirectory: public
files:
- '**/*'
cache:
paths: []
```
[Quick Start]: /getting-started/quick-start/

View file

@ -58,7 +58,7 @@ This is a much simpler setup as your Hugo files and generated content are publis
5. Once you are happy with the results:
* Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to kill the server
* Before proceeding run `rm -rf public` to completely remove the `public` directory
6. `git submodule add -b master git@github.com:<USERNAME>/<USERNAME>.github.io.git public`. This creates a git [submodule][]. Now when you run the `hugo` command to build your site to `public`, the created `public` directory will have a different remote origin (i.e. hosted GitHub repository).
6. `git submodule add -b master https://github.com/<USERNAME>/<USERNAME>.github.io.git public`. This creates a git [submodule][]. Now when you run the `hugo` command to build your site to `public`, the created `public` directory will have a different remote origin (i.e. hosted GitHub repository).
### Put it Into a Script

View file

@ -0,0 +1,26 @@
---
date: 2020-01-05
title: "Hugo 0.62.2: A couple of Bug Fixes"
description: "This version fixes a couple of bugs introduced in 0.62.0."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png
---
The main driving force behind these patch releases in the new year has been getting a good story with [portable links](https://github.com/bep/portable-hugo-links/) between GitHub and Hugo, using the new render hooks introduced in [Hugo 0.62.0](https://gohugo.io/news/0.62.0-relnotes/). And all was mostly well until a Hugo user asked about anchor links. Which is, when you look into it, a slightly sad Markdown story. They have been [talking about anchors in Markdown](https://talk.commonmark.org/t/anchors-in-markdown/247) over at the CommonMark forum for the last six years, but it has come to nothing. The current situation is that some Markdown engines support the `{#anchorName}` attribute syntax (Hugo's Goldmark does, GitHub does not) and for those that support auto-generation of IDs, the implementation often varies. And this makes for poor portability.
To improve this, Hugo has now reverse-engineered GitHub's implementation and made that the default strategy for generation or header IDs. We understand that this isn't everyone's cup of tea, so you can [configure the behaviour](https://gohugo.io/getting-started/configuration-markup#goldmark) to be one of `github`, `github-ascii` (some client-libraries have Unicode issues) or `blackfriday` (which will match how it behaved before Hugo 0.60).
* hugolib: Fix relative .Page.GetPage from bundle [196a9df5](https://github.com/gohugoio/hugo/commit/196a9df585c4744e3280f37c1c24e469fce14b8c) [@bep](https://github.com/bep) [#6705](https://github.com/gohugoio/hugo/issues/6705)
* markup/goldmark: Adjust auto ID space handling [9b6e6146](https://github.com/gohugoio/hugo/commit/9b6e61464b09ffe3423fb8d7c72bddb7a9ed5b98) [@bep](https://github.com/bep) [#6710](https://github.com/gohugoio/hugo/issues/6710)
* docs: Document the new autoHeadingIDType setting [d62ede8e](https://github.com/gohugoio/hugo/commit/d62ede8e9e5883e7ebb023e49b82f07b45edc1c7) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)[#6616](https://github.com/gohugoio/hugo/issues/6616)
* docs: Regenerate docshelper [81b7e48a](https://github.com/gohugoio/hugo/commit/81b7e48a55092203aeee8785799e6fed3928760e) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)[#6616](https://github.com/gohugoio/hugo/issues/6616)
* markup/goldmark: Add an optional Blackfriday auto ID strategy [16e7c112](https://github.com/gohugoio/hugo/commit/16e7c1120346bd853cf6510ffac8e94824bf2c7f) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)
* markup/goldmark: Make the autoID type config a string [8f071fc1](https://github.com/gohugoio/hugo/commit/8f071fc159ce9a0fc0ea14a73bde8f299bedd109) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)
* markup/goldmark: Simplify code [5ee1f087](https://github.com/gohugoio/hugo/commit/5ee1f0876f3ec8b79d6305298185dc821ead2d28) [@bep](https://github.com/bep)
* markup/goldmark: Make auto IDs GitHub compatible [a82d2700](https://github.com/gohugoio/hugo/commit/a82d2700fcc772aada15d65b8f76913ca23f7404) [@bep](https://github.com/bep) [#6616](https://github.com/gohugoio/hugo/issues/6616)

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

View file

@ -0,0 +1,126 @@
---
date: 2020-01-23
title: "Improved base templates, and faster!"
description: "In Hugo 0.63 we have improved the base template lookup logic, and this simplification also made Hugo faster …"
categories: ["Releases"]
---
**Note:** There is already a [patch release](/news/0.63.1-relnotes/) with some fixes.
Hugo `0.63` is, in general, **considerably faster and more memory effective** (see the site-building benchmarks below comparing it to `v0.62`). Not that we are particularly concerned about Hugo's build speed. We leave that to others. But we would hate if it got slower, so we have a comprehensive benchmark suite. And when we needed to simplify the template handling code to solve a concurrency issue, it also became more effective. And as a bonus, we also finally got the [base template lookup order](https://gohugo.io/templates/base/#base-template-lookup-order) that you really, really wanted!
```bash
name old time/op new time/op delta
SiteNew/Bundle_with_image-16 13.2ms ± 2% 10.7ms ± 0% -19.13% (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file-16 13.1ms ± 0% 10.8ms ± 0% -17.50% (p=0.029 n=4+4)
SiteNew/Tags_and_categories-16 47.7ms ± 1% 43.7ms ± 2% -8.43% (p=0.029 n=4+4)
SiteNew/Canonify_URLs-16 52.3ms ± 6% 49.5ms ± 7% ~ (p=0.200 n=4+4)
SiteNew/Deep_content_tree-16 77.7ms ± 0% 71.6ms ± 1% -7.84% (p=0.029 n=4+4)
SiteNew/Many_HTML_templates-16 44.0ms ± 2% 37.5ms ± 1% -14.79% (p=0.029 n=4+4)
SiteNew/Page_collections-16 58.4ms ± 1% 52.5ms ± 1% -10.09% (p=0.029 n=4+4)
name old alloc/op new alloc/op delta
SiteNew/Bundle_with_image-16 3.81MB ± 0% 2.22MB ± 0% -41.57% (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file-16 3.60MB ± 0% 2.01MB ± 0% -44.09% (p=0.029 n=4+4)
SiteNew/Tags_and_categories-16 19.3MB ± 1% 14.2MB ± 0% -26.52% (p=0.029 n=4+4)
SiteNew/Canonify_URLs-16 70.7MB ± 0% 69.0MB ± 0% -2.30% (p=0.029 n=4+4)
SiteNew/Deep_content_tree-16 37.0MB ± 0% 31.2MB ± 0% -15.78% (p=0.029 n=4+4)
SiteNew/Many_HTML_templates-16 17.5MB ± 0% 10.6MB ± 0% -39.68% (p=0.029 n=4+4)
SiteNew/Page_collections-16 25.8MB ± 0% 21.2MB ± 0% -17.80% (p=0.029 n=4+4)
name old allocs/op new allocs/op delta
SiteNew/Bundle_with_image-16 52.3k ± 0% 26.1k ± 0% -50.08% (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file-16 52.3k ± 0% 26.1k ± 0% -50.06% (p=0.029 n=4+4)
SiteNew/Tags_and_categories-16 337k ± 1% 272k ± 0% -19.20% (p=0.029 n=4+4)
SiteNew/Canonify_URLs-16 422k ± 0% 395k ± 0% -6.33% (p=0.029 n=4+4)
SiteNew/Deep_content_tree-16 400k ± 0% 314k ± 0% -21.41% (p=0.029 n=4+4)
SiteNew/Many_HTML_templates-16 247k ± 0% 143k ± 0% -41.84% (p=0.029 n=4+4)
SiteNew/Page_collections-16 282k ± 0% 207k ± 0% -26.31% (p=0.029 n=4+4)
```
This release represents **35 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 [@hcwong](https://github.com/hcwong), [@flother](https://github.com/flother), and [@RemcodM](https://github.com/RemcodM) for their ongoing contributions.
And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) and [@onedrawingperday](https://github.com/onedrawingperday) for their relentless work on keeping the themes site in pristine condition and to [@davidsneighbour](https://github.com/davidsneighbour) and [@kaushalmodi](https://github.com/kaushalmodi) for all the great work on the documentation site.
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
which has received **13 contributions by 10 contributors**. A special thanks to [@bep](https://github.com/bep), [@jeffscottlevine](https://github.com/jeffscottlevine), [@davidsneighbour](https://github.com/davidsneighbour), and [@nicfits](https://github.com/nicfits) for their work on the documentation site.
Hugo now has:
* 41091+ [stars](https://github.com/gohugoio/hugo/stargazers)
* 440+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
* 286+ [themes](http://themes.gohugo.io/)
## Notes
* `.Type` on-page now returns an empty string if not set in the front matter or if `.Section` returns empty. See [#6760](https://github.com/gohugoio/hugo/issues/6760).
* Baseof template (e.g. `baseof.html`) lookup order is completely revised/expanded. See [base template lookup order](https://gohugo.io/templates/base/#base-template-lookup-order). We now do template resolution at execution time following the same rules as the template it applies to (e.g. `_default/single.html`). This is an obvious improvement and your site should work as before.
* Shortcode params now supports params with raw string literals (strings surrounded with \`\`) that supports newlines.
* Note: In a base template (e.g. `baseof.html`), the first template block must be a `define`.
## Enhancements
### Templates
* Rework template management to get rid of concurrency issues [c6d650c8](https://github.com/gohugoio/hugo/commit/c6d650c8c8b22fdc7ddedc1e42a3ca698e1390d6) [@bep](https://github.com/bep) [#6716](https://github.com/gohugoio/hugo/issues/6716)[#6760](https://github.com/gohugoio/hugo/issues/6760)[#6768](https://github.com/gohugoio/hugo/issues/6768)[#6778](https://github.com/gohugoio/hugo/issues/6778)
* Put Go's internal template funcs in Hugo's map [1cf23541](https://github.com/gohugoio/hugo/commit/1cf235412f98b42aefe368e99a0e9e95bae6eef7) [@bep](https://github.com/bep) [#6717](https://github.com/gohugoio/hugo/issues/6717)
### Output
* Add base template lookup variant to docs.json [cafb1d53](https://github.com/gohugoio/hugo/commit/cafb1d53c0927e2aef8abff1bf9095c90c6f3067) [@bep](https://github.com/bep)
### Core
* Disable a test assertion on ARM [836c2426](https://github.com/gohugoio/hugo/commit/836c24261f9f175254256fb326d92a3db47e1c75) [@bep](https://github.com/bep) [#6655](https://github.com/gohugoio/hugo/issues/6655)
* Some more benchmark adjustments [ddd75f21](https://github.com/gohugoio/hugo/commit/ddd75f212110a3d6643a07301e377415f3d163bd) [@bep](https://github.com/bep)
* Adjust site benchmarks [4ed6ebef](https://github.com/gohugoio/hugo/commit/4ed6ebef4ca71572a19bb890cb4c026a688b2b5b) [@bep](https://github.com/bep)
* Add a benchmark with lots of templates [ea05c0e8](https://github.com/gohugoio/hugo/commit/ea05c0e8456e8dec71ffd796148355b0d8b36eb0) [@bep](https://github.com/bep)
### Other
* Regen docs helper [4f466db6](https://github.com/gohugoio/hugo/commit/4f466db666dded1b6c6d1e6926e170f22164433a) [@bep](https://github.com/bep)
* Allow multiple arguments in ne/ge/gt/le/lt functions Treat op arg1 arg2 arg3 ... as (arg1 op arg2) && (arg1 op arg3) and so on for ne/ge/gt/le/lt. [0c251be6](https://github.com/gohugoio/hugo/commit/0c251be66bf3ad4abafbc47583e394ca4e6ffcf1) [@le0tan](https://github.com/le0tan) [#6619](https://github.com/gohugoio/hugo/issues/6619)
* Update go-org [8585b388](https://github.com/gohugoio/hugo/commit/8585b388d27abde1ab6b6c63ad6addf4066ec8dd) [@niklasfasching](https://github.com/niklasfasching)
* Add support for newline characters in raw string shortcode [21ca2e9c](https://github.com/gohugoio/hugo/commit/21ca2e9ce4255bfad2bb0576aff087a240acf70a) [@hcwong](https://github.com/hcwong)
* Update github.com/alecthomas/chroma [3efa1d81](https://github.com/gohugoio/hugo/commit/3efa1d81219a6e7b41c9676e9cab446741f69055) [@ghislainbourgeois](https://github.com/ghislainbourgeois)
* Update minify to v2.7.2 [65ec8fe8](https://github.com/gohugoio/hugo/commit/65ec8fe827efef5a14c4e1bc440a6df97d2f20a2) [@bep](https://github.com/bep) [#6756](https://github.com/gohugoio/hugo/issues/6756)
* Update Goldmark to v1.1.21 [d3e8ab2e](https://github.com/gohugoio/hugo/commit/d3e8ab2e39dcc27853b163079f4a82364286fe82) [@flother](https://github.com/flother) [#6571](https://github.com/gohugoio/hugo/issues/6571)
* Allow raw string literals in shortcode params [da814556](https://github.com/gohugoio/hugo/commit/da814556567eab9ba0ac5fef5314c3ad5ee50ccd) [@hcwong](https://github.com/hcwong)
* Update github.com/gohugoio/testmodBuilder [0c0bb372](https://github.com/gohugoio/hugo/commit/0c0bb372858b5de58c15ccd300144e0bc205ffad) [@bep](https://github.com/bep)
* Update direct dependencies [94cfdf6b](https://github.com/gohugoio/hugo/commit/94cfdf6befd657e46c9458b23f17d851cd2f7037) [@bep](https://github.com/bep) [#6719](https://github.com/gohugoio/hugo/issues/6719)
* Update to new CSS config [45138017](https://github.com/gohugoio/hugo/commit/451380177868e48127a33362aa8d553b90516fb5) [@bep](https://github.com/bep) [#6719](https://github.com/gohugoio/hugo/issues/6719)
* Update to Minify v2.7.0 [56354a63](https://github.com/gohugoio/hugo/commit/56354a63bb73271224a9300a4742dc1a2f551202) [@bep](https://github.com/bep)
* Add support for freebsd/arm64 [aead8108](https://github.com/gohugoio/hugo/commit/aead8108b80d77e23c68a47fd8d86464310130be) [@dmgk](https://github.com/dmgk) [#6719](https://github.com/gohugoio/hugo/issues/6719)
* Update releasenotes_writer.go [df6e9efd](https://github.com/gohugoio/hugo/commit/df6e9efd8f345707932231ea23dc8713afb5b026) [@bep](https://github.com/bep)
* Adjust auto ID space handling [9b6e6146](https://github.com/gohugoio/hugo/commit/9b6e61464b09ffe3423fb8d7c72bddb7a9ed5b98) [@bep](https://github.com/bep) [#6710](https://github.com/gohugoio/hugo/issues/6710)
* Document the new autoHeadingIDType setting [d62ede8e](https://github.com/gohugoio/hugo/commit/d62ede8e9e5883e7ebb023e49b82f07b45edc1c7) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)[#6616](https://github.com/gohugoio/hugo/issues/6616)
* Regenerate docshelper [81b7e48a](https://github.com/gohugoio/hugo/commit/81b7e48a55092203aeee8785799e6fed3928760e) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)[#6616](https://github.com/gohugoio/hugo/issues/6616)
* Add an optional Blackfriday auto ID strategy [16e7c112](https://github.com/gohugoio/hugo/commit/16e7c1120346bd853cf6510ffac8e94824bf2c7f) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)
* Make the autoID type config a string [8f071fc1](https://github.com/gohugoio/hugo/commit/8f071fc159ce9a0fc0ea14a73bde8f299bedd109) [@bep](https://github.com/bep) [#6707](https://github.com/gohugoio/hugo/issues/6707)
* markup/goldmark: Simplify code [5ee1f087](https://github.com/gohugoio/hugo/commit/5ee1f0876f3ec8b79d6305298185dc821ead2d28) [@bep](https://github.com/bep)
* Make auto IDs GitHub compatible [a82d2700](https://github.com/gohugoio/hugo/commit/a82d2700fcc772aada15d65b8f76913ca23f7404) [@bep](https://github.com/bep) [#6616](https://github.com/gohugoio/hugo/issues/6616)
* Support files in content mounts [ff6253bc](https://github.com/gohugoio/hugo/commit/ff6253bc7cf745e9c0127ddc9006da3c2c00c738) [@bep](https://github.com/bep) [#6684](https://github.com/gohugoio/hugo/issues/6684)[#6696](https://github.com/gohugoio/hugo/issues/6696)
* Update alpine base image in Dockerfile to 3.11 [aa4ccb8a](https://github.com/gohugoio/hugo/commit/aa4ccb8a1e9b8aa17397acf34049a2aa16b0b6cb) [@RemcodM](https://github.com/RemcodM)
## Fixes
### Templates
* Fix eq when > 2 args [2fefc016](https://github.com/gohugoio/hugo/commit/2fefc01606fddb119f368c89fb2dedd452ad6547) [@bep](https://github.com/bep) [#6786](https://github.com/gohugoio/hugo/issues/6786)
### Core
* Fix relative .Page.GetPage from bundle [196a9df5](https://github.com/gohugoio/hugo/commit/196a9df585c4744e3280f37c1c24e469fce14b8c) [@bep](https://github.com/bep) [#6705](https://github.com/gohugoio/hugo/issues/6705)
* Fix inline shortcode regression [5509954c](https://github.com/gohugoio/hugo/commit/5509954c7e8b0ce8d5ea903b0ab639ea14b69acb) [@bep](https://github.com/bep) [#6677](https://github.com/gohugoio/hugo/issues/6677)
### Other
* Fix 0.62.1 server rebuild slowdown regression [17af79a0](https://github.com/gohugoio/hugo/commit/17af79a03e249a731cf5634ffea23ca00774333d) [@bep](https://github.com/bep) [#6784](https://github.com/gohugoio/hugo/issues/6784)
* Fix blog not building [d61bee5e](https://github.com/gohugoio/hugo/commit/d61bee5e0916b5d2b388e66ef85c336312a21a06) [@colonelpopcorn](https://github.com/colonelpopcorn) [#6752](https://github.com/gohugoio/hugo/issues/6752)

View file

@ -0,0 +1,17 @@
---
date: 2020-01-23
title: "Hugo 0.63.1: A couple of Bug Fixes"
description: "This version fixes a couple of bugs introduced in 0.63.0."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png
---
This is a bug-fix release with a couple of important fixes.
* deps: Make the build flags shared between sites [0df7bd62](https://github.com/gohugoio/hugo/commit/0df7bd62df460a49544845d5332f33b2020b48a1) [@bep](https://github.com/bep) [#6789](https://github.com/gohugoio/hugo/issues/6789)
* Fix baseof with regular define regression [f441f675](https://github.com/gohugoio/hugo/commit/f441f675126ef1123d9f94429872dd683b40e011) [@bep](https://github.com/bep) [#6790](https://github.com/gohugoio/hugo/issues/6790)
* Revert to minify [v2.61](https://github.com/gohugoio/hugo/commit/7ed22e9fb6a5b74c52ae6054b843b8c64e83f4b6)

View file

@ -0,0 +1,20 @@
---
date: 2020-01-27
title: "Hugo 0.63.2: A couple of Bug Fixes"
description: "This version fixes a couple of bugs introduced in 0.63.0."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png
---
This is a bug-fix release with a couple of important fixes.
* And now finally fix the 404 templates [74b6c4e5](https://github.com/gohugoio/hugo/commit/74b6c4e5ff5ee16f0e6b352a26c1e58b90a25dc6) [@bep](https://github.com/bep) [#6795](https://github.com/gohugoio/hugo/issues/6795)
* Fix 404 with base template regression [8df5d76e](https://github.com/gohugoio/hugo/commit/8df5d76e708238563185bac84809b34a4d395734) [@bep](https://github.com/bep) [#6795](https://github.com/gohugoio/hugo/issues/6795)
* Revert to .Type = "page" when empty [#6805](https://github.com/gohugoio/hugo/issues/6805)

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View file

@ -0,0 +1,54 @@
---
date: 2020-02-04
title: "Mostly bugfixes …"
description: "Hugo 0.64.0 is the version you really really want …"
categories: ["Releases"]
---
Hugo **0.64.0** is mostly a bugfix-release, but well worth the download. The main reason this release comes so soon after the previous is my (me being [@bep](https://github.com/bep)) ongoing work on getting solid support for third-party libraries in [Hugo Modules](https://gohugo.io/hugo-modules/). In particular, this release makes the Hugo server's live-reload work with [Turbolinks](https://github.com/bep/hugo-alpine-test/blob/27927832630be588eab0be2197cc8c0cb5725540/config.toml#L11) and similar. Also worth mentioning is that `hugo mod get -u` (without any path) now correctly updates every module imported in `config.toml` even with Go 1.13.
This release represents **16 contributions by 2 contributors** to the main Hugo code base.
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
which has received **6 contributions by 4 contributors**. A special thanks to [@bep](https://github.com/bep), [@peterkappus](https://github.com/peterkappus), [@kc0bfv](https://github.com/kc0bfv), and [@inwardmovement](https://github.com/inwardmovement) for their work on the documentation site.
Hugo now has:
* 41348+ [stars](https://github.com/gohugoio/hugo/stargazers)
* 439+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
* 289+ [themes](http://themes.gohugo.io/)
## Enhancements
### Output
* Do not render alias paginator pages for non-HTML outputs [2d159e9c](https://github.com/gohugoio/hugo/commit/2d159e9cc7a25832e4b0cad226b149f7c4624708) [@bep](https://github.com/bep) [#6797](https://github.com/gohugoio/hugo/issues/6797)
### Other
* Mention a "no CGO rule" [29973101](https://github.com/gohugoio/hugo/commit/299731012441378bb9c057ceb0a3c277108aaf01) [@bep](https://github.com/bep) [#6842](https://github.com/gohugoio/hugo/issues/6842)
* Update to Go 1.13.7 and Go 1.12.16 [0792cfa9](https://github.com/gohugoio/hugo/commit/0792cfa9fae94a06a31e393a46fed3b1dd73b66a) [@bep](https://github.com/bep) [#6830](https://github.com/gohugoio/hugo/issues/6830)
* Add defer to livereload script tag [b3f0674b](https://github.com/gohugoio/hugo/commit/b3f0674b80a32425aeb4412f318c720391bbf773) [@bep](https://github.com/bep)
* Don't use document.write to inject livereload [ef78a0d1](https://github.com/gohugoio/hugo/commit/ef78a0d18a13098bcea1ff2b2d45d7388b8d41a0) [@bep](https://github.com/bep) [#6507](https://github.com/gohugoio/hugo/issues/6507)
* Add a render hook whitespace test [58595864](https://github.com/gohugoio/hugo/commit/585958645372e6219239247dbac02e447d2b355b) [@bep](https://github.com/bep) [#6832](https://github.com/gohugoio/hugo/issues/6832)
* Inject livereload script right after head if possible [8f08cdd0](https://github.com/gohugoio/hugo/commit/8f08cdd0ac6a2decd5aa5c9c12c0b2c264f9a989) [@bep](https://github.com/bep) [#6821](https://github.com/gohugoio/hugo/issues/6821)
* Update goldmark to v1.1.22 [281abb18](https://github.com/gohugoio/hugo/commit/281abb18ee39fa2b5d4782b64f27cffcbf4e0240) [@bhavin192](https://github.com/bhavin192)
* Make the build flags shared between sites [0df7bd62](https://github.com/gohugoio/hugo/commit/0df7bd62df460a49544845d5332f33b2020b48a1) [@bep](https://github.com/bep) [#6789](https://github.com/gohugoio/hugo/issues/6789)
## Fixes
### Other
* Fix module mount in sub folder [80dd6ddd](https://github.com/gohugoio/hugo/commit/80dd6ddde27ce36f5432fb780e94d4974b5277c7) [@bep](https://github.com/bep) [#6730](https://github.com/gohugoio/hugo/issues/6730)
* Fix config environment handling [2bbc865f](https://github.com/gohugoio/hugo/commit/2bbc865f7bb713b2d0d2dbb02b90ae2621ad5367) [@bep](https://github.com/bep) [#6503](https://github.com/gohugoio/hugo/issues/6503)[#6824](https://github.com/gohugoio/hugo/issues/6824)
* Fix base template handling with preceding comments [f45cb317](https://github.com/gohugoio/hugo/commit/f45cb3172862140883cfa08bd401c17e1ada5b39) [@bep](https://github.com/bep) [#6816](https://github.com/gohugoio/hugo/issues/6816)
* Fix "hugo mod get -u" with no arguments [49ef6472](https://github.com/gohugoio/hugo/commit/49ef6472039ede7d485242eba511207a8274495a) [@bep](https://github.com/bep) [#6826](https://github.com/gohugoio/hugo/issues/6826)[#6825](https://github.com/gohugoio/hugo/issues/6825)
* And now finally fix the 404 templates [74b6c4e5](https://github.com/gohugoio/hugo/commit/74b6c4e5ff5ee16f0e6b352a26c1e58b90a25dc6) [@bep](https://github.com/bep) [#6795](https://github.com/gohugoio/hugo/issues/6795)
* Fix 404 with base template regression [8df5d76e](https://github.com/gohugoio/hugo/commit/8df5d76e708238563185bac84809b34a4d395734) [@bep](https://github.com/bep) [#6795](https://github.com/gohugoio/hugo/issues/6795)
* Fix baseof with regular define regression [f441f675](https://github.com/gohugoio/hugo/commit/f441f675126ef1123d9f94429872dd683b40e011) [@bep](https://github.com/bep) [#6790](https://github.com/gohugoio/hugo/issues/6790)

View file

@ -1,7 +1,7 @@
---
title: Alternative Templating Languages
title: DEPRECATED - Alternative Templating Languages
linktitle: Alternative Templating
description: In addition to Go templates, Hugo supports the powerful Ace templating from @yosssi and Amber templating from @eknkc.
description: DEPRECATED - Support for Ace & Amber templating has been removed in version 0.62
godocref:
date: 2017-02-01
publishdate: 2017-02-01
@ -19,59 +19,4 @@ aliases: [/templates/ace/,/templates/amber/]
toc: true
---
## Ace Templates
For template documentation, follow the links from the [Ace project](https://github.com/yosssi/ace).
* Ace templates must be named with the ace-suffix; e.g., `list.ace`
* It's possible to use both Go templates and Ace templates side by side and even include one into the other
* Full Go template syntax support, including all the useful helper [template functions][]
* Partials can be included both with the Ace and the Go template syntax. For example, the following two will have the same output in Ace:
* `= include partials/foo.html .`
* `{{ partial "foo" . }}`
One noticeable difference between Ace and the other templating engines in Hugo is [Ace's inheritance support through base and inner templates][aceinheritance].
In Hugo, the Ace base template will be chosen with the same rule set as for [Go base templates][].
```
.:
index.ace
./blog:
single.ace
baseof.ace
./_default:
baseof.ace list.ace single.ace single-baseof.ace
```
{{% note %}}
Note that the `html` suffix is needed even if the filename is suffixed `ace`. This does not work from inside a theme ([issue #763](https://github.com/gohugoio/hugo/issues/763)).
{{% /note %}}
Some examples for the layout files above:
* Home page: `./index.ace` + `./_default/baseof.ace`
* Single page in the `blog` section: `./blog/single.ace` + `./blog/baseof.ace`
* Single page in another section: `./_default/single.ace` + `./_default/single-baseof.ace`
* Taxonomy page in any section: `./_default/list.ace` + `./_default/baseof.ace`
{{% note %}}
In most cases, one `baseof.ace` in `_default` will suffice. An Ace template without a reference to a base section (e.g., `= content`) will be handled as a standalone template.
{{% /note %}}
## Amber Templates
For Amber template documentation, follow the links from the [Amber project][].
* Amber templates must be named with the Amber suffix; e.g., `list.amber`
* Partials in Amber or HTML can be included with the Amber template syntax:
* `import ../partials/test.html `
* `import ../partials/test_a.amber `
[aceinheritance]: https://github.com/yosssi/ace/tree/master/examples/base_inner_template
[Amber Project]: https://github.com/eknkc/amber
[template functions]: /functions/
[Go templates]: /templates/introduction/
[Go base templates]: /templates/base/
Support for Amber and Ace templates has been removed since Hugo 0.62 per [issue #6609](https://github.com/gohugoio/hugo/issues/6609).

View file

@ -25,37 +25,9 @@ The `block` keyword allows you to define the outer shell of your pages' one or m
## Base Template Lookup Order
The [lookup order][lookup] for base templates is as follows:
{{< new-in "0.63.0" >}} Since Hugo v0.63, the base template lookup order closely follows that of the template is applies to (e.g. `_default/list.html`).
1. `/layouts/section/<TYPE>-baseof.html`
2. `/themes/<THEME>/layouts/section/<TYPE>-baseof.html`
3. `/layouts/<TYPE>/baseof.html`
4. `/themes/<THEME>/layouts/<TYPE>/baseof.html`
5. `/layouts/section/baseof.html`
6. `/themes/<THEME>/layouts/section/baseof.html`
7. `/layouts/_default/<TYPE>-baseof.html`
8. `/themes/<THEME>/layouts/_default/<TYPE>-baseof.html`
9. `/layouts/_default/baseof.html`
10. `/themes/<THEME>/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 `posts` section. Hugo picks `layout/section/posts.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 `posts` base template:
1. `/layouts/section/posts-baseof.html`
2. `/themes/mytheme/layouts/section/posts-baseof.html`
3. `/layouts/posts/baseof.html`
4. `/themes/mytheme/layouts/posts/baseof.html`
5. `/layouts/section/baseof.html`
6. `/themes/mytheme/layouts/section/baseof.html`
7. `/layouts/_default/posts-baseof.html`
8. `/themes/mytheme/layouts/_default/posts-baseof.html`
9. `/layouts/_default/baseof.html`
10. `/themes/mytheme/layouts/_default/baseof.html`
See [Template Lookup Order](/templates/lookup-order/) for details and examples.
## Define the Base Template

View file

@ -55,37 +55,9 @@ copyright = "This work is licensed under a Creative Commons Attribution-ShareAli
## The Embedded rss.xml
This is the default RSS template that ships with Hugo. It adheres to the [RSS 2.0 Specification][RSS 2.0].
This is the default RSS template that ships with Hugo:
```xml
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range .Pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description>
</item>
{{ end }}
</channel>
</rss>
```
https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml
## Reference your RSS Feed in `<head>`

View file

@ -676,6 +676,12 @@
"wlua"
]
},
{
"Name": "MLIR",
"Aliases": [
"mlir"
]
},
{
"Name": "Mako",
"Aliases": [
@ -1113,6 +1119,14 @@
"squidconf"
]
},
{
"Name": "Standard ML",
"Aliases": [
"fun",
"sig",
"sml"
]
},
{
"Name": "Swift",
"Aliases": [
@ -1133,6 +1147,13 @@
"toml"
]
},
{
"Name": "TableGen",
"Aliases": [
"tablegen",
"td"
]
},
{
"Name": "Tcl",
"Aliases": [
@ -1399,6 +1420,7 @@
},
"parser": {
"autoHeadingID": true,
"autoHeadingIDType": "github",
"attribute": true
},
"extensions": {
@ -1899,6 +1921,22 @@
"layouts/_default/single.html"
]
},
{
"Example": "Base template for single page in \"posts\" section",
"Kind": "page",
"OutputFormat": "HTML",
"Suffix": "html",
"Template Lookup Order": [
"layouts/posts/single-baseof.html.html",
"layouts/posts/baseof.html.html",
"layouts/posts/single-baseof.html",
"layouts/posts/baseof.html",
"layouts/_default/single-baseof.html.html",
"layouts/_default/baseof.html.html",
"layouts/_default/single-baseof.html",
"layouts/_default/baseof.html"
]
},
{
"Example": "Single page in \"posts\" section with layout set",
"Kind": "page",
@ -1915,6 +1953,26 @@
"layouts/_default/single.html"
]
},
{
"Example": "Base template for single page in \"posts\" section with layout set",
"Kind": "page",
"OutputFormat": "HTML",
"Suffix": "html",
"Template Lookup Order": [
"layouts/posts/demolayout-baseof.html.html",
"layouts/posts/single-baseof.html.html",
"layouts/posts/baseof.html.html",
"layouts/posts/demolayout-baseof.html",
"layouts/posts/single-baseof.html",
"layouts/posts/baseof.html",
"layouts/_default/demolayout-baseof.html.html",
"layouts/_default/single-baseof.html.html",
"layouts/_default/baseof.html.html",
"layouts/_default/demolayout-baseof.html",
"layouts/_default/single-baseof.html",
"layouts/_default/baseof.html"
]
},
{
"Example": "AMP single page",
"Kind": "page",
@ -1963,6 +2021,30 @@
"layouts/_default/list.html"
]
},
{
"Example": "Base template for home page",
"Kind": "home",
"OutputFormat": "HTML",
"Suffix": "html",
"Template Lookup Order": [
"layouts/index-baseof.html.html",
"layouts/home-baseof.html.html",
"layouts/list-baseof.html.html",
"layouts/baseof.html.html",
"layouts/index-baseof.html",
"layouts/home-baseof.html",
"layouts/list-baseof.html",
"layouts/baseof.html",
"layouts/_default/index-baseof.html.html",
"layouts/_default/home-baseof.html.html",
"layouts/_default/list-baseof.html.html",
"layouts/_default/baseof.html.html",
"layouts/_default/index-baseof.html",
"layouts/_default/home-baseof.html",
"layouts/_default/list-baseof.html",
"layouts/_default/baseof.html"
]
},
{
"Example": "Home page with type set",
"Kind": "home",
@ -1989,6 +2071,38 @@
"layouts/_default/list.html"
]
},
{
"Example": "Base template for home page with type set",
"Kind": "home",
"OutputFormat": "HTML",
"Suffix": "html",
"Template Lookup Order": [
"layouts/demotype/index-baseof.html.html",
"layouts/demotype/home-baseof.html.html",
"layouts/demotype/list-baseof.html.html",
"layouts/demotype/baseof.html.html",
"layouts/demotype/index-baseof.html",
"layouts/demotype/home-baseof.html",
"layouts/demotype/list-baseof.html",
"layouts/demotype/baseof.html",
"layouts/index-baseof.html.html",
"layouts/home-baseof.html.html",
"layouts/list-baseof.html.html",
"layouts/baseof.html.html",
"layouts/index-baseof.html",
"layouts/home-baseof.html",
"layouts/list-baseof.html",
"layouts/baseof.html",
"layouts/_default/index-baseof.html.html",
"layouts/_default/home-baseof.html.html",
"layouts/_default/list-baseof.html.html",
"layouts/_default/baseof.html.html",
"layouts/_default/index-baseof.html",
"layouts/_default/home-baseof.html",
"layouts/_default/list-baseof.html",
"layouts/_default/baseof.html"
]
},
{
"Example": "Home page with layout set",
"Kind": "home",
@ -2446,10 +2560,10 @@
]
},
"Ge": {
"Description": "Ge returns the boolean truth of arg1 \u003e= arg2.",
"Description": "Ge returns the boolean truth of arg1 \u003e= arg2 \u0026\u0026 arg1 \u003e= arg3 \u0026\u0026 arg1 \u003e= arg4.",
"Args": [
"a",
"b"
"first",
"others"
],
"Aliases": [
"ge"
@ -2462,10 +2576,10 @@
]
},
"Gt": {
"Description": "Gt returns the boolean truth of arg1 \u003e arg2.",
"Description": "Gt returns the boolean truth of arg1 \u003e arg2 \u0026\u0026 arg1 \u003e arg3 \u0026\u0026 arg1 \u003e arg4.",
"Args": [
"a",
"b"
"first",
"others"
],
"Aliases": [
"gt"
@ -2473,10 +2587,10 @@
"Examples": []
},
"Le": {
"Description": "Le returns the boolean truth of arg1 \u003c= arg2.",
"Description": "Le returns the boolean truth of arg1 \u003c= arg2 \u0026\u0026 arg1 \u003c= arg3 \u0026\u0026 arg1 \u003c= arg4.",
"Args": [
"a",
"b"
"first",
"others"
],
"Aliases": [
"le"
@ -2484,10 +2598,10 @@
"Examples": []
},
"Lt": {
"Description": "Lt returns the boolean truth of arg1 \u003c arg2.",
"Description": "Lt returns the boolean truth of arg1 \u003c arg2 \u0026\u0026 arg1 \u003c arg3 \u0026\u0026 arg1 \u003c arg4.",
"Args": [
"a",
"b"
"first",
"others"
],
"Aliases": [
"lt"
@ -2495,10 +2609,10 @@
"Examples": []
},
"Ne": {
"Description": "Ne returns the boolean truth of arg1 != arg2.",
"Description": "Ne returns the boolean truth of arg1 != arg2 \u0026\u0026 arg1 != arg3 \u0026\u0026 arg1 != arg4.",
"Args": [
"x",
"y"
"first",
"others"
],
"Aliases": [
"ne"
@ -2993,7 +3107,7 @@
},
"fmt": {
"Errorf": {
"Description": "Errorf formats according to a format specifier and returns the string as a\nvalue that satisfies error.",
"Description": "Errorf formats according to a format specifier and logs an ERROR.\nIt returns an empty string.",
"Args": [
"format",
"a"
@ -3004,7 +3118,7 @@
"Examples": [
[
"{{ errorf \"%s.\" \"failed\" }}",
"failed."
""
]
]
},

2
go.mod
View file

@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs
go 1.12
require github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d // indirect
require github.com/gohugoio/gohugoioTheme v0.0.0-20200128164921-1d0bc5482051 // indirect

8
go.sum
View file

@ -3,3 +3,11 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b h1:PWNjl46f
github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d h1:D3DcaYkuJbotdWNNAQpQl37txX4HQ6R5uMHoxVmTw0w=
github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
github.com/gohugoio/gohugoioTheme v0.0.0-20200123151337-9475fd449324 h1:UZwHDYtGY0uOKIvcm2LWd+xfFxD3X5L222LIJdI5RE4=
github.com/gohugoio/gohugoioTheme v0.0.0-20200123151337-9475fd449324/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
github.com/gohugoio/gohugoioTheme v0.0.0-20200123204146-589b4c309025 h1:ScYFARz+bHX1rEr1donVknhRdxGY/cwqK1hHvWEfrlc=
github.com/gohugoio/gohugoioTheme v0.0.0-20200123204146-589b4c309025/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
github.com/gohugoio/gohugoioTheme v0.0.0-20200123205007-5d6620a0db26 h1:acXfduibbWxji9tW0WkLHbjcXFsnd5uIwXe0WfwOazg=
github.com/gohugoio/gohugoioTheme v0.0.0-20200123205007-5d6620a0db26/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
github.com/gohugoio/gohugoioTheme v0.0.0-20200128164921-1d0bc5482051 h1:cS14MnUGS6xwWYfPNshimm8HdMCZiYBxWkCD0VnvgVw=
github.com/gohugoio/gohugoioTheme v0.0.0-20200128164921-1d0bc5482051/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=

View file

@ -3,7 +3,7 @@ publish = "public"
command = "hugo --gc --minify"
[context.production.environment]
HUGO_VERSION = "0.62.1"
HUGO_VERSION = "0.64.0"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --gc --minify --enableGitInfo"
[context.split1.environment]
HUGO_VERSION = "0.62.1"
HUGO_VERSION = "0.64.0"
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
HUGO_VERSION = "0.62.1"
HUGO_VERSION = "0.64.0"
[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
HUGO_VERSION = "0.62.1"
HUGO_VERSION = "0.64.0"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB