Merge commit '3c0036805d64fdd8290f1c4a31371780ff3ea365'

This commit is contained in:
Bjørn Erik Pedersen 2020-02-06 13:03:30 +01:00
commit 1e5eb8679e
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
93 changed files with 137 additions and 214 deletions

View file

@ -1,4 +1,3 @@
{{/* {{ define "header" }}{{ partial "page-header" . }}{{ end }} */}}
{{ define "main" }} {{ define "main" }}
{{ $section_to_display := .Pages }} {{ $section_to_display := .Pages }}
<div class="w-100 ph4 pb5 pb6-ns pt1 pt3-ns"> <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" }} {{ define "main" }}
<div class="w-100 ph4 ph5-ns pb5 pb6-ns pt1 pt3-ns "> <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] [social]
twitter = "GoHugoIO" 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 # MARKDOWN
## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday ## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
[blackfriday] [blackfriday]

View file

@ -1,7 +1,5 @@
description = "The worlds fastest framework for building websites" 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.. ## Setting this to true will add a "noindex" to *EVERY* page on the site..
removefromexternalsearch = false removefromexternalsearch = false
## Gh repo for site footer (include trailing slash) ## 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/) * [Static Man](https://staticman.net/)
* [Talkyard](https://www.talkyard.io/blog-comments) (Open source, & serverless hosting) * [Talkyard](https://www.talkyard.io/blog-comments) (Open source, & serverless hosting)
* [txtpen](https://txtpen.github.io/hn/)
* [IntenseDebate](https://intensedebate.com/) * [IntenseDebate](https://intensedebate.com/)
* [Graph Comment][] * [Graph Comment][]
* [Muut](https://muut.com/) * [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) * [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) * [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/ [configuration]: /getting-started/configuration/
[disquspartial]: /templates/partials/#disqus [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" >}} {{< code file="content/posts/old-post.md" >}}
--- ---
title: New Post title: A new post with the filename old-post.md
slug: "new-post" slug: "new-post"
--- ---
{{< /code >}} {{< /code >}}

View file

@ -67,7 +67,7 @@ GetMatch
```go ```go
// Using Match/GetMatch to find this images/sunset.jpg ? // Using Match/GetMatch to find this images/sunset.jpg ?
.Resources.Match "images/sun*" ✅ .Resources.Match "images/sun*" ✅
.Resources.Match "**/Sunset.jpg" ✅ .Resources.Match "**/sunset.jpg" ✅
.Resources.Match "images/*.jpg" ✅ .Resources.Match "images/*.jpg" ✅
.Resources.Match "**.jpg" ✅ .Resources.Match "**.jpg" ✅
.Resources.Match "*" 🚫 .Resources.Match "*" 🚫
@ -78,7 +78,7 @@ GetMatch
## Page Resources Metadata ## 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 %}} {{% note %}}
Resources of type `page` get `Title` etc. from their own front matter. 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. - Every docx in the bundle will receive the `word` icon.
{{% warning %}} {{% 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 %}} {{%/ warning %}}
### The `:counter` placeholder in `name` and `title` ### The `:counter` placeholder in `name` and `title`

View file

@ -32,7 +32,7 @@ Some examples:
{{ $optOrg := dict "markup" "org" }} {{ $optOrg := dict "markup" "org" }}
{{ "**Bold Markdown**" | $p.RenderString }} {{ "**Bold Markdown**" | $p.RenderString }}
{{ "**Bold Block Markdown**" | $p.RenderString $optBlock }} {{ "**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 }} {{ $pages = $pages | lang.Merge .Site.RegularPages }}
{{ end }} {{ 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

@ -125,17 +125,31 @@ Text
PlainText PlainText
: The plain variant of the above. : The plain variant of the above.
A Markdown example for an inline-style link with title: #### Link with title Markdown example :
```md ```md
[Text](https://www.gohugo.io "Title") [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" >}} {{< 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> <a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text }}</a>
{{< /code >}} {{< /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. [^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/ : Hostname (and path) to the root, e.g. https://bep.is/
blackfriday blackfriday
: See [Configure Blackfriday](/getting-started/configuration/#configure-blackfriday) : See [Configure Blackfriday](/getting-started/configuration-markup#blackfriday)
buildDrafts (false) buildDrafts (false)
: Include drafts when building. : 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. 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" >}} {{< code file="install-with-linuxbrew.sh" >}}
brew install hugo brew install hugo
{{< /code >}} {{< /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) ### 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 [highlight shortcode]: /content-management/shortcodes/#highlight
[installgit]: https://git-scm.com/ [installgit]: https://git-scm.com/
[installgo]: https://golang.org/dl/ [installgo]: https://golang.org/dl/
[linuxbrew]: https://linuxbrew.sh/ [linuxbrew]: https://docs.brew.sh/Homebrew-on-Linux
[Path Editor]: https://patheditor2.codeplex.com/ [Path Editor]: https://patheditor2.codeplex.com/
[pygments]: http://pygments.org [pygments]: http://pygments.org
[quickstart]: /getting-started/quick-start/ [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. 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 %}} {{% /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/ [commands]: /commands/
[config]: /getting-started/configuration/ [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. 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/ [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: 5. Once you are happy with the results:
* Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to kill the server * Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to kill the server
* Before proceeding run `rm -rf public` to completely remove the `public` directory * 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 ### Put it Into a Script

View file

@ -9,9 +9,9 @@ images:
--- ---
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.
This is a bug-fix release with a couple of important fixes. 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) * 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) * 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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

View file

@ -1,12 +1,14 @@
--- ---
date: 2020-01-23 date: 2020-01-23
title: "0.63.0" title: "Improved base templates, and faster!"
description: "0.63.0" description: "In Hugo 0.63 we have improved the base template lookup logic, and this simplification also made Hugo faster …"
categories: ["Releases"] categories: ["Releases"]
--- ---
Hugo `0.53` is, in general, **considerably faster and more memory effective** (see the site-building benchmarks below comparing it to `v0.52`). 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! **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 ```bash
name old time/op new time/op delta name old time/op new time/op delta
@ -56,6 +58,7 @@ Hugo now has:
* `.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). * `.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. * 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. * 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 ## Enhancements

View file

@ -8,13 +8,10 @@ images:
- images/blog/hugo-bug-poster.png - images/blog/hugo-bug-poster.png
--- ---
This is a bug-fix release with a couple of important fixes. 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) * 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) * 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

@ -15,6 +15,6 @@ 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) * 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 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

@ -1,12 +1,12 @@
--- ---
date: 2020-02-04 date: 2020-02-04
title: "0.64.0" title: "Mostly bugfixes …"
description: "0.64.0" description: "Hugo 0.64.0 is the version you really really want …"
categories: ["Releases"] 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. 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. 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), Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),

View file

@ -1,7 +1,7 @@
--- ---
title: Alternative Templating Languages title: DEPRECATED - Alternative Templating Languages
linktitle: Alternative Templating 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: godocref:
date: 2017-02-01 date: 2017-02-01
publishdate: 2017-02-01 publishdate: 2017-02-01
@ -19,59 +19,4 @@ aliases: [/templates/ace/,/templates/amber/]
toc: true toc: true
--- ---
## Ace Templates Support for Amber and Ace templates has been removed since Hugo 0.62 per [issue #6609](https://github.com/gohugoio/hugo/issues/6609).
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/

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 ## 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` See [Template Lookup Order](/templates/lookup-order/) for details and examples.
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`
## Define the Base Template ## 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 ## 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 https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.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>
```
## Reference your RSS Feed in `<head>` ## Reference your RSS Feed in `<head>`

View file

@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs
go 1.12 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

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-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 h1:D3DcaYkuJbotdWNNAQpQl37txX4HQ6R5uMHoxVmTw0w=
github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= 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" command = "hugo --gc --minify"
[context.production.environment] [context.production.environment]
HUGO_VERSION = "0.62.1" HUGO_VERSION = "0.64.0"
HUGO_ENV = "production" HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true" HUGO_ENABLEGITINFO = "true"
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --gc --minify --enableGitInfo" command = "hugo --gc --minify --enableGitInfo"
[context.split1.environment] [context.split1.environment]
HUGO_VERSION = "0.62.1" HUGO_VERSION = "0.64.0"
HUGO_ENV = "production" HUGO_ENV = "production"
[context.deploy-preview] [context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL" command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment] [context.deploy-preview.environment]
HUGO_VERSION = "0.62.1" HUGO_VERSION = "0.64.0"
[context.branch-deploy] [context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment] [context.branch-deploy.environment]
HUGO_VERSION = "0.62.1" HUGO_VERSION = "0.64.0"
[context.next.environment] [context.next.environment]
HUGO_ENABLEGITINFO = "true" HUGO_ENABLEGITINFO = "true"

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB