mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Squashed 'docs/' changes from 50c02516c..0c3c04fd6
0c3c04fd6 Merge pull request #827 from BCNelson/range-patch b14dd3505 Updated link to Go Docs to more helpful page c3d83149a Boolean Values in the Where Function 56d4cea3c hugo-extended no longer the default e9b15c698 Update index.md 11de98e0d Release 0.55.6 d2def17f4 Merge branch 'release-0.55.6' 115457b70 releaser: Add release notes to /docs for release of 0.55.6 25855690d Fix misspelling fc5e43db2 Update 404.md with Netlify Instructions 9f684318f Removed mentioning of removed --stepAnalysis command line option 86ba9071c Related md5 and aliases for sha1/sha256 15f48966a Added related sha function into the See Also 5e08b6930 Fix date description 908e87ab2 Revert docs/config.toml changes c925646cf Add a "deploy" command e765084dd Update sectionvars.md e08be4d81 Update sectionvars.md 7c9653cbe Hugo 0.55.5 1035ff028 releaser: Add release notes to /docs for release of 0.55.5 cda21f9d4 docs: Regenerate docs helper git-subtree-dir: docs git-subtree-split: 0c3c04fd63a7f140bdca0d3ca9b1e9dc794ebd77
This commit is contained in:
parent
f147b5c53e
commit
be04ece859
15 changed files with 146 additions and 56 deletions
|
@ -61,7 +61,7 @@ audio
|
|||
: an array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`.
|
||||
|
||||
date
|
||||
: the datetime at which the content was created; note this value is auto-populated according to Hugo's built-in [archetype][].
|
||||
: the datetime assigned to this page. This is usually fetched from the `date` field in front matter, but this behaviour is configurable.
|
||||
|
||||
description
|
||||
: the description for the content.
|
||||
|
|
|
@ -14,7 +14,7 @@ keywords: []
|
|||
signature: ["md5 INPUT"]
|
||||
workson: []
|
||||
hugoversion:
|
||||
relatedfuncs: []
|
||||
relatedfuncs: [sha]
|
||||
deprecated: false
|
||||
aliases: []
|
||||
---
|
||||
|
|
|
@ -14,9 +14,9 @@ keywords: [sha,checksum]
|
|||
signature: ["sha1 INPUT", "sha256 INPUT"]
|
||||
workson: []
|
||||
hugoversion:
|
||||
relatedfuncs: []
|
||||
relatedfuncs: [md5]
|
||||
deprecated: false
|
||||
aliases: []
|
||||
aliases: [sha1, sha256]
|
||||
---
|
||||
|
||||
`sha1` hashes the given input and returns its SHA1 checksum.
|
||||
|
|
|
@ -83,6 +83,15 @@ The following logical operators are available with `where`:
|
|||
`intersect`
|
||||
: `true` if a given field value that is a slice/array of strings or integers contains elements in common with the matching value; it follows the same rules as the [`intersect` function][intersect].
|
||||
|
||||
## Use `where` with `Booleans`
|
||||
When using booleans you should not put quotation marks.
|
||||
```go-html-template
|
||||
{{range where .Pages ".Draft" true}}
|
||||
<p>{{.Title}}</p>
|
||||
{{end}}
|
||||
```
|
||||
|
||||
|
||||
## Use `where` with `intersect`
|
||||
|
||||
```go-html-template
|
||||
|
@ -122,7 +131,7 @@ then ranges through only the first 5 posts in that list:
|
|||
You can also nest `where` clauses to drill down on lists of content by more than one parameter. The following first grabs all pages in the "blog" section and then ranges through the result of the first `where` clause and finds all pages that are *not* featured:
|
||||
|
||||
```go-html-template
|
||||
{{ range where (where .Pages "Section" "blog" ) ".Params.featured" "!=" "true" }}
|
||||
{{ range where (where .Pages "Section" "blog" ) ".Params.featured" "!=" true }}
|
||||
```
|
||||
|
||||
## Unset Fields
|
||||
|
|
|
@ -247,9 +247,6 @@ sitemap
|
|||
staticDir ("static")
|
||||
: A directory or a list of directories from where Hugo reads [static files][static-files].
|
||||
|
||||
stepAnalysis (false)
|
||||
: Display memory and timing of different steps of the program.
|
||||
|
||||
summaryLength (70)
|
||||
: The length of text in words to show in a [`.Summary`](/content-management/summaries/#hugo-defined-automatic-summary-splitting).
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
---
|
||||
date: 2019-04-20
|
||||
title: "Hugo 0.55.3: A Few More Bug Fixes!"
|
||||
description: "To wrap up this Eeaster, here is one more patch release with some important fixes."
|
||||
description: "To wrap up this Easter, here is one more patch release with some important fixes."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
|
56
content/en/news/0.55.5-relnotes/index.md
Normal file
56
content/en/news/0.55.5-relnotes/index.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
|
||||
---
|
||||
date: 2019-05-02
|
||||
title: "Hugo 0.55.5: Take Five!"
|
||||
description: "We round up this 0.55 release with a final batch of bug fixes!"
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
This is a bug-fix release with a couple of important fixes.
|
||||
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 34743+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 439+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 314+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Provide more detailed errors in Where [f76e5011](https://github.com/gohugoio/hugo/commit/f76e50118b8b5dd8989d068db35222bfa0a242d8) [@moorereason](https://github.com/moorereason)
|
||||
|
||||
### Other
|
||||
|
||||
* Regenerate docs helper [cee181c3](https://github.com/gohugoio/hugo/commit/cee181c3a67fe04b8e0c9f2807c5aa2871df474e) [@bep](https://github.com/bep)
|
||||
* Update blackfriday to v1.5.2 [1cbb501b](https://github.com/gohugoio/hugo/commit/1cbb501be8aa83b08865fbb6ad5aee254946712f) [@dbirks](https://github.com/dbirks)
|
||||
|
||||
## Fixes
|
||||
|
||||
### Templates
|
||||
|
||||
* Fix nil compare in eq/ne for interface values [66b143a0](https://github.com/gohugoio/hugo/commit/66b143a01d1c192619839b732ce188923ab15d60) [@bep](https://github.com/bep) [#5905](https://github.com/gohugoio/hugo/issues/5905)
|
||||
* Fix hugo package name and add godocs [4f93f8c6](https://github.com/gohugoio/hugo/commit/4f93f8c670b26258dc7e3a613c38dbc86d8eda76) [@moorereason](https://github.com/moorereason)
|
||||
|
||||
### Output
|
||||
|
||||
* Fix permalink in sitemap etc. when multiple permalinkable output formats [6b76841b](https://github.com/gohugoio/hugo/commit/6b76841b052b97625b8995f326d758b89f5c2349) [@bep](https://github.com/bep) [#5910](https://github.com/gohugoio/hugo/issues/5910)
|
||||
|
||||
### Core
|
||||
|
||||
* Fix PrevInSection/NextInSection for nested sections [bcbed4eb](https://github.com/gohugoio/hugo/commit/bcbed4ebdaf55b67abc521d69bba456c041a7e7d) [@bep](https://github.com/bep) [#5883](https://github.com/gohugoio/hugo/issues/5883)
|
||||
|
||||
### Other
|
||||
|
||||
* Fix concurrent initialization order [009076e5](https://github.com/gohugoio/hugo/commit/009076e5ee88fc46c95a9afd34f82f9386aa282a) [@bep](https://github.com/bep) [#5901](https://github.com/gohugoio/hugo/issues/5901)
|
||||
|
||||
|
||||
|
||||
|
||||
|
13
content/en/news/0.55.6-relnotes/index.md
Normal file
13
content/en/news/0.55.6-relnotes/index.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
---
|
||||
date: 2019-05-18
|
||||
title: "Hugo 0.55.6: One Bug Fix!"
|
||||
description: "Fixes some reported paginator crashes in server mode."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
||||
---
|
||||
|
||||
This is a bug-fix release with one important fix. There have been reports about infrequent paginator crashes when running the Hugo server since 0.55.0. The reason have been narrowed down to that of parallel rebuilds. This isn't a new thing, but the changes in 0.55.0 made it extra important to serialize the page initialization. This release fixes that by protecting the `Build` method with a lock when running in server mode. [95ce2a40](https://github.com/gohugoio/hugo/commit/95ce2a40e734bb82b69f9a64270faf3ed69c92cc) [@bep](https://github.com/bep) [#5885](https://github.com/gohugoio/hugo/issues/5885)[#5968](https://github.com/gohugoio/hugo/issues/5968)
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
.CurrentSection
|
||||
: The page's current section. The value can be the page itself if it is a section or the homepage.
|
||||
|
||||
.FirstSection
|
||||
: The page's first section below root, e.g. `/docs`, `/blog` etc.
|
||||
|
||||
.InSection $anotherPage
|
||||
: Whether the given page is in the current section. Note that this will always return false for pages that are not either regular, home or section pages.
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ Your 404.html file can be set to load automatically when a visitor enters a mist
|
|||
* Amazon AWS S3. When setting a bucket up for static web serving, you can specify the error file from within the S3 GUI.
|
||||
* Amazon CloudFont. You can specify the page in the Error Pages section in the CloudFont Console. [Details here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
|
||||
* Caddy Server. Using `errors { 404 /404.html }`. [Details here](https://caddyserver.com/docs/errors)
|
||||
* Netlify. Add `/* /404.html 404` to `content/_redirects`. [Details Here](https://www.netlify.com/docs/redirects/#custom-404)
|
||||
|
||||
{{% note %}}
|
||||
`hugo server` will not automatically load your custom `404.html` file, but you
|
||||
|
|
|
@ -20,7 +20,7 @@ toc: true
|
|||
---
|
||||
|
||||
{{% note %}}
|
||||
The following is only a primer on Go Templates. For an in-depth look into Go Templates, check the official [Go docs](http://golang.org/pkg/html/template/).
|
||||
The following is only a primer on Go Templates. For an in-depth look into Go Templates, check the official [Go docs](https://golang.org/pkg/text/template/).
|
||||
{{% /note %}}
|
||||
|
||||
Go Templates provide an extremely simple template language that adheres to the belief that only the most basic of logic belongs in the template or view layer.
|
||||
|
@ -233,6 +233,18 @@ key.
|
|||
{{ end }}
|
||||
```
|
||||
|
||||
#### Example 5: Conditional on empty _map_, _array_, or _slice_.
|
||||
|
||||
If the _map_, _array_, or _slice_ passed into the range is zero-length then the else statment is evaluated.
|
||||
|
||||
```go-html-template
|
||||
{{ range $array }}
|
||||
{{ . }}
|
||||
{{else}}
|
||||
<!-- This is only evaluated if $array is empty -->
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
### Conditionals
|
||||
|
||||
`if`, `else`, `with`, `or`, and `and` provide the framework for handling conditional logic in Go Templates. Like `range`, each statement is closed with an `{{ end }}`.
|
||||
|
|
|
@ -98,14 +98,4 @@ parameters to `partialCached` beyond the initial context. See the
|
|||
{{% /tip %}}
|
||||
|
||||
|
||||
## Step Analysis
|
||||
|
||||
Hugo provides a means of seeing metrics about each step in the site build
|
||||
process. We call that *Step Analysis*. The *step analysis* output shows the
|
||||
total time per step, the cumulative time after each step (in parentheses),
|
||||
the memory usage per step, and the total memory allocations per step.
|
||||
|
||||
To enable *step analysis*, use the `--stepAnalysis` option when running Hugo.
|
||||
|
||||
|
||||
[partialCached]:{{< ref "/functions/partialCached.md" >}}
|
||||
|
|
|
@ -51,6 +51,6 @@ If you process `SCSS` or `SASS` to `CSS` in your Hugo project, you need the Hugo
|
|||
error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
|
||||
```
|
||||
|
||||
We release two set of binaries for technical reasons. The extended is what you get by default, as an example, when you run `brew install hugo` on `macOS`. On the [release page](https://github.com/gohugoio/hugo/releases), look for archives with `extended` in the name.
|
||||
We release two set of binaries for technical reasons. The extended is not what you get by default, as an example, when you run `brew install hugo` on `macOS`. On the [release page](https://github.com/gohugoio/hugo/releases), look for archives with `extended` in the name. To build `hugo-extended`, use `go install --tags extended`
|
||||
|
||||
To confirm, run `hugo version` and look for the word `extended`.
|
||||
|
|
|
@ -1498,6 +1498,30 @@
|
|||
},
|
||||
"output": {
|
||||
"formats": [
|
||||
{
|
||||
"MediaType": "text/html",
|
||||
"name": "HTML",
|
||||
"mediaType": {
|
||||
"type": "text/html",
|
||||
"string": "text/html",
|
||||
"mainType": "text",
|
||||
"subType": "html",
|
||||
"delimiter": ".",
|
||||
"suffixes": [
|
||||
"html"
|
||||
]
|
||||
},
|
||||
"path": "",
|
||||
"baseName": "index",
|
||||
"rel": "canonical",
|
||||
"protocol": "",
|
||||
"isPlainText": false,
|
||||
"isHTML": true,
|
||||
"noUgly": false,
|
||||
"notAlternative": false,
|
||||
"permalinkable": true,
|
||||
"weight": 10
|
||||
},
|
||||
{
|
||||
"MediaType": "text/html",
|
||||
"name": "AMP",
|
||||
|
@ -1519,7 +1543,8 @@
|
|||
"isHTML": true,
|
||||
"noUgly": false,
|
||||
"notAlternative": false,
|
||||
"permalinkable": true
|
||||
"permalinkable": true,
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"MediaType": "text/css",
|
||||
|
@ -1542,7 +1567,8 @@
|
|||
"isHTML": false,
|
||||
"noUgly": false,
|
||||
"notAlternative": true,
|
||||
"permalinkable": false
|
||||
"permalinkable": false,
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"MediaType": "text/csv",
|
||||
|
@ -1565,7 +1591,8 @@
|
|||
"isHTML": false,
|
||||
"noUgly": false,
|
||||
"notAlternative": false,
|
||||
"permalinkable": false
|
||||
"permalinkable": false,
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"MediaType": "text/calendar",
|
||||
|
@ -1588,30 +1615,8 @@
|
|||
"isHTML": false,
|
||||
"noUgly": false,
|
||||
"notAlternative": false,
|
||||
"permalinkable": false
|
||||
},
|
||||
{
|
||||
"MediaType": "text/html",
|
||||
"name": "HTML",
|
||||
"mediaType": {
|
||||
"type": "text/html",
|
||||
"string": "text/html",
|
||||
"mainType": "text",
|
||||
"subType": "html",
|
||||
"delimiter": ".",
|
||||
"suffixes": [
|
||||
"html"
|
||||
]
|
||||
},
|
||||
"path": "",
|
||||
"baseName": "index",
|
||||
"rel": "canonical",
|
||||
"protocol": "",
|
||||
"isPlainText": false,
|
||||
"isHTML": true,
|
||||
"noUgly": false,
|
||||
"notAlternative": false,
|
||||
"permalinkable": true
|
||||
"permalinkable": false,
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"MediaType": "application/json",
|
||||
|
@ -1634,7 +1639,8 @@
|
|||
"isHTML": false,
|
||||
"noUgly": false,
|
||||
"notAlternative": false,
|
||||
"permalinkable": false
|
||||
"permalinkable": false,
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"MediaType": "text/plain",
|
||||
|
@ -1657,7 +1663,8 @@
|
|||
"isHTML": false,
|
||||
"noUgly": false,
|
||||
"notAlternative": false,
|
||||
"permalinkable": false
|
||||
"permalinkable": false,
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"MediaType": "application/rss+xml",
|
||||
|
@ -1680,7 +1687,8 @@
|
|||
"isHTML": false,
|
||||
"noUgly": true,
|
||||
"notAlternative": false,
|
||||
"permalinkable": false
|
||||
"permalinkable": false,
|
||||
"weight": 0
|
||||
},
|
||||
{
|
||||
"MediaType": "application/xml",
|
||||
|
@ -1703,7 +1711,8 @@
|
|||
"isHTML": false,
|
||||
"noUgly": true,
|
||||
"notAlternative": false,
|
||||
"permalinkable": false
|
||||
"permalinkable": false,
|
||||
"weight": 0
|
||||
}
|
||||
],
|
||||
"layouts": [
|
||||
|
|
|
@ -3,7 +3,7 @@ publish = "public"
|
|||
command = "hugo --gc --minify"
|
||||
|
||||
[context.production.environment]
|
||||
HUGO_VERSION = "0.55.4"
|
||||
HUGO_VERSION = "0.55.6"
|
||||
HUGO_ENV = "production"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
||||
|
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
|
|||
command = "hugo --gc --minify --enableGitInfo"
|
||||
|
||||
[context.split1.environment]
|
||||
HUGO_VERSION = "0.55.4"
|
||||
HUGO_VERSION = "0.55.6"
|
||||
HUGO_ENV = "production"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.deploy-preview.environment]
|
||||
HUGO_VERSION = "0.55.4"
|
||||
HUGO_VERSION = "0.55.6"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.branch-deploy.environment]
|
||||
HUGO_VERSION = "0.55.4"
|
||||
HUGO_VERSION = "0.55.6"
|
||||
|
||||
[context.next.environment]
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
|
Loading…
Reference in a new issue