mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Merge commit '77b976dd92b4f66657d83d875aef0c617df492d9'
This commit is contained in:
commit
db45dbbee8
302 changed files with 1289 additions and 19021 deletions
|
@ -12,6 +12,18 @@
|
|||
color: white;
|
||||
}
|
||||
|
||||
.prose-glossary h3 {
|
||||
margin-top: 0;
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
.prose-glossary h3:first-of-type {
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
.prose-glossary h3 ~ p {
|
||||
margin: 0.5em 0 2em 0;
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
|
|
|
@ -804,6 +804,8 @@ img { max-width: 100%; }
|
|||
.b--washed-red { border-color: #ffdfdf; }
|
||||
.b--transparent { border-color: transparent; }
|
||||
.b--inherit { border-color: inherit; }
|
||||
.b--initial { border-color: currentColor; border-color: initial; }
|
||||
.b--unset { border-color: unset; }
|
||||
/*
|
||||
|
||||
BORDER RADIUS
|
||||
|
@ -852,6 +854,9 @@ img { max-width: 100%; }
|
|||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.br-inherit { border-radius: inherit; }
|
||||
.br-initial { border-radius: 0; border-radius: initial; }
|
||||
.br-unset { border-radius: unset; }
|
||||
@media screen and (min-width: 30em) {
|
||||
.br0-ns { border-radius: 0; }
|
||||
.br1-ns { border-radius: .125rem; }
|
||||
|
@ -876,6 +881,9 @@ img { max-width: 100%; }
|
|||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.br-inherit-ns { border-radius: inherit; }
|
||||
.br-initial-ns { border-radius: 0; border-radius: initial; }
|
||||
.br-unset-ns { border-radius: unset; }
|
||||
}
|
||||
@media screen and (min-width: 30em) and (max-width: 60em) {
|
||||
.br0-m { border-radius: 0; }
|
||||
|
@ -901,6 +909,9 @@ img { max-width: 100%; }
|
|||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.br-inherit-m { border-radius: inherit; }
|
||||
.br-initial-m { border-radius: 0; border-radius: initial; }
|
||||
.br-unset-m { border-radius: unset; }
|
||||
}
|
||||
@media screen and (min-width: 60em) {
|
||||
.br0-l { border-radius: 0; }
|
||||
|
@ -926,6 +937,9 @@ img { max-width: 100%; }
|
|||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.br-inherit-l { border-radius: inherit; }
|
||||
.br-initial-l { border-radius: 0; border-radius: initial; }
|
||||
.br-unset-l { border-radius: unset; }
|
||||
}
|
||||
/*
|
||||
|
||||
|
@ -2367,6 +2381,7 @@ img { max-width: 100%; }
|
|||
.washed-yellow { color: #fffceb; }
|
||||
.washed-red { color: #ffdfdf; }
|
||||
.color-inherit { color: inherit; }
|
||||
/* Background colors */
|
||||
.bg-black-90 { background-color: rgba(0, 0, 0, .9); }
|
||||
.bg-black-80 { background-color: rgba(0, 0, 0, .8); }
|
||||
.bg-black-70 { background-color: rgba(0, 0, 0, .7); }
|
||||
|
@ -2386,7 +2401,6 @@ img { max-width: 100%; }
|
|||
.bg-white-30 { background-color: rgba(255, 255, 255, .3); }
|
||||
.bg-white-20 { background-color: rgba(255, 255, 255, .2); }
|
||||
.bg-white-10 { background-color: rgba(255, 255, 255, .1); }
|
||||
/* Background colors */
|
||||
.bg-black { background-color: #000; }
|
||||
.bg-near-black { background-color: #111; }
|
||||
.bg-dark-gray { background-color: #333; }
|
||||
|
@ -4671,6 +4685,7 @@ h6:hover .header-link {
|
|||
.searchbox__input::-webkit-input-placeholder{color:#aaa}
|
||||
.searchbox__input:-ms-input-placeholder{color:#aaa}
|
||||
.searchbox__input::-ms-input-placeholder{color:#aaa}
|
||||
.searchbox__input::-moz-placeholder{color:#aaa}
|
||||
.searchbox__input::placeholder{color:#aaa}
|
||||
.searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69, 142, 225, 0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;right:inherit;left:0}
|
||||
.searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""}
|
||||
|
@ -4904,14 +4919,14 @@ pre {
|
|||
text-decoration: none;
|
||||
|
||||
}
|
||||
.column-count-2 {-webkit-column-count: 1;column-count: 1}
|
||||
.column-gap-1 {-webkit-column-gap: 0;column-gap: 0}
|
||||
.break-inside-avoid {-webkit-column-break-inside: auto;break-inside: auto}
|
||||
.column-count-2 {-webkit-column-count: 1;-moz-column-count: 1;column-count: 1}
|
||||
.column-gap-1 {-webkit-column-gap: 0;-moz-column-gap: 0;column-gap: 0}
|
||||
.break-inside-avoid {-webkit-column-break-inside: auto;page-break-inside: auto;break-inside: auto}
|
||||
@media screen and (min-width: 60em) {
|
||||
.column-count-3-l {-webkit-column-count: 3;column-count: 3}
|
||||
.column-count-2-l {-webkit-column-count: 2;column-count: 2}
|
||||
.column-gap-1-l {-webkit-column-gap: 1;column-gap: 1}
|
||||
.break-inside-avoid-l {-webkit-column-break-inside: avoid;break-inside: avoid}
|
||||
.column-count-3-l {-webkit-column-count: 3;-moz-column-count: 3;column-count: 3}
|
||||
.column-count-2-l {-webkit-column-count: 2;-moz-column-count: 2;column-count: 2}
|
||||
.column-gap-1-l {-webkit-column-gap: 1;-moz-column-gap: 1;column-gap: 1}
|
||||
.break-inside-avoid-l {-webkit-column-break-inside: avoid;page-break-inside: avoid;break-inside: avoid}
|
||||
}
|
||||
.prose ul, .prose ol {
|
||||
margin-bottom: 2em;
|
||||
|
@ -4922,10 +4937,24 @@ pre {
|
|||
.prose li:hover {
|
||||
background-color: #eee
|
||||
}
|
||||
.prose ::-moz-selection {
|
||||
background: #0594CB; /* WebKit/Blink Browsers */
|
||||
color: white;
|
||||
}
|
||||
.prose ::selection {
|
||||
background: #0594CB; /* WebKit/Blink Browsers */
|
||||
color: white;
|
||||
}
|
||||
.prose-glossary h3 {
|
||||
margin-top: 0;
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
.prose-glossary h3:first-of-type {
|
||||
margin-top: 3em;
|
||||
}
|
||||
.prose-glossary h3 ~ p {
|
||||
margin: 0.5em 0 2em 0;
|
||||
}
|
||||
body {
|
||||
|
||||
line-height: 1.45;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -31,7 +31,7 @@
|
|||
<img src="{{ . }}" alt="Featured Image for {{ $.Title }}" class="mw-100">
|
||||
{{ end }}
|
||||
|
||||
<div class="prose" id="prose">
|
||||
<div class="prose prose-{{ .Type }}" id="prose">
|
||||
{{- partial "docs/functions-signature.html" . -}}
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
|
|
@ -1 +1 @@
|
|||
# github.com/gohugoio/gohugoioTheme v0.0.0-20230630055807-9874cd863bc5
|
||||
# github.com/gohugoio/gohugoioTheme v0.0.0-20230812102551-06f8256e7ee5
|
||||
|
|
|
@ -8,8 +8,6 @@ ghrepo = "https://github.com/gohugoio/hugoDocs/"
|
|||
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
|
||||
|
@ -20,4 +18,4 @@ 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"
|
||||
#sidebar_direction = "sidebar_left"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Archetypes
|
||||
description: Archetypes are templates used when creating new content.
|
||||
description: An archetype is a template for new content.
|
||||
keywords: [archetypes,generators,metadata,front matter]
|
||||
categories: [content management]
|
||||
menu:
|
||||
|
@ -13,78 +13,173 @@ weight: 140
|
|||
aliases: [/content/archetypes/]
|
||||
---
|
||||
|
||||
## What are archetypes?
|
||||
## Overview
|
||||
|
||||
**Archetypes** are content template files in the [archetypes directory] of your project that contain preconfigured [front matter] and possibly also a content disposition for your website's [content types]. These will be used when you run `hugo new`.
|
||||
A content file consists of [front matter] and markup. The markup is typically markdown, but Hugo also supports other [content formats]. Front matter can be TOML, YAML, or JSON.
|
||||
|
||||
The `hugo new content` command creates a new file in the `content` directory, using an archetype as a template. This is the default archetype:
|
||||
|
||||
The `hugo new` uses the `content-section` to find the most suitable archetype template in your project. If your project does not contain any archetype files, it will also look in the theme.
|
||||
{{< code-toggle file="archetypes/default.md" copy=false fm=true >}}
|
||||
title = '{{ replace .File.ContentBaseName `-` ` ` | title }}'
|
||||
date = '{{ .Date }}'
|
||||
draft = true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
{{< code file="archetype-example.sh" >}}
|
||||
hugo new posts/my-first-post.md
|
||||
{{< /code >}}
|
||||
When you create new content, Hugo evaluates the [template actions] within the archetype. For example:
|
||||
|
||||
The above will create a new content file in `content/posts/my-first-post.md` using the first archetype file found of these:
|
||||
|
||||
1. `archetypes/posts.md`
|
||||
2. `archetypes/default.md`
|
||||
3. `themes/my-theme/archetypes/posts.md`
|
||||
4. `themes/my-theme/archetypes/default.md`
|
||||
|
||||
The last two list items are only applicable if you use a theme and it uses the `my-theme` theme name as an example.
|
||||
|
||||
## Create a new archetype template
|
||||
|
||||
A fictional example for the section `newsletter` and the archetype file `archetypes/newsletter.md`. Create a new file in `archetypes/newsletter.md` and open it in a text editor.
|
||||
|
||||
{{< code file="archetypes/newsletter.md" >}}
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
|
||||
**Insert Lead paragraph here.**
|
||||
|
||||
## New cool posts
|
||||
|
||||
{{ range first 10 ( where .Site.RegularPages "Type" "cool" ) }}
|
||||
* {{ .Title }}
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
|
||||
When you create a new newsletter with:
|
||||
|
||||
```bash
|
||||
hugo new newsletter/the-latest-cool.stuff.md
|
||||
```text
|
||||
hugo new content posts/my-first-post.md
|
||||
```
|
||||
|
||||
It will create a new newsletter type of content file based on the archetype template.
|
||||
With the default archetype shown above, Hugo creates this content file:
|
||||
|
||||
**Note:** the site will only be built if the `.Site` is in use in the archetype file, and this can be time consuming for big sites.
|
||||
{{< code-toggle file="content/posts/my-first-post.md" copy=false fm=true >}}
|
||||
title = 'My First Post'
|
||||
date = '2023-08-24T11:49:46-07:00'
|
||||
draft = true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
The above _newsletter type archetype_ illustrates the possibilities: The full Hugo `.Site` and all of Hugo's template funcs can be used in the archetype file.
|
||||
You can create an archetype for one or more [content types]. For example, use one archetype for posts, and use the default archetype for everything else:
|
||||
|
||||
## Directory based archetypes
|
||||
|
||||
Since Hugo `0.49` you can use complete directories as archetype templates. Given this archetype directory:
|
||||
|
||||
```bash
|
||||
archetypes
|
||||
```text
|
||||
archetypes/
|
||||
├── default.md
|
||||
└── post-bundle
|
||||
├── bio.md
|
||||
├── images
|
||||
│ └── featured.jpg
|
||||
└── index.md
|
||||
└── posts.md
|
||||
```
|
||||
|
||||
```bash
|
||||
hugo new --kind post-bundle posts/my-post
|
||||
## Lookup order
|
||||
|
||||
Hugo looks for archetypes in the `archetypes` directory in the root of your project, falling back to the `archetypes` directory in themes or installed modules. An archetype for a specific content type takes precedence over the default archetype.
|
||||
|
||||
For example, with this command:
|
||||
|
||||
```text
|
||||
hugo new content posts/my-first-post.md
|
||||
```
|
||||
|
||||
Will create a new folder in `/content/posts/my-post` with the same set of files as in the `post-bundle` archetypes folder. All content files (`index.md` etc.) can contain template logic, and will receive the correct `.Site` for the content's language.
|
||||
The archetype lookup order is:
|
||||
|
||||
[archetypes directory]: /getting-started/directory-structure/
|
||||
[content types]: /content-management/types/
|
||||
[front matter]: /content-management/front-matter/
|
||||
1. archetypes/posts.md
|
||||
1. archetypes/default.md
|
||||
1. themes/my-theme/archetypes/posts.md
|
||||
1. themes/my-theme/archetypes/default.md
|
||||
|
||||
If none of these exists, Hugo uses a built-in default archetype.
|
||||
|
||||
## Functions and context
|
||||
|
||||
You can use any [template function] within an archetype. As shown above, the default archetype uses the [`replace`](/functions/replace/) function to replace hyphens with spaces when populating the title in front matter.
|
||||
|
||||
Archetypes receive the following objects and values in [context]:
|
||||
|
||||
- `.Date`
|
||||
- `.Type`
|
||||
- `.Site` (see [details](/variables/site/))
|
||||
- `.File` (see [details](/variables/files/))
|
||||
|
||||
As shown above, the default archetype passes `.File.ContentBaseName` as the argument to the `replace` function when populating the title in front matter.
|
||||
|
||||
## Include content
|
||||
|
||||
Although typically used as a front matter template, you can also use an archetype to populate content.
|
||||
|
||||
For example, in a documentation site you might have a section (content type) for functions. Every page within this section should follow the same format: a brief description, the function signature, examples, and notes. We can pre-populate the page to remind content authors of the standard format.
|
||||
|
||||
|
||||
{{< code file="archetypes/functions.md" copy=false >}}
|
||||
---
|
||||
date: '{{ .Date }}'
|
||||
draft: true
|
||||
title: '{{ replace .File.ContentBaseName `-` ` ` | title }}'
|
||||
---
|
||||
|
||||
A brief description of what the function does, using simple present tense in the third person singular form. For example:
|
||||
|
||||
`someFunction` returns the string `s` repeated `n` times.
|
||||
|
||||
## Signature
|
||||
|
||||
```text
|
||||
func someFunction(s string, n int) string
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
One or more practical examples, each within a fenced code block.
|
||||
|
||||
## Notes
|
||||
|
||||
Additional information to clarify as needed.
|
||||
{{< /code >}}
|
||||
|
||||
Although you can include [template actions] within the content body, remember that Hugo evaluates these once---at the time of content creation. In most cases, place template actions in a [template] where Hugo evaluates the actions every time you [build](/getting-started/glossary/#build) the site.
|
||||
|
||||
## Leaf bundles
|
||||
|
||||
You can also create archetypes for [leaf bundles](/getting-started/glossary/#leaf-bundle).
|
||||
|
||||
For example, in a photography site you might have a section (content type) for galleries. Each gallery is leaf bundle with content and images.
|
||||
|
||||
Create an archetype for galleries:
|
||||
|
||||
```text
|
||||
archetypes/
|
||||
├── galleries/
|
||||
│ ├── images/
|
||||
│ │ └── .gitkeep
|
||||
│ └── index.md <-- same format as default.md
|
||||
└── default.md
|
||||
```
|
||||
|
||||
Subdirectories within an archetype must contain at least one file. Without a file, Hugo will not create the subdirectory when you create new content. The name and size of the file are irrelevant. The example above includes a `.gitkeep` file, an empty file commonly used to preserve otherwise empty directories in a Git repository.
|
||||
|
||||
|
||||
To create a new gallery:
|
||||
```text
|
||||
hugo new galleries/bryce-canyon
|
||||
```
|
||||
|
||||
This produces:
|
||||
|
||||
```text
|
||||
content/
|
||||
├── galleries/
|
||||
│ └── bryce-canyon/
|
||||
│ ├── images/
|
||||
│ │ └── .gitkeep
|
||||
│ └── index.md
|
||||
└── _index.md
|
||||
```
|
||||
|
||||
## Use alternate archetype
|
||||
|
||||
Use the `--kind` command line flag to specify an alternate archetype when creating content.
|
||||
|
||||
For example, let's say your site has two sections: articles and tutorials. Create an archetype for each content type:
|
||||
|
||||
```text
|
||||
archetypes/
|
||||
├── articles.md
|
||||
├── default.md
|
||||
└── tutorials.md
|
||||
```
|
||||
|
||||
To create an article using the articles archetype:
|
||||
|
||||
```text
|
||||
hugo new content articles/something.md
|
||||
```
|
||||
|
||||
To create an article using the tutorials archetype:
|
||||
|
||||
```text
|
||||
hugo new content --kind tutorials articles/something.md
|
||||
```
|
||||
|
||||
[content formats]: /getting-started/glossary/#content-format
|
||||
[content types]: /getting-started/glossary/#content-type
|
||||
[context]: /getting-started/glossary/#context
|
||||
[front matter]: /getting-started/glossary/#front-matter
|
||||
[template actions]: /getting-started/glossary/#template-action
|
||||
[template]: /getting-started/glossary/#template
|
||||
[template function]: /getting-started/glossary/#function
|
||||
|
|
|
@ -65,7 +65,7 @@ Parameter | Comment
|
|||
--- | ---
|
||||
backend | Don't change this unless you know what you are doing.
|
||||
doctype | Currently, the only document type supported in Hugo is `article`.
|
||||
extensions | Possible extensions are `asciidoctor-html5s`, `asciidoctor-bibtex`, `asciidoctor-diagram`, `asciidoctor-interdoc-reftext`, `asciidoctor-katex`, `asciidoctor-latex`, `asciidoctor-mathematical`, `asciidoctor-question`, `asciidoctor-rouge`.
|
||||
extensions | Possible extensions are `asciidoctor-html5s`, `asciidoctor-bibtex`, `asciidoctor-diagram`, `asciidoctor-interdoc-reftext`, `asciidoctor-katex`, `asciidoctor-latex`, `asciidoctor-mathematical`, `asciidoctor-question`.
|
||||
attributes | Variables to be referenced in your AsciiDoc file. This is a list of variable name/value maps. See [Asciidoctor's attributes](https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#attributes-and-substitutions).
|
||||
noHeaderOrFooter | Output an embeddable document, which excludes the header, the footer, and everything outside the body of the document. Don't change this unless you know what you are doing.
|
||||
safeMode | Safe mode level `unsafe`, `safe`, `server` or `secure`. Don't change this unless you know what you are doing.
|
||||
|
|
|
@ -12,9 +12,9 @@ weight: 90
|
|||
---
|
||||
## Image resources
|
||||
|
||||
To process an image, you must access the image as either a page resource or a global resource.
|
||||
To process an image you must access the file as a page resource, global resource, or remote resource.
|
||||
|
||||
### Page resources
|
||||
### Page resource
|
||||
|
||||
A page resource is a file within a [page bundle]. A page bundle is a directory with an `index.md` or `_index.md` file at its root.
|
||||
|
||||
|
@ -26,13 +26,15 @@ content/
|
|||
└── sunset.jpg <-- page resource
|
||||
```
|
||||
|
||||
### Global resources
|
||||
To access an image as a page resource:
|
||||
|
||||
A global resource is a file:
|
||||
```go-html-template
|
||||
{{ $image := .Resources.Get "sunset.jpg" }}
|
||||
```
|
||||
|
||||
- Within the `assets` directory, or
|
||||
- Within any directory [mounted] to the `assets` directory, or
|
||||
- Located on a remote server accessible via `http` or `https`
|
||||
### Global resource
|
||||
|
||||
A global resource is a file within the `assets` directory, or within any directory [mounted] to the `assets` directory.
|
||||
|
||||
```text
|
||||
assets/
|
||||
|
@ -40,13 +42,15 @@ assets/
|
|||
└── sunset.jpg <-- global resource
|
||||
```
|
||||
|
||||
To access a local image as a global resource:
|
||||
To access an image as a global resource:
|
||||
|
||||
```go-html-template
|
||||
{{ $image := resources.Get "images/sunset.jpg" }}
|
||||
```
|
||||
|
||||
To access a remote image as a global resource:
|
||||
### Remote resource
|
||||
|
||||
A remote resource is a file on a remote server, accessible via http or https. To access an image as a remote resource:
|
||||
|
||||
```go-html-template
|
||||
{{ $image := resources.GetRemote "https://gohugo.io/img/hugo-logo.png" }}
|
||||
|
@ -80,6 +84,21 @@ Example 3: A more concise way to skip image rendering if the resource is not fou
|
|||
{{ end }}
|
||||
```
|
||||
|
||||
Example 4: Skips rendering if there's problem accessing a remote resource.
|
||||
|
||||
```go-html-template
|
||||
{{ $u := "https://gohugo.io/img/hugo-logo.png" }}
|
||||
{{ with resources.GetRemote $u }}
|
||||
{{ with .Err }}
|
||||
{{ errorf "%s" . }}
|
||||
{{ else }}
|
||||
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "Unable to get remote resource %q" $u }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
## Image processing methods
|
||||
|
||||
The `image` resource implements the [`Resize`], [`Fit`], [`Fill`], [`Crop`], [`Filter`], [`Colors`] and [`Exif`] methods.
|
||||
|
@ -384,14 +403,7 @@ Note the self-closing shortcode syntax above. You may call the `imgproc` shortco
|
|||
|
||||
Define an `imaging` section in your site configuration to set the default [image processing options](#image-processing-options).
|
||||
|
||||
{{< code-toggle file="hugo" copy=true >}}
|
||||
[imaging]
|
||||
resampleFilter = "Box"
|
||||
quality = 75
|
||||
hint = "photo"
|
||||
anchor = "Smart"
|
||||
bgColor = "#ffffff"
|
||||
{{< /code-toggle >}}
|
||||
{{< code-toggle config="imaging" />}}
|
||||
|
||||
anchor
|
||||
: See image processing options: [anchor](#anchor).
|
||||
|
|
|
@ -19,6 +19,10 @@ Also See [Hugo Multilingual Part 1: Content translation].
|
|||
|
||||
## Configure languages
|
||||
|
||||
This is the default language configuration:
|
||||
|
||||
{{< code-toggle config="languages" />}}
|
||||
|
||||
This is an example of a site configuration for a multilingual project. Any key not defined in a `languages` object will fall back to the global value in the root of your site configuration.
|
||||
|
||||
{{< code-toggle file="hugo" >}}
|
||||
|
@ -98,9 +102,10 @@ subtitle = 'Reference, Tutorials, and Explanations'
|
|||
In Hugo `v0.112.0` we consolidated all configuration options, and improved how the languages and their parameters are merged with the main configuration. But while testing this on Hugo sites out there, we received some error reports and reverted some of the changes in favor of deprecation warnings:
|
||||
|
||||
1. `site.Language.Params` is deprecated. Use `site.Params` directly.
|
||||
1. Adding custom parameters to the top level language configuration is deprecated, add all of these below `[params]`, see `color` in the example below.
|
||||
1. Adding custom parameters to the top level language configuration is deprecated. Define custom parameters within `languages.xx.params`. See `color` in the example below.
|
||||
|
||||
{{< code-toggle file=hugo copy=false >}}
|
||||
|
||||
```toml
|
||||
title = "My blog"
|
||||
languageCode = "en-us"
|
||||
|
||||
|
@ -110,7 +115,7 @@ title = "Min blogg"
|
|||
languageCode = "sv"
|
||||
[languages.en.params]
|
||||
color = "blue"
|
||||
```
|
||||
{{< /code-toggle >}}
|
||||
|
||||
In the example above, all settings except `color` below `params` map to predefined configuration options in Hugo for the site and its language, and should be accessed via the documented accessors:
|
||||
|
||||
|
@ -386,7 +391,7 @@ This article has 101 words.
|
|||
|
||||
### Query a singular/plural translation
|
||||
|
||||
In other to meet singular/plural requirement, you must pass a dictionary (map) with a numeric `.Count` property to the `i18n` function. The below example uses `.ReadingTime` variable which has a built-in `.Count` property.
|
||||
To enable pluralization when translating, pass a map with a numeric `.Count` property to the `i18n` function. The example below uses `.ReadingTime` variable which has a built-in `.Count` property.
|
||||
|
||||
```go-html-template
|
||||
{{ i18n "readingTime" .ReadingTime }}
|
||||
|
@ -506,7 +511,7 @@ See [lang.FormatNumber] and [lang.FormatNumberCustom] for details.
|
|||
With this template code:
|
||||
|
||||
```go-html-template
|
||||
{{ 512.5032 | lang.FormatPercent 2 }} → 512.50%
|
||||
{{ 512.5032 | lang.FormatPercent 2 }}
|
||||
```
|
||||
|
||||
The rendered page displays:
|
||||
|
@ -636,20 +641,20 @@ To support Multilingual mode in your themes, some considerations must be taken f
|
|||
If there is more than one language defined, the `LanguagePrefix` variable will equal `/en` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string (and is therefore harmless for single-language Hugo websites).
|
||||
|
||||
|
||||
## Generate multilingual content with `hugo new`
|
||||
## Generate multilingual content with `hugo new content`
|
||||
|
||||
If you organize content with translations in the same directory:
|
||||
|
||||
```text
|
||||
hugo new post/test.en.md
|
||||
hugo new post/test.de.md
|
||||
hugo new content post/test.en.md
|
||||
hugo new content post/test.de.md
|
||||
```
|
||||
|
||||
If you organize content with translations in different directories:
|
||||
|
||||
```text
|
||||
hugo new content/en/post/test.md
|
||||
hugo new content/de/post/test.md
|
||||
hugo new content content/en/post/test.md
|
||||
hugo new content content/de/post/test.md
|
||||
```
|
||||
|
||||
[abslangurl]: /functions/abslangurl
|
||||
|
|
|
@ -113,19 +113,7 @@ Hugo provides a sensible default configuration of Related Content, but you can f
|
|||
|
||||
Without any `related` configuration set on the project, Hugo's Related Content methods will use the following.
|
||||
|
||||
{{< code-toggle file="hugo" >}}
|
||||
related:
|
||||
threshold: 80
|
||||
includeNewer: false
|
||||
toLower: false
|
||||
indices:
|
||||
- name: keywords
|
||||
weight: 100
|
||||
- name: date
|
||||
weight: 10
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Note that if you have configured `tags` as a taxonomy, `tags` will also be added to the default configuration above with the weight of `80`.
|
||||
{{< code-toggle config="related" />}}
|
||||
|
||||
Custom configuration should be set using the same syntax.
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Sections
|
||||
description: Hugo generates a **section tree** that matches your content.
|
||||
description: Organize content into sections.
|
||||
|
||||
categories: [content management]
|
||||
keywords: [lists,sections,content types,organization]
|
||||
menu:
|
||||
|
@ -12,54 +13,112 @@ weight: 120
|
|||
aliases: [/content/sections/]
|
||||
---
|
||||
|
||||
A **Section** is a collection of pages that gets defined based on the
|
||||
organization structure under the `content/` directory.
|
||||
|
||||
By default, all the **first-level** directories under `content/` form their own
|
||||
sections (**root sections**) provided they constitute [Branch Bundles][branch bundles].
|
||||
Directories which are just [Leaf Bundles][leaf bundles] do *not* form
|
||||
their own sections, despite being first-level directories.
|
||||
|
||||
If a user needs to define a section `foo` at a deeper level, they need to create
|
||||
a directory named `foo` with an `_index.md` file (see [Branch Bundles][branch bundles]
|
||||
for more information).
|
||||
## Overview
|
||||
|
||||
A section is a top-level content directory, or any content directory with an _index.md file. A content directory with an _index.md file is also known as a [branch bundle](/getting-started/glossary/#branch-bundle). Section templates receive one or more page [collections](/getting-started/glossary/#collection) in [context](/getting-started/glossary/#context).
|
||||
|
||||
{{% note %}}
|
||||
A **section** cannot be defined or overridden by a front matter parameter -- it
|
||||
is strictly derived from the content organization structure.
|
||||
Although top-level directories without _index.md files are sections, we recommend creating _index.md files in _all_ sections.
|
||||
{{% /note %}}
|
||||
|
||||
## Nested sections
|
||||
A typical site consists of one or more sections. For example:
|
||||
|
||||
The sections can be nested as deeply as you need.
|
||||
|
||||
```bash
|
||||
content
|
||||
└── blog <-- Section, because first-level dir under content/
|
||||
├── funny-cats
|
||||
│ ├── mypost.md
|
||||
│ └── kittens <-- Section, because contains _index.md
|
||||
│ └── _index.md
|
||||
└── tech <-- Section, because contains _index.md
|
||||
└── _index.md
|
||||
```text
|
||||
content/
|
||||
├── articles/ <-- section (top-level directory)
|
||||
│ ├── 2022/
|
||||
│ │ ├── article-1/
|
||||
│ │ │ ├── cover.jpg
|
||||
│ │ │ └── index.md
|
||||
│ │ └── article-2.md
|
||||
│ └── 2023/
|
||||
│ ├── article-3.md
|
||||
│ └── article-4.md
|
||||
├── products/ <-- section (top-level directory)
|
||||
│ ├── product-1/ <-- section (has _index.md file)
|
||||
│ │ ├── benefits/ <-- section (has _index.md file)
|
||||
│ │ │ ├── _index.md
|
||||
│ │ │ ├── benefit-1.md
|
||||
│ │ │ └── benefit-2.md
|
||||
│ │ ├── features/ <-- section (has _index.md file)
|
||||
│ │ │ ├── _index.md
|
||||
│ │ │ ├── feature-1.md
|
||||
│ │ │ └── feature-2.md
|
||||
│ │ └── _index.md
|
||||
│ └── product-2/ <-- section (has _index.md file)
|
||||
│ ├── benefits/ <-- section (has _index.md file)
|
||||
│ │ ├── _index.md
|
||||
│ │ ├── benefit-1.md
|
||||
│ │ └── benefit-2.md
|
||||
│ ├── features/ <-- section (has _index.md file)
|
||||
│ │ ├── _index.md
|
||||
│ │ ├── feature-1.md
|
||||
│ │ └── feature-2.md
|
||||
│ └── _index.md
|
||||
├── _index.md
|
||||
└── about.md
|
||||
```
|
||||
|
||||
**The important part to understand is, that to make the section tree fully navigational, at least the lower-most section needs a content file. (e.g. `_index.md`).**
|
||||
The example above has two top-level sections: articles and products. None of the directories under articles are sections, while all of the directories under products are sections. A section within a section is a known as a nested section or subsection.
|
||||
|
||||
{{% note %}}
|
||||
When we talk about a **section** in correlation with template selection, it is
|
||||
currently always the *root section* only (`/blog/funny-cats/mypost/ => blog`).
|
||||
## Explanation
|
||||
|
||||
If you need a specific template for a sub-section, you need to adjust either the `type` or `layout` in front matter.
|
||||
{{% /note %}}
|
||||
Sections and non-sections behave differently.
|
||||
|
||||
## Example: breadcrumb navigation
|
||||
||Sections|Non-sections
|
||||
:--|:-:|:-:
|
||||
Directory names become URL segments|:heavy_check_mark:|:heavy_check_mark:
|
||||
Have logical ancestors and descendants|:heavy_check_mark:|:x:
|
||||
Have list pages|:heavy_check_mark:|:x:
|
||||
|
||||
With the available [section variables and methods](#section-page-variables-and-methods) you can build powerful navigation. One common example would be a partial to show Breadcrumb navigation:
|
||||
With the file structure from the [example above](#overview):
|
||||
|
||||
1. The list page for the articles section includes all articles, regardless of directory structure; none of the subdirectories are sections.
|
||||
|
||||
1. The articles/2022 and articles/2023 directories do not have list pages; they are not sections.
|
||||
|
||||
1. The list page for the products section, by default, includes product-1 and product-2, but not their descendant pages. To include descendant pages, use the `.RegularPagesRecursive` collection instead of the `.Pages` collection in the list template. See [details](/variables/page/#page-collections).
|
||||
|
||||
1. All directories in the products section have list pages; each directory is a section.
|
||||
|
||||
## Template selection
|
||||
|
||||
Hugo has a defined [lookup order] to determine which template to use when rendering a page. The [lookup rules] consider the top-level section name; subsection names are not considered when selecting a template.
|
||||
|
||||
With the file structure from the [example above](#overview):
|
||||
|
||||
Content directory|List page template
|
||||
:--|:--
|
||||
content/products|layouts/products/list.html
|
||||
content/products/product-1|layouts/products/list.html
|
||||
content/products/product-1/benefits|layouts/products/list.html
|
||||
|
||||
Content directory|Single page template
|
||||
:--|:--
|
||||
content/products|layouts/products/single.html
|
||||
content/products/product-1|layouts/products/single.html
|
||||
content/products/product-1/benefits|layouts/products/single.html
|
||||
|
||||
If you need to use a different template for a subsection, specify `type` and/or `layout` in front matter.
|
||||
|
||||
[lookup rules]: /templates/lookup-order/#lookup-rules
|
||||
[lookup order]: /templates/lookup-order/
|
||||
|
||||
## Ancestors and descendants
|
||||
|
||||
A section has one or more ancestors (including the home page), and zero or more descendants. With the file structure from the [example above](#overview):
|
||||
|
||||
|
||||
```text
|
||||
content/products/product-1/benefits/benefit-1.md
|
||||
```
|
||||
|
||||
The content file (benefit-1.md) has four ancestors: benefits, product-1, products, and the home page. This logical relationship allows us to use the `.Parent` and `.Ancestors` methods to traverse the site structure.
|
||||
|
||||
For example, use the `.Ancestors` method to render breadcrumb navigation.
|
||||
|
||||
{{< code file="layouts/partials/breadcrumb.html" >}}
|
||||
<nav aria-label="breadcrumb">
|
||||
<nav aria-label="breadcrumb" class="breadcrumb">
|
||||
<ol>
|
||||
{{ range .Ancestors.Reverse }}
|
||||
<li>
|
||||
|
@ -73,19 +132,28 @@ With the available [section variables and methods](#section-page-variables-and-m
|
|||
</nav>
|
||||
{{< /code >}}
|
||||
|
||||
## Section page variables and methods
|
||||
With this CSS:
|
||||
|
||||
Also see [Page Variables](/variables/page/).
|
||||
```css
|
||||
.breadcrumb ol {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
{{< readfile file="/content/en/readfiles/sectionvars.md" markdown="true" >}}
|
||||
.breadcrumb li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
## Content section lists
|
||||
.breadcrumb li:not(:last-child)::after {
|
||||
content: "»";
|
||||
}
|
||||
```
|
||||
|
||||
Hugo will automatically create a page for each *root section* that lists all the content in that section. See the documentation on [section templates] for details on customizing the way these pages are rendered.
|
||||
Hugo renders this, where each breadcrumb is a link to the corresponding page:
|
||||
|
||||
## Content *section* vs. content *type*
|
||||
```text
|
||||
Home » Products » Product 1 » Benefits » Benefit 1
|
||||
```
|
||||
|
||||
By default, everything created within a section will use the [content `type`][content type] that matches the *root section* name. For example, Hugo will assume that `posts/post-1.md` has a `posts` content `type`. If you are using an [archetype] for your `posts` section, Hugo will generate front matter according to what it finds in `archetypes/posts.md`.
|
||||
|
||||
[archetype]: /content-management/archetypes/
|
||||
[content type]: /content-management/types/
|
||||
|
|
|
@ -56,13 +56,8 @@ and a new line with a "quoted string".` */>}}
|
|||
|
||||
### Shortcodes with markdown
|
||||
|
||||
In Hugo `0.55` we changed how the `%` delimiter works. Shortcodes using the `%` as the outer-most delimiter will now be fully rendered when sent to the content renderer. They can be part of the generated table of contents, footnotes, etc.
|
||||
Shortcodes using the `%` as the outer-most delimiter will be fully rendered when sent to the content renderer. This means that the rendered output from a shortcode can be part of the page's table of contents, footnotes, etc.
|
||||
|
||||
If you want the old behavior, you can put the following line in the start of your shortcode template:
|
||||
|
||||
```go-html-template
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
```
|
||||
|
||||
### Shortcodes without markdown
|
||||
|
||||
|
|
|
@ -82,11 +82,7 @@ Hugo natively supports taxonomies.
|
|||
|
||||
Without adding a single line to your [site configuration] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be the same as manually [configuring your taxonomies](#configure-taxonomies) as below:
|
||||
|
||||
{{< code-toggle file="hugo" copy=false >}}
|
||||
[taxonomies]
|
||||
tag = "tags"
|
||||
category = "categories"
|
||||
{{</ code-toggle >}}
|
||||
{{< code-toggle config="taxonomies" />}}
|
||||
|
||||
If you do not want Hugo to create any taxonomies, set `disableKinds` in your [site configuration] to the following:
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: anchorize
|
||||
description: Takes a string and sanitizes it the same way as the [`defaultMarkdownHandler`](/getting-started/configuration-markup#configure-markup) does for markdown headers.
|
||||
description: Takes a string and sanitizes it the same way as the [`defaultMarkdownHandler`](/getting-started/configuration-markup#default-configuration) does for markdown headers.
|
||||
categories: [functions]
|
||||
menu:
|
||||
docs:
|
||||
|
|
|
@ -1,37 +1,99 @@
|
|||
---
|
||||
title: append
|
||||
description: "`append` appends one or more values to a slice and returns the resulting slice."
|
||||
description: Appends one or more elements to a slice and returns the resulting slice.
|
||||
categories: [functions]
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
keywords: [collections]
|
||||
signature: ["COLLECTION | append VALUE [VALUE]...", "COLLECTION | append COLLECTION"]
|
||||
signature: ["COLLECTION | append ELEMENT [ELEMENT]...", "COLLECTION | append COLLECTION"]
|
||||
relatedfuncs: [last,first,where,slice]
|
||||
---
|
||||
|
||||
An example appending single values:
|
||||
This function appends all elements, excluding the last, to the last element. This allows [pipe](/getting-started/glossary/#pipeline) constructs as shown below.
|
||||
|
||||
Append a single element to a slice:
|
||||
|
||||
```go-html-template
|
||||
{{ $s := slice "a" "b" "c" }}
|
||||
{{ $s = $s | append "d" "e" }}
|
||||
{{/* $s now contains a []string with elements "a", "b", "c", "d", and "e" */}}
|
||||
{{ $s := slice "a" "b" }}
|
||||
{{ $s }} → [a b]
|
||||
|
||||
{{ $s = $s | append "c" }}
|
||||
{{ $s }} → [a b c]
|
||||
```
|
||||
|
||||
The same example appending a slice to a slice:
|
||||
Append two elements to a slice:
|
||||
|
||||
```go-html-template
|
||||
{{ $s := slice "a" "b" "c" }}
|
||||
{{ $s := slice "a" "b" }}
|
||||
{{ $s }} → [a b]
|
||||
|
||||
{{ $s = $s | append "c" "d" }}
|
||||
{{ $s }} → [a b c d]
|
||||
```
|
||||
|
||||
Append two elements, as a slice, to a slice. This produces the same result as the previous example:
|
||||
|
||||
```go-html-template
|
||||
{{ $s := slice "a" "b" }}
|
||||
{{ $s }} → [a b]
|
||||
|
||||
{{ $s = $s | append (slice "c" "d") }}
|
||||
{{ $s }} → [a b c d]
|
||||
```
|
||||
|
||||
Start with an empty slice:
|
||||
|
||||
```go-html-template
|
||||
{{ $s := slice }}
|
||||
{{ $s }} → []
|
||||
|
||||
{{ $s = $s | append "a" }}
|
||||
{{ $s }} → [a]
|
||||
|
||||
{{ $s = $s | append "b" "c" }}
|
||||
{{ $s }} → [a b c]
|
||||
|
||||
{{ $s = $s | append (slice "d" "e") }}
|
||||
{{ $s }} → [a b c d e]
|
||||
```
|
||||
|
||||
If a slice contains other slices, further slices will be appended as values:
|
||||
If you start with a slice of a slice:
|
||||
|
||||
```go-html-template
|
||||
{{ $s := slice (slice "a" "b") (slice "c" "d") }}
|
||||
{{ $s = $s | append (slice "e" "f") (slice "g" "h") }}
|
||||
{{/* $s now contains a [][]string containing four slices: ["a" "b"], ["c" "d"], ["e" "f"], and ["g" "h"] */}}
|
||||
{{ $s := slice (slice "a" "b") }}
|
||||
{{ $s }} → [[a b]]
|
||||
|
||||
{{ $s = $s | append (slice "c" "d") }}
|
||||
{{ $s }} → [[a b] [c d]]
|
||||
```
|
||||
|
||||
The `append` function works for all types, including `Pages`.
|
||||
To create a slice of slices, starting with an empty slice:
|
||||
|
||||
```go-html-template
|
||||
{{ $s := slice }}
|
||||
{{ $s }} → []
|
||||
|
||||
{{ $s = $s | append (slice (slice "a" "b")) }}
|
||||
{{ $s }} → [[a b]]
|
||||
|
||||
{{ $s = $s | append (slice "c" "d") }}
|
||||
{{ $s }} → [[a b] [c d]]
|
||||
```
|
||||
|
||||
|
||||
|
||||
Although the elements in the examples above are strings, you can use the `append` function with any data type, including Pages. For example, on the home page of a corporate site, to display links to the two most recent press releases followed by links to the four most recent articles:
|
||||
|
||||
```go-html-template
|
||||
{{ $p := where site.RegularPages "Type" "press-releases" | first 2 }}
|
||||
{{ $p = $p | append (where site.RegularPages "Type" "articles" | first 4) }}
|
||||
|
||||
{{ with $p }}
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
```
|
||||
|
|
|
@ -10,11 +10,11 @@ signature: ["apply COLLECTION FUNCTION [PARAM...]"]
|
|||
relatedfuncs: []
|
||||
---
|
||||
|
||||
`apply` expects at least three parameters, depending on the function being applied.
|
||||
`apply` expects at least three arguments, depending on the function being applied.
|
||||
|
||||
1. The first parameter is the sequence to operate on.
|
||||
2. The second parameter is the name of the function as a string, which must be the name of a valid [Hugo function][functions].
|
||||
3. After that, the parameters to the applied function are provided, with the string `"."` standing in for each element of the sequence the function is to be applied against.
|
||||
1. The first argument is the sequence to operate on.
|
||||
2. The second argument is the name of the function as a string, which must be the name of a valid [Hugo function][functions].
|
||||
3. After that, the arguments to the applied function are provided, with the string `"."` standing in for each element of the sequence the function is to be applied against.
|
||||
|
||||
Here is an example of a content file with `names:` as a front matter field:
|
||||
|
||||
|
|
|
@ -1,26 +1,40 @@
|
|||
---
|
||||
title: cond
|
||||
description: "Return one of two arguments, depending on the value of a third argument."
|
||||
description: Returns one of two arguments depending on the value of the control argument.
|
||||
categories: [functions]
|
||||
keywords: [conditional, ternary]
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
signature: ["cond CONTROL VAR1 VAR2"]
|
||||
signature: [cond CONTROL ARG1 ARG2]
|
||||
relatedfuncs: [default]
|
||||
---
|
||||
|
||||
`cond` returns *VAR1* if *CONTROL* is true, or *VAR2* if it is not.
|
||||
|
||||
Example:
|
||||
The CONTROL argument is a boolean value that indicates whether the function should return ARG1 or ARG2. If CONTROL is `true`, the function returns ARG1. Otherwise, the function returns ARG2.
|
||||
|
||||
```go-html-template
|
||||
{{ cond (eq (len $geese) 1) "goose" "geese" }}
|
||||
{{ $qty := 42 }}
|
||||
{{ cond (le $qty 3) "few" "many" }} → "many"
|
||||
```
|
||||
|
||||
Would emit "goose" if the `$geese` array has exactly 1 item, or "geese" otherwise.
|
||||
The CONTROL argument must be either `true` or `false`. To cast a non-boolean value to boolean, pass it through the `not` operator twice.
|
||||
|
||||
```go-html-template
|
||||
{{ cond (42 | not | not) "truthy" "falsy" }} → "truthy"
|
||||
{{ cond ("" | not | not) "truthy" "falsy" }} → "falsy"
|
||||
```
|
||||
|
||||
{{% note %}}
|
||||
Whenever you use a `cond` function, *both* variable expressions are *always* evaluated. This means that a usage like `cond false (div 1 0) 27` will throw an error because `div 1 0` will be evaluated *even though the condition is false*.
|
||||
Unlike [ternary operators] in other languages, the `cond` function does not perform [short-circuit evaluation]. The function evaluates both ARG1 and ARG2, regardless of the CONTROL value.
|
||||
|
||||
In other words, the `cond` function does *not* provide [short-circuit evaluation](https://en.wikipedia.org/wiki/Short-circuit_evaluation) and does *not* work like a normal [ternary operator](https://en.wikipedia.org/wiki/%3F:) that will pass over the first expression if the condition returns `false`.
|
||||
[short-circuit evaluation]: https://en.wikipedia.org/wiki/Short-circuit_evaluation
|
||||
[ternary operators]: https://en.wikipedia.org/wiki/Ternary_conditional_operator
|
||||
{{% /note %}}
|
||||
|
||||
|
||||
Due to the absence of short-circuit evaluation, these examples throw an error:
|
||||
|
||||
```go-html-template
|
||||
{{ cond true "true" (div 1 0) }}
|
||||
{{ cond false (div 1 0) "false" }}
|
||||
```
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
title: dict
|
||||
description: Creates a dictionary from a list of key and value pairs.
|
||||
description: Creates a map from a list of key and value pairs.
|
||||
categories: [functions]
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
keywords: [dictionary]
|
||||
keywords: [collections]
|
||||
signature: ["dict KEY VALUE [KEY VALUE]..."]
|
||||
relatedfuncs: []
|
||||
---
|
||||
|
|
|
@ -6,7 +6,7 @@ menu:
|
|||
docs:
|
||||
parent: functions
|
||||
keywords: []
|
||||
signature: ["echoParam DICTIONARY KEY"]
|
||||
signature: ["echoParam MAP KEY"]
|
||||
relatedfuncs: []
|
||||
---
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ signature:
|
|||
- "strings.FindRE PATTERN INPUT [LIMIT]"
|
||||
relatedfuncs: [findRESubmatch, replaceRE]
|
||||
---
|
||||
By default, `findRE` finds all matches. You can limit the number of matches with an optional LIMIT parameter.
|
||||
By default, `findRE` finds all matches. You can limit the number of matches with an optional LIMIT argument.
|
||||
|
||||
{{% readfile file="/functions/common/regular-expressions.md" %}}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ signature:
|
|||
relatedfuncs: [findRE, replaceRE]
|
||||
---
|
||||
|
||||
By default, `findRESubmatch` finds all matches. You can limit the number of matches with an optional LIMIT parameter. A return value of nil indicates no match.
|
||||
By default, `findRESubmatch` finds all matches. You can limit the number of matches with an optional LIMIT argument. A return value of nil indicates no match.
|
||||
|
||||
{{% readfile file="/functions/common/regular-expressions.md" %}}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ toc: true
|
|||
---
|
||||
The `highlight` function uses the [Chroma] syntax highlighter, supporting over 200 languages with more than 40 available styles.
|
||||
|
||||
## Parameters
|
||||
## Arguments
|
||||
|
||||
INPUT
|
||||
: The code to highlight.
|
||||
|
@ -67,7 +67,7 @@ Substitute this number of spaces for each tab character in your highlighted code
|
|||
|
||||
guessSyntax
|
||||
: Boolean. Default is `false`.\
|
||||
If the `LANG` parameter is blank or an unrecognized language, auto-detect the language if possible, otherwise use a fallback language.
|
||||
If the `LANG` argument is blank or an unrecognized language, auto-detect the language if possible, otherwise use a fallback language.
|
||||
|
||||
{{% note %}}
|
||||
Instead of specifying both `lineNos` and `lineNumbersInTable`, you can use the following shorthand notation:
|
||||
|
|
|
@ -39,7 +39,7 @@ The above will overlay `$logo` in the upper left corner of `$img` (at position `
|
|||
Using the `Text` filter, you can add text to an image.
|
||||
|
||||
{{% funcsig %}}
|
||||
images.Text TEXT DICT)
|
||||
images.Text TEXT MAP)
|
||||
{{% /funcsig %}}
|
||||
|
||||
The following example will add the text `Hugo rocks!` to the image with the specified color, size and position.
|
||||
|
|
|
@ -68,7 +68,7 @@ location = "oslo"
|
|||
|
||||
The content of `oslo.toml` can be accessed from your template using the following node path: `.Site.Data.locations.oslo`. However, the specific file you need is going to change according to the front matter.
|
||||
|
||||
This is where the `index` function is needed. `index` takes 2 parameters in this use case:
|
||||
This is where the `index` function is needed. `index` takes 2 arguments in this use case:
|
||||
|
||||
1. The node path
|
||||
2. A string corresponding to the desired data; e.g.—
|
||||
|
|
|
@ -10,9 +10,7 @@ signature: ["jsonify INPUT", "jsonify OPTIONS INPUT"]
|
|||
relatedfuncs: [plainify]
|
||||
---
|
||||
|
||||
Jsonify encodes a given object to JSON.
|
||||
|
||||
To customize the printing of the JSON, pass a dictionary of options as the first
|
||||
To customize the printing of the JSON, pass a map of options as the first
|
||||
argument. Supported options are "prefix" and "indent". Each JSON element in
|
||||
the output will begin on a new line beginning with *prefix* followed by one or
|
||||
more copies of *indent* according to the indentation nesting.
|
||||
|
|
|
@ -5,7 +5,7 @@ categories: [functions]
|
|||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
keywords: [dictionary]
|
||||
keywords: [collections]
|
||||
signature: ["collections.Merge MAP MAP...", "merge MAP MAP..."]
|
||||
relatedfuncs: [dict, append, reflect.IsMap, reflect.IsSlice]
|
||||
---
|
||||
|
|
|
@ -22,18 +22,18 @@ Here is the simplest usage:
|
|||
{{ partialCached "footer.html" . }}
|
||||
```
|
||||
|
||||
You can also pass additional parameters to `partialCached` to create *variants* of the cached partial. For example, if you have a complex partial that should be identical when rendered for pages within the same section, you could use a variant based upon section so that the partial is only rendered once per section:
|
||||
You can also pass additional arguments to `partialCached` to create *variants* of the cached partial. For example, if you have a complex partial that should be identical when rendered for pages within the same section, you could use a variant based upon section so that the partial is only rendered once per section:
|
||||
|
||||
{{< code file="partial-cached-example.html" >}}
|
||||
{{ partialCached "footer.html" . .Section }}
|
||||
{{< /code >}}
|
||||
|
||||
If you need to pass additional parameters to create unique variants, you can pass as many variant parameters as you need:
|
||||
If you need to pass additional arguments to create unique variants, you can pass as many variant arguments as you need:
|
||||
|
||||
```go-html-template
|
||||
{{ partialCached "footer.html" . .Params.country .Params.province }}
|
||||
```
|
||||
|
||||
Note that the variant parameters are not made available to the underlying partial template. They are only use to create a unique cache key. Since Hugo `0.61.0` you can use any object as cache key(s), not just strings.
|
||||
Note that the variant arguments are not made available to the underlying partial template. They are only use to create a unique cache key. Since Hugo `0.61.0` you can use any object as cache key(s), not just strings.
|
||||
|
||||
See also [The Full Partial Series Part 1: Caching!](https://regisphilibert.com/blog/2019/12/hugo-partial-series-part-1-caching-with-partialcached/).
|
||||
|
|
|
@ -10,7 +10,7 @@ signature: ["ref . PAGE"]
|
|||
relatedfuncs: [relref]
|
||||
---
|
||||
|
||||
This function takes two parameters:
|
||||
This function takes two arguments:
|
||||
|
||||
- The context of the page from which to resolve relative paths, typically the current page (`.`)
|
||||
- The path to a page, with or without a file extension, with or without an anchor. A path without a leading `/` is first resolved relative to the given context, then to the remainder of the site.
|
||||
|
|
|
@ -10,7 +10,7 @@ signature: ["relref . PAGE"]
|
|||
relatedfuncs: [ref]
|
||||
---
|
||||
|
||||
This function takes two parameters:
|
||||
This function takes two arguments:
|
||||
|
||||
- The context of the page from which to resolve relative paths, typically the current page (`.`)
|
||||
- The path to a page, with or without a file extension, with or without an anchor. A path without a leading `/` is first resolved relative to the given context, then to the remainder of the site.
|
||||
|
|
|
@ -13,7 +13,7 @@ relatedfuncs: [replaceRE]
|
|||
---
|
||||
|
||||
Replace returns a copy of `INPUT` with all occurrences of `OLD` replaced with `NEW`.
|
||||
The number of replacements can be limited with an optional `LIMIT` parameter.
|
||||
The number of replacements can be limited with an optional `LIMIT` argument.
|
||||
|
||||
```
|
||||
`{{ replace "Batman and Robin" "Robin" "Catwoman" }}`
|
||||
|
|
|
@ -11,7 +11,7 @@ signature:
|
|||
- "strings.ReplaceRE PATTERN REPLACEMENT INPUT [LIMIT]"
|
||||
relatedfuncs: [findRE, FindRESubmatch, replace]
|
||||
---
|
||||
By default, `replaceRE` replaces all matches. You can limit the number of matches with an optional LIMIT parameter.
|
||||
By default, `replaceRE` replaces all matches. You can limit the number of matches with an optional LIMIT argument.
|
||||
|
||||
{{% readfile file="/functions/common/regular-expressions.md" %}}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ signature:
|
|||
relatedfuncs: []
|
||||
---
|
||||
|
||||
It normally takes two parameters: `start` and `length`. It can also take one parameter: `start`, i.e. `length` is omitted, in which case the substring starting from start until the end of the string will be returned.
|
||||
It normally takes two argument: `start` and `length`. It can also take one argument: `start`, i.e. `length` is omitted, in which case the substring starting from start until the end of the string will be returned.
|
||||
|
||||
To extract characters from the end of the string, use a negative start number.
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ relatedfuncs: []
|
|||
|
||||
## Using locations
|
||||
|
||||
The optional `TIMEZONE` parameter is a string that sets a default time zone (or more specific, the location, which represents the collection of time offsets in a geographical area) that is associated with the specified time value. If the time value has an explicit timezone or offset specified, it will take precedence over the `TIMEZONE` parameter.
|
||||
The optional `TIMEZONE` argument is a string that sets a default time zone (or more specific, the location, which represents the collection of time offsets in a geographical area) that is associated with the specified time value. If the time value has an explicit timezone or offset specified, it will take precedence over the `TIMEZONE` argument.
|
||||
|
||||
The list of valid locations may be system dependent, but should include `UTC`, `Local`, or any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
||||
|
||||
|
|
88
docs/content/en/functions/transform.Remarshal.md
Normal file
88
docs/content/en/functions/transform.Remarshal.md
Normal file
|
@ -0,0 +1,88 @@
|
|||
---
|
||||
title: transform.Remarshal
|
||||
description: Marshals a string of serialized data, or a map, into a string of serialized data in the specified format.
|
||||
categories: [functions]
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
keywords: []
|
||||
signature: [ transform.Remarshal FORMAT INPUT ]
|
||||
---
|
||||
|
||||
The FORMAT must be one of `json`, `toml`, `yaml`, or `xml`. If the INPUT is a string of serialized data, it must be valid JSON, TOML, YAML, or XML.
|
||||
|
||||
{{% note %}}
|
||||
This function is primarily a helper for Hugo's documentation, used to convert configuration and front matter examples to JSON, TOML, and YAML.
|
||||
|
||||
This is not a general purpose converter, and may change without notice if required for Hugo's documentation site.
|
||||
{{% /note %}}
|
||||
|
||||
Example 1
|
||||
: Convert a string of TOML to JSON.
|
||||
|
||||
```go-html-template
|
||||
{{ $s := `
|
||||
baseURL = 'https://example.org/'
|
||||
languageCode = 'en-US'
|
||||
title = 'ABC Widgets'
|
||||
`}}
|
||||
<pre>{{ transform.Remarshal "json" $s }}</pre>
|
||||
```
|
||||
|
||||
Resulting HTML:
|
||||
|
||||
```html
|
||||
<pre>{
|
||||
"baseURL": "https://example.org/",
|
||||
"languageCode": "en-US",
|
||||
"title": "ABC Widgets"
|
||||
}
|
||||
</pre>
|
||||
```
|
||||
|
||||
Rendered in browser:
|
||||
|
||||
```text
|
||||
{
|
||||
"baseURL": "https://example.org/",
|
||||
"languageCode": "en-US",
|
||||
"title": "ABC Widgets"
|
||||
}
|
||||
```
|
||||
|
||||
Example 2
|
||||
: Convert a map to YAML.
|
||||
|
||||
```go-html-template
|
||||
{{ $m := dict
|
||||
"a" "Hugo rocks!"
|
||||
"b" (dict "question" "What is 6x7?" "answer" 42)
|
||||
"c" (slice "foo" "bar")
|
||||
}}
|
||||
<pre>{{ transform.Remarshal "yaml" $m }}</pre>
|
||||
```
|
||||
|
||||
Resulting HTML:
|
||||
|
||||
```html
|
||||
<pre>a: Hugo rocks!
|
||||
b:
|
||||
answer: 42
|
||||
question: What is 6x7?
|
||||
c:
|
||||
- foo
|
||||
- bar
|
||||
</pre>
|
||||
```
|
||||
|
||||
Rendered in browser:
|
||||
|
||||
```text
|
||||
a: Hugo rocks!
|
||||
b:
|
||||
answer: 42
|
||||
question: What is 6x7?
|
||||
c:
|
||||
- foo
|
||||
- bar
|
||||
```
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Configure markup
|
||||
description: How to handle Markdown and other markup related configuration.
|
||||
description: Configure rendering of markup to HTML.
|
||||
categories: [fundamentals, getting started]
|
||||
keywords: [configuration,highlighting]
|
||||
menu:
|
||||
|
@ -12,9 +12,9 @@ slug: configuration-markup
|
|||
toc: true
|
||||
---
|
||||
|
||||
## Configure markup
|
||||
## Default configuration
|
||||
|
||||
See [Goldmark](#goldmark) for settings related to the default Markdown handler in Hugo.
|
||||
See [Goldmark](#goldmark) for settings related to the default markdown handler in Hugo.
|
||||
|
||||
Below are all markup related configuration in Hugo with their default settings:
|
||||
|
||||
|
@ -22,7 +22,7 @@ Below are all markup related configuration in Hugo with their default settings:
|
|||
|
||||
**See each section below for details.**
|
||||
|
||||
### Goldmark
|
||||
## Goldmark
|
||||
|
||||
[Goldmark](https://github.com/yuin/goldmark/) is from Hugo 0.60 the default library used for Markdown. It's fast, it's [CommonMark](https://spec.commonmark.org/0.29/) compliant and it's very flexible.
|
||||
|
||||
|
@ -38,7 +38,7 @@ hardWraps
|
|||
: By default, Goldmark ignores newlines within a paragraph. Set to `true` to render newlines as `<br>` elements.
|
||||
|
||||
unsafe
|
||||
: By default, Goldmark does not render raw HTMLs and potentially dangerous links. If you have lots of inline HTML and/or JavaScript, you may need to turn this on.
|
||||
: By default, Goldmark does not render raw HTML and potentially dangerous links. If you have lots of inline HTML and/or JavaScript, you may need to turn this on.
|
||||
|
||||
typographer
|
||||
: This extension substitutes punctuations with typographic entities like [smartypants](https://daringfireball.net/projects/smartypants/).
|
||||
|
@ -82,7 +82,7 @@ Note that attributes in [code fences](/content-management/syntax-highlighting/#h
|
|||
autoHeadingIDType ("github")
|
||||
: 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 compatible with 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.
|
||||
|
||||
### Highlight
|
||||
## Highlight
|
||||
|
||||
This is the default `highlight` configuration. Note that some of these settings can be set per code block, see [Syntax Highlighting](/content-management/syntax-highlighting/).
|
||||
|
||||
|
@ -95,7 +95,7 @@ For `style`, see these galleries:
|
|||
|
||||
For CSS, see [Generate Syntax Highlighter CSS](/content-management/syntax-highlighting/#generate-syntax-highlighter-css).
|
||||
|
||||
### Table of contents
|
||||
## Table of contents
|
||||
|
||||
{{< code-toggle config="markup.tableOfContents" />}}
|
||||
|
||||
|
@ -108,7 +108,7 @@ endLevel
|
|||
: The heading level, inclusive, to stop render the table of contents.
|
||||
|
||||
ordered
|
||||
: Whether or not to generate an ordered list instead of an unordered list.
|
||||
: If `true`, generates an ordered list instead of an unordered list.
|
||||
|
||||
## Markdown render hooks
|
||||
|
||||
|
|
|
@ -411,7 +411,7 @@ Maximum number of items in the RSS feed.
|
|||
|
||||
### sectionPagesMenu
|
||||
|
||||
See [Menus](/content-management/menus/#define-in-site-configuration).
|
||||
See [Menus](/content-management/menus/#define-automatically).
|
||||
|
||||
### security
|
||||
|
||||
|
@ -491,28 +491,7 @@ enableemoji: true
|
|||
|
||||
The `build` configuration section contains global build-related configuration options.
|
||||
|
||||
{{< code-toggle file="hugo" >}}
|
||||
[build]
|
||||
noJSConfigInAssets = false
|
||||
useResourceCacheWhen = 'fallback'
|
||||
[build.buildStats]
|
||||
disableClasses = false
|
||||
disableIDs = false
|
||||
disableTags = false
|
||||
enable = false
|
||||
[[build.cachebusters]]
|
||||
source = 'assets/.*\.(js|ts|jsx|tsx)'
|
||||
target = '(js|scripts|javascript)'
|
||||
[[build.cachebusters]]
|
||||
source = 'assets/.*\.(css|sass|scss)$'
|
||||
target = '(css|styles|scss|sass)'
|
||||
[[build.cachebusters]]
|
||||
source = '(postcss|tailwind)\.config\.js'
|
||||
target = '(css|styles|scss|sass)'
|
||||
[[build.cachebusters]]
|
||||
source = 'assets/.*\.(.*)$'
|
||||
target = '$1'
|
||||
{{< /code-toggle >}}
|
||||
{{< code-toggle config="build" />}}
|
||||
|
||||
buildStats {{< new-in "0.115.1" >}}
|
||||
: When enabled, creates a `hugo_stats.json` file in the root of your project. This file contains arrays of the `class` attributes, `id` attributes, and tags of every HTML element within your published site. Use this file as data source when [removing unused CSS] from your site. This process is also known as pruning, purging, or tree shaking.
|
||||
|
@ -735,13 +714,7 @@ Dates are important in Hugo, and you can configure how Hugo assigns dates to you
|
|||
|
||||
The default configuration is:
|
||||
|
||||
{{< code-toggle file="hugo" >}}
|
||||
[frontmatter]
|
||||
date = ["date", "publishDate", "lastmod"]
|
||||
lastmod = [":git", "lastmod", "date", "publishDate"]
|
||||
publishDate = ["publishDate", "date"]
|
||||
expiryDate = ["expiryDate"]
|
||||
{{< /code-toggle >}}
|
||||
{{< code-toggle config="frontmatter" />}}
|
||||
|
||||
If you, as an example, have a non-standard date parameter in some of your content, you can override the setting for `date`:
|
||||
|
||||
|
@ -797,27 +770,7 @@ Default configuration:
|
|||
|
||||
Since Hugo 0.52 you can configure more than just the `cacheDir`. This is the default configuration:
|
||||
|
||||
{{< code-toggle file="hugo" >}}
|
||||
[caches]
|
||||
[caches.getjson]
|
||||
dir = ":cacheDir/:project"
|
||||
maxAge = -1
|
||||
[caches.getcsv]
|
||||
dir = ":cacheDir/:project"
|
||||
maxAge = -1
|
||||
[caches.getresource]
|
||||
dir = ":cacheDir/:project"
|
||||
maxAge = -1
|
||||
[caches.images]
|
||||
dir = ":resourceDir/_gen"
|
||||
maxAge = -1
|
||||
[caches.assets]
|
||||
dir = ":resourceDir/_gen"
|
||||
maxAge = -1
|
||||
[caches.modules]
|
||||
dir = ":cacheDir/modules"
|
||||
maxAge = -1
|
||||
{{< /code-toggle >}}
|
||||
{{< code-toggle config="caches" />}}
|
||||
|
||||
You can override any of these cache settings in your own `hugo.toml`.
|
||||
|
||||
|
@ -850,12 +803,12 @@ dir
|
|||
[lookup order]: /templates/lookup-order/
|
||||
[Output Formats]: /templates/output-formats/
|
||||
[templates]: /templates/
|
||||
[toml]: https://github.com/toml-lang/toml
|
||||
[toml]: https://toml.io/en/latest
|
||||
[yaml]: https://yaml.org/spec/
|
||||
[static-files]: /content-management/static-files/
|
||||
|
||||
|
||||
# Configure cacheDir
|
||||
## Configure cacheDir
|
||||
|
||||
This is the directory where Hugo by default will store its file caches. See [Configure File Caches](#configure-file-caches).
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ example/
|
|||
The following is a high-level overview of each of the directories with links to each of their respective sections within the Hugo docs.
|
||||
|
||||
[`archetypes`](/content-management/archetypes/)
|
||||
: You can create new content files in Hugo using the `hugo new` command.
|
||||
: You can create new content files in Hugo using the `hugo new content` command.
|
||||
By default, Hugo will create new content files with at least `date`, `title` (inferred from the file name), and `draft = true`. This saves time and promotes consistency for sites using multiple content types. You can create your own [archetypes] with custom preconfigured front matter fields as well.
|
||||
|
||||
[`assets`]
|
||||
|
|
|
@ -5,8 +5,8 @@ keywords: [books, tutorials, learning, usage]
|
|||
menu:
|
||||
docs:
|
||||
parent: getting-started
|
||||
weight: 60
|
||||
weight: 60
|
||||
weight: 70
|
||||
weight: 70
|
||||
---
|
||||
|
||||
## Books
|
||||
|
|
266
docs/content/en/getting-started/glossary.md
Normal file
266
docs/content/en/getting-started/glossary.md
Normal file
|
@ -0,0 +1,266 @@
|
|||
---
|
||||
title: Glossary of terms
|
||||
description: Terms commonly used throughout the documentation.
|
||||
keywords: [glossary]
|
||||
menu:
|
||||
docs:
|
||||
parent: getting-started
|
||||
weight: 60
|
||||
weight: 60
|
||||
type: glossary
|
||||
---
|
||||
|
||||
<!-- Use level 3 headings for each term in the glossary. -->
|
||||
|
||||
### action
|
||||
|
||||
See [template action](#template-action).
|
||||
|
||||
### archetype
|
||||
|
||||
A template for new content. See [details](/content-management/archetypes/).
|
||||
|
||||
### argument
|
||||
|
||||
A [scalar](#scalar), [array](#array), [slice](#slice), [map](#map), or [object](#object) passed to a [function](#function), [method](#method), or [shortcode](#shortcode).
|
||||
|
||||
### array
|
||||
|
||||
A numbered sequence of elements. Unlike Go's [slice](#slice) data type, an array has a fixed length. See the [Go documentation](https://go.dev/ref/spec#Array_types) for details.
|
||||
|
||||
### bool
|
||||
|
||||
See [boolean](#boolean).
|
||||
|
||||
### boolean
|
||||
|
||||
A data type with two possible values, either `true` or `false`.
|
||||
|
||||
### branch bundle
|
||||
|
||||
A [page bundle](#page-bundle) with an _index.md file and zero or more [resources](#resource). Analogous to a physical branch, a branch bundle may have descendants including regular pages, [leaf bundles](/getting-started/glossary/#leaf-bundle), and other branch bundles. See [details](/content-management/page-bundles/).
|
||||
|
||||
### build
|
||||
|
||||
To generate a static site that includes HTML files and assets such as images, CSS, and JavaScript. The build process includes rendering and resource transformations.
|
||||
|
||||
### bundle
|
||||
|
||||
See [page bundle](#page-bundle).
|
||||
|
||||
### cache
|
||||
|
||||
A software component that stores data so that future requests for the same data are faster.
|
||||
|
||||
### collection
|
||||
|
||||
Typically, a collection of pages, but may also refer to an [array](#array), [slice](#slice), or [map](#map). For example, the pages within a site's "articles" section are a page collection.
|
||||
|
||||
### content format
|
||||
|
||||
A markup language for creating content. Typically markdown, but may also be HTML, AsciiDoc, Org, Pandoc, or reStructuredText. See [details](/content-management/formats/).
|
||||
|
||||
### content type
|
||||
|
||||
A classification of content inferred from the top-level directory name or the `type` set in [front matter](#front-matter). Pages in the root of the content directory, including the home page, are of type "page". Accessed via `.Page.Type` in [templates](#template). See [details](/content-management/types/).
|
||||
|
||||
### context
|
||||
|
||||
Represented by a period "." within a [template action](#template-action), context is the current location in a data structure. For example, while iterating over a [collection](#collection) of pages, the context within each iteration is the page's data structure. The context received by each template depends on template type and/or how it was called. See [details](/templates/introduction/#the-dot).
|
||||
|
||||
### flag
|
||||
|
||||
An option passed to a command-line program, beginning with one or two hyphens. See [details](/commands/hugo/).
|
||||
|
||||
### float
|
||||
|
||||
See [floating point](#floating-point).
|
||||
|
||||
### floating point
|
||||
|
||||
A numeric data type with a fractional component. For example, `3.14159`.
|
||||
|
||||
### function
|
||||
|
||||
Used within a [template action](#template-action), a function takes one or more [arguments](#argument) and returns a value. Unlike [methods](#method), functions are not associated with an [object](#object). See [details](/functions/).
|
||||
|
||||
### front matter
|
||||
|
||||
Metadata at the beginning of each content page, separated from the content by format-specific delimiters. See [details](/content-management/front-matter/).
|
||||
|
||||
### int
|
||||
|
||||
See [integer](#integer).
|
||||
|
||||
### integer
|
||||
|
||||
A numeric data type without a fractional component. For example, `42`.
|
||||
|
||||
### internationalization
|
||||
|
||||
Software design and development efforts that enable [localization](#localization). See the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated i18n.
|
||||
|
||||
### kind
|
||||
|
||||
See [page kind](#page-kind).
|
||||
|
||||
### layout
|
||||
|
||||
See [template](#template).
|
||||
|
||||
### leaf bundle
|
||||
|
||||
A [page bundle](#page-bundle) with an index.md file and zero or more [resources](#resource). Analogous to a physical leaf, a leaf bundle is at the end of a branch. Hugo ignores content (but not resources) beneath the leaf bundle. See [details](/content-management/page-bundles/).
|
||||
|
||||
### list page
|
||||
|
||||
Any [page kind](#page-kind) that receives a page [collection](#collection) in [context](#context). This includes the home page, [section pages](#section-page), [taxonomy pages](#taxonomy-page), and [term pages](#term-page).
|
||||
|
||||
### localization
|
||||
|
||||
Adaptation of a site to meet language and regional requirements. This includes translations, language-specific media, date and currency formats, etc. See [details](/content-management/multilingual/) and the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated l10n.
|
||||
|
||||
### map
|
||||
|
||||
An unordered group of elements, each indexed by a unique key. See the [Go documentation](https://go.dev/ref/spec#Map_types) for details.
|
||||
|
||||
### method
|
||||
|
||||
Used within a [template action](#template-action) and associated with an [object](#object), a method takes zero or more [arguments](#argument) and either returns a value or performs an action. For example, `.IsHome` is a method on the `.Page` object which returns `true` if the current page is the home page. See also [function](#function).
|
||||
|
||||
### module
|
||||
|
||||
Like a [theme](#theme), a module is a packaged combination of [archetypes](#archetype), assets, content, data, [templates](#template), translations, or configuration settings. A module may serve as the basis for a new site, or to augment an existing site. See [details](/hugo-modules/).
|
||||
|
||||
### object
|
||||
|
||||
A data structure with or without associated [methods](#method).
|
||||
|
||||
### page bundle
|
||||
|
||||
A directory that encapsulates both content and associated [resources](#resource). There are two types of page bundles: [leaf bundles](/getting-started/glossary/#leaf-bundle) and [branch bundles](/getting-started/glossary/#branch-bundle). See [details](/content-management/page-bundles/).
|
||||
|
||||
### page kind
|
||||
|
||||
A classification of rendered pages, one of "home", "page", "section", "taxonomy", or "term". Accessed via `.Page.Kind` in [templates](#template). See [details](/templates/section-templates/#page-kinds).
|
||||
|
||||
### pager
|
||||
|
||||
Created during [pagination](#pagination), a pager contains a subset of a section list, and navigation links to other pagers.
|
||||
|
||||
### paginate
|
||||
|
||||
To split a [section](#section) list into two or more [pagers](#pager) See [details](/templates/pagination/).
|
||||
|
||||
### pagination
|
||||
|
||||
The process of [paginating](#paginate) a [section](#section) list.
|
||||
|
||||
### parameter
|
||||
|
||||
Typically, a user-defined key/value pair at the site or page level, but may also refer to a configuration setting or an [argument](#argument).
|
||||
|
||||
### partial
|
||||
|
||||
A [template](#template) called from any other template including [shortcodes](#shortcode), [render hooks](#render-hook), and other partials. A partial either renders something or returns something. A partial can also call itself, for example, to [walk](#walk) a data structure.
|
||||
|
||||
### permalink
|
||||
|
||||
The absolute URL of a rendered page, including scheme and host.
|
||||
|
||||
### pipe
|
||||
|
||||
See [pipeline](#pipeline).
|
||||
|
||||
### pipeline
|
||||
|
||||
Within a [template action](#template-action), a pipeline is a possibly chained sequence of values, [function](#function) calls, or [method](#method) calls. Functions and methods in the pipeline may take multiple [arguments](#argument).
|
||||
|
||||
A pipeline may be *chained* by separating a sequence of commands with pipeline characters "|". In a chained pipeline, the result of each command is passed as the last argument to the following command. The output of the final command in the pipeline is the value of the pipeline. See the [Go documentation](https://pkg.go.dev/text/template#hdr-Pipelines) for details.
|
||||
|
||||
### publish
|
||||
|
||||
See [build](#build).
|
||||
|
||||
### regular page
|
||||
|
||||
Content with the "page" [page kind](#page-kind). See also [section page](#section-page).
|
||||
|
||||
### render hook
|
||||
|
||||
A [template](#template) that overrides standard markdown rendering. See [details](/templates/render-hooks/).
|
||||
|
||||
### resource
|
||||
|
||||
Any file consumed by the build process to augment or generate content, structure, behavior, or presentation. For example: images, videos, content snippets, CSS, Sass, Javascript, and data.
|
||||
|
||||
Hugo supports three types of resources: page resources (located in a [page bundle](/getting-started/glossary/#page-bundle)), global resources (located in the assets directory), and remote resources (typically accessed via https).
|
||||
|
||||
### scalar
|
||||
|
||||
A single value, one of [string](#string), [integer](#integer), [floating point](#floating-point), or [boolean](#boolean).
|
||||
|
||||
### section
|
||||
|
||||
A top-level content directory, or any content directory with an _index.md file. A content directory with an _index.md file is also known as a [branch bundle](/getting-started/glossary/#branch-bundle). Section templates receive one or more page [collections](#collection) in [context](#context). See [details](/content-management/sections/).
|
||||
|
||||
### section page
|
||||
|
||||
Content with the "section" [page kind](#page-kind). Typically a listing of [regular pages](#regular-page) and/or [section pages](#section-page) within the current [section](#section). See also [regular page](#regular-page).
|
||||
|
||||
### shortcode
|
||||
|
||||
A [template](#template) called from within markdown, taking zero or more [arguments](#argument). See [details](/content-management/shortcodes/).
|
||||
|
||||
### slice
|
||||
|
||||
A numbered sequence of elements. Unlike Go's [array](#array) data type, slices are dynamically sized. See the [Go documentation](https://go.dev/ref/spec#Slice_types) for details.
|
||||
|
||||
### string
|
||||
|
||||
A sequence of bytes. For example, `"What is 6 times 7?"` .
|
||||
|
||||
### taxonomy
|
||||
|
||||
A group of related [terms](#term) used to classify content. For example, a "colors" taxonomy might include the terms "red", "green", and "blue". See [details](/content-management/taxonomies/).
|
||||
|
||||
### taxonomy page
|
||||
|
||||
Content with the "taxonomy" [page kind](#page-kind). Typically a listing of [terms](#term) within a given [taxonomy](#taxonomy).
|
||||
|
||||
### template
|
||||
|
||||
An HTML file with [template actions](#template-action), located within the layouts directory of a project, theme, or module. See [details](/templates/).
|
||||
|
||||
### template action
|
||||
|
||||
A data evaluation or control structure within a [template](#template), delimited by "{{" and "}}". See the [Go documentation](https://pkg.go.dev/text/template#hdr-Actions) for details.
|
||||
|
||||
### term
|
||||
|
||||
A member of a [taxonomy](#taxonomy), used to classify content. See [details](/content-management/taxonomies/).
|
||||
|
||||
### term page
|
||||
|
||||
Content with the "term" [page kind](#page-kind). Typically a listing of [regular pages](#regular-page) and [section pages](#section-page) with a given [term](#term).
|
||||
|
||||
### theme
|
||||
|
||||
A packaged combination of [archetypes](#archetype), assets, content, data, [templates](#template), translations, or configuration settings. A theme may serve as the basis for a new site, or to augment an existing site. See also [module](#module).
|
||||
|
||||
### token
|
||||
|
||||
An identifier within a format string, beginning with a colon and replaced with a value when rendered. For example, use tokens in format strings for both [permalinks](/content-management/urls/#permalinks) and [dates](/functions/dateformat/#datetime-formatting-layouts).
|
||||
|
||||
|
||||
### type
|
||||
|
||||
See [content type](#content-type).
|
||||
|
||||
### variable
|
||||
|
||||
A variable initialized within a [template action](#template-action).
|
||||
|
||||
### walk
|
||||
|
||||
To recursively traverse a nested data structure. For example, rendering a multilevel menu.
|
|
@ -103,7 +103,7 @@ Press `Ctrl + C` to stop Hugo's development server.
|
|||
Add a new page to your site.
|
||||
|
||||
```text
|
||||
hugo new posts/my-first-post.md
|
||||
hugo new content posts/my-first-post.md
|
||||
```
|
||||
|
||||
Hugo created the file in the `content/posts` directory. Open the file with your editor.
|
||||
|
|
|
@ -171,6 +171,19 @@ Under the deploy step, you will see a link to your live site.
|
|||
|
||||
In the future, whenever you push a change from your local repository, GitHub will rebuild your site and deploy the changes.
|
||||
|
||||
## Customize the workflow
|
||||
|
||||
The example workflow above includes this step, which typically takes 10‑15 seconds:
|
||||
|
||||
```yaml
|
||||
- name: Install Dart Sass
|
||||
run: sudo snap install dart-sass
|
||||
```
|
||||
|
||||
You may remove this step if your site, themes, and modules do not transpile Sass to CSS using the [Dart Sass] transpiler.
|
||||
|
||||
[Dart Sass]: /hugo-pipes/transpile-sass-to-css/#dart-sass
|
||||
|
||||
## Additional resources
|
||||
|
||||
- [Learn more about GitHub Actions](https://docs.github.com/en/actions)
|
||||
|
|
|
@ -26,7 +26,7 @@ Note that you can mount any directory into Hugo's virtual `assets` folder using
|
|||
| `resources.GetMatch` | `GetMatch` finds the first Resource matching the given pattern, or nil if none found. See Match for a more complete explanation about the rules used. |
|
||||
| `resources.Match` | `Match` gets all resources matching the given base path prefix, e.g "*.png" will match all png files. The "*" does not match path delimiters (/), so if you organize your resources in sub-folders, you need to be explicit about it, e.g.: "images/*.png". To match any PNG image anywhere in the bundle you can do "\*\*.png", and to match all PNG images below the images folder, use "images/\*\*.jpg". The matching is case insensitive. Match matches by using the files name with path relative to the file system root with Unix style slashes (/) and no leading slash, e.g. "images/logo.png". See https://github.com/gobwas/glob for the full rules set.|
|
||||
|
||||
See the [GoDoc Page](https://pkg.go.dev/github.com/gohugoio/hugo@v0.93.1/tpl/resources) for the `resources` package for an up to date overview of all template functions in this namespace.
|
||||
See the [GoDoc Page](https://pkg.go.dev/github.com/gohugoio/hugo/tpl/resources) for the `resources` package for an up to date overview of all template functions in this namespace.
|
||||
|
||||
## Get a resource
|
||||
|
||||
|
@ -50,12 +50,16 @@ With `resources.GetRemote`, the first argument is a remote URL:
|
|||
|
||||
StatusCode
|
||||
: The HTTP status code, e.g. 200
|
||||
|
||||
Status
|
||||
: The HTTP status text, e.g. "200 OK"
|
||||
|
||||
TransferEncoding
|
||||
: The transfer encoding, e.g. "chunked"
|
||||
|
||||
ContentLength
|
||||
: The content length, e.g. 1234
|
||||
|
||||
ContentType
|
||||
: The content type, e.g. "text/html"
|
||||
|
||||
|
|
|
@ -36,8 +36,6 @@ There are several ways to set up CSS purging with PostCSS in Hugo. If you have a
|
|||
|
||||
The below configuration will write a `hugo_stats.json` file to the project root as part of the build. If you're only using this for the production build, you should consider placing it below [config/production](/getting-started/configuration/#configuration-directory).
|
||||
|
||||
<!-- TODO (jmm) writeStats => build.buildStats -->
|
||||
|
||||
{{< code-toggle file="hugo" >}}
|
||||
[build.buildStats]
|
||||
enable = true
|
||||
|
@ -83,7 +81,8 @@ These are the environment variables Hugo passes down to PostCSS (and Babel), whi
|
|||
|
||||
PWD
|
||||
: The absolute path to the project working directory.
|
||||
HUGO_ENVIRONMENT (and the alias HUGO_ENV)
|
||||
|
||||
HUGO_ENVIRONMENT
|
||||
: The value e.g. set with `hugo -e production` (defaults to `production` for `hugo` and `development` for `hugo server`).
|
||||
|
||||
HUGO_PUBLISHDIR
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
date: 2014-03-01T17:21:33Z
|
||||
description: "Hugo 0.10 brings syntax highlighting (powered by Pygments), automatic table of contents generation, support for Unicode, and a lot more!"
|
||||
title: "Hugo 0.10"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
- [Syntax highlighting](http://hugo.spf13.com/extras/highlighting) powered by pygments (**slow**)
|
||||
- Ability to [sort content](http://hugo.spf13.com/content/ordering) many more ways
|
||||
- Automatic [table of contents](http://hugo.spf13.com/extras/toc) generation
|
||||
- Support for unicode URLs, aliases and indexes
|
||||
- Configurable per-section [permalink](http://hugo.spf13.com/extras/permalinks) pattern support
|
||||
- Support for [paired shortcodes](http://hugo.spf13.com/extras/shortcodes)
|
||||
- Shipping with some [shortcodes](http://hugo.spf13.com/extras/shortcodes) (highlight & figure)
|
||||
- Adding [canonify](http://hugo.spf13.com/extras/urls) option to keep URLs relative
|
||||
- A bunch of [additional template functions](http://hugo.spf13.com/layouts/templatefunctions)
|
||||
- Watching very large sites now works on mac
|
||||
- RSS generation improved. Limited to 50 items by default, can limit further in [template](http://hugo.spf13.com/layout/rss)
|
||||
- Boolean params now supported in [frontmatter](http://hugo.spf13.com/content/front-matter)
|
||||
- Launched website [showcase](http://hugo.spf13.com/showcase). Show off your own hugo site!
|
||||
- A bunch of [bug fixes](https://github.com/spf13/hugo/commits/master)
|
|
@ -1,23 +0,0 @@
|
|||
---
|
||||
date: 2014-05-29T22:53:22Z
|
||||
description: "Now 3–4 times faster, Hugo 0.11 brings live reload, theme engine, menu system, XML sitemap, and more!"
|
||||
title: "Hugo 0.11"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
- Considerably faster... about 3 - 4x faster on average
|
||||
- [Live Reload](/getting-started/usage/#livereload). Hugo will automatically reload the browser when the build is complete
|
||||
- Theme engine w/[Theme Repository](http://github.com/spf13/hugoThemes)
|
||||
- [Menu system](/content-management/menus/) with support for active page
|
||||
- [Builders](/commands/hugo_new) to quickly create a new site, content or theme
|
||||
- [XML sitemap](/templates/sitemap-template) generation
|
||||
- [Integrated Disqus](/content-management/comments) support
|
||||
- Streamlined [template organization](/templates/introduction)
|
||||
- Brand new docs site
|
||||
- Support for publishDate which allows for posts to be dated in the future
|
||||
- More [sort](/functions/sort) options
|
||||
- Logging support
|
||||
- Much better error handling
|
||||
- More informative verbose output
|
||||
- Renamed Indexes > [Taxonomies](/content-management/taxonomies/)
|
||||
- Renamed Chrome > [Partials](/templates/partials)
|
|
@ -1,29 +0,0 @@
|
|||
---
|
||||
date: 2015-01-21T20:35:00Z
|
||||
description: "Hugo 0.12 focused on polishing the theme engine and adding critical functionality to the templates."
|
||||
title: "Hugo 0.12"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
A lot has happened since Hugo v0.11.0 was released. Most of the work has been
|
||||
focused on polishing the theme engine and adding critical functionality to the
|
||||
templates.
|
||||
|
||||
This release represents over 90 code commits from 28 different contributors.
|
||||
|
||||
- 10 [new themes](https://github.com/spf13/hugoThemes) created by the community
|
||||
- fully themable [partials](/templates/partials/)
|
||||
- [404 template](/templates/404/) support in themes
|
||||
- [shortcode](/content-management/shortcodes/) support in themes
|
||||
- [views](/templates/views/) support in themes
|
||||
- inner [shortcode](/content-management/shortcodes) content now treated as markdown
|
||||
- support for header ids in markdown (# header {#myid})
|
||||
- [where](/functions/where/) template function to filter lists of content, taxonomies, etc.
|
||||
- [groupby](/templates/lists#by-page-field) & [groupbydate](/templates/lists/#by-date-1) methods to group pages
|
||||
- taxonomy [pages list](/templates/taxonomy-templates#taxonomy-methods) now sortable, filterable, limitable & groupable
|
||||
- general cleanup to taxonomies & documentation to make it more clear and consistent
|
||||
- [showcase](/showcase/) returned and has been expanded
|
||||
- pretty links now always have trailing slashes
|
||||
- [baseurl](/getting-started/configuration#baseurl) can now include a subdirectory
|
||||
- better feedback about draft & future post rendering
|
||||
- a variety of improvements to [the website](/)
|
|
@ -1,95 +0,0 @@
|
|||
---
|
||||
date: 2015-02-22T04:10:06Z
|
||||
description: "Hugo 0.13 is the largest Hugo release to date. The release introduced some long sought after features (pagination, sequencing, data loading, tons of template improvements) as well as major internal improvements. In addition to the code changes, the Hugo community has grown significantly and now has over 3000 stars on GitHub, 134 contributors, 24 themes and 1000s of happy users."
|
||||
title: "Hugo 0.13"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
The v0.13.0 release is the largest Hugo release to date. The release introduced
|
||||
some long sought after features (pagination, sequencing, data loading, tons of
|
||||
template improvements) as well as major internal improvements. In addition to
|
||||
the code changes, the Hugo community has grown significantly and now has over
|
||||
3000 stars on GitHub, 134 contributors, 24 themes and 1000s of happy users.
|
||||
|
||||
This release represents **448 contributions by 65 contributors**
|
||||
|
||||
A special shout out to [@bep](https://github.com/bep) and
|
||||
[@anthonyfok](https://github.com/anthonyfok) for their new role as Hugo
|
||||
maintainers and their tremendous contributions this release.
|
||||
|
||||
### New major features
|
||||
- Support for [data files](http://gohugo.io/extras/datafiles/) in [YAML](http://yaml.org/),
|
||||
[JSON](http://www.json.org/), or [TOML](https://github.com/toml-lang/toml)
|
||||
located in the `data` directory ([#885](https://github.com/spf13/hugo/issues/885))
|
||||
- Support for [dynamic content](http://gohugo.io/extras/dynamiccontent/) by loading JSON & CSV
|
||||
from remote sources via GetJson and GetCsv in short codes or other layout
|
||||
files ([#748](https://github.com/spf13/hugo/issues/748))
|
||||
- [Pagination support](http://gohugo.io/extras/pagination/) for home page, sections and
|
||||
taxonomies ([#750](https://github.com/spf13/hugo/issues/750))
|
||||
- Universal sequencing support
|
||||
- A new, generic Next/Prev functionality is added to all lists of pages
|
||||
(sections, taxonomies, etc.)
|
||||
- Add in-section [Next/Prev](http://gohugo.io/templates/variables/) content pointers
|
||||
- `Scratch` -- [a "scratchpad"](http://gohugo.io/extras/scratch) for your node- and page-scoped
|
||||
variables
|
||||
- [Cross Reference](http://gohugo.io/extras/crossreferences/) support to easily link documents
|
||||
together with the ref and relref shortcodes.
|
||||
- [Ace](http://ace.yoss.si/) template engine support ([#541](https://github.com/spf13/hugo/pull/541))
|
||||
- A new [shortcode](http://gohugo.io/extras/shortcodes/) token of `{{</* */>}}` (raw HTML)
|
||||
alongside the existing `{{%/* */%}}` (Markdown)
|
||||
- A top level `Hugo` variable (on Page & Node) is added with various build
|
||||
information
|
||||
- Several new ways to order and group content:
|
||||
- `ByPublishDate`
|
||||
- `GroupByPublishDate(format, order)`
|
||||
- `GroupByParam(key, order)`
|
||||
- `GroupByParamDate(key, format, order)`
|
||||
- Hugo has undergone a major refactoring, with a new handler system and a
|
||||
generic file system. This sounds and is technical, but will pave the way for
|
||||
new features and make Hugo even speedier
|
||||
|
||||
### Notable enhancements to existing features
|
||||
- The [shortcode](http://gohugo.io/extras/shortcodes/) handling is rewritten for speed and
|
||||
better error messages.
|
||||
- Several improvements to the [template functions](http://gohugo.io/templates/functions/):
|
||||
- `where` is now even more powerful and accepts SQL-like syntax with the
|
||||
operators `==`, `eq`; `!=`, `<>`, `ne`; `>=`, `ge`; `>`, `gt`; `<=`,
|
||||
`le`; `<`, `lt`; `in`, `not in`
|
||||
- `where` template function now also accepts dot chaining key argument
|
||||
(e.g. `"Params.foo.bar"`)
|
||||
- New template functions:
|
||||
- `apply`
|
||||
- `chomp`
|
||||
- `delimit`
|
||||
- `sort`
|
||||
- `markdownify`
|
||||
- `in` and `intersect`
|
||||
- `trim`
|
||||
- `replace`
|
||||
- `dateFormat`
|
||||
- Several [configurable improvements related to Markdown
|
||||
rendering](http://gohugo.io/overview/configuration/#configure-blackfriday-rendering:a66b35d20295cb764719ac8bd35837ec):
|
||||
- Configuration of footnote rendering
|
||||
- Optional support for smart angled quotes, e.g. `"Hugo"` → «Hugo»
|
||||
- Enable descriptive header IDs
|
||||
- URLs in XML output is now correctly canonified ([#725](https://github.com/spf13/hugo/issues/725), [#728](https://github.com/spf13/hugo/issues/728), and part
|
||||
of [#789](https://github.com/spf13/hugo/issues/789))
|
||||
|
||||
### Other improvements
|
||||
- Internal change to use byte buffer pool significantly lowering memory usage
|
||||
and providing measurable performance improvements overall
|
||||
- Changes to docs:
|
||||
- A new [Troubleshooting](http://gohugo.io/troubleshooting/overview/) section is added
|
||||
- It's now searchable through Google Custom Search ([#753](https://github.com/spf13/hugo/issues/753))
|
||||
- Some new great tutorials:
|
||||
- [Automated deployments with
|
||||
Wercker](http://gohugo.io/tutorials/automated-deployments/)
|
||||
- [Creating a new theme](http://gohugo.io/tutorials/creating-a-new-theme/)
|
||||
- [`hugo new`](http://gohugo.io/content/archetypes/) now copies the content in addition to the front matter
|
||||
- Improved unit test coverage
|
||||
- Fixed a lot of Windows-related path issues
|
||||
- Improved error messages for template and rendering errors
|
||||
- Enabled soft LiveReload of CSS and images ([#490](https://github.com/spf13/hugo/pull/490))
|
||||
- Various fixes in RSS feed generation ([#789](https://github.com/spf13/hugo/issues/789))
|
||||
- `HasMenuCurrent` and `IsMenuCurrent` is now supported on Nodes
|
||||
- A bunch of [bug fixes](https://github.com/spf13/hugo/commits/master)
|
|
@ -1,54 +0,0 @@
|
|||
---
|
||||
date: 2015-05-26T01:32:45Z
|
||||
description: "The v0.14.0 Hugo release brings of the most demanded features to Hugo. The foundation of Hugo is stabilizing nicely and a lot of polish has been added. We’ve expanded support for additional content types with support for AsciiDoc, Restructured Text, HTML and Markdown."
|
||||
title: "Hugo 0.14"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
The v0.14.0 Hugo release brings of the most demanded features to Hugo. The foundation of Hugo is stabilizing nicely and a lot of polish has been added. We’ve expanded support for additional content types with support for AsciiDoc, Restructured Text, HTML and Markdown. Some of these types depend on external libraries as there does not currently exist native support in Go. We’ve tried to make the experience as seamless as possible. Look for more improvements here in upcoming releases.
|
||||
|
||||
A lot of work has been done to improve the user experience, with extra polish to the Windows experience. Hugo errors are more helpful overall and Hugo now can detect if it’s being run in Windows Explorer and provide additional instructions to run it via the command prompt.
|
||||
|
||||
The Hugo community continues to grow. Hugo has over 4000 stars on github, 165 contributors, 35 themes and 1000s of happy users. It is now the 5th most popular static site generator (by Stars) and has the 3rd largest contributor community.
|
||||
|
||||
This release represents over **240 contributions by 36 contributors** to the main Hugo codebase.
|
||||
|
||||
Big shout out to [@bep](https://github.com/bep) who led the development of Hugo this release, [@anthonyfok](https://github.com/anthonyfok), [@eparis](https://github.com/eparis), [@SchumacherFM](https://github.com/SchumacherFM), [@RickCogley](https://github.com/RickCogley) & [@mdhender](https://github.com/mdhender) for their significant contributions and [@tatsushid](https://github.com/tatsushid) for his continuous improvements to the templates. Also a big thanks to all the theme creators. 11 new themes have been added since last release and the [hugoThemes repo now has previews of all of them](https://github.com/spf13/hugoThemes/blob/master/README.md#theme-list).
|
||||
|
||||
Hugo also depends on a lot of other great projects. A big thanks to all of our dependencies inclding:
|
||||
[cobra](https://github.com/spf13/cobra), [viper](https://github.com/spf13/viper), [blackfriday](https://github.com/russross/blackfriday), [pflag](https://github.com/spf13/pflag), [HugoThemes](https://github.com/spf13/hugothemes), [BurntSushi/Toml](https://github.com/BurntSushi/toml), [goYaml](https://github.com/go-yaml/yaml/tree/v2), and the Go standard library.
|
||||
|
||||
## New features
|
||||
- Support for all file types in content directory.
|
||||
- If dedicated file type handler isn’t found it will be copied to the destination.
|
||||
- Add `AsciiDoc` support using external helpers.
|
||||
- Add experimental support for [`Mmark`](https://github.com/miekg/mmark) markdown processor
|
||||
- Bash autocomplete support via `genautocomplete` command
|
||||
- Add section menu support for a [Section Menu for Lazy Bloggers](https://gohugo.io/templates/menu-templates/#section-menu-for-lazy-bloggers)
|
||||
- Add support for `Ace` base templates
|
||||
- Adding `RelativeURLs = true` to site config will now make all the relative URLs relative to the content root.
|
||||
- New template functions:
|
||||
- `getenv`
|
||||
- The string functions `substr` and `slicestr`
|
||||
*`seq`, a sequence generator very similar to its Gnu counterpart
|
||||
- `absURL` and `relURL`, both of which takes the `BaseURL` setting into account
|
||||
|
||||
## Improvements
|
||||
- Highlighting with `Pygments` is now cached to disk -- expect a major speed boost if you use it!
|
||||
- More Pygments highlighting options, including `line numbers`
|
||||
- Show help information to Windows users who try to double click on `hugo.exe`.
|
||||
- Add `bind` flag to `hugo server` to set the interface to which the server will bind
|
||||
- Add support for `canonifyurls` in `srcset`
|
||||
- Add shortcode support for HTML (content) files
|
||||
- Allow the same `shortcode` to be used with or without inline content
|
||||
- Configurable RSS output filename
|
||||
|
||||
## Bugfixes
|
||||
- Fix panic with paginator and zero pages in result set.
|
||||
- Fix crossrefs on Windows.
|
||||
- Fix `eq` and `ne` template functions when used with a raw number combined with the result of `add`, `sub` etc.
|
||||
- Fix paginator with uglyurls
|
||||
- Fix [#998](https://github.com/spf13/hugo/issues/988), supporting UTF8 characters in Permalinks.
|
||||
|
||||
## Notices
|
||||
- To get variable and function names in line with the rest of the Go community, a set of variable and function names has been deprecated: These will still work in 0.14, but will be removed in 0.15. What to do should be obvious by the build log; `getJson` to `getJSON`, `getCsv` to `getCSV`, `safeHtml` to `safeHTML`, `safeCss` to `safeCSS`, `safeUrl` to `safeURL`, `Url` to `URL`, `UrlPath` to `URLPath`, `BaseUrl` to `BaseURL`, `Recent` to `Pages`, `Indexes` to `Taxonomies`.
|
|
@ -1,97 +0,0 @@
|
|||
---
|
||||
date: 2015-12-19T09:45:24Z
|
||||
description: "The v0.15.0 Hugo release brings a lot of polish to Hugo. Exactly 6 months after the 0.14 release, Hugo has seen massive growth and changes. Most notably, this is Hugo's first release under the Apache 2.0 license."
|
||||
title: "Hugo 0.15"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
The v0.15.0 Hugo release brings a lot of polish to Hugo. Exactly 6 months after the 0.14 release, Hugo has seen massive growth and changes. Most notably, this is Hugo's first release under the Apache 2.0 license. With this license change we hope to expand the great community around Hugo and make it easier for our many users to contribute. This release represents over **377 contributions by 87 contributors** to the main Hugo repo and hundreds of improvements to the libraries Hugo uses. Hugo also launched a [new theme showcase](http://themes.gohugo.io) and participated in [Hacktoberfest](https://hacktoberfest.digitalocean.com).
|
||||
|
||||
Hugo now has:
|
||||
- 6700 (+2700) stars on GitHub
|
||||
- 235 (+75) contributors
|
||||
- 65 (+30) themes
|
||||
|
||||
**Template Improvements:** This release takes Hugo to a new level of speed and usability. Considerable work has been done adding features and performance to the template system which now has full support of Ace, Amber and Go Templates.
|
||||
|
||||
**Hugo Import:** Have a Jekyll site, but dreaming of porting it to Hugo? This release introduces a new `hugo import jekyll`command that makes this easier than ever.
|
||||
|
||||
**Performance Improvements:** Just when you thought Hugo couldn't get any faster, Hugo continues to improve in speed while adding features. Notably Hugo 0.15 introduces the ability to render and serve directly from memory resulting in 30%+ lower render times.
|
||||
|
||||
Huge thanks to all who participated in this release. A special thanks to [@bep](https://github.com/bep) who led the development of Hugo this release again, [@anthonyfok](https://github.com/anthonyfok), [@eparis](https://github.com/eparis), [@tatsushid](https://github.com/tatsushid) and [@DigitalCraftsman](https://github.com/digitalcraftsman/).
|
||||
|
||||
## New features
|
||||
- new `hugo import jekyll` command. [#1469](https://github.com/spf13/hugo/pull/1469)
|
||||
- The new `Param` convenience method on `Page` and `Node` can be used to get the most specific parameter value for a given key. [#1462](https://github.com/spf13/hugo/issues/1462)
|
||||
- Several new information elements have been added to `Page` and `Node`:
|
||||
- `RuneCount`: The number of [runes](http://blog.golang.org/strings) in the content, excluding any whitespace. This may be a good alternative to `.WordCount` for Japanese and other CJK languages where a word-split by spaces makes no sense. [#1266](https://github.com/spf13/hugo/issues/1266)
|
||||
- `RawContent`: Raw Markdown as a string. One use case may be of embedding remarkjs.com slides.
|
||||
- `IsHome`: tells the truth about whether you're on the home page or not.
|
||||
|
||||
## Improvements
|
||||
- `hugo server` now builds ~30%+ faster by rendering to memory instead of disk. To get the old behavior, start the server with `--renderToDisk=true`.
|
||||
- Hugo now supports dynamic reloading of the config file when watching.
|
||||
- We now use a custom-built `LazyFileReader` for reading file contents, which means we don't read media files in `/content` into memory anymore -- and file reading is now performed in parallel on multicore PCs. [#1181](https://github.com/spf13/hugo/issues/1181)
|
||||
- Hugo is now built with `Go 1.5` which, among many other improvements, have fixed the last known data race in Hugo. [#917](https://github.com/spf13/hugo/issues/917)
|
||||
- Paginator now also supports page groups. [#1274](https://github.com/spf13/hugo/issues/1274)
|
||||
- Markdown improvements:
|
||||
- Hugo now supports GitHub-flavoured markdown code fences for highlighting for `md`-files (Blackfriday rendered markdown) and `mmark` files (MMark rendered markdown). [#362](https://github.com/spf13/hugo/issues/362) [#1258](https://github.com/spf13/hugo/issues/1258)
|
||||
- Several new Blackfriday options are added:
|
||||
- Option to disable Blackfriday's `Smartypants`.
|
||||
- Option for Blackfriday to open links in a new window/tab. [#1220](https://github.com/spf13/hugo/issues/1220)
|
||||
- Option to disable Blackfriday's LaTeX style dashes [#1231](https://github.com/spf13/hugo/issues/1231)
|
||||
- Definition lists extension support.
|
||||
- `Scratch` now has built-in `map` support.
|
||||
- We now fall back to `link title` for the default page sort. [#1299](https://github.com/spf13/hugo/issues/1299)
|
||||
- Some notable new configuration options:
|
||||
- `IgnoreFiles` can be set with a list of Regular Expressions that matches files to be ignored during build. [#1189](https://github.com/spf13/hugo/issues/1189)
|
||||
- `PreserveTaxonomyNames`, when set to `true`, will preserve what you type as the taxonomy name both in the folders created and the taxonomy `key`, but it will be normalized for the URL. [#1180](https://github.com/spf13/hugo/issues/1180)
|
||||
- `hugo gen` can now generate man files, bash auto complete and markdown documentation
|
||||
- Hugo will now make suggestions when a command is mistyped
|
||||
- Shortcodes now have a boolean `.IsNamedParams` property. [#1597](https://github.com/spf13/hugo/pull/1597)
|
||||
|
||||
## New Template Features
|
||||
- All template engines:
|
||||
- The new `dict` function that could be used to pass maps into a template. [#1463](https://github.com/spf13/hugo/pull/1463)
|
||||
- The new `pluralize` and `singularize` template funcs.
|
||||
- The new `base64Decode` and `base64Encode` template funcs.
|
||||
- The `sort` template func now accepts field/key chaining arguments and pointer values. [#1330](https://github.com/spf13/hugo/issues/1330)
|
||||
- Several fixes for `slicestr` and `substr`, most importantly, they now have full `utf-8`-support. [#1190](https://github.com/spf13/hugo/issues/1190) [#1333](https://github.com/spf13/hugo/issues/1333) [#1347](https://github.com/spf13/hugo/issues/1347)
|
||||
- The new `last` template function allows the user to select the last `N` items of a slice. [#1148](https://github.com/spf13/hugo/issues/1148)
|
||||
- The new `after` func allows the user to select the items after the `Nth` item. [#1200](https://github.com/spf13/hugo/pull/1200)
|
||||
- Add `time.Time` type support to the `where`, `ge`, `gt`, `le`, and `lt` template functions.
|
||||
- It is now possible to use constructs like `where Values ".Param.key" nil` to filter pages that doesn't have a particular parameter. [#1232](https://github.com/spf13/hugo/issues/1232)
|
||||
- `getJSON`/`getCSV`: Add retry on invalid content. [#1166](https://github.com/spf13/hugo/issues/1166)
|
||||
- The new `readDir` func lists local files. [#1204](https://github.com/spf13/hugo/pull/1204)
|
||||
- The new `safeJS` function allows the embedding of content into JavaScript contexts in Go templates.
|
||||
- Get the main site RSS link from any page by accessing the `.Site.RSSLink` property. [#1566](https://github.com/spf13/hugo/pull/1566)
|
||||
- Ace templates:
|
||||
- Base templates now also works in themes. [#1215](https://github.com/spf13/hugo/issues/1215).
|
||||
- And now also on Windows. [#1178](https://github.com/spf13/hugo/issues/1178)
|
||||
- Full support for Amber templates including all template functions.
|
||||
- A built-in template for Google Analytics. [#1505](https://github.com/spf13/hugo/pull/1505)
|
||||
- Hugo is now shipped with new built-in shortcodes: [#1576](https://github.com/spf13/hugo/issues/1576)
|
||||
- `youtube` for YouTube videos
|
||||
- `vimeo` for Vimeo videos
|
||||
- `gist` for GitHub gists
|
||||
- `tweet` for Twitter Tweets
|
||||
- `speakerdeck` for Speakerdeck slides
|
||||
|
||||
## Bugfixes
|
||||
- Fix data races in page sorting and page reversal. These operations are now also cached. [#1293](https://github.com/spf13/hugo/issues/1293)
|
||||
- `page.HasMenuCurrent()` and `node.HasMenuCurrent()` now work correctly in multi-level nested menus.
|
||||
- Support `Fish and Chips` style section titles. Previously, this would end up as `Fish And Chips`. Now, the first character is made to upper, but the rest are preserved as-is. [#1176](https://github.com/spf13/hugo/issues/1176)
|
||||
- Hugo now removes superfluous p-tags around shortcodes. [#1148](https://github.com/spf13/hugo/issues/1148)
|
||||
|
||||
## Notices
|
||||
- `hugo server` will watch by default now.
|
||||
- Some fields and methods were deprecated in `0.14`. These are now removed, so the error message isn't as friendly if you still use the old values. So please change:
|
||||
- `getJson` to `getJSON`, `getCsv` to `getCSV`, `safeHtml` to
|
||||
`safeHTML`, `safeCss` to `safeCSS`, `safeUrl` to `safeURL`, `Url` to `URL`,
|
||||
`UrlPath` to `URLPath`, `BaseUrl` to `BaseURL`, `Recent` to `Pages`.
|
||||
|
||||
## Known Issues
|
||||
|
||||
Using the Hugo v0.15 32-bit Windows or ARM binary, running `hugo server` would crash or hang due to a [memory alignment issue](https://golang.org/pkg/sync/atomic/#pkg-note-BUG) in [Afero](https://github.com/spf13/afero). The bug was discovered shortly after the v0.15.0 release and has since been [fixed](https://github.com/spf13/afero/pull/23) by @tpng. If you encounter this bug, you may either compile Hugo v0.16-DEV from source, or use the following solution/workaround:
|
||||
- **64-bit Windows users: Please use [hugo_0.15_windows_amd64.zip](https://github.com/spf13/hugo/releases/download/v0.15/hugo_0.15_windows_amd64.zip)** (amd64 == x86-64). It is only the 32-bit hugo_0.15_windows_386.zip that crashes/hangs (see #1621 and #1628).
|
||||
- **32-bit Windows and ARM users: Please run `hugo server --renderToDisk` as a workaround** until Hugo v0.16 is released (see [“hugo server” returns runtime error on armhf](https://discuss.gohugo.io/t/hugo-server-returns-runtime-error-on-armhf/2293) and #1716).
|
|
@ -1,248 +0,0 @@
|
|||
---
|
||||
date: 2016-06-06T13:54:06-04:00
|
||||
description: "Hugo 0.16 is our best and biggest release ever. The Hugo community has outdone itself with continued performance improvements, beautiful themes and increased stability."
|
||||
title: "Hugo 0.16"
|
||||
categories: ["Releases"]
|
||||
aliases: [/0-16/]
|
||||
---
|
||||
|
||||
Hugo 0.16 is our best and biggest release ever. The Hugo community has
|
||||
outdone itself with continued performance improvements,
|
||||
[beautiful themes](http://themes.gohugo.io) for all types of sites from project
|
||||
sites to documentation to blogs to portfolios, and increased stability.
|
||||
|
||||
This release represents **over 550 contributions by over 110 contributors** to
|
||||
the main Hugo code base. Since last release Hugo has **gained 3500 stars, 90
|
||||
contributors and 23 additional themes.**
|
||||
|
||||
This release celebrates 3 years since {{< gh "@spf13" >}} wrote the first lines
|
||||
of Hugo. During those 3 years Hugo has accomplished some major milestones
|
||||
including...
|
||||
|
||||
* 10,000+ stars on GitHub
|
||||
* 320+ contributors
|
||||
* 90+ themes
|
||||
* 1000s of happy websites
|
||||
* Many subprojects like {{< gh "@spf13/cobra">}}, {{< gh "@spf13/viper">}} and
|
||||
{{< gh "@spf13/afero">}} which have experienced broad usage across the Go
|
||||
ecosystem.
|
||||
|
||||
{{< gh "@bep" >}} led the development of Hugo for the 3rd consecutive release
|
||||
with nearly half of the contributions to 0.16 in addition to his considerable
|
||||
contributions as lead maintainer. {{< gh "@anthonyfok" >}}, {{< gh
|
||||
"@DigitalCraftsman" >}}, {{< gh "@MooreReason" >}} all made significant
|
||||
contributions. A special thanks to {{< gh "@abourget" >}} for his considerable
|
||||
work on multilingual support. Due to its broad impact we wanted to spend more
|
||||
time testing it and it will be included in Hugo's next release.
|
||||
|
||||
### Highlights
|
||||
|
||||
**Partial Builds:** Prior to this release Hugo would always reread and rebuild
|
||||
the entire site. This release introduces support for reactive site building
|
||||
while watching (`hugo server`). Hugo will watch the filesystem for changes and
|
||||
only re-read the changed files. Depending on the files change Hugo will
|
||||
intelligently re-render only the needed portion of the site. Performance gains
|
||||
depend on the operation performed and size of the site. In our testing build
|
||||
times decreased anywhere from 10% to 99%.
|
||||
|
||||
**Template Improvements:** Template improvements continue to be a mainstay of each Hugo release. Hugo 0.16 adds support for the new `block` keyword introduced in Go 1.6 -- think base templates with default sections -- as well as many new template functions.
|
||||
|
||||
**Polish:** As Hugo matures releases will inevitably contain fewer huge new features. This release represents hundreds of small improvements across ever facet of Hugo which will make for a much better experience for all of our users. Worth mentioning here is the curious bug where live reloading didn't work in some editors on OS X, including the popular TextMate 2. This is now fixed. Oh, and now any error will exit with an error code, a big thing for automated deployments.
|
||||
|
||||
### New Features
|
||||
* Support reading configuration variables from the OS environment {{<gh 2090 >}}
|
||||
* Add emoji support {{<gh 1892>}}
|
||||
* Add `themesDir` option to configuration {{<gh 1556>}}
|
||||
* Add support for Go 1.6 `block` keyword in templates {{<gh 1832>}}
|
||||
* Partial static sync {{<gh 1644>}}
|
||||
* Source file based relative linking (à la GitHub) {{<gh 0x0f6b334b6715253b030c4e783b88e911b6e53e56>}}
|
||||
* Add `ByLastmod` sort function to pages. {{<gh 0xeb627ca16de6fb5e8646279edd295a8bf0f72bf1 >}}
|
||||
* New templates functions:
|
||||
* `readFile` {{<gh 1551 >}}
|
||||
* `countwords` and `countrunes` {{<gh 1440>}}
|
||||
* `default` {{<gh 1943>}}
|
||||
* `hasPrefix` {{<gh 1243>}}
|
||||
* `humanize` {{<gh 1818>}}
|
||||
* `jsonify` {{<gh 0x435e996c4fd48e9009ffa9f83a19fb55f0777dbd>}}
|
||||
* `md5` and `sha1` {{<gh 1932>}}
|
||||
* `replaceRE` {{<gh 1845>}}
|
||||
* `findRE` {{<gh 2048>}}
|
||||
* `shuffle` {{<gh 1942>}}
|
||||
* `slice` {{<gh 1902>}}
|
||||
* `plainify` {{<gh 1915>}}
|
||||
|
||||
### Enhancements
|
||||
|
||||
* Hugo now exits with error code on any error. This is a big thing for
|
||||
automated deployments. {{<gh 740 >}}
|
||||
* Print error when `/index.html` is zero-length {{<gh 947>}}
|
||||
* Enable dirname and filename bash autocompletion for more flags {{<gh
|
||||
0x666ddd237791b56fd048992dca9a27d1af50a10e>}}
|
||||
* Improve error handling in commands {{<gh 1502>}}
|
||||
* Add sanity checks for `hugo import jekyll` {{<gh 1625 >}}
|
||||
* Add description to `Page.Params` {{<gh 1484>}}
|
||||
* Add async version of Google Analytics internal template {{<gh 1711>}}
|
||||
* Add autostart option to YouTube shortcode {{<gh 1784>}}
|
||||
* Set Date and Lastmod for main home page {{<gh 1903>}}
|
||||
* Allow URL with extension in front matter {{<gh 1923>}}
|
||||
* Add list support in Scratch {{<gh
|
||||
0xeaba04e82bdfc5d4c29e970f11b4aab9cc0efeaa>}}
|
||||
* Add file option to gist shortcode {{<gh 1955>}}
|
||||
* Add config layout and content directory CLI options {{<gh 1698>}}
|
||||
* Add boolean value comparison to `where` template function {{<gh
|
||||
0xf3c74c9db484c8961e70cb3458f9e41e7832fa12>}}
|
||||
* Do not write to cache when `ignoreCache` is set {{<gh 2067>}}
|
||||
* Add option to disable rendering of 404 page {{<gh 2037>}}
|
||||
* Mercurial is no longer needed to build Hugo {{<gh 2062 >}}
|
||||
* Do not create `robots.txt` by default {{<gh 2049>}}
|
||||
* Disable syntax guessing for PygmentsCodeFences by default. To enable syntax
|
||||
guessing again, add the following to your config file:
|
||||
`PygmentsCodeFencesGuessSyntax = true` {{<gh 2034>}}
|
||||
* Make `ByCount` sort consistently {{<gh 1930>}}
|
||||
* Add `Scratch` to shortcode {{<gh 2000>}}
|
||||
* Add support for symbolic links for content, layout, static, theme {{<gh 1855 >}}
|
||||
* Add '+' as one of the valid characters in URLs specified in the front matter {{<gh 1290 >}}
|
||||
* Make alias redirect output URLs relative when `RelativeURLs = true` {{<gh 2093 >}}
|
||||
* Hugo injects meta generator tag on homepage if missing {{<gh 2182 >}}
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix file change watcher for TextMate 2 and friends on OS X {{<gh 1053 >}}
|
||||
* Make dynamic reloading of config file reliable on all platform {{<gh 1684 >}}
|
||||
* Hugo now works on Linux/arm64 {{<gh 1772 >}}
|
||||
* `plainIDAnchors` now defaults to `true` {{<gh 2057>}}
|
||||
* Win32 and ARM builds fixed {{<gh 1716>}}
|
||||
* Copy static dir files without theme's static dir {{<gh 1656>}}
|
||||
* Make `noTimes` command flag work {{<gh 1657>}}
|
||||
* Change most global CLI flags into local ones {{<gh 1624>}}
|
||||
* Remove transformation of menu URLs {{<gh 1239>}}
|
||||
* Do not fail on unknown Jekyll file {{<gh 1705>}}
|
||||
* Use absolute path when editing with editor {{<gh 1589>}}
|
||||
* Fix hugo server "Watching for changes" path display {{<gh 1721>}}
|
||||
* Do not strip special characters out of URLs {{<gh 1292>}}
|
||||
* Fix `RSSLink` when uglyURLs are enabled {{<gh 175>}}
|
||||
* Get BaseURL from viper in server mode {{<gh 1821>}}
|
||||
* Fix shortcode handling in RST {{<gh 1904>}}
|
||||
* Use default sitemap configuration for homepage {{<gh 1304>}}
|
||||
* Exit if specific port is unavailable in server mode {{<gh 1901>}}
|
||||
* Fix regression in "section menus for lazy blogger" {{<gh 2065>}}
|
||||
|
||||
****
|
||||
|
||||
## **0.15.0** November 25, 2015
|
||||
|
||||
The v0.15.0 Hugo release brings a lot of polish to Hugo. Exactly 6 months after
|
||||
the 0.14 release, Hugo has seen massive growth and changes. Most notably, this
|
||||
is Hugo's first release under the Apache 2.0 license. With this license change
|
||||
we hope to expand the great community around Hugo and make it easier for our
|
||||
many users to contribute. This release represents over **377 contributions by
|
||||
87 contributors** to the main Hugo repo and hundreds of improvements to the
|
||||
libraries Hugo uses. Hugo also launched a [new theme
|
||||
showcase](http://themes.gohugo.io) and participated in
|
||||
[Hacktoberfest](https://hacktoberfest.digitalocean.com).
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 6700 (+2700) stars on GitHub
|
||||
* 235 (+75) contributors
|
||||
* 65 (+30) themes
|
||||
|
||||
|
||||
**Template Improvements:** This release takes Hugo to a new level of speed and
|
||||
usability. Considerable work has been done adding features and performance to
|
||||
the template system which now has full support of Ace, Amber and Go Templates.
|
||||
|
||||
**Hugo Import:** Have a Jekyll site, but dreaming of porting it to Hugo? This
|
||||
release introduces a new `hugo import jekyll`command that makes this easier
|
||||
than ever.
|
||||
|
||||
**Performance Improvements:** Just when you thought Hugo couldn't get any faster,
|
||||
Hugo continues to improve in speed while adding features. Notably Hugo 0.15
|
||||
introduces the ability to render and serve directly from memory resulting in
|
||||
30%+ lower render times.
|
||||
|
||||
Huge thanks to all who participated in this release. A special thanks to
|
||||
{{< gh "@bep" >}} who led the development of Hugo this release again,
|
||||
{{< gh "@anthonyfok" >}},
|
||||
{{< gh "@eparis" >}},
|
||||
{{< gh "@tatsushid" >}} and
|
||||
{{< gh "@DigitalCraftsman" >}}.
|
||||
|
||||
|
||||
### New features
|
||||
* new `hugo import jekyll` command. {{< gh 1469 >}}
|
||||
* The new `Param` convenience method on `Page` and `Node` can be used to get the most specific parameter value for a given key. {{< gh 1462 >}}
|
||||
* Several new information elements have been added to `Page` and `Node`:
|
||||
* `RuneCount`: The number of [runes](http://blog.golang.org/strings) in the content, excluding any whitespace. This may be a good alternative to `.WordCount` for Japanese and other CJK languages where a word-split by spaces makes no sense. {{< gh 1266 >}}
|
||||
* `RawContent`: Raw Markdown as a string. One use case may be of embedding remarkjs.com slides.
|
||||
* `IsHome`: tells the truth about whether you're on the home page or not.
|
||||
|
||||
### Improvements
|
||||
* `hugo server` now builds ~30%+ faster by rendering to memory instead of disk. To get the old behavior, start the server with `--renderToDisk=true`.
|
||||
* Hugo now supports dynamic reloading of the config file when watching.
|
||||
* We now use a custom-built `LazyFileReader` for reading file contents, which means we don't read media files in `/content` into memory anymore -- and file reading is now performed in parallel on multicore PCs. {{< gh 1181 >}}
|
||||
* Hugo is now built with `Go 1.5` which, among many other improvements, have fixed the last known data race in Hugo. {{< gh 917 >}}
|
||||
* Paginator now also supports page groups. {{< gh 1274 >}}
|
||||
* Markdown improvements:
|
||||
* Hugo now supports GitHub-flavoured markdown code fences for highlighting for `md`-files (Blackfriday rendered markdown) and `mmark` files (MMark rendered markdown). {{< gh 362 1258 >}}
|
||||
* Several new Blackfriday options are added:
|
||||
* Option to disable Blackfriday's `Smartypants`.
|
||||
* Option for Blackfriday to open links in a new window/tab. {{< gh 1220 >}}
|
||||
* Option to disable Blackfriday's LaTeX style dashes {{< gh 1231 >}}
|
||||
* Definition lists extension support.
|
||||
* `Scratch` now has built-in `map` support.
|
||||
* We now fall back to `link title` for the default page sort. {{< gh 1299 >}}
|
||||
* Some notable new configuration options:
|
||||
* `IgnoreFiles` can be set with a list of Regular Expressions that matches files to be ignored during build. {{< gh 1189 >}}
|
||||
* `PreserveTaxonomyNames`, when set to `true`, will preserve what you type as the taxonomy name both in the folders created and the taxonomy `key`, but it will be normalized for the URL. {{< gh 1180 >}}
|
||||
* `hugo gen` can now generate man files, bash auto complete and markdown documentation
|
||||
* Hugo will now make suggestions when a command is mistyped
|
||||
* Shortcodes now have a boolean `.IsNamedParams` property. {{< gh 1597 >}}
|
||||
|
||||
### New Template Features
|
||||
* All template engines:
|
||||
* The new `dict` function that could be used to pass maps into a template. {{< gh 1463 >}}
|
||||
* The new `pluralize` and `singularize` template funcs.
|
||||
* The new `base64Decode` and `base64Encode` template funcs.
|
||||
* The `sort` template func now accepts field/key chaining arguments and pointer values. {{< gh 1330 >}}
|
||||
* Several fixes for `slicestr` and `substr`, most importantly, they now have full `utf-8`-support. {{< gh 1190 1333 1347 >}}
|
||||
* The new `last` template function allows the user to select the last `N` items of a slice. {{< gh 1148 >}}
|
||||
* The new `after` func allows the user to select the items after the `Nth` item. {{< gh 1200 >}}
|
||||
* Add `time.Time` type support to the `where`, `ge`, `gt`, `le`, and `lt` template functions.
|
||||
* It is now possible to use constructs like `where Values ".Param.key" nil` to filter pages that doesn't have a particular parameter. {{< gh 1232 >}}
|
||||
* `getJSON`/`getCSV`: Add retry on invalid content. {{< gh 1166 >}}
|
||||
* The new `readDir` func lists local files. {{< gh 1204 >}}
|
||||
* The new `safeJS` function allows the embedding of content into JavaScript contexts in Go templates.
|
||||
* Get the main site RSS link from any page by accessing the `.Site.RSSLink` property. {{< gh 1566 >}}
|
||||
* Ace templates:
|
||||
* Base templates now also works in themes. {{< gh 1215 >}}.
|
||||
* And now also on Windows. {{< gh 1178 >}}
|
||||
* Full support for Amber templates including all template functions.
|
||||
* A built-in template for Google Analytics. {{< gh 1505 >}}
|
||||
* Hugo is now shipped with new built-in shortcodes: {{< gh 1576 >}}
|
||||
* `youtube` for YouTube videos
|
||||
* `vimeo` for Vimeo videos
|
||||
* `gist` for GitHub gists
|
||||
* `tweet` for Twitter Tweets
|
||||
* `speakerdeck` for Speakerdeck slides
|
||||
|
||||
|
||||
### Bugfixes
|
||||
* Fix data races in page sorting and page reversal. These operations are now also cached. {{< gh 1293 >}}
|
||||
* `page.HasMenuCurrent()` and `node.HasMenuCurrent()` now work correctly in multi-level nested menus.
|
||||
* Support `Fish and Chips` style section titles. Previously, this would end up as `Fish And Chips`. Now, the first character is made toupper, but the rest are preserved as-is. {{< gh 1176 >}}
|
||||
* Hugo now removes superfluous p-tags around shortcodes. {{< gh 1148 >}}
|
||||
|
||||
### Notices
|
||||
* `hugo server` will watch by default now.
|
||||
* Some fields and methods were deprecated in `0.14`. These are now removed, so the error message isn't as friendly if you still use the old values. So please change:
|
||||
* `getJson` to `getJSON`, `getCsv` to `getCSV`, `safeHtml` to
|
||||
`safeHTML`, `safeCss` to `safeCSS`, `safeUrl` to `safeURL`, `Url` to `URL`,
|
||||
`UrlPath` to `URLPath`, `BaseUrl` to `BaseURL`, `Recent` to `Pages`.
|
||||
|
||||
### Known Issues
|
||||
|
||||
Using the Hugo v0.15 32-bit Windows or ARM binary, running `hugo server` would crash or hang due to a [memory alignment issue](https://golang.org/pkg/sync/atomic/#pkg-note-BUG) in [Afero](https://github.com/spf13/afero). The bug was discovered shortly after the v0.15.0 release and has since been [fixed](https://github.com/spf13/afero/pull/23) by {{< gh "@tpng" >}}. If you encounter this bug, you may either compile Hugo v0.16-DEV from source, or use the following solution/workaround:
|
||||
|
||||
* **64-bit Windows users: Please use [hugo_0.15_windows_amd64.zip](https://github.com/gohugoio/hugo/releases/download/v0.15/hugo_0.15_windows_amd64.zip)** (amd64 == x86-64). It is only the 32-bit hugo_0.15_windows_386.zip that crashes/hangs (see {{< gh 1621 >}} and {{< gh 1628 >}}).
|
||||
* **32-bit Windows and ARM users: Please run `hugo server --renderToDisk` as a workaround** until Hugo v0.16 is released (see [“hugo server” returns runtime error on armhf](https://discourse.gohugo.io/t/hugo-server-returns-runtime-error-on-armhf/2293) and {{< gh 1716 >}}).
|
|
@ -1,91 +0,0 @@
|
|||
---
|
||||
categories: ["Releases"]
|
||||
date: 2016-10-07T13:54:06-04:00
|
||||
description: "Hugo now supports multilingual sites with the most simple and elegant experience."
|
||||
link: ""
|
||||
title: "0.17: Hugo is going global"
|
||||
aliases: [/0-17/]
|
||||
---
|
||||
Hugo is going global with our 0.17 release. We put a lot of thought into how we could extend Hugo
|
||||
to support multilingual websites with the most simple and elegant experience. Hugo's multilingual
|
||||
capabilities rival the best web and documentation software, but Hugo's experience is unmatched.
|
||||
If you have a single language website, the simple Hugo experience you already love is unchanged.
|
||||
Adding additional languages to your website is simple and straightforward. Hugo has been completely
|
||||
internally rewritten to be multilingual aware with translation and internationalization features
|
||||
embedded throughout Hugo.
|
||||
|
||||
Hugo continues its trend of each release being faster than the last. It's quite a challenge to consistently add
|
||||
significant new functionality and simultaneously dramatically improve performance. {{<gh "@bep">}} has made it
|
||||
his personal mission to apply the Go mantra of "Enable more. Do less" to Hugo. Hugo's consistent improvement
|
||||
is a testament to his brilliance and his dedication to his craft. Hugo additionally benefits from the
|
||||
performance improvements from the Go team in the Go 1.7 release.
|
||||
|
||||
This release represents **over 300 contributions by over 70 contributors** to
|
||||
the main Hugo code base. Since last release Hugo has **gained 2000 stars, 50 new
|
||||
contributors and 20 additional themes.**
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 12,000 stars on GitHub
|
||||
* 370+ contributors
|
||||
* 110+ themes
|
||||
|
||||
{{<gh "@bep" >}} continues to lead the project with the lionshare of contributions
|
||||
and reviews. A special thanks to {{<gh "@bep" >}} and {{<gh "@abourget" >}} for their
|
||||
considerable work on multilingual support.
|
||||
|
||||
A big welcome to newcomers {{<gh "@MarkDBlackwell" >}}, {{<gh "@bogem" >}} and
|
||||
{{<gh "@g3wanghc" >}} for their critical contributions.
|
||||
|
||||
### Highlights
|
||||
|
||||
**Multilingual Support:**
|
||||
Hugo now supports multiple languages side-by-side. A single site can now have multiple languages rendered with
|
||||
full support for translation and i18n.
|
||||
|
||||
**Performance:**
|
||||
Hugo is faster than ever! Hugo 0.17 is not only our fastest release, it's also the most efficient.
|
||||
Hugo 0.17 is **nearly twice as fast as Hugo 0.16** and uses about 10% less memory.
|
||||
This means that the same site will build in nearly half the time it took with Hugo 0.16.
|
||||
For the first time Hugo sites are averaging well under 1ms per rendered content.
|
||||
|
||||
**Docs overhaul:**
|
||||
This release really focused on improving the documentation. [Gohugo.io](http://gohugo.io) is
|
||||
more accurate and complete than ever.
|
||||
|
||||
**Support for macOS Sierra**
|
||||
|
||||
### New Features
|
||||
* Multilingual support {{<gh 2303>}}
|
||||
* Allow content expiration {{<gh 2137 >}}
|
||||
* New templates functions:
|
||||
* `querify` function to generate query strings inside templates {{<gh 2257>}}
|
||||
* `htmlEscape` and `htmlUnescape` template functions {{<gh 2287>}}
|
||||
* `time` converts a timestamp string into a time.Time structure {{<gh 2329>}}
|
||||
|
||||
### Enhancements
|
||||
|
||||
* Render the shortcodes as late as possible {{<gh 0xed0985404db4630d1b9d3ad0b7e41fb186ae0112>}}
|
||||
* Remove unneeded casts in page.getParam {{<gh 2186 >}}
|
||||
* Automatic page date fallback {{<gh 2239>}}
|
||||
* Enable safeHTMLAttr {{<gh 2234>}}
|
||||
* Add TODO list support for markdown {{<gh 2296>}}
|
||||
* Make absURL and relURL accept any type {{<gh 2352>}}
|
||||
* Suppress 'missing static' error {{<gh 2344>}}
|
||||
* Make summary, wordcount etc. more efficient {{<gh 2378>}}
|
||||
* Better error reporting in `hugo convert` {{<gh 2440>}}
|
||||
* Reproducible builds thanks to govendor {{<gh 2461>}}
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix shortcode in markdown headers {{<gh 2210 >}}
|
||||
* Explicitly bind livereload to hugo server port {{<gh 2205>}}
|
||||
* Fix Emojify for certain text patterns {{<gh 2198>}}
|
||||
* Normalize file name to NFC {{<gh 2259>}}
|
||||
* Ignore emacs temp files {{<gh 2266>}}
|
||||
* Handle symlink change event {{<gh 2273>}}
|
||||
* Fix panic when using URLize {{<gh 2274>}}
|
||||
* `hugo import jekyll`: Fixed target path location check {{<gh 2293>}}
|
||||
* Return all errors from casting in templates {{<gh 2356>}}
|
||||
* Fix paginator counter on x86-32 {{<gh 2420>}}
|
||||
* Fix half-broken self-closing shortcodes {{<gh 2499>}}
|
|
@ -1,112 +0,0 @@
|
|||
---
|
||||
date: 2016-12-30T13:54:02-04:00
|
||||
categories: ["Releases"]
|
||||
description: "The primary new feature in Hugo 0.18 is that every piece of content is now a Page."
|
||||
link: ""
|
||||
title: "Hugo 0.18"
|
||||
aliases: [/0-18/]
|
||||
---
|
||||
|
||||
Hugo 0.18.1 is a bug fix release fixing some issues introduced in Hugo 0.18:
|
||||
|
||||
* Fix 32-bit binaries {{<gh 2847 >}}
|
||||
* Fix issues with `preserveTaxonomyNames` {{<gh 2809 >}}
|
||||
* Fix `.URL` for taxonomy pages when `uglyURLs=true` {{<gh 2819 >}}
|
||||
* Fix `IsTranslated` and `Translations` for node pages {{<gh 2812 >}}
|
||||
* Make template error messages more verbose {{<gh 2820 >}}
|
||||
|
||||
## **0.18.0** December 19th 2016
|
||||
|
||||
Today, we're excited to release the much-anticipated Hugo 0.18!
|
||||
|
||||
We're heading towards the end of the year 2016, and we can look back on three releases and a steady growing community around the project.
|
||||
This release includes **over 220 contributions by nearly 50 contributors** to the main codebase.
|
||||
Since the last release, Hugo has **gained 1750 stars and 27 additional themes**.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
- 13750+ stars
|
||||
- 408+ contributors
|
||||
- 137+ themes
|
||||
|
||||
{{< gh "@bep" >}} once again took the lead of Hugo and contributed a significant amount of additions.
|
||||
Also a big shoutout to {{< gh "@digitalcraftsman" >}} for his relentless work on keeping the documentation and the themes site in pristine condition,
|
||||
and also a big thanks to {{< gh "@moorereason" >}} and {{< gh "@bogem" >}} for their contributions.
|
||||
|
||||
We wish you all a Merry Christmas and a Happy New Year.<br>
|
||||
*The Hugo team*
|
||||
|
||||
### Highlights
|
||||
|
||||
The primary new feature in Hugo 0.18 is that every piece of content is now a `Page` ({{<gh 2297>}}). This means that every page, including the homepage, can have a content file with front matter.
|
||||
|
||||
Not only is this a much simpler model to understand, it is also faster and paved the way for several important new features:
|
||||
|
||||
* Enable proper titles for Nodes {{<gh 1051>}}
|
||||
* Sitemap.xml should include nodes, as well as pages {{<gh 1303>}}
|
||||
* Document homepage content workaround {{<gh 2240>}}
|
||||
* Allow home page to be easily authored in markdown {{<gh 720>}}
|
||||
* Minimalist website with homepage as content {{<gh 330>}}
|
||||
|
||||
Hugo again continues its trend of each release being faster than the last. It's quite a challenge to consistently add significant new functionality and simultaneously dramatically improve performance. Running [this benchmark]( https://github.com/bep/hugo-benchmark) with [these sites](https://github.com/bep/hugo-benchmark/tree/master/sites) (renders to memory) shows about 60% reduction in time spent and 30% reduction in memory usage compared to Hugo 0.17.
|
||||
|
||||
### Other New Features
|
||||
|
||||
* Every `Page` now has a `Kind` property. Since everything is a `Page` now, the `Kind` is used to differentiate different kinds of pages.
|
||||
Possible values are `page`, `home`, `section`, `taxonomy`, and `taxonomyTerm`.
|
||||
(Internally, we also define `RSS`, `sitemap`, `robotsTXT`, and `404`, but those have no practical use for end users at the moment since they are not included in any collections.)
|
||||
* Add a `GitInfo` object to `Page` if `enableGitInfo` is set. It then also sets `Lastmod` for the given `Page` to the author date provided by Git. {{<gh 2291>}}
|
||||
* Implement support for alias templates {{<gh 2533 >}}
|
||||
* New template functions:
|
||||
* Add `imageConfig` function {{<gh 2677>}}
|
||||
* Add `sha256` function {{<gh 2762>}}
|
||||
* Add `partialCached` template function {{<gh 1368>}}
|
||||
* Add shortcode to display Instagram images {{<gh 2690>}}
|
||||
* Add `noChmod` option to disable perm sync {{<gh 2749>}}
|
||||
* Add `quiet` build mode {{<gh 1218>}}
|
||||
|
||||
|
||||
### Notices
|
||||
|
||||
* `.Site.Pages` will now contain *several kinds of pages*, including regular pages, sections, taxonomies, and the home page.
|
||||
If you want a specific kind of page, you can filter it with `where` and `Kind`.
|
||||
`.Site.RegularPages` is a shortcut to the page collection you have been used to getting.
|
||||
* `RSSlink` is now deprecated. Use `RSSLink` instead.
|
||||
Note that in Hugo 0.17 both of them existed, so there is a fifty-fifty chance you will not have to do anything
|
||||
(if you use a theme, the chance is close to 0), and `RSSlink` will still work for two Hugo versions.
|
||||
|
||||
### Fixes
|
||||
|
||||
* Revise the `base` template lookup logic so it now better matches the behavior of regular templates, making it easier to override the master templates from the theme {{<gh 2783>}}
|
||||
* Add workaround for `block` template crash.
|
||||
Block templates are very useful, but there is a bug in Go 1.6 and 1.7 which makes the template rendering crash if you use the block template in more complex scenarios.
|
||||
This is fixed in the upcoming Go 1.8, but Hugo adds a temporary workaround in Hugo 0.18. {{<gh 2549>}}
|
||||
* All the `Params` configurations are now case insensitive {{<gh 1129>}} {{<gh 2590>}} {{<gh 2615>}}
|
||||
* Make RawContent raw again {{<gh 2601>}}
|
||||
* Fix archetype title and date handling {{<gh 2750>}}
|
||||
* Fix TOML archetype parsing in `hugo new` {{<gh 2745>}}
|
||||
* Fix page sorting when weight is zero {{<gh 2673>}}
|
||||
* Fix page names that contain dot {{<gh 2555>}}
|
||||
* Fix RSS Title regression {{<gh 2645>}}
|
||||
* Handle ToC before handling shortcodes {{<gh 2433>}}
|
||||
* Only watch relevant themes dir {{<gh 2602>}}
|
||||
* Hugo new content creates TOML slices with closing bracket on new line {{<gh 2800>}}
|
||||
|
||||
### Improvements
|
||||
|
||||
* Add page information to error logging in rendering {{<gh 2570>}}
|
||||
* Deprecate `RSSlink` in favor of `RSSLink`
|
||||
* Make benchmark command more useful {{<gh 2432>}}
|
||||
* Consolidate the `Param` methods {{<gh 2590>}}
|
||||
* Allow to set cache dir in config file
|
||||
* Performance improvements:
|
||||
* Avoid repeated Viper loads of `sectionPagesMenu` {{<gh 2728>}}
|
||||
* Avoid reading from Viper for path and URL funcs {{<gh 2495>}}
|
||||
* Add `partialCached` template function. This can be a significant performance boost if you have complex partials that does not need to be rerendered for every page. {{<gh 1368>}}
|
||||
|
||||
### Documentation Updates
|
||||
|
||||
* Update roadmap {{<gh 2666>}}
|
||||
* Update multilingual example {{<gh 2417>}}
|
||||
* Add a "Deployment with rsync" tutorial page {{<gh 2658>}}
|
||||
* Refactor `/docs` to use the `block` keyword {{<gh 2226>}}
|
|
@ -1,81 +0,0 @@
|
|||
---
|
||||
date: 2017-02-27T13:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "Hugo 0.19 brings native Emacs Org-mode content support, and Hugo has its own Twitter account"
|
||||
link: ""
|
||||
title: "Hugo 0.19"
|
||||
aliases: [/0-19/]
|
||||
---
|
||||
|
||||
We're happy to announce the first release of Hugo in 2017.
|
||||
|
||||
This release represents **over 180 contributions by over 50 contributors** to the main Hugo code base. Since last release Hugo has **gained 1450 stars, 35 new contributors, and 15 additional themes.**
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 15200+ stars
|
||||
* 470+ contributors
|
||||
* 151+ themes
|
||||
|
||||
Furthermore, Hugo has its own Twitter account ([@gohugoio](https://twitter.com/gohugoio)) where we share bite-sized news and themes from the Hugo community.
|
||||
|
||||
{{< gh "@bep" >}} leads the Hugo development and once again contributed a significant amount of additions. Also a big shoutout to {{< gh "@chaseadamsio" >}} for the Emacs Org-mode support, {{< gh "@digitalcraftsman" >}} for his relentless work on keeping the documentation and the themes site in pristine condition, {{< gh "@fj" >}}for his work on revising the `params` handling in Hugo, and {{< gh "@moorereason" >}} and {{< gh "@bogem" >}} for their ongoing contributions.
|
||||
|
||||
### Highlights
|
||||
|
||||
Hugo `0.19` brings native Emacs Org-mode content support ({{<gh 1483>}}), big thanks to {{< gh "@chaseadamsio" >}}.
|
||||
|
||||
Also, a considerably amount of work have been put into cleaning up the Hugo source code, in an issue titled [Refactor the globals out of site build](https://github.com/gohugoio/hugo/issues/2701). This is not immediately visible to the Hugo end user, but will speed up future development.
|
||||
|
||||
Hugo `0.18` was bringing full-parallel page rendering, so workarounds depending on rendering order did not work anymore, and pages with duplicate target paths (common examples would be `/index.md` or `/about/index.md`) would now conflict with the home page or the section listing.
|
||||
|
||||
With Hugo `0.19`, you can control this behaviour by turning off page types you do not want ({{<gh 2534 >}}). In its most extreme case, if you put the below setting in your [`config.toml`](/getting-started/configuration/), you will get **nothing!**:
|
||||
|
||||
{{< code-toggle file="config" >}}
|
||||
disableKinds = ["page", "home", "section", "taxonomy", "taxonomyTerm", "RSS", "sitemap", "robotsTXT", "404"]
|
||||
{{< /code-toggle >}}
|
||||
|
||||
### Other New Features
|
||||
|
||||
* Add ability to sort pages by front matter parameters, enabling easy custom "top 10" page lists. {{<gh 3022 >}}
|
||||
* Add `truncate` template function {{<gh 2882 >}}
|
||||
* Add `now` function, which replaces the now deprecated `.Now` {{<gh 2859 >}}
|
||||
* Make RSS item limit configurable {{<gh 3035 >}}
|
||||
|
||||
### Enhancements
|
||||
|
||||
* Enhance `.Param` to permit arbitrarily nested parameter references {{<gh 2598 >}}
|
||||
* Use `Page.Params` more consistently when adding metadata {{<gh 3033 >}}
|
||||
* The `sectionPagesMenu` feature ("Section menu for the lazy blogger") is now integrated with the section content pages. {{<gh 2974 >}}
|
||||
* Hugo `0.19` is compiled with Go 1.8!
|
||||
* Make template funcs like `findRE` and friends more liberal in what argument types they accept {{<gh 3018 >}} {{<gh 2822 >}}
|
||||
* Improve generation of OpenGraph date tags {{<gh 2979 >}}
|
||||
|
||||
### Notes
|
||||
|
||||
* `sourceRelativeLinks` is now deprecated and will be removed in Hugo `0.21` if no one is stepping up to the plate and fixes and maintains this feature. {{<gh 3028 >}}
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix `.Site.LastChange` on sites where the default sort order is not chronological. {{<gh 2909 >}}
|
||||
* Fix regression of `.Truncated` evaluation in manual summaries. {{<gh 2989 >}}
|
||||
* Fix `preserveTaxonomyNames` regression {{<gh 3070 >}}
|
||||
* Fix issue with taxonomies when only some have content page {{<gh 2992 >}}
|
||||
* Fix instagram shortcode panic on invalid ID {{<gh 3048 >}}
|
||||
* Fix subtle data race in `getJSON` {{<gh 3045 >}}
|
||||
* Fix deadlock in cached partials {{<gh 2935 >}}
|
||||
* Avoid double-encoding of paginator URLs {{<gh 2177 >}}
|
||||
* Allow tilde in URLs {{<gh 2177 >}}
|
||||
* Fix `.Site.Pages` handling on live reloads {{<gh 2869 >}}
|
||||
* `UniqueID` now correctly uses the fill file path from the content root to calculate the hash, and is finally ... unique!
|
||||
* Discard current language based on `.Lang()`, go get translations correct for paginated pages. {{<gh 2972 >}}
|
||||
* Fix infinite loop in template AST handling for recursive templates {{<gh 2927 >}}
|
||||
* Fix issue with watching when config loading fails {{<gh 2603 >}}
|
||||
* Correctly flush the imageConfig on live-reload {{<gh 3016 >}}
|
||||
* Fix parsing of TOML arrays in front matter {{<gh 2752 >}}
|
||||
|
||||
### Docs
|
||||
|
||||
* Add tutorial "How to use Google Firebase to host a Hugo site" {{<gh 3007 >}}
|
||||
* Improve documentation for menu rendering {{<gh 3056 >}}
|
||||
* Revise GitHub Pages deployment tutorial {{<gh 2930 >}}
|
|
@ -1,70 +0,0 @@
|
|||
---
|
||||
date: 2017-04-10T13:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "Hugo 0.20 introduces the powerful and long sought after feature Custom Output Formats"
|
||||
link: ""
|
||||
title: "Hugo 0.20"
|
||||
aliases: [/0-20/]
|
||||
---
|
||||
|
||||
Hugo `0.20` introduces the powerful and long sought after feature [Custom Output Formats](http://gohugo.io/extras/output-formats/); Hugo isn’t just that “static HTML with an added RSS feed” anymore. _Say hello_ to calendars, e-book formats, Google AMP, and JSON search indexes, to name a few ( [#2828](https://github.com/gohugoio/hugo/issues/2828) ).
|
||||
|
||||
This release represents **over 180 contributions by over 30 contributors** to the main Hugo code base. Since last release Hugo has **gained 1100 stars, 20 new contributors and 5 additional themes.**
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 16300+ stars
|
||||
* 495+ contributors
|
||||
* 156+ themes
|
||||
|
||||
[@bep](https://github.com/bep) still leads the Hugo development with his witty Norwegian humor, and once again contributed a significant amount of additions. Also a big shoutout to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition, and [@moorereason](https://github.com/moorereason) and [@bogem](https://github.com/bogem) for their ongoing contributions.
|
||||
|
||||
## Other Highlights
|
||||
|
||||
[@bogem](https://github.com/bogem) has also contributed TOML as an alternative and much simpler format for language/i18n files ([#3200](https://github.com/gohugoio/hugo/issues/3200)). A feature you will appreciate when you start to work on larger translations.
|
||||
|
||||
Also, there have been some important updates in the Emacs Org-mode handling: [@chaseadamsio](https://github.com/chaseadamsio) has fixed the newline-handling ( [#3126](https://github.com/gohugoio/hugo/issues/3126) ) and [@clockoon](https://github.com/clockoon) has added basic footnote support.
|
||||
|
||||
Worth mentioning is also the ongoing work that [@rdwatters](https://github.com/rdwatters) and [@budparr](https://github.com/budparr) is doing to re-do the [gohugo.io](https://gohugo.io/) site, including a total restructuring and partial rewrite of the documentation. It is getting close to finished, and it looks fantastic!
|
||||
|
||||
## Notes
|
||||
|
||||
* `RSS` description in the built-in template is changed from full `.Content` to `.Summary`. This is a somewhat breaking change, but is what most people expect from their RSS feeds. If you want full content, please provide your own RSS template.
|
||||
* The deprecated `.RSSlink` is now removed. Use `.RSSLink`.
|
||||
* `RSSUri` is deprecated and will be removed in a future Hugo version, replace it with an output format definition.
|
||||
* The deprecated `.Site.GetParam` is now removed, use `.Site.Param`.
|
||||
* Hugo does no longer append missing trailing slash to `baseURL` set as a command line parameter, making it consistent with how it behaves from site config. [#3262](https://github.com/gohugoio/hugo/issues/3262)
|
||||
|
||||
## Enhancements
|
||||
|
||||
* Hugo `0.20` is built with Go 1.8.1.
|
||||
* Add `.Site.Params.mainSections` that defaults to the section with the most pages. Plan is to get themes to use this instead of the hardcoded `blog` in `where` clauses. [#3206](https://github.com/gohugoio/hugo/issues/3206)
|
||||
* File extension is now configurable. [#320](https://github.com/gohugoio/hugo/issues/320)
|
||||
* Improve `markdownify` template function performance. [#3292](https://github.com/gohugoio/hugo/issues/3292)
|
||||
* Add taxonomy terms’ pages to `.Data.Pages` [#2826](https://github.com/gohugoio/hugo/issues/2826)
|
||||
* Change `RSS` description from full `.Content` to `.Summary`.
|
||||
* Ignore “.” dirs in `hugo --cleanDestinationDir` [#3202](https://github.com/gohugoio/hugo/issues/3202)
|
||||
* Allow `jekyll import` to accept both `2006-01-02` and `2006-1-2` date format [#2738](https://github.com/gohugoio/hugo/issues/2738)
|
||||
* Raise the default `rssLimit` [#3145](https://github.com/gohugoio/hugo/issues/3145)
|
||||
* Unify section list vs single template lookup order [#3116](https://github.com/gohugoio/hugo/issues/3116)
|
||||
* Allow `apply` to be used with the built-in Go template funcs `print`, `printf` and `println`. [#3139](https://github.com/gohugoio/hugo/issues/3139)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Fix deadlock in `getJSON` [#3211](https://github.com/gohugoio/hugo/issues/3211)
|
||||
* Make sure empty terms pages are created. [#2977](https://github.com/gohugoio/hugo/issues/2977)
|
||||
* Fix base template lookup order for sections [#2995](https://github.com/gohugoio/hugo/issues/2995)
|
||||
* `URL` fixes:
|
||||
* Fix pagination URLs with `baseURL` with sub-root and `canonifyUrls=false` [#1252](https://github.com/gohugoio/hugo/issues/1252)
|
||||
* Fix pagination URL for resources with “.” in name [#2110](https://github.com/gohugoio/hugo/issues/2110) [#2374](https://github.com/gohugoio/hugo/issues/2374) [#1885](https://github.com/gohugoio/hugo/issues/1885)
|
||||
* Handle taxonomy names with period [#3169](https://github.com/gohugoio/hugo/issues/3169)
|
||||
* Handle `uglyURLs` ambiguity in `Permalink` [#3102](https://github.com/gohugoio/hugo/issues/3102)
|
||||
* Fix `Permalink` for language-roots wrong when `uglyURLs` is `true` [#3179](https://github.com/gohugoio/hugo/issues/3179)
|
||||
* Fix misc case issues for `URLs` [#1641](https://github.com/gohugoio/hugo/issues/1641)
|
||||
* Fix for taxonomies URLs when `uglyUrls=true` [#1989](https://github.com/gohugoio/hugo/issues/1989)
|
||||
* Fix empty `RSSLink` for list pages with content page. [#3131](https://github.com/gohugoio/hugo/issues/3131)
|
||||
* Correctly identify regular pages on the form “my_index_page.md” [#3234](https://github.com/gohugoio/hugo/issues/3234)
|
||||
* `Exit -1` on `ERROR` in global logger [#3239](https://github.com/gohugoio/hugo/issues/3239)
|
||||
* Document hugo `help command` [#2349](https://github.com/gohugoio/hugo/issues/2349)
|
||||
* Fix internal `Hugo` version handling for bug fix releases. [#3025](https://github.com/gohugoio/hugo/issues/3025)
|
||||
* Only return `RSSLink` for pages that actually have a RSS feed. [#1302](https://github.com/gohugoio/hugo/issues/1302)
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
date: 2017-04-13T13:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "Hugo 0.20.1 is a bug fix release, fixing some important regressions introduced in 0.20"
|
||||
link: ""
|
||||
title: "Hugo 0.20.1"
|
||||
aliases: [/0-20-1/]
|
||||
---
|
||||
|
||||
* Fix logic for base template in work dir vs in the theme [#3323](https://github.com/gohugoio/hugo/issues/3323)
|
||||
* camelCased templates (partials, shortcodes etc.) not found [#3333](https://github.com/gohugoio/hugo/issues/3333)
|
||||
* Live-reload fails with `_index.md` with paginator [#3315](https://github.com/gohugoio/hugo/issues/3315)
|
||||
* `rssURI` WARNING always shown [#3319](https://github.com/gohugoio/hugo/issues/3319)
|
|
@ -1,45 +0,0 @@
|
|||
---
|
||||
date: 2017-04-16T13:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "Hugo 0.20.2 adds support for plain text partials included into HTML templates"
|
||||
link: ""
|
||||
title: "Hugo 0.20.2"
|
||||
aliases: [/0-20-2/]
|
||||
---
|
||||
|
||||
Hugo `0.20.2` adds support for plain text partials included into `HTML` templates. This was a side-effect of the big new [Custom Output Format](https://gohugo.io/extras/output-formats/) feature in `0.20`, and while the change was intentional and there was an ongoing discussion about fixing it in [#3273](https://github.com/gohugoio/hugo/issues/3273), it did break some themes. There were valid workarounds for these themes, but we might as well get it right.
|
||||
|
||||
The most obvious use case for this is inline `CSS` styles, which you now can do without having to name your partials with a `html` suffix.
|
||||
|
||||
A simple example:
|
||||
|
||||
In `layouts/partials/mystyles.css`:
|
||||
|
||||
body {
|
||||
background-color: {{ .Param "colors.main" }}
|
||||
}
|
||||
|
||||
Then in `config.toml` (note that by using the `.Param` lookup func, we can override the color in a page’s front matter if we want):
|
||||
|
||||
{{< code-toggle file="config" >}}
|
||||
[params]
|
||||
[params.colors]
|
||||
main = "green"
|
||||
text = "blue"
|
||||
{{< /code-toggle >}}
|
||||
|
||||
And then in `layouts/partials/head.html` (or the partial used to include the head section into your layout):
|
||||
|
||||
<head>
|
||||
<style type="text/css">
|
||||
{{ partial "mystyles.css" . | safeCSS }}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
Of course, `0.20` also made it super-easy to create external `CSS` stylesheets based on your site and page configuration. A simple example:
|
||||
|
||||
Add “CSS” to your home page’s `outputs` list, create the template `/layouts/index.css` using Go template syntax for the dynamic parts, and then include it into your `HTML` template with:
|
||||
|
||||
{{ with .OutputFormats.Get "css" }}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end }}`
|
|
@ -1,24 +0,0 @@
|
|||
---
|
||||
date: 2017-04-24T13:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "This is a bug-fix release with one important fix. But it also adds some harness around GoReleaser"
|
||||
link: ""
|
||||
title: "Hugo 0.20.3"
|
||||
aliases: [/0-20-3/]
|
||||
---
|
||||
|
||||
This is a bug-fix release with one important fix. But it also adds some harness around [GoReleaser](https://github.com/goreleaser/goreleaser) to automate the Hugo release process. Big thanks to [@caarlos0](https://github.com/caarlos0) for great and super-fast support fixing issues along the way.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 16619+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 458+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 156+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Enhancement
|
||||
|
||||
* Automate the Hugo release process [550eba64](https://github.com/gohugoio/hugo/commit/550eba64705725eb54fdb1042e0fb4dbf6f29fd0) [@bep](https://github.com/bep) [#3358](https://github.com/gohugoio/hugo/issues/3358)
|
||||
|
||||
## Fix
|
||||
|
||||
* Fix handling of zero-length files [9bf5c381](https://github.com/gohugoio/hugo/commit/9bf5c381b6b3e69d4d8dbfd7a40074ac44792bbf) [@bep](https://github.com/bep) [#3355](https://github.com/gohugoio/hugo/issues/3355)
|
|
@ -1,22 +0,0 @@
|
|||
---
|
||||
date: 2017-04-24T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "This is the second bug-fix release of the day, fixing a couple of issues related to the new release scripts"
|
||||
link: ""
|
||||
title: "Hugo 0.20.4"
|
||||
aliases: [/0-20-4/]
|
||||
---
|
||||
|
||||
This is the second bug-fix release of the day, fixing a couple of issues related to the new release scripts.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 16626+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 457+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 156+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Fix statically linked binaries [275bcf56](https://github.com/gohugoio/hugo/commit/275bcf566c7cb72367d4423cf4810319311ff680) [@munnerz](https://github.com/munnerz) [#3382](https://github.com/gohugoio/hugo/issues/3382)
|
||||
* Filename change in Hugo 0.20.3 binaries [#3385](https://github.com/gohugoio/hugo/issues/3385)
|
||||
* Fix version calculation [cb3c6b6f](https://github.com/gohugoio/hugo/commit/cb3c6b6f7670f85189a4a3637e7132901d1ed6e9) [@bep](https://github.com/bep)
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
date: 2017-04-25T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: ""
|
||||
link: ""
|
||||
title: "Hugo 0.20.5"
|
||||
aliases: [/0-20-5/]
|
||||
---
|
||||
|
||||
This is a bug-fix release which fixes the version number of `0.20.4` (which wrongly shows up as `0.21-DEV`) ([#3388](https://github.com/gohugoio/hugo/issues/3388)).
|
|
@ -1,22 +0,0 @@
|
|||
---
|
||||
date: 2017-04-27T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: ""
|
||||
link: ""
|
||||
title: "Hugo 0.20.6"
|
||||
aliases: [/0-20-6/]
|
||||
---
|
||||
|
||||
There have been some [shouting on discuss.gohugo.io](https://discuss.gohugo.io/t/index-md-is-generated-in-subfolder-index-index-html-hugo-0-20/6338/15) about some broken sites after the release of Hugo `0.20`. This release reintroduces the old behaviour, making `/my-blog-post/index.md` work as expected.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 16675+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 456+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 156+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Avoid index.md in /index/index.html [#3396](https://github.com/gohugoio/hugo/issues/3396)
|
||||
* Make missing GitInfo a WARNING [b30ca4be](https://github.com/gohugoio/hugo/commit/b30ca4bec811dbc17e9fd05925544db2b75e0e49) [@bep](https://github.com/bep) [#3376](https://github.com/gohugoio/hugo/issues/3376)
|
||||
* Fix some of the fpm fields for deb [3bd1d057](https://github.com/gohugoio/hugo/commit/3bd1d0571d5f2f6bf0dc8f90a8adf2dbfcb2fdfd) [@anthonyfok](https://github.com/anthonyfok)
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
date: 2017-05-03T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "This just fixes an issue with the release scripts, no change in the binaries"
|
||||
link: ""
|
||||
title: "Hugo 0.20.7"
|
||||
aliases: [/0-20-7/]
|
||||
---
|
||||
|
||||
This just fixes an issue with the release scripts, no change in the binaries.
|
||||
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 16782+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 458+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 156+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Fix
|
||||
|
||||
* Push the tag before goreleaser is run [3682bf52](https://github.com/gohugoio/hugo/commit/3682bf527989e86d9da32d76809306cb576383e8) [@bep](https://github.com/bep) [#3405](https://github.com/gohugoio/hugo/issues/3405)
|
|
@ -1,103 +0,0 @@
|
|||
---
|
||||
date: 2017-05-22T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "Hugo 0.21 brings full support for shortcodes per Output Format, the last vital piece of that puzzle"
|
||||
link: ""
|
||||
title: "Hugo 0.21"
|
||||
aliases: [/0-21/]
|
||||
---
|
||||
|
||||
Hugo `0.21` brings full support for shortcodes per [Output Format](https://gohugo.io/extras/output-formats/) ([#3220](https://github.com/gohugoio/hugo/issues/3220)), the last vital piece of that puzzle. This is especially useful for `Google AMP` with its many custom media tags.
|
||||
|
||||
This release represents **126 contributions by 29 contributors** to the main Hugo code base. Since last main release Hugo has **gained 850 stars and 7 additional themes**.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 17156+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 457+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 163+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@moorereason](https://github.com/moorereason), [@bogem](https://github.com/bogem), and [@munnerz](https://github.com/munnerz) for their ongoing contributions. And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
## Other Highlights
|
||||
|
||||
On a more technical side, [@moorereason](https://github.com/moorereason) and [@bep](https://github.com/bep) have introduced namespaces for Hugo's many template funcs ([#3042](https://github.com/gohugoio/hugo/issues/3042) ). There are so many now, and adding more into that big pile would be a sure path toward losing control. Now they are nicely categorised into namespaces with its own tests and examples, with an API that the documentation site can use to make sure it is correct and up-to-date.
|
||||
|
||||
## Notes
|
||||
|
||||
* The deprecated `.Extension`, `.Now` and `.TargetPath` will now `ERROR` [544f0a63](https://github.com/gohugoio/hugo/commit/544f0a6394b0e085d355e8217fc5bb3d96c12a98) [@bep](https://github.com/bep)
|
||||
* The config settings and flags `disable404`, `disableRSS`, `disableSitemap`, `disableRobotsTXT` are now deprecated. Use `disableKinds`. [5794a265](https://github.com/gohugoio/hugo/commit/5794a265b41ffdeebfd8485eecf65cf4088d49d6) [@bep](https://github.com/bep) [#3345](https://github.com/gohugoio/hugo/issues/3345)
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Log a WARNING on wrong usage of `IsSet` [38661c17](https://github.com/gohugoio/hugo/commit/38661c17bb8c31c9f31ee18f8eba5e3bfddd5574) [@moorereason](https://github.com/moorereason) [#3092](https://github.com/gohugoio/hugo/issues/3092)
|
||||
* Add support for ellipsed paginator navigator, making paginators with lots of pages more compact [b6ea492b](https://github.com/gohugoio/hugo/commit/b6ea492b7a6325d04d44eeb00a990a3a0e29e0c0) [@bep](https://github.com/bep) [#3466](https://github.com/gohugoio/hugo/issues/3466)
|
||||
* Add support for interfaces to `intersect` [f1c29b01](https://github.com/gohugoio/hugo/commit/f1c29b017bbd88e701cd5151dd186e868672ef89) [@moorereason](https://github.com/moorereason) [#1952](https://github.com/gohugoio/hugo/issues/1952)
|
||||
* Add `NumFmt` function [93b3b138](https://github.com/gohugoio/hugo/commit/93b3b1386714999d716e03b131f77234248f1724) [@moorereason](https://github.com/moorereason) [#1444](https://github.com/gohugoio/hugo/issues/1444)
|
||||
* Add template function namespaces [#3418](https://github.com/gohugoio/hugo/issues/3418) [#3042](https://github.com/gohugoio/hugo/issues/3042) [@moorereason](https://github.com/moorereason) [@bep](https://github.com/bep)
|
||||
* Add translation links to the default sitemap template [90d3fbf1](https://github.com/gohugoio/hugo/commit/90d3fbf1da93a279cfe994a226ae82cf5441deab) [@rayjolt](https://github.com/rayjolt) [#2569](https://github.com/gohugoio/hugo/issues/2569)
|
||||
* Allow text partials in HTML templates and the other way around [1cf29200](https://github.com/gohugoio/hugo/commit/1cf29200b4bb0a9c006155ec76759b7f4b1ad925) [@bep](https://github.com/bep) [#3273](https://github.com/gohugoio/hugo/issues/3273)
|
||||
|
||||
### Output
|
||||
|
||||
* Refactor site rendering with an "output format context". In this release, this is used for shortcode handling only, but this paves the way for future niceness [1e4d082c](https://github.com/gohugoio/hugo/commit/1e4d082cf5b92fedbc60b1b4f0e9d1ee6ec45e33) [@bep](https://github.com/bep) [#3397](https://github.com/gohugoio/hugo/issues/3397) [2bcbf104](https://github.com/gohugoio/hugo/commit/2bcbf104006e0ec03be4fd500f2519301d460f8c) [@bep](https://github.com/bep) [#3220](https://github.com/gohugoio/hugo/issues/3220)
|
||||
|
||||
|
||||
### Core
|
||||
|
||||
* Handle `shortcode` per `Output Format` [af72db80](https://github.com/gohugoio/hugo/commit/af72db806f2c1c0bf1dfe5832275c41eeba89906) [@bep](https://github.com/bep) [#3220](https://github.com/gohugoio/hugo/issues/3220)
|
||||
* Improve shortcode error message [58d9cbd3](https://github.com/gohugoio/hugo/commit/58d9cbd31bcf7c296a39860fd7e566d10faaff28) [@bep](https://github.com/bep)
|
||||
* Avoid `index.md` in `/index/index.html` [fea4fd86](https://github.com/gohugoio/hugo/commit/fea4fd86a324bf9679df23f8289887d91b42e919) [@bep](https://github.com/bep) [#3396](https://github.com/gohugoio/hugo/issues/3396)
|
||||
* Make missing `GitInfo` a `WARNING` [5ad2f176](https://github.com/gohugoio/hugo/commit/5ad2f17693a9860be76ef8089c8728d2b59d6b04) [@bep](https://github.com/bep) [#3376](https://github.com/gohugoio/hugo/issues/3376)
|
||||
* Prevent decoding `pageParam` in common cases [e98f885b](https://github.com/gohugoio/hugo/commit/e98f885b8af27f5473a89d31d0b1f02e61e8a5ec) [@bogem](https://github.com/bogem)
|
||||
* Ignore non-source files on partial rebuild [b5b6e81c](https://github.com/gohugoio/hugo/commit/b5b6e81c0269abf9b0f4bc6a127744a25344e5c6) [@xofyarg](https://github.com/xofyarg) [#3325](https://github.com/gohugoio/hugo/issues/3325)
|
||||
* Log `WARNING` only on unknown `/data` files [ab692e73](https://github.com/gohugoio/hugo/commit/ab692e73dea3ddfe979c88ee236cc394e47e82f1) [@bep](https://github.com/bep) [#3361](https://github.com/gohugoio/hugo/issues/3361)
|
||||
* Avoid processing the same notify event twice [3b677594](https://github.com/gohugoio/hugo/commit/3b67759495c9268c30e6ba2d8c7e3b75d52d2960) [@bep](https://github.com/bep)
|
||||
* Only show `rssURI` deprecation `WARNING` if it is actually set [cfd3af8e](https://github.com/gohugoio/hugo/commit/cfd3af8e691119461effa4385251b9d3818e2291) [@bep](https://github.com/bep) [#3319](https://github.com/gohugoio/hugo/issues/3319)
|
||||
|
||||
### Docs
|
||||
|
||||
* Add documentation on slug translation [635b3bb4](https://github.com/gohugoio/hugo/commit/635b3bb4eb873978c7d52e6c0cb85da0c4d25299) [@xavib](https://github.com/xavib)
|
||||
* Replace `cdn.mathjax.org` with `cdnjs.cloudflare.com` [4b637ac0](https://github.com/gohugoio/hugo/commit/4b637ac041d17b22187f5ccd0f65461f0065aaa9) [@takuti](https://github.com/takuti)
|
||||
* Add notes about some output format behaviour [162d3a58](https://github.com/gohugoio/hugo/commit/162d3a586d36cabf6376a76b096fd8b6414487ae) [@jpatters](https://github.com/jpatters)
|
||||
* Add `txtpen` as alternative commenting service [7cdc244a](https://github.com/gohugoio/hugo/commit/7cdc244a72de4c08edc0008e37aec83d945dccdf) [@rickyhan](https://github.com/rickyhan)
|
||||
|
||||
### Other
|
||||
|
||||
* Embed `Page` in `WeightedPage` [ebf677a5](https://github.com/gohugoio/hugo/commit/ebf677a58360126d8b9a1e98d086aa4279f53181) [@bep](https://github.com/bep) [#3435](https://github.com/gohugoio/hugo/issues/3435)
|
||||
* Improve the detection of untranslated strings [a40d1f6e](https://github.com/gohugoio/hugo/commit/a40d1f6ed2aedddc99725658993258cd557640ed) [@bogem](https://github.com/bogem) [#2607](https://github.com/gohugoio/hugo/issues/2607)
|
||||
* Make first letter of the Hugo commands flags' usage lowercase [f0f69d03](https://github.com/gohugoio/hugo/commit/f0f69d03c551acb8ac2eeedaad579cf0b596f9ef) [@bogem](https://github.com/bogem)
|
||||
* Import `Octopress` image tag in `Jekyll importer` [5f3ad1c3](https://github.com/gohugoio/hugo/commit/5f3ad1c31985450fab8d6772e9cbfcb57cf5cc53) [@buynov](https://github.com/buynov)
|
||||
|
||||
## Fixes
|
||||
|
||||
### Templates
|
||||
|
||||
* Do not lower case template names [6d2ea0f7](https://github.com/gohugoio/hugo/commit/6d2ea0f7d7e8a54b8edfc36e52ff74266c30dc27) [@bep](https://github.com/bep) [#3333](https://github.com/gohugoio/hugo/issues/3333)
|
||||
|
||||
### Output
|
||||
|
||||
* Fix output format mixup in example [10287263](https://github.com/gohugoio/hugo/commit/10287263f529181d3169668b044cb84e2e3b049a) [@bep](https://github.com/bep) [#3481](https://github.com/gohugoio/hugo/issues/3481)
|
||||
* Fix base theme vs project base template logic [077005e5](https://github.com/gohugoio/hugo/commit/077005e514b1ed50d84ceb90c7c72f184cb04521) [@bep](https://github.com/bep) [#3323](https://github.com/gohugoio/hugo/issues/3323)
|
||||
|
||||
### Core
|
||||
* Render `404` in default language only [154e18dd](https://github.com/gohugoio/hugo/commit/154e18ddb9ad205055d5bd4827c87f3f0daf499f) [@mitchchn](https://github.com/mitchchn) [#3075](https://github.com/gohugoio/hugo/issues/3075)
|
||||
* Fix `RSSLink` vs `RSS` `Output Format` [e682fcc6](https://github.com/gohugoio/hugo/commit/e682fcc62233b47cf5bdcaf598ac0657ef089471) [@bep](https://github.com/bep) [#3450](https://github.com/gohugoio/hugo/issues/3450)
|
||||
* Add default config for `ignoreFiles`, making that option work when running in server mode [42f4ce15](https://github.com/gohugoio/hugo/commit/42f4ce15a9d68053da36f9efcf7a7d975cc59559) [@chaseadamsio](https://github.com/chaseadamsio)
|
||||
* Fix output formats override when no outputs definition given [6e2f2dd8](https://github.com/gohugoio/hugo/commit/6e2f2dd8d3ca61c92a2ee8824fbf05cadef08425) [@bep](https://github.com/bep) [#3447](https://github.com/gohugoio/hugo/issues/3447)
|
||||
* Fix handling of zero-length files [0e87b18b](https://github.com/gohugoio/hugo/commit/0e87b18b66d2c8ba9e2abc429630cb03f5b093d6) [@bep](https://github.com/bep) [#3355](https://github.com/gohugoio/hugo/issues/3355)
|
||||
* Must recreate `Paginator` on live-reload [45c74526](https://github.com/gohugoio/hugo/commit/45c74526686f6a2afa02bcee767d837d6b9dd028) [@bep](https://github.com/bep) [#3315](https://github.com/gohugoio/hugo/issues/3315)
|
||||
|
||||
### Docs
|
||||
|
||||
* Fix incorrect path in `templates/list` [27e88154](https://github.com/gohugoio/hugo/commit/27e88154af2dd9af6d0523d6e67b612e6336f91c) [@MunifTanjim](https://github.com/MunifTanjim)
|
||||
* Fixed incorrect specification of directory structure [a28fbca6](https://github.com/gohugoio/hugo/commit/a28fbca6dcfa80b6541f5ef6c8c12cd1804ae9ed) [@TejasQ](https://github.com/TejasQ)
|
||||
* Fix `bash` command in `tutorials/github-pages-blog` [c9976155](https://github.com/gohugoio/hugo/commit/c99761555c014e4d041438d5d7e53a6cbaee4492) [@hansott](https://github.com/hansott)
|
||||
* Fix `.Data.Pages` range in example [b5e32eb6](https://github.com/gohugoio/hugo/commit/b5e32eb60993b4656918af2c959ae217a68c461e) [@hxlnt](https://github.com/hxlnt)
|
||||
|
||||
### Other
|
||||
|
||||
* Fix data race in live-reload close, avoiding some rare panics [355736ec](https://github.com/gohugoio/hugo/commit/355736ec357c81dfb2eb6851ee019d407090c5ec) [@bep](https://github.com/bep) [#2625](https://github.com/gohugoio/hugo/issues/2625)
|
||||
* Skip `.git` directories in file scan [94b5be67](https://github.com/gohugoio/hugo/commit/94b5be67fc73b87d114d94a7bb1a33ab997f30f1) [@bogem](https://github.com/bogem) [#3468](https://github.com/gohugoio/hugo/issues/3468)
|
|
@ -1,87 +0,0 @@
|
|||
---
|
||||
date: 2017-06-12T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "Hugo 0.22 brings nested sections, by popular demand and a long sought after feature"
|
||||
link: ""
|
||||
title: "Hugo 0.22"
|
||||
aliases: [/0-22/]
|
||||
---
|
||||
|
||||
|
||||
Hugo `0.22` brings **nested sections**, by popular demand and a long sought after feature ([#465](https://github.com/gohugoio/hugo/issues/465)). We are still low on documentation for this great feature, but [@bep](https://github.com/bep) has been kind enough to accompany his implementation with a [demo site](http://hugotest.bep.is/).
|
||||
|
||||
This release represents **58 contributions by 10 contributors** to the main Hugo code base. Since last release Hugo has **gained 420 stars and 2 additional themes.**
|
||||
|
||||
[@bep](https://github.com/bep) still leads the Hugo development with his witty Norwegian humor, and once again contributed a significant amount of additions. But also a big shoutout to [@bogem](https://github.com/bogem), [@moorereason](https://github.com/moorereason), and [@onedrawingperday](https://github.com/onedrawingperday) for their ongoing contributions. And as always big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 17576+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 455+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 165+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Other Highlights
|
||||
|
||||
`.Site.GetPage` can now also be used to get regular pages ([#2844](https://github.com/gohugoio/hugo/issues/2844)):
|
||||
|
||||
```
|
||||
{{ (.Site.GetPage "page" "blog" "mypost.md" ).Title }}
|
||||
```
|
||||
|
||||
Also, considerable work has been put into writing automated benchmark tests for the site builds, and we're happy to report that although this release comes with fundamental structural changes, this version is -- in general -- even faster than the previous. It’s quite a challenge to consistently add significant new functionality and simultaneously maintain the stellar performance Hugo is famous for.
|
||||
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
`.Site.Sections` is replaced. We have reworked how sections work in Hugo, they can now be nested and are no longer taxonomies. If you use the old collection, you should get detailed upgrade instructions in the log when you run `hugo`. For more information, see this [demo site](http://hugotest.bep.is/).
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Add `uint` support to `In` [b82cd82f](https://github.com/gohugoio/hugo/commit/b82cd82f1198a371ed94bda7faafe22813f4cb29) [@moorereason](https://github.com/moorereason)
|
||||
* Support interfaces in `union` [204c3a9e](https://github.com/gohugoio/hugo/commit/204c3a9e32fcf6617ede978e35d3e2e89a5b491c) [@moorereason](https://github.com/moorereason) [#3411](https://github.com/gohugoio/hugo/issues/3411)
|
||||
* Add `uniq` function [e28d9aa4](https://github.com/gohugoio/hugo/commit/e28d9aa42c3429d22fe254e69e4605aaf1e684f3) [@adiabatic](https://github.com/adiabatic)
|
||||
* Handle `template.HTML` and friends in `ToInt` [4113693a](https://github.com/gohugoio/hugo/commit/4113693ac1b275f3a40aa5c248269340ef9b57f6) [@moorereason](https://github.com/moorereason) [#3308](https://github.com/gohugoio/hugo/issues/3308)
|
||||
|
||||
|
||||
### Core
|
||||
|
||||
* Make the `RSS feed` use the date for the node it represents [f1da5a15](https://github.com/gohugoio/hugo/commit/f1da5a15a37666ee59350d6600a8c14c1383f5bc) [@bep](https://github.com/bep) [#2708](https://github.com/gohugoio/hugo/issues/2708)
|
||||
* Enable `nested sections` [b3968939](https://github.com/gohugoio/hugo/commit/b39689393ccb8434d9a57658a64b77568c718e99) [@bep](https://github.com/bep) [#465](https://github.com/gohugoio/hugo/issues/465)
|
||||
* Add test for "no 404" in `sitemap` [8aaec644](https://github.com/gohugoio/hugo/commit/8aaec644a90d09bd7f079d35d382f76bb4ed35db) [@bep](https://github.com/bep) [#3563](https://github.com/gohugoio/hugo/issues/3563)
|
||||
* Support regular pages in `.Site.GetPage` [e0c2e798](https://github.com/gohugoio/hugo/commit/e0c2e798201f75ae6e9a81a7442355288c2d141b) [@bep](https://github.com/bep) [#2844](https://github.com/gohugoio/hugo/issues/2844)
|
||||
[#3082](https://github.com/gohugoio/hugo/issues/3082)
|
||||
|
||||
### Performance
|
||||
* Add site building benchmarks [8930e259](https://github.com/gohugoio/hugo/commit/8930e259d78cba4041b550cc51a7f40bc91d7c20) [@bep](https://github.com/bep) [#3535](https://github.com/gohugoio/hugo/issues/3535)
|
||||
* Add a cache to `GetPage` which makes it much faster [50d11138](https://github.com/gohugoio/hugo/commit/50d11138f3e18b545c15fadf52f7b0b744bf3e7c) [@bep](https://github.com/bep)
|
||||
* Speed up `GetPage` [fbb78b89](https://github.com/gohugoio/hugo/commit/fbb78b89df8ccef8f0ab26af00aa45d35c1ee2cf) [@bep](https://github.com/bep) [#3503](https://github.com/gohugoio/hugo/issues/3503)
|
||||
* Add BenchmarkFrontmatterTags [3d9c4f51](https://github.com/gohugoio/hugo/commit/3d9c4f513b0443648d7e88995e351df1739646d2) [@bep](https://github.com/bep) [#3464](https://github.com/gohugoio/hugo/issues/3464)
|
||||
* Add `benchSite.sh` to make it easy to run Hugo performance benchmarks [d74452cf](https://github.com/gohugoio/hugo/commit/d74452cfe8f69a85ec83e05481e16bebf199a5cb) [@bep](https://github.com/bep)
|
||||
* Cache language config [4aff2b6e](https://github.com/gohugoio/hugo/commit/4aff2b6e7409a308f30cff1825fec02991e0d56a) [@bep](https://github.com/bep)
|
||||
* Temporarily revert to BurntSushi for `TOML` front matter handling; it is currently much faster [0907a5c1](https://github.com/gohugoio/hugo/commit/0907a5c1c293755e6bf297246f07888448d81f8b) [@bep](https://github.com/bep) [#3541](https://github.com/gohugoio/hugo/issues/3541) [#3464](https://github.com/gohugoio/hugo/issues/3464)
|
||||
* Add a simple partitioned lazy cache [87203139](https://github.com/gohugoio/hugo/commit/87203139c38e0b992c96d7b8a23c7730649c68e5) [@bep](https://github.com/bep)
|
||||
|
||||
### Other
|
||||
|
||||
* Add `noindex` tag to HTML generated by Hugo aliases [d5ab7f08](https://github.com/gohugoio/hugo/commit/d5ab7f087d967b30e7de7d789e6ad3091b42f1f7) [@onedrawingperday](https://github.com/onedrawingperday)
|
||||
* Update Go versions [bde807bd](https://github.com/gohugoio/hugo/commit/bde807bd1e560fb4cc765c0fc22132db7f8a0801) [@bep](https://github.com/bep)
|
||||
* Remove the `rlimit` tweaking on `macOS` [bcd32f10](https://github.com/gohugoio/hugo/commit/bcd32f1086c8c604fb22a7496924e41cc46b1605) [@bep](https://github.com/bep) [#3512](https://github.com/gohugoio/hugo/issues/3512)
|
||||
|
||||
### Docs
|
||||
* Rewrite “Archetypes” article [@davidturnbull](https://github.com/davidturnbull) [#3543](https://github.com/gohugoio/hugo/pull/3543/)
|
||||
* Remove Unmaintained Frontends from Tools. [f41f7282](https://github.com/gohugoio/hugo/commit/f41f72822251c9a31031fd5b3dda585c57c8b028) [@onedrawingperday](https://github.com/onedrawingperday)
|
||||
|
||||
## Fixes
|
||||
|
||||
### Core
|
||||
* Improve `live-reload` on directory structure changes making removal of directories or pasting new content directories into `/content` just work [fe901b81](https://github.com/gohugoio/hugo/commit/fe901b81191860b60e6fcb29f8ebf87baef2ee79) [@bep](https://github.com/bep) [#3570](https://github.com/gohugoio/hugo/issues/3570)
|
||||
* Respect `disableKinds=["sitemap"]` [69d92dc4](https://github.com/gohugoio/hugo/commit/69d92dc49cb8ab9276ab013d427ba2d9aaf9135d) [@bep](https://github.com/bep) [#3544](https://github.com/gohugoio/hugo/issues/3544)
|
||||
* Fix `disablePathToLower` regression [5be04486](https://github.com/gohugoio/hugo/commit/5be0448635fdf5fe6b1ee673e869f2b9baf1a5c6) [@bep](https://github.com/bep) [#3374](https://github.com/gohugoio/hugo/issues/3374)
|
||||
* Fix `ref`/`relref` issue with duplicate base filenames [612f6e3a](https://github.com/gohugoio/hugo/commit/612f6e3afe0510c31f70f3621f3dc8ba609dade4) [@bep](https://github.com/bep) [#2507](https://github.com/gohugoio/hugo/issues/2507)
|
||||
|
||||
### Docs
|
||||
|
||||
* Fix parameter name in `YouTube` shortcode section [37e37877](https://github.com/gohugoio/hugo/commit/37e378773fbc127863f2b7a389d5ce3a14674c73) [@zivbk1](https://github.com/zivbk1)
|
|
@ -1,35 +0,0 @@
|
|||
---
|
||||
date: 2017-06-13T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "Hugo 0.22.1 fixes a couple of issues reported after the 0.22 release"
|
||||
link: ""
|
||||
title: "Hugo 0.22.1"
|
||||
aliases: [/0-22-1/]
|
||||
---
|
||||
|
||||
Hugo `0.22.1` fixes a couple of issues reported after the [0.22 release](https://github.com/gohugoio/hugo/releases/tag/v0.22) Monday. Most importantly a fix for detecting regular subfolders below the root-sections.
|
||||
|
||||
Also, we forgot to adapt the `permalink settings` with support for nested sections, which made that feature less useful than it could be.
|
||||
|
||||
With this release you can configure **permalinks with sections** like this:
|
||||
|
||||
**First level only:**
|
||||
|
||||
```
|
||||
[permalinks]
|
||||
blog = ":section/:title"
|
||||
```
|
||||
|
||||
**Nested (all levels):**
|
||||
|
||||
```
|
||||
[permalinks]
|
||||
blog = ":sections/:title"
|
||||
```
|
||||
## Fixes
|
||||
|
||||
* Fix section logic for root folders with subfolders [a30023f5](https://github.com/gohugoio/hugo/commit/a30023f5cbafd06034807255181a5b7b17f3c25f) [@bep](https://github.com/bep) [#3586](https://github.com/gohugoio/hugo/issues/3586)
|
||||
* Support sub-sections in permalink settings [1f26420d](https://github.com/gohugoio/hugo/commit/1f26420d392a5ab4c7b7fe1911c0268b45d01ab8) [@bep](https://github.com/bep) [#3580](https://github.com/gohugoio/hugo/issues/3580)
|
||||
* Adjust rlimit to 64000 [ff54b6bd](https://github.com/gohugoio/hugo/commit/ff54b6bddcefab45339d8dc2b13776b92bdc04b9) [@bep](https://github.com/bep) [#3582](https://github.com/gohugoio/hugo/issues/3582)
|
||||
* Make error on setting rlimit a warning only [629e1439](https://github.com/gohugoio/hugo/commit/629e1439e819a7118ae483381d4634f16d3474dd) [@bep](https://github.com/bep) [#3582](https://github.com/gohugoio/hugo/issues/3582)
|
||||
* Revert: Remove the rlimit tweaking on macOS [26aa06a3](https://github.com/gohugoio/hugo/commit/26aa06a3db57ab7134a900d641fa2976f7971520) [@bep](https://github.com/bep) [#3582](https://github.com/gohugoio/hugo/issues/3582)
|
|
@ -1,44 +0,0 @@
|
|||
---
|
||||
date: 2017-06-16T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "Hugo 0.23 is mainly a release that handles all the small changes needed to get Hugo moved to a GitHub organisation"
|
||||
link: ""
|
||||
title: "Hugo 0.23"
|
||||
aliases: [/0-23/]
|
||||
---
|
||||
|
||||
Hugo `0.23` is mainly a release that handles all the small changes needed to get Hugo moved to a GitHub organisation: [gohugoio](https://github.com/gohugoio), but it also contains a couple of important fixes that makes this an update worth-while for all.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 17739+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 494+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 165+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Fix handling of duplicate footnotes [a9e551a1](https://github.com/gohugoio/hugo/commit/a9e551a100e60a603210ee083103dd73369d6a98) [@bep](https://github.com/bep) [#1912](https://github.com/gohugoio/hugo/issues/1912)
|
||||
* Add support for spaces in project folder for `GitInfo` #3533 #3552
|
||||
|
||||
## GitHub organisation related changes
|
||||
|
||||
* Update layout references to gohugoio/hugo [66d4850b](https://github.com/gohugoio/hugo/commit/66d4850b89db293dc58e828de784037f06c6c8dc) [@bep](https://github.com/bep)
|
||||
* Update content references to gohugoio/hugo [715ff1f8](https://github.com/gohugoio/hugo/commit/715ff1f87406edf27738c8c0f52fe185fa974ee8) [@bep](https://github.com/bep)
|
||||
* Add note on updates for rpm-based distros [52a0cea6](https://github.com/gohugoio/hugo/commit/52a0cea65de7b75ae1662abe3dec36fca3604617) [@daftaupe](https://github.com/daftaupe)
|
||||
* Update logo link in README [ccb8300d](https://github.com/gohugoio/hugo/commit/ccb8300d380636d75a39f4133284eb0109e836c3) [@bep](https://github.com/bep)
|
||||
* Remove docs building from CI builds [214dbdfb](https://github.com/gohugoio/hugo/commit/214dbdfb6f016d21415bc1ed511a37a084238878) [@bep](https://github.com/bep)
|
||||
* Adjust docs path [729be807](https://github.com/gohugoio/hugo/commit/729be8074bddb58c9111f32c55cc769e49cd0d5a) [@bep](https://github.com/bep)
|
||||
* Add docs as submodule [6cee0dfe](https://github.com/gohugoio/hugo/commit/6cee0dfe53899d433afc3c173a87d56265904cb0) [@bep](https://github.com/bep)
|
||||
* Update Gitter link in README [fbb25014](https://github.com/gohugoio/hugo/commit/fbb25014e1306ce7127d53e5fc4fc49867790336) [@bep](https://github.com/bep)
|
||||
* Change Windows build badge link, take #3 [86543d6a](https://github.com/gohugoio/hugo/commit/86543d6a50251b40540ebd0b851d45eb99d017c7) [@bep](https://github.com/bep)
|
||||
* Update Windows build link [e6ae32a0](https://github.com/gohugoio/hugo/commit/e6ae32a0ba75b9894418227e87391defbb1b3b49) [@bep](https://github.com/bep)
|
||||
* Update links in CONTRIBUTING.md due to the org transition [95386544](https://github.com/gohugoio/hugo/commit/95386544e858949a2baa414f395f30aaf66a6257) [@digitalcraftsman](https://github.com/digitalcraftsman)
|
||||
* Update source path in Dockerfile due to the org transition [7b99fb9f](https://github.com/gohugoio/hugo/commit/7b99fb9f1ca8381457afe9d8e953a388b8ada182) [@digitalcraftsman](https://github.com/digitalcraftsman)
|
||||
* Update clone folder in appveyor.yml due to the org transition [d531d17b](https://github.com/gohugoio/hugo/commit/d531d17b3be0b14faf4934611e01ac3289e37835) [@digitalcraftsman](https://github.com/digitalcraftsman)
|
||||
* Update import path in snapcraft.yaml due to the org transition [9266bf9d](https://github.com/gohugoio/hugo/commit/9266bf9d4c24592b875a7f6b92f761b4cea40879) [@digitalcraftsman](https://github.com/digitalcraftsman)
|
||||
* Run gofmt to get imports in line vs gohugoio/hugo [873a6f18](https://github.com/gohugoio/hugo/commit/873a6f18851bcda79d562ff6c02e1109e8e31a88) [@bep](https://github.com/bep)
|
||||
* Update Makefile vs gohugoio/hugo [f503d76a](https://github.com/gohugoio/hugo/commit/f503d76a3b2719bbb65ab9df5595d0dbc871fae9) [@bep](https://github.com/bep)
|
||||
* Update README to point to gohugoio/hugo [93643860](https://github.com/gohugoio/hugo/commit/93643860c9db10c6c32176b17cc83f1c317279bd) [@bep](https://github.com/bep)
|
||||
* Update examples to point to gohugoio/hugo [db46bcf8](https://github.com/gohugoio/hugo/commit/db46bcf82d060656d4bc731550e63ec9cf8576f2) [@bep](https://github.com/bep)
|
||||
* Update textual references in Go source to point to gohugoio/hugo [c17ad675](https://github.com/gohugoio/hugo/commit/c17ad675e8fcdb2db40fc50816b8f016bc14294c) [@bep](https://github.com/bep)
|
||||
* Update import paths to gohugoio/hugo [d8717cd4](https://github.com/gohugoio/hugo/commit/d8717cd4c74e80ea8e20adead9321412a2d76022) [@bep](https://github.com/bep)
|
|
@ -1,72 +0,0 @@
|
|||
---
|
||||
date: 2017-06-17T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "The Revival of the Archetypes!"
|
||||
link: ""
|
||||
title: "Hugo 0.24"
|
||||
aliases: [/0-24/]
|
||||
---
|
||||
|
||||
> "A feature that could be the name of the next Indiana Jones movie deserves its own release," says [@bep](https://github.com/bep).
|
||||
|
||||
Hugo now handles the **archetype files as Go templates**. This means that the issues with sorting and lost comments are long gone. This also means that you will have to supply all values, including title and date. But this also opens up a lot of new windows.
|
||||
|
||||
A fictional example for the section `newsletter` and the archetype file `archetypes/newsletter.md`:
|
||||
|
||||
```
|
||||
---
|
||||
title: "{{ replace .TranslationBaseName "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
|
||||
**Insert Lead paragraph here.**
|
||||
|
||||
<!--more-->
|
||||
|
||||
## New Cool Posts
|
||||
|
||||
{{ range first 10 ( where .Site.RegularPages "Type" "cool" ) }}
|
||||
* {{ .Title }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
And then create a new post with:
|
||||
|
||||
```
|
||||
hugo new newsletter/the-latest-cool.stuff.md
|
||||
```
|
||||
|
||||
**Note:** the site will only be built if the `.Site` is in use in the archetype file, and this can be time consuming for big sites.
|
||||
|
||||
**Hot Tip:** If you set the `newContentEditor` configuration variable to an editor on your `PATH`, the newly created article will be opened.
|
||||
|
||||
The above _newsletter type archetype_ illustrates the possibilities: The full Hugo `.Site` and all of Hugo's template funcs can be used in the archetype file.
|
||||
|
||||
**Also, Hugo now supports archetype files for all content formats, not just markdown.**
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 17839+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 493+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 166+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
|
||||
* Archetype files now need to be complete, including `title` and `date`.
|
||||
* The `-f` (format) flag in `hugo new` is removed: Now use the archetype files as is.
|
||||
|
||||
## Enhancements
|
||||
|
||||
* Support extension-less media types. The motivation behind this change is to support Netlify's `_redirects` files, so we can generate server-side redirects for the Hugo docs site. See [this commit](https://github.com/gohugoio/hugoDocs/commit/c1ab9894e8292e0a74c43bbca2263b1fb3840f9e) to see how we configured that. [0f40e1fa](https://github.com/gohugoio/hugo/commit/0f40e1fadfca2276f65adefa6d7d5d63aef9160a) [@bep](https://github.com/bep) [#3614](https://github.com/gohugoio/hugo/issues/3614)
|
||||
* Add `disableAliases` [516e6c6d](https://github.com/gohugoio/hugo/commit/516e6c6dc5733cdaf985317d58eedbc6ec0ef2f7) [@bep](https://github.com/bep) [#3613](https://github.com/gohugoio/hugo/issues/3613)
|
||||
* Support non-md files as archetype files [19f2e729](https://github.com/gohugoio/hugo/commit/19f2e729135af700c5d4aa06e7b3540e6d4847fd) [@bep](https://github.com/bep) [#3597](https://github.com/gohugoio/hugo/issues/3597) [#3618](https://github.com/gohugoio/hugo/issues/3618)
|
||||
* Identify extension-less text types as text [c43b512b](https://github.com/gohugoio/hugo/commit/c43b512b4700f76ac77f12d632bb030c3a241393) [@bep](https://github.com/bep) [#3614](https://github.com/gohugoio/hugo/issues/3614)
|
||||
* Add `.Site` to the archetype templates [662e12f3](https://github.com/gohugoio/hugo/commit/662e12f348a638a6fcc92a416ee7f7c2a7ef8792) [@bep](https://github.com/bep) [#1629](https://github.com/gohugoio/hugo/issues/1629)
|
||||
* Use archetype template as-is as a Go template [422057f6](https://github.com/gohugoio/hugo/commit/422057f60709696bbbd1c38c9ead2bf114d47e31) [@bep](https://github.com/bep) [#452](https://github.com/gohugoio/hugo/issues/452) [#1629](https://github.com/gohugoio/hugo/issues/1629)
|
||||
* Update links to new discuss URL [4aa12390](https://github.com/gohugoio/hugo/commit/4aa1239070bb9d4324d3582f3e809b702a59d3ac) [@bep](https://github.com/bep)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Fix error handling for `JSON` front matter [fb53987a](https://github.com/gohugoio/hugo/commit/fb53987a4ff2acb9da8dec6ec7b11924d37352ce) [@bep](https://github.com/bep) [#3610](https://github.com/gohugoio/hugo/issues/3610)
|
||||
* Fix handling of quoted brackets in `JSON` front matter [3183b9a2](https://github.com/gohugoio/hugo/commit/3183b9a29d8adac962fbc73f79b04542f4c4c55d) [@bep](https://github.com/bep) [#3511](https://github.com/gohugoio/hugo/issues/3511)
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
date: 2017-06-24T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "This release fixes some important archetype-related regressions from Hugo 0.24"
|
||||
link: ""
|
||||
title: "Hugo 0.24.1"
|
||||
aliases: [/0-24-1/]
|
||||
---
|
||||
|
||||
This release fixes some important **archetype-related regressions** from the recent Hugo 0.24-release.
|
||||
|
||||
## Fixes
|
||||
|
||||
* Fix archetype regression when no archetype file [4294dd8d](https://github.com/gohugoio/hugo/commit/4294dd8d9d22bd8107b7904d5389967da1f83f27) [@bep](https://github.com/bep) [#3626](https://github.com/gohugoio/hugo/issues/3626)
|
||||
* Preserve shortcodes in archetype templates [b63e4ee1](https://github.com/gohugoio/hugo/commit/b63e4ee198c875b73a6a9af6bb809589785ed589) [@bep](https://github.com/bep) [#3623](https://github.com/gohugoio/hugo/issues/3623)
|
||||
* Fix handling of timezones with positive UTC offset (e.g., +0800) in TOML [0744f81e](https://github.com/gohugoio/hugo/commit/0744f81ec00bb8888f59d6c8b5f57096e07e70b1) [@bep](https://github.com/bep) [#3628](https://github.com/gohugoio/hugo/issues/3628)
|
||||
|
||||
## Enhancements
|
||||
|
||||
* Create default archetype on new site [bfa336d9](https://github.com/gohugoio/hugo/commit/bfa336d96173377b9bbe2298dbd101f6a718c174) [@bep](https://github.com/bep) [#3626](https://github.com/gohugoio/hugo/issues/3626)
|
|
@ -1,74 +0,0 @@
|
|||
---
|
||||
date: 2017-07-07T17:53:58-04:00
|
||||
categories: ["Releases"]
|
||||
description: "Hugo 0.25 automatically opens the page you're working on in the browser"
|
||||
link: ""
|
||||
title: "Hugo 0.25"
|
||||
aliases: [/0-25/]
|
||||
---
|
||||
|
||||
Hugo `0.25` is the **Kinder Surprise**: It automatically opens the page you're working on in the browser, it adds full `AND` and `OR` support in page queries, and you can now have templates per language.
|
||||
|
||||
If you start with `hugo server --navigateToChanged`, Hugo will navigate to the relevant page on save (see animated GIF). This is extremely useful for site-wide edits. Another very useful feature in this version is the added support for `AND` (`intersect`) and `OR` (`union`) filters when combined with `where`.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
{{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }}
|
||||
{{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }}
|
||||
{{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }}
|
||||
```
|
||||
|
||||
The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page params.
|
||||
|
||||
This release represents **36 contributions by 12 contributors** to the main Hugo code base. [@bep](https://github.com/bep) still leads the Hugo development with his witty Norwegian humor, and once again contributed a significant amount of additions. But also a big shoutout to [@yihui](https://github.com/yihui), [@anthonyfok](https://github.com/anthonyfok), and [@kropp](https://github.com/kropp) for their ongoing contributions. And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 18209+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 455+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 168+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Add `Pages` support to `intersect` (`AND`) and `union`(`OR`). This makes the `where` template func even more powerful. [ccdd08d5](https://github.com/gohugoio/hugo/commit/ccdd08d57ab64441e93d6861ae126b5faacdb92f) [@bep](https://github.com/bep) [#3174](https://github.com/gohugoio/hugo/issues/3174)
|
||||
* Add `math.Log` function. This is very handy for creating tag clouds. [34c56677](https://github.com/gohugoio/hugo/commit/34c566773a1364077e1397daece85b22948dc721) [@artem-sidorenko](https://github.com/artem-sidorenko)
|
||||
* Add `WebP` images support [8431c8d3](https://github.com/gohugoio/hugo/commit/8431c8d39d878c18c6b5463d9091a953608df10b) [@bep](https://github.com/bep) [#3529](https://github.com/gohugoio/hugo/issues/3529)
|
||||
* Only show post's own keywords in schema.org [da72805a](https://github.com/gohugoio/hugo/commit/da72805a4304a57362e8e79a01cc145767b027c5) [@brunoamaral](https://github.com/brunoamaral) [#2635](https://github.com/gohugoio/hugo/issues/2635)[#2646](https://github.com/gohugoio/hugo/issues/2646)
|
||||
* Simplify the `Disqus` template a little bit (#3655) [eccb0647](https://github.com/gohugoio/hugo/commit/eccb0647821e9db20ba9800da1b4861807cc5205) [@yihui](https://github.com/yihui)
|
||||
* Improve the built-in Disqus template (#3639) [2e1e4934](https://github.com/gohugoio/hugo/commit/2e1e4934b60ce8081a7f3a79191ed204f3098481) [@yihui](https://github.com/yihui)
|
||||
|
||||
### Output
|
||||
|
||||
* Support templates per site/language. This is for both regular templates and shortcode templates. [aa6b1b9b](https://github.com/gohugoio/hugo/commit/aa6b1b9be7c9d7322333893b642aaf8c7a5f2c2e) [@bep](https://github.com/bep) [#3360](https://github.com/gohugoio/hugo/issues/3360)
|
||||
|
||||
### Core
|
||||
|
||||
* Extend the sections API [a1d260b4](https://github.com/gohugoio/hugo/commit/a1d260b41a6673adef679ec4e262c5f390432cf5) [@bep](https://github.com/bep) [#3591](https://github.com/gohugoio/hugo/issues/3591)
|
||||
* Make `.Site.Sections` return the top level sections [dd9b1baa](https://github.com/gohugoio/hugo/commit/dd9b1baab0cb860a3eb32fd9043bac18cab3f9f0) [@bep](https://github.com/bep) [#3591](https://github.com/gohugoio/hugo/issues/3591)
|
||||
* Render `404.html` for all languages [41805dca](https://github.com/gohugoio/hugo/commit/41805dca9e40e9b0952e04d06074e6fc91140495) [@mitchchn](https://github.com/mitchchn) [#3598](https://github.com/gohugoio/hugo/issues/3598)
|
||||
|
||||
### Other
|
||||
|
||||
* Support human-readable `YAML` boolean values in `undraft` [1039356e](https://github.com/gohugoio/hugo/commit/1039356edf747f044c989a5bc0e85d792341ed5d) [@kropp](https://github.com/kropp)
|
||||
* `hugo import jekyll` support nested `_posts` directories [7ee1f25e](https://github.com/gohugoio/hugo/commit/7ee1f25e9ef3be8f99c171e8e7982f4f82c13e16) [@coderzh](https://github.com/coderzh) [#1890](https://github.com/gohugoio/hugo/issues/1890)[#1911](https://github.com/gohugoio/hugo/issues/1911)
|
||||
* Update `Dockerfile` and add Docker optimizations [118f8f7c](https://github.com/gohugoio/hugo/commit/118f8f7cf22d756d8a894ff93551974a806f2155) [@ellerbrock](https://github.com/ellerbrock)
|
||||
* Add Blackfriday `joinLines` extension support (#3574) [a5440496](https://github.com/gohugoio/hugo/commit/a54404968a4b36579797f2e7ff7f5eada94866d9) [@choueric](https://github.com/choueric)
|
||||
* add `--initial-header-level=2` to rst2html (#3528) [bfce30d8](https://github.com/gohugoio/hugo/commit/bfce30d85972c27c27e8a2caac9db6315f813298) [@frankbraun](https://github.com/frankbraun)
|
||||
* Support open "current content page" in browser [c825a731](https://github.com/gohugoio/hugo/commit/c825a7312131b4afa67ee90d593640dee3525d98) [@bep](https://github.com/bep) [#3643](https://github.com/gohugoio/hugo/issues/3643)
|
||||
* Make `--navigateToChanged` more robust on Windows [30e14cc3](https://github.com/gohugoio/hugo/commit/30e14cc31678ddc204b082ab362f86b6b8063881) [@anthonyfok](https://github.com/anthonyfok) [#3645](https://github.com/gohugoio/hugo/issues/3645)
|
||||
* Remove the docs submodule [31393f60](https://github.com/gohugoio/hugo/commit/31393f6024416ea1b2e61d1080dfd7104df36eda) [@bep](https://github.com/bep) [#3647](https://github.com/gohugoio/hugo/issues/3647)
|
||||
* Use `example.com` as homepage for new theme [aff1ac32](https://github.com/gohugoio/hugo/commit/aff1ac3235b6c075d01f7237addf44fecdd36d82) [@anthonyfok](https://github.com/anthonyfok)
|
||||
|
||||
## Fixes
|
||||
|
||||
### Templates
|
||||
|
||||
* Fix `in` function for JSON arrays [d12cf5a2](https://github.com/gohugoio/hugo/commit/d12cf5a25df00fa16c59f0b2ae282187a398214c) [@bep](https://github.com/bep) [#1468](https://github.com/gohugoio/hugo/issues/1468)
|
||||
|
||||
### Other
|
||||
|
||||
* Fix handling of `JSON` front matter with escaped quotes [e10e51a0](https://github.com/gohugoio/hugo/commit/e10e51a00827b9fdc1bee51439fef05afc529831) [@bep](https://github.com/bep) [#3661](https://github.com/gohugoio/hugo/issues/3661)
|
||||
* Fix typo in code comment [56d82aa0](https://github.com/gohugoio/hugo/commit/56d82aa025f4d2edb1dc6315132cd7ab52df649a) [@dvic](https://github.com/dvic)
|
|
@ -1,22 +0,0 @@
|
|||
---
|
||||
categories: ["Releases"]
|
||||
description: "This is a bug-fix release with a couple of important fixes"
|
||||
link: ""
|
||||
title: "Hugo 0.25.1"
|
||||
aliases: [/0-25-1/]
|
||||
---
|
||||
|
||||
This is a bug-fix release with a couple of important fixes.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 18277+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 456+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 170+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Fix union when the first slice is empty [dbbc5c48](https://github.com/gohugoio/hugo/commit/dbbc5c4810a04ac06fad7500d88cf5c3bfe0c7fd) [@bep](https://github.com/bep) [#3686](https://github.com/gohugoio/hugo/issues/3686)
|
||||
* Navigate to changed on CREATE When working with content from IntelliJ IDE, like WebStorm, every file save is followed by two events: "RENAME" and then "CREATE". [7bcc1ce6](https://github.com/gohugoio/hugo/commit/7bcc1ce659710f2220b400ce3b76e50d2e48b241) [@miltador](https://github.com/miltador)
|
||||
* Final (!) fix for issue with escaped JSON front matter [7f82b41a](https://github.com/gohugoio/hugo/commit/7f82b41a24af0fd04d28fbfebf9254766a3c6e6f) [@bep](https://github.com/bep) [#3682](https://github.com/gohugoio/hugo/issues/3682)
|
||||
* Fix issue with escaped JSON front matter [84db6c74](https://github.com/gohugoio/hugo/commit/84db6c74a084d2b52117b999d4ec343cd3389a68) [@bep](https://github.com/bep) [#3682](https://github.com/gohugoio/hugo/issues/3682)
|
|
@ -1,81 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-08-07
|
||||
title: "Hugo 0.26: Language Style Edition"
|
||||
description: "Hugo 0.26 brings proper AP Style or Chicago Style Title Case, « French Guillemets » and more."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-26-poster.png
|
||||
---
|
||||
|
||||
This release brings a choice of **AP Style or Chicago Style Title Case** ([8fb594bf](https://github.com/gohugoio/hugo/commit/8fb594bfb090c017d4e5cbb2905780221e202c41) [#989](https://github.com/gohugoio/hugo/issues/989)). You can also now configure Blackfriday to render **« French Guillemets »** ([cb9dfc26](https://github.com/gohugoio/hugo/commit/cb9dfc2613ae5125cafa450097fb0f62dd3770e7) [#3725](https://github.com/gohugoio/hugo/issues/3725)). To enable French Guillemets:
|
||||
|
||||
|
||||
{{< code-toggle file="config" >}}
|
||||
[blackfriday]
|
||||
angledQuotes = true
|
||||
smartypantsQuotesNBSP = true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Oh, and this release also fixes it so you should see no ugly long crashes no more when you step wrong in your templates ([794ea21e](https://github.com/gohugoio/hugo/commit/794ea21e9449b876c5514f1ce8fe61449bbe4980)).
|
||||
|
||||
Hugo `0.26` represents **46 contributions by 11 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 [@anthonyfok](https://github.com/anthonyfok), [@jorinvo](https://github.com/jorinvo), and [@digitalcraftsman](https://github.com/digitalcraftsman) for their ongoing contributions. And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **838 contributions by 30 contributors**. A special thanks to [@rdwatters](https://github.com/rdwatters), [@bep](https://github.com/bep), [@digitalcraftsman](https://github.com/digitalcraftsman), and [@budparr](https://github.com/budparr) for their work on the documentation site.
|
||||
|
||||
This may look like a **Waiting Sausage**, a barbecue term used in Norway for that sausage you eat while waiting for the steak to get ready. And it is: We're working on bigger and even more interesting changes behind the scenes. Stay tuned!
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 18802+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 457+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 175+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
|
||||
* `sourceRelativeLinks` has been deprecated for a while and has now been removed. [9891c0fb](https://github.com/gohugoio/hugo/commit/9891c0fb0eb274b8a95b62c40070a87a6e04088c) [@bep](https://github.com/bep) [#3766](https://github.com/gohugoio/hugo/issues/3766)
|
||||
* The `title` template function and taxonomy page titles now default to following the [AP Stylebook](https://www.apstylebook.com/) for title casing. To override this default to use the old behavior, set `titleCaseStyle` to `Go` in your site configuration. [8fb594bf](https://github.com/gohugoio/hugo/commit/8fb594bfb090c017d4e5cbb2905780221e202c41) [@bep](https://github.com/bep) [#989](https://github.com/gohugoio/hugo/issues/989)
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Use hash for cache key [6cd33f69](https://github.com/gohugoio/hugo/commit/6cd33f6953671edb13d42dcb15746bd10df3428b) [@RealOrangeOne](https://github.com/RealOrangeOne) [#3690](https://github.com/gohugoio/hugo/issues/3690)
|
||||
* Add some empty slice tests to intersect [e0cf2e05](https://github.com/gohugoio/hugo/commit/e0cf2e05bbdcb8b4a3f875df84a878f4ca80e904) [@bep](https://github.com/bep) [#3686](https://github.com/gohugoio/hugo/issues/3686)
|
||||
|
||||
### Core
|
||||
|
||||
* Support `reflinks` starting with a slash [dbe63970](https://github.com/gohugoio/hugo/commit/dbe63970e09313dec287816ab070b5c2f5a13b1b) [@bep](https://github.com/bep) [#3703](https://github.com/gohugoio/hugo/issues/3703)
|
||||
* Make template panics into nice error messages [794ea21e](https://github.com/gohugoio/hugo/commit/794ea21e9449b876c5514f1ce8fe61449bbe4980) [@bep](https://github.com/bep)
|
||||
|
||||
### Other
|
||||
|
||||
* Make the `title` case style guide configurable [8fb594bf](https://github.com/gohugoio/hugo/commit/8fb594bfb090c017d4e5cbb2905780221e202c41) [@bep](https://github.com/bep) [#989](https://github.com/gohugoio/hugo/issues/989)
|
||||
* Add support for French Guillemets [cb9dfc26](https://github.com/gohugoio/hugo/commit/cb9dfc2613ae5125cafa450097fb0f62dd3770e7) [@bep](https://github.com/bep) [#3725](https://github.com/gohugoio/hugo/issues/3725)
|
||||
* Add support for French Guillemets [c4a0b6e8](https://github.com/gohugoio/hugo/commit/c4a0b6e8abdf9f800fbd7a7f89e9f736edc60431) [@bep](https://github.com/bep) [#3725](https://github.com/gohugoio/hugo/issues/3725)
|
||||
* Switch from fork bep/inflect to markbates/inflect [09907d36](https://github.com/gohugoio/hugo/commit/09907d36af586c5b29389312f2ecc2962c06313c) [@jorinvo](https://github.com/jorinvo)
|
||||
* Remove unused dependencies from vendor.json [9b4170ce](https://github.com/gohugoio/hugo/commit/9b4170ce768717adfbe9d97c46e38ceaec2ce994) [@jorinvo](https://github.com/jorinvo)
|
||||
* Add `--debug` option to be improved on over time [aee2b067](https://github.com/gohugoio/hugo/commit/aee2b06780858c12d8cb04c7b1ba592543410aa9) [@maxandersen](https://github.com/maxandersen)
|
||||
* Reduce Docker image size from 277MB to 27MB [bfe0bfbb](https://github.com/gohugoio/hugo/commit/bfe0bfbbd1a59ddadb72a6b07fecce71716088ec) [@ellerbrock](https://github.com/ellerbrock) [#3730](https://github.com/gohugoio/hugo/issues/3730)[#3738](https://github.com/gohugoio/hugo/issues/3738)
|
||||
* Optimize Docker image size [606d6a8c](https://github.com/gohugoio/hugo/commit/606d6a8c9177dda4551ed198e0aabbe569f0725d) [@ellerbrock](https://github.com/ellerbrock) [#3674](https://github.com/gohugoio/hugo/issues/3674)
|
||||
* Add `--trace` to asciidoctor args [b60aa1a5](https://github.com/gohugoio/hugo/commit/b60aa1a504f3fbf9c19a6bf2030fdc7a04ab4a5a) [@miltador](https://github.com/miltador) [#3714](https://github.com/gohugoio/hugo/issues/3714)
|
||||
* Add script to pull in docs changes [ff433f98](https://github.com/gohugoio/hugo/commit/ff433f98133662063cbb16e220fd44c678c82823) [@bep](https://github.com/bep)
|
||||
* Add `HasShortcode` [deccc540](https://github.com/gohugoio/hugo/commit/deccc54004cbe88ddbf8f3f951d3178dc0693189) [@bep](https://github.com/bep) [#3707](https://github.com/gohugoio/hugo/issues/3707)
|
||||
* Improve the twitter card template [00b590d7](https://github.com/gohugoio/hugo/commit/00b590d7ab4f3021814acceaf74c4eaf64edb226) [@bep](https://github.com/bep) [#3711](https://github.com/gohugoio/hugo/issues/3711)
|
||||
* Add `GOEXE` to support building with different versions of `go` [ea5e9e34](https://github.com/gohugoio/hugo/commit/ea5e9e346c93320538c6517b619b5f57473291c8) [@mdhender](https://github.com/mdhender)
|
||||
|
||||
## Fixes
|
||||
|
||||
### Templates
|
||||
|
||||
* Fix intersect on `[]interface{}` handling [55d0b894](https://github.com/gohugoio/hugo/commit/55d0b89417651eba3ae51c96bd9de9e0daa0399e) [@moorereason](https://github.com/moorereason) [#3718](https://github.com/gohugoio/hugo/issues/3718)
|
||||
|
||||
### Other
|
||||
|
||||
* Fix broken `TaskList` in Markdown [481924b3](https://github.com/gohugoio/hugo/commit/481924b34d23b0ce435778cce7bce77571b22f9d) [@mpcabd](https://github.com/mpcabd) [#3710](https://github.com/gohugoio/hugo/issues/3710)
|
||||
|
||||
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-09-11
|
||||
title: "Hugo 0.27: Fast and Flexible Related Content!"
|
||||
description: "Makes it easy to add \"See Also\" sections etc. to your site."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-27-poster.png
|
||||
---
|
||||
|
||||
|
||||
Hugo `0.27`comes with fast and flexible **Related Content** ([3b4f17bb](https://github.com/gohugoio/hugo/commit/3b4f17bbc9ff789faa581ac278ad109d1ac5b816) [@bep](https://github.com/bep) [#98](https://github.com/gohugoio/hugo/issues/98)). To add this to your site, put something like this in your single page template:
|
||||
|
||||
```go-html-template
|
||||
{{ $related := .Site.RegularPages.Related . | first 5 }}
|
||||
{{ with $related }}
|
||||
<h3>See Also</h3>
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
The above translates to _list the five regular pages mostly related to the current page_. See the [Related Content Documentation](https://gohugo.io/content-management/related/) for details and configuration options.
|
||||
|
||||
This release represents **37 contributions by 9 contributors** to the main Hugo code base.
|
||||
|
||||
[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@moorereason](https://github.com/moorereason), [@yihui](https://github.com/yihui), and [@oneleaftea](https://github.com/oneleaftea) for their ongoing contributions.
|
||||
|
||||
And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **44 contributions by 30 contributors**. A special thanks to [@bep](https://github.com/bep), [@sdomino](https://github.com/sdomino), [@gotgenes](https://github.com/gotgenes), and [@digitalcraftsman](https://github.com/digitalcraftsman) for their work on the documentation site.
|
||||
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 19464+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 455+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 178+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
|
||||
* We now only strip p tag in `markdownify` if there is only one paragraph. This allows blocks of paragraphs to be "markdownified" [33ae10b6](https://github.com/gohugoio/hugo/commit/33ae10b6ade67cd9618970121d7de5fd2ce7d781) [@bep](https://github.com/bep) [#3040](https://github.com/gohugoio/hugo/issues/3040)
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Add `time.Duration` and `time.ParseDuration` template funcs [f4bf2141](https://github.com/gohugoio/hugo/commit/f4bf214137ebd24a0d12f16d3a98d9038e6eabd3) [@bep](https://github.com/bep) [#3828](https://github.com/gohugoio/hugo/issues/3828)
|
||||
* Add `cond` (ternary) template func [0462c96a](https://github.com/gohugoio/hugo/commit/0462c96a5a9da3e8adc78d96acd39575a8b46c40) [@bep](https://github.com/bep) [#3860](https://github.com/gohugoio/hugo/issues/3860)
|
||||
* Prepare for template metrics [d000cf60](https://github.com/gohugoio/hugo/commit/d000cf605091c6999b72d6c632752289bc680223) [@bep](https://github.com/bep)
|
||||
* Add `strings.TrimLeft` and `TrimRight` [7674ad73](https://github.com/gohugoio/hugo/commit/7674ad73825c61eecc4003475fe0577f225fe579) [@moorereason](https://github.com/moorereason)
|
||||
* compare, hugolib, tpl: Add `Eqer` interface [08f48b91](https://github.com/gohugoio/hugo/commit/08f48b91d68d3002b887ddf737456ff0cc4e786d) [@bep](https://github.com/bep) [#3807](https://github.com/gohugoio/hugo/issues/3807)
|
||||
* Only strip p tag in `markdownify` if only one paragraph [33ae10b6](https://github.com/gohugoio/hugo/commit/33ae10b6ade67cd9618970121d7de5fd2ce7d781) [@bep](https://github.com/bep) [#3040](https://github.com/gohugoio/hugo/issues/3040)
|
||||
* Cleanup `strings.TrimPrefix` and `TrimSuffix` [29a2da05](https://github.com/gohugoio/hugo/commit/29a2da0593b081cdd61b93c6328af2c9ea4eb20f) [@moorereason](https://github.com/moorereason)
|
||||
|
||||
### Output
|
||||
|
||||
* Improve the base template (aka `baseof.html`) identification [0019ce00](https://github.com/gohugoio/hugo/commit/0019ce002449d671a20a69406da37b10977f9493) [@bep](https://github.com/bep)
|
||||
|
||||
### Core
|
||||
|
||||
* Implement "related content" [3b4f17bb](https://github.com/gohugoio/hugo/commit/3b4f17bbc9ff789faa581ac278ad109d1ac5b816) [@bep](https://github.com/bep) [#98](https://github.com/gohugoio/hugo/issues/98)
|
||||
* Add `Page.Equals` [f0f49ed9](https://github.com/gohugoio/hugo/commit/f0f49ed9b0c9b4545a45c95d56340fcbf4aafbef) [@bep](https://github.com/bep)
|
||||
* Rewrite `replaceDivider` to reduce memory allocation [71ae9b45](https://github.com/gohugoio/hugo/commit/71ae9b4533083be185c5314c9c5b273cc3bd07bd) [@bep](https://github.com/bep)
|
||||
|
||||
|
||||
### Other
|
||||
|
||||
* Set up Hugo release flow on `CircleCI` [d2249c50](https://github.com/gohugoio/hugo/commit/d2249c50991ba7b00b092aca6e315ca1a4de75a1) [@bep](https://github.com/bep) [#3779](https://github.com/gohugoio/hugo/issues/3779)
|
||||
* Maintain the scroll position if possible [7231d5a8](https://github.com/gohugoio/hugo/commit/7231d5a829f8d97336a2120afde1260db6ee6541) [@yihui](https://github.com/yihui) [#3824](https://github.com/gohugoio/hugo/issues/3824)
|
||||
* Add an `iFrame` title to the `YouTube` shortcode [919bc921](https://github.com/gohugoio/hugo/commit/919bc9210a69c801c7304c0b529df93d1dca27aa) [@nraboy](https://github.com/nraboy)
|
||||
* Remove the theme submodule from /docs [ea2cc26b](https://github.com/gohugoio/hugo/commit/ea2cc26b390476f1c605405604f8c92afd09b6ee) [@bep](https://github.com/bep) [#3791](https://github.com/gohugoio/hugo/issues/3791)
|
||||
* Add support for multiple config files via `--config a.toml,b.toml,c.toml` [0f9f73cc](https://github.com/gohugoio/hugo/commit/0f9f73cce5c3f1f05be20bcf1d23b2332623d7f9) [@jgielstra](https://github.com/jgielstra)
|
||||
* Render task list item inside `label` for correct accessibility [c8257f8b](https://github.com/gohugoio/hugo/commit/c8257f8b726478ca70dc8984cdcc17b31e4bdc0c) [@danieka](https://github.com/danieka) [#3303](https://github.com/gohugoio/hugo/issues/3303)
|
||||
* Normalize `UniqueID` between Windows & Linux [0abdeeef](https://github.com/gohugoio/hugo/commit/0abdeeef6740a3cbba0db95374853d040f2022b8) [@Shywim](https://github.com/Shywim)
|
||||
|
||||
|
||||
## Fixes
|
||||
|
||||
### Output
|
||||
|
||||
* Fix taxonomy term base template lookup [f88fe312](https://github.com/gohugoio/hugo/commit/f88fe312cb35f7de1615c095edd2f898303dd23b) [@bep](https://github.com/bep) [#3856](https://github.com/gohugoio/hugo/issues/3856)
|
||||
* Fix `published` front matter handling [202510fd](https://github.com/gohugoio/hugo/commit/202510fdc92d52a20baeaa7edb1091f6882bd95f) [@bep](https://github.com/bep) [#3867](https://github.com/gohugoio/hugo/issues/3867)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-09-13
|
||||
title: "Hugo 0.27.1: One bugfix"
|
||||
description: "Hugo 0.27.1 fixes an issue introduced in Go 1.9 with HTML escaping of shortcodes in multi output sites."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
---
|
||||
|
||||
|
||||
|
||||
This fixes a regression introduced in [Go 1.9](https://github.com/golang/go/issues/21844) which lead to HTML in shortcodes in multi output Hugo sites being wrongly escaped in some cases.
|
||||
|
||||
* Fix escaped HTML Go 1.9 multioutput issue (#3880) [2d613dd9](https://github.com/gohugoio/hugo/commit/2d613dd905bb8eeb8af57e30ddd749a0f04fbd3c) [@bep](https://github.com/bep) [#3876](https://github.com/gohugoio/hugo/issues/3876)
|
||||
|
||||
* Bump to Go 1.9 in the Snap build [642ba6ca](https://github.com/gohugoio/hugo/commit/642ba6cab24c558b16378178fe829cbc45845424) [@bep](https://github.com/bep)
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-09-25
|
||||
title: "Hugo 0.28: High-speed Syntax Highlighting!"
|
||||
description: "Chroma is the new default syntax highlighter in Hugo."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-28-poster.png
|
||||
---
|
||||
|
||||
Hugo `0.28` brings **blistering fast and native syntax highlighting** from [Chroma](https://github.com/alecthomas/chroma) ([fb33d828](https://github.com/gohugoio/hugo/commit/fb33d8286d78a78a74deb44355b621852a1c4033) [@bep](https://github.com/bep) [#3888](https://github.com/gohugoio/hugo/issues/3888)). A big thank you to [Alec Thomas](https://github.com/alecthomas) for taking on this massive task of porting the popular python highlighter Pygments to Go.
|
||||
|
||||
Hugo has been caching the highlighter output to disk, so for repeated builds it has been fine, but this little snippet, showing a build of the [gohugo.io](https://gohugo.io/) site without cache and with both Pygments and Chroma, should illustrate the improvement:
|
||||
|
||||
See the [Updated Documentation](https://gohugo.io/content-management/syntax-highlighting/) for more information about how this works.
|
||||
|
||||
Worth mentioning is also the `liveReloadPort` flag on `hugo server`, which makes it possible to do "live reloads" behind a HTTPS proxy, which makes for very cool remote customer demos.
|
||||
|
||||
One example would be a Hugo server running behind a [ngrok](https://ngrok.com) tunnel:
|
||||
|
||||
```bash
|
||||
ngrok http 1313
|
||||
```
|
||||
Then start the Hugo server with:
|
||||
|
||||
```bash
|
||||
hugo server -b https://youridhere.ngrok.io --appendPort=false --liveReloadPort=443 --navigateToChanged
|
||||
```
|
||||
|
||||
The `navigateToChanged` flag is slightly unrelated, but it is super cool ...
|
||||
|
||||
This release represents **15 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 **9 contributions by 7 contributors**. A special thanks to [@bep](https://github.com/bep), [@i-give-up](https://github.com/i-give-up), [@muhajirframe](https://github.com/muhajirframe), and [@icannotfly](https://github.com/icannotfly) for their work on the documentation site.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 19771+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 454+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 180+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
* Hugo now uses Chroma as new default syntax highlighter. This should in most cases work out-of-the box or with very little adjustments. But if you want to continue to use Pygments, set `pygmentsUseClassic=true` in your site config.
|
||||
* We now add a set of "no cache" headers to the responses for `hugo server`, which makes the most sense in most development scenarios. Run with `hugo server --noHTTPCache=false` to get the old behaviour.
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Add `urls.Parse` function [81ed5647](https://github.com/gohugoio/hugo/commit/81ed564793609a32be20a569cc15da2cc02dd734) [@moorereason](https://github.com/moorereason) [#3849](https://github.com/gohugoio/hugo/issues/3849)
|
||||
* Add `math.Ceil`, `Floor`, and `Round` [19c59104](https://github.com/gohugoio/hugo/commit/19c5910485242838d6678c2aacd8501f7e646a53) [@moorereason](https://github.com/moorereason) [#3883](https://github.com/gohugoio/hugo/issues/3883)
|
||||
|
||||
### Other
|
||||
|
||||
* Use Chroma as new default syntax highlighter [fb33d828](https://github.com/gohugoio/hugo/commit/fb33d8286d78a78a74deb44355b621852a1c4033) [@bep](https://github.com/bep) [#3888](https://github.com/gohugoio/hugo/issues/3888)
|
||||
* Trim newlines in the highlight shortcode [0d29a0f7](https://github.com/gohugoio/hugo/commit/0d29a0f7819e8d73149701052c29f090cd6db42b) [@bep](https://github.com/bep) [#3898](https://github.com/gohugoio/hugo/issues/3898)
|
||||
* Update `goorgeous` [b8fabce2](https://github.com/gohugoio/hugo/commit/b8fabce217fcb52e3f273491bef95c7977058732) [@bep](https://github.com/bep) [#3899](https://github.com/gohugoio/hugo/issues/3899)
|
||||
* Add `liveReloadPort` flag to server [b1804776](https://github.com/gohugoio/hugo/commit/b180477631555824a06293053e2b6e63c5f07361) [@bep](https://github.com/bep) [#3882](https://github.com/gohugoio/hugo/issues/3882)
|
||||
* Add `noHTTPCache` flag to hugo server (default on) [0b34af21](https://github.com/gohugoio/hugo/commit/0b34af216154367af7f53ce93d44e6b3d58c3f34) [@bep](https://github.com/bep) [#3897](https://github.com/gohugoio/hugo/issues/3897)
|
||||
* Make `noHTTPCache` default on [80c7ea60](https://github.com/gohugoio/hugo/commit/80c7ea60a0e0f488563a6b7311f3d4c23457aac7) [@bep](https://github.com/bep) [#3897](https://github.com/gohugoio/hugo/issues/3897)
|
|
@ -1,46 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-09-26
|
||||
title: "Hugo 0.29: Template Metrics"
|
||||
description: "Makes it easy to find template bottle necks."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-29-poster.png
|
||||
---
|
||||
|
||||
Hugo `0.29` brings Template Metrics by [@moorereason](https://github.com/moorereason). Hugo is very fast, but it is still possible to write ineffective templates. Now these should be easy to identify. Just run:
|
||||
|
||||
```bash
|
||||
hugo --templateMetrics
|
||||
```
|
||||
Now, that was the tasty carrot. The real reason this release comes so fast after the last one is to change the default value for the new `noHTTPCache` flag, which gives away too much performance to make sense as a default value.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 19817+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 454+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 180+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
* Make `noHTTPCache` default false [e94d4f01](https://github.com/gohugoio/hugo/commit/e94d4f0177852b357f40fb9686a0ff3667d86351) [@bep](https://github.com/bep)
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
* Add simple template metrics feature [b4a14c25](https://github.com/gohugoio/hugo/commit/b4a14c25fe85c41b79497be27ead128502a4dd7b) [@moorereason](https://github.com/moorereason)
|
||||
* Set Metrics at creation time [b5e1dc58](https://github.com/gohugoio/hugo/commit/b5e1dc5892f81da798d0d4e964a1f3328532f45e) [@bep](https://github.com/bep)
|
||||
* Fix sort order [d3681f51](https://github.com/gohugoio/hugo/commit/d3681f51c08fb11e8addcf9f0b484848d20d46cc) [@bep](https://github.com/bep)
|
||||
* Add math.Ceil, Floor, and Round to method mappings [8a69d235](https://github.com/gohugoio/hugo/commit/8a69d2356703d9f2fcb75bce0ae514e70ebd8e01) [@moorereason](https://github.com/moorereason)
|
||||
|
||||
### Other
|
||||
* Split go build in Dockerfile [d9697e27](https://github.com/gohugoio/hugo/commit/d9697e275ecb038958b3dcea2b43e11dcba28fc9) [@tjamet](https://github.com/tjamet)
|
||||
* Update Dockerfile to benefit build cache [09d960f1](https://github.com/gohugoio/hugo/commit/09d960f17396eb7fd2c8fe6527db9503d59f0b4f) [@tjamet](https://github.com/tjamet)
|
||||
* Add git to snap package for GitInfo [a3a3f5b8](https://github.com/gohugoio/hugo/commit/a3a3f5b86114213a23337499551f000662b26022) [@ghalse](https://github.com/ghalse)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-10-16
|
||||
title: "Hugo 0.30: Race Car Edition!"
|
||||
description: "Fast Render Mode boosts live reloading!"
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-30-poster.png
|
||||
---
|
||||
|
||||
|
||||
Hugo `0.30` is the **Race Car Edition**. Hugo is already very very fast, but wants much more. So we added **Fast Render Mode**. It is hard to explain, so start the Hugo development server with `hugo server` and start editing. Live reloads just got so much faster! The "how and what" is discussed at length in [other places](https://github.com/gohugoio/hugo/pull/3959), but the short version is that we now re-render only the parts of the site that you are working on.
|
||||
|
||||
The second performance-related feature is a follow-up to the Template Metrics added in Hugo `0.29`. Now, if you add the flag `--templateMetricsHints`, we will calculate a score for how your partials can be cached (with the `partialCached` template func).
|
||||
|
||||
This release also more or less makes the really fast Chroma highlighter a complete alternative to Pygments. Most notable is the new table `linenos` support ([7c30e2cb](https://github.com/gohugoio/hugo/commit/7c30e2cbb08fdf0e61f80c7f1aa29909aeca4211) [@bep](https://github.com/bep) [#3915](https://github.com/gohugoio/hugo/issues/3915)), which makes copy-and-paste code blocks much easier.
|
||||
|
||||
This release represents **31 contributions by 10 contributors** to the main Hugo code base.
|
||||
[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contribution, but also a big shoutout to [@moorereason](https://github.com/moorereason), [@digitalcraftsman](https://github.com/digitalcraftsman), and [@bmon](https://github.com/bmon) for their ongoing contributions.
|
||||
And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **26 contributions by 15 contributors**. A special thanks to [@bep](https://github.com/bep), [@digitalcraftsman](https://github.com/digitalcraftsman), [@moorereason](https://github.com/moorereason), and [@kaushalmodi](https://github.com/kaushalmodi) for their work on the documentation site.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 20195+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 454+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 180+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
|
||||
* Running `hugo server` will now run with the new "Fast Render Mode" default on. To turn it off, run `hugo server --disableFastRender` or set `disableFastRender=true` in your site config.
|
||||
* There have been several fixes and enhancements in the Chroma highlighter. One is that it now creates Pygments compatible CSS classes, which means that you may want to re-generate the stylesheet. See the [Syntax Highlighting Doc](https://gohugo.io/content-management/syntax-highlighting/).
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Performance
|
||||
* Only re-render the view(s) you're working on [60bd332c](https://github.com/gohugoio/hugo/commit/60bd332c1f68e49e6ac439047e7c660865189380) [@bep](https://github.com/bep) [#3962](https://github.com/gohugoio/hugo/issues/3962)
|
||||
* Detect `partialCached` candidates [5800a20a](https://github.com/gohugoio/hugo/commit/5800a20a258378440e203a6c4a4343f5077755df) [@bep](https://github.com/bep)
|
||||
* Move metrics output to the end of the site build [b277cb33](https://github.com/gohugoio/hugo/commit/b277cb33e4dfa7440fca3b7888026944ce056154) [@moorereason](https://github.com/moorereason)
|
||||
|
||||
### Templates
|
||||
|
||||
* Output `xmlns:xhtml` only if there are translations available [0859d9df](https://github.com/gohugoio/hugo/commit/0859d9dfe647db3b8a192da38ad7efb5480a29a1) [@jamieconnolly](https://github.com/jamieconnolly)
|
||||
* Add `errorf` template function [4fc67fe4](https://github.com/gohugoio/hugo/commit/4fc67fe44a3c65fc7faaed21d5fa5bb5f87edf2c) [@bmon](https://github.com/bmon) [#3817](https://github.com/gohugoio/hugo/issues/3817)
|
||||
* Add `os.FileExists` template function [28188789](https://github.com/gohugoio/hugo/commit/2818878994e906c292cbe00cb2a83f1531a21f32) [@digitalcraftsman](https://github.com/digitalcraftsman) [#3839](https://github.com/gohugoio/hugo/issues/3839)
|
||||
* Add `float` template function [57adc539](https://github.com/gohugoio/hugo/commit/57adc539fc98dcb6fba8070b9611b8bd545f6f7f) [@x3ro](https://github.com/x3ro) [#3307](https://github.com/gohugoio/hugo/issues/3307)
|
||||
* Rework the partial test and benchmarks [e2e8bcbe](https://github.com/gohugoio/hugo/commit/e2e8bcbec34702a27047b91b6b007a15f1fc0797) [@bep](https://github.com/bep)
|
||||
|
||||
### Other
|
||||
|
||||
* Change `SummaryLength` to be configurable (#3924) [8717a60c](https://github.com/gohugoio/hugo/commit/8717a60cc030f4310c1779c0cdd51db37ad636cd) [@bmon](https://github.com/bmon) [#3734](https://github.com/gohugoio/hugo/issues/3734)
|
||||
* Replace `make` with `mage` in CircleCI build [fe71cb6f](https://github.com/gohugoio/hugo/commit/fe71cb6f5f83cdc8374cf1fc35a6d48102bd4b12) [@bep](https://github.com/bep) [#3969](https://github.com/gohugoio/hugo/issues/3969)
|
||||
* Add table `linenos` support for Chroma highlighter [7c30e2cb](https://github.com/gohugoio/hugo/commit/7c30e2cbb08fdf0e61f80c7f1aa29909aeca4211) [@bep](https://github.com/bep) [#3915](https://github.com/gohugoio/hugo/issues/3915)
|
||||
* Replace `make` with `mage` [8d2580f0](https://github.com/gohugoio/hugo/commit/8d2580f07c0253e12524a4b5c13165f876d00b21) [@bep](https://github.com/bep) [#3937](https://github.com/gohugoio/hugo/issues/3937)
|
||||
* Create `magefile` from `Makefile` [384a6ac4](https://github.com/gohugoio/hugo/commit/384a6ac4bd2de16fcd6a1c952e7ca41b66023a12) [@natefinch](https://github.com/natefinch)
|
||||
* Clean up lint in various packages [47fdfd51](https://github.com/gohugoio/hugo/commit/47fdfd5196cd24a23b30afe1d88969ffb413ab59) [@moorereason](https://github.com/moorereason)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Make sure `Date` and `PublishDate` are always set to a value if one is available [6a30874f](https://github.com/gohugoio/hugo/commit/6a30874f19610a38e846e120aac03c68e12f9b7b) [@bep](https://github.com/bep) [#3854](https://github.com/gohugoio/hugo/issues/3854)
|
||||
* Add correct config file name to verbose server log [15ec031d](https://github.com/gohugoio/hugo/commit/15ec031d9818d239bfbff525c00cd99cc3118a96) [@mdhender](https://github.com/mdhender)
|
|
@ -1,23 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-10-19T00:00:00+02:00
|
||||
title: "Hugo 0.30.1: Two Important Bugfixes!"
|
||||
description: "Fixes `hugo -w` and validator-broken Sitemap."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
---
|
||||
|
||||
|
||||
|
||||
This is a bug-fix release with two important fixes.
|
||||
|
||||
* Fix hugo -w [fa53b13c](https://github.com/gohugoio/hugo/commit/fa53b13ca0ffb1db6ed20f5353661d3f8a5fd455) [@bep](https://github.com/bep) [#3980](https://github.com/gohugoio/hugo/issues/3980)
|
||||
* Revert sitemap template change to make the Google validator happy [5109ed520](https://github.com/gohugoio/hugo/commit/5109ed520f2ddde815d50e7b31acbbfc57ce7719) [@bep](https://github.com/bep) [#3978](https://github.com/gohugoio/hugo/issues/3978)
|
||||
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 20285+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 454+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 180+ [themes](http://themes.gohugo.io/)
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-10-19T12:00:00+02:00
|
||||
title: "Hugo 0.30.2: One More Bugfix"
|
||||
description: "Fixes Fast Render mode when having sub-path in `baseURL`."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
---
|
||||
This release fixes Fast Render mode with sub-path in baseURL [31641033](https://github.com/gohugoio/hugo/commit/3164103310fbca1211cfa9ce4a5eb7437854b6ad) [@bep](https://github.com/bep) [#3981](https://github.com/gohugoio/hugo/issues/3981).
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-11-20
|
||||
title: "Hugo 0.31: Language Multihost Edition!"
|
||||
description: "Hugo 0.31: Multihost, smart union static dirs, and more ..."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-31-poster.png
|
||||
---
|
||||
|
||||
Hugo `0.31` is the **Language Multihost Edition!**
|
||||
|
||||
> <img src="https://esolia.com/img/eSolia-Logo-Flat-2015.svg" alt="eSolia" width="100px" align="top" style="width:100px" />The Multihost feature is sponsored by [eSolia](https://esolia.com/), [@rickcogley](https://github.com/rickcogley)'s company.
|
||||
|
||||
[Multihost](https://gohugo.io/content-management/multilingual/#configure-multilingual-multihost) means that you can have a **`baseURL` per language**, for example, `https://no.example.com` and `https://en.example.com`. This is seamlessly integrated, and the built-in web server with live reload and `navigateToChanged` etc. just works. A related enhancement in this release is the support for **as many static dirs as you need**, with intelligent language overrides, forming a big union file system. Add to that several other language related fixes and enhancements, it is safe to say that this is the version you want for multilingual Hugo sites!
|
||||
|
||||
This release represents **44 contributions by 7 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 [@kaushalmodi](https://github.com/kaushalmodi), [@natefinch](https://github.com/natefinch), and [@betaveros](https://github.com/betaveros) for their ongoing contributions.
|
||||
And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **13 contributions by 9 contributors**. A special thanks to [@oncletom](https://github.com/oncletom), [@kaushalmodi](https://github.com/kaushalmodi), [@XhmikosR](https://github.com/XhmikosR), and [@digitalcraftsman](https://github.com/digitalcraftsman) for their work on the documentation site.
|
||||
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 21105+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 455+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 184+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
|
||||
* For mapping of translated content, Hugo now considers the full path of the content file, which makes it possible with translation of duplicate content filenames such as `index.md`. A specific translation key can be specified with the new `translationKey` front matter variable. See [#2699](https://github.com/gohugoio/hugo/issues/2699).
|
||||
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Language related
|
||||
|
||||
* Support unknown language codes [23ba779f](https://github.com/gohugoio/hugo/commit/23ba779fab90ce45cddd68b4f49a2515ce6d4878) [@bep](https://github.com/bep) [#3564](https://github.com/gohugoio/hugo/issues/3564)
|
||||
* Fix `.IsTranslated` with identical filenames [b3daa1f4](https://github.com/gohugoio/hugo/commit/b3daa1f4bf1b84bcc5da028257ba609be74e3ecc) [@bep](https://github.com/bep) [#2699](https://github.com/gohugoio/hugo/issues/2699)
|
||||
* Fall back to unstranslated base template [0a81a6b4](https://github.com/gohugoio/hugo/commit/0a81a6b4bae3de53aa9c179b855c671a2d30eec7) [@bep](https://github.com/bep) [#3893](https://github.com/gohugoio/hugo/issues/3893)
|
||||
* Add support for multiple static dirs [60dfb9a6](https://github.com/gohugoio/hugo/commit/60dfb9a6e076200ab3ca3fd30e34bb3c14e0a893) [@bep](https://github.com/bep) [#36](https://github.com/gohugoio/hugo/issues/36)[#4027](https://github.com/gohugoio/hugo/issues/4027)
|
||||
* Add multilingual multihost support [2e046576](https://github.com/gohugoio/hugo/commit/2e0465764b5dacc511b977b1c9aa07324ad0ee9c) [@bep](https://github.com/bep) [#4027](https://github.com/gohugoio/hugo/issues/4027)
|
||||
|
||||
### Templates
|
||||
|
||||
* Refactor `Mod` with `cast` [76dc811c](https://github.com/gohugoio/hugo/commit/76dc811c6539b2ed8b4d3b22693e5088b9f6ecfe) [@artem-sidorenko](https://github.com/artem-sidorenko)
|
||||
* Add support for height argument to figure shortcode [488631fe](https://github.com/gohugoio/hugo/commit/488631fe0abc3667355345c7eb98ba7a2204deb5) [@kaushalmodi](https://github.com/kaushalmodi) [#4014](https://github.com/gohugoio/hugo/issues/4014)
|
||||
|
||||
### Core
|
||||
|
||||
* Use ms precision for static change logging [bb048d81](https://github.com/gohugoio/hugo/commit/bb048d811d3977adb10656335cd339cd8c945a25) [@bep](https://github.com/bep)
|
||||
* Update Chroma to get the latest SASS lexer [b32ffed6](https://github.com/gohugoio/hugo/commit/b32ffed6abc67646cad89e163846f3ffef29cec8) [@bep](https://github.com/bep) [#4069](https://github.com/gohugoio/hugo/issues/4069)
|
||||
* Bump to Go 1.9.2 [9299a16c](https://github.com/gohugoio/hugo/commit/9299a16c9952a284d3ac3f31d2662f1812f77768) [@bep](https://github.com/bep) [#4064](https://github.com/gohugoio/hugo/issues/4064)
|
||||
* Update Travis and snapcraft to Go 1.9.2 [77cbd001](https://github.com/gohugoio/hugo/commit/77cbd001ff6b2e0aaa48566ef2af49ca68e19af9) [@bep](https://github.com/bep) [#4064](https://github.com/gohugoio/hugo/issues/4064)
|
||||
* Handle Taxonomy permalinks [d9a78b61](https://github.com/gohugoio/hugo/commit/d9a78b61adefe8e1803529f4774185874af85148) [@betaveros](https://github.com/betaveros) [#1208](https://github.com/gohugoio/hugo/issues/1208)
|
||||
|
||||
|
||||
### Other
|
||||
|
||||
* Support Fast Render mode with sub-path in baseURL [31641033](https://github.com/gohugoio/hugo/commit/3164103310fbca1211cfa9ce4a5eb7437854b6ad) [@bep](https://github.com/bep) [#3981](https://github.com/gohugoio/hugo/issues/3981)
|
||||
* Simplify Site benchmarks [c3c10f2c](https://github.com/gohugoio/hugo/commit/c3c10f2c7ce4ee11186f51161943efc8b37a28c9) [@bep](https://github.com/bep)
|
||||
* Replace `make` with `mage` to build Hugo [#3969](https://github.com/gohugoio/hugo/issues/3969)
|
||||
* Convert to `dep` as dependency/vendor manager for Hugo [#3988](https://github.com/gohugoio/hugo/issues/3988)
|
||||
* Pre-allocate some slices [a9be687b](https://github.com/gohugoio/hugo/commit/a9be687b81df01c7343f78f0d3760042f467baa4) [@bep](https://github.com/bep)
|
||||
|
||||
## Fixes
|
||||
|
||||
### Templates
|
||||
|
||||
* Make sure only one instance of a cached partial is rendered [#4086](https://github.com/gohugoio/hugo/issues/4086)
|
||||
|
||||
### Other
|
||||
|
||||
* Fix broken shortcodes for `Ace` and `Amber` [503ca6de](https://github.com/gohugoio/hugo/commit/503ca6de6ceb0b4af533f9efeff917d6f3871278) [@bep](https://github.com/bep) [#4051](https://github.com/gohugoio/hugo/issues/4051)
|
||||
* Fix error handling in `mage` build [c9c19d79](https://github.com/gohugoio/hugo/commit/c9c19d794537cf76ff281788c3d6cf5f2beac54d) [@natefinch](https://github.com/natefinch)
|
||||
* Fix `hugo -w` [fa53b13c](https://github.com/gohugoio/hugo/commit/fa53b13ca0ffb1db6ed20f5353661d3f8a5fd455) [@bep](https://github.com/bep) [#3980](https://github.com/gohugoio/hugo/issues/3980)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-11-27
|
||||
title: "Hugo 0.31.1: One Bugfix!"
|
||||
description: "Fixes broken `--appendPort=false`."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
||||
---
|
||||
|
||||
This is a bug-fix release with one important bug fix:
|
||||
|
||||
* Fix broken `--appendPort=false` [8afd7d9c](https://github.com/gohugoio/hugo/commit/8afd7d9ceb0d168300e3399c6e87a355a88c9a28) [@bep](https://github.com/bep) [#4111](https://github.com/gohugoio/hugo/issues/4111)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2017-12-31
|
||||
title: "Hugo 0.32: Page Bundles and Image Processing!"
|
||||
description: "Images and other resources with page-relative links, resize, scale and crop images, and much more."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-32-poster.png
|
||||
---
|
||||
|
||||
Hugo `0.32` features **Page Bundles and Image Processing** by [@bep](https://github.com/bep), which is very cool and useful on so many levels. Read about it in more detail in the [Hugo documentation](https://gohugo.io/about/new-in-032/), but some of the highlights include:
|
||||
|
||||
* Automatic bundling of a content page with its resources. Resources can be anything: Images, `JSON` files ... and also other content pages.
|
||||
* A `Resource` will have its `RelPermalink` and `Permalink` relative to the "owning page". This makes the complete article with both text and images portable (just send a ZIP file with a folder to your editor), and it can be previewed directly on GitHub.
|
||||
* Powerful and simple to use image processing with the new `.Resize`, `.Fill`, and `.Fit` methods on the new `Image` resource.
|
||||
* Full support for symbolic links inside `/content`, both for regular files and directories.
|
||||
|
||||
The built-in benchmarks in Hugo show that this is also the [fastest and most memory effective](https://gist.github.com/bep/2a9bbd221de2da5d39c8b32085c658f7) Hugo version to date. But note that the build time total reported in the console is now adjusted to be the *real total*, including the copy of static files. So, if it reports more milliseconds, it is still most likely faster ...
|
||||
|
||||
This release represents **30 contributions by 7 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 [@betaveros](https://github.com/betaveros), [@chaseadamsio](https://github.com/chaseadamsio), and [@kropp](https://github.com/kropp). And as always big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **17 contributions by 7 contributors**. A special thanks to [@bep](https://github.com/bep), [@felicianotech](https://github.com/felicianotech), [@maiki](https://github.com/maiki), and [@carlchengli](https://github.com/carlchengli) for their work on the documentation site.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 22061+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 454+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 193+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
Today is **New Year's Eve.** It is the last day of 2017, a year that have seen a **string of pearls of Hugo releases**, making Hugo _the_ top choice for website development:
|
||||
|
||||
* 0.32, December 2017: **Page Bundles and Image Processing** edition.
|
||||
* 0.31, November 2017: The Language **Multihost Edition!** with one `baseURL` per language.
|
||||
* 0.30, October 2017: The Race Car Edition with the **Fast Render Mode**.
|
||||
* 0.29, September 2017: Added **Template Metrics**.
|
||||
* 0.28, September 2017: **Blistering fast and native syntax highlighting** from [Chroma](https://github.com/alecthomas/chroma).
|
||||
* 0.27, September 2017: Fast and flexible **Related Content.**
|
||||
* 0.26, August 2017: The **Language Style Edition** with AP Style or Chicago Style Title Case and « French Guillemets ».
|
||||
* 0.25, July 2017: The **Kinder Surprise** edition added, among other cool things, `hugo server --navigateToChanged` which navigates to the content page you start editing.
|
||||
* 0.24, June 2017: Was **The Revival of the Archetypes!** Now archetype files, i.e. the content file templates, can include template syntax with all of Hugo's functions and variables.
|
||||
* 0.23, June 2017: Hugo moved to it's own GitHub organization, **gohugoio**.
|
||||
* 0.22, June 2017: Added **nested sections**, a long sought after feature.
|
||||
* 0.21, May 2017: Full support for shortcodes per output format (think **AMP**).
|
||||
* 0.20, April 2017: Was all about **Custom Output Formats**.
|
||||
* 0.19, February 2017: Native Emacs Org-mode content support and lots of internal upgrades.
|
||||
|
||||
## Notes
|
||||
|
||||
* The build total in the console is now the ... total (i.e. it now includes both the copy of the static files and the Hugo build). So if your Hugo site seems to build slightly slower, it is in reality probably slightly faster than before this release.
|
||||
* Images and other static resources in folders with "_index.md" will have its `RelPermalink` relative to its page.
|
||||
* Images and other static resources in or below "index.md" folders will have its `RelPermalink` relative to its page (respecting permalink settings etc.)
|
||||
* Content pages in or below "index.md" will not get their own `URL`, but will be part of the `.Resources` collection of its page.
|
||||
* `.Site.Files` is deprecated.
|
||||
* Hugo no longer minfies CSS files inside `/content`. This was an undocumented "proof of concept feature". We may revisit the "assets handling" in a future release.
|
||||
* `Page.GetParam`does not lowercase your result anymore. If you really want to lowercase your params, do it with `.GetParam "myparam" | lower` or similar.
|
||||
|
||||
Previously deprecated that will now `ERROR`:
|
||||
|
||||
* `disable404`: Use `disableKinds=["404"]`
|
||||
* `disableRSS`: Use `disableKinds=["RSS"]`
|
||||
* `disableSitemap`: Use `disableKinds=["sitemap"]`
|
||||
* `disableRobotsTXT`: Use `disableKinds=["robotsTXT"]`
|
||||
|
||||
## Enhancements
|
||||
|
||||
* Add `.Title` and `.Page` to `MenuEntry` [9df3736f](https://github.com/gohugoio/hugo/commit/9df3736fec164c51d819797416dc263f2869be77) [@rmetzler](https://github.com/rmetzler) [#2784](https://github.com/gohugoio/hugo/issues/2784)
|
||||
* Add `Pandoc` support [e69da7a4](https://github.com/gohugoio/hugo/commit/e69da7a4cb725987f153707bf2fc59c135007e2a) [@betaveros](https://github.com/betaveros) [#234](https://github.com/gohugoio/hugo/issues/234)
|
||||
* Implement Page bundling and image handling [3cdf19e9](https://github.com/gohugoio/hugo/commit/3cdf19e9b7e46c57a9bb43ff02199177feb55768) [@bep](https://github.com/bep) [#3651](https://github.com/gohugoio/hugo/issues/3651)[#3158](https://github.com/gohugoio/hugo/issues/3158)[#1014](https://github.com/gohugoio/hugo/issues/1014)[#2021](https://github.com/gohugoio/hugo/issues/2021)[#1240](https://github.com/gohugoio/hugo/issues/1240)[#3757](https://github.com/gohugoio/hugo/issues/3757)
|
||||
* Make `chomp` return the type it receives [22cd89ad](https://github.com/gohugoio/hugo/commit/22cd89adc4792a3b55389d38acd4acfae3786775) [@kropp](https://github.com/kropp) [#2187](https://github.com/gohugoio/hugo/issues/2187)
|
||||
* Reuse the `BlackFriday` config instance when possible [db4b7a5c](https://github.com/gohugoio/hugo/commit/db4b7a5c6742c75f9cd9627d3b054d3a72802ec8) [@bep](https://github.com/bep)
|
||||
* Remove the goroutines from the shortcode lexer [24369410](https://github.com/gohugoio/hugo/commit/243694102a60da2fb1050020f68384539f9f9ef5) [@bep](https://github.com/bep)
|
||||
* Improve site benchmarks [051fa343](https://github.com/gohugoio/hugo/commit/051fa343d06d6c070df742f7cbd125432fcab665) [@bep](https://github.com/bep)
|
||||
* Update `Chroma` to `v0.2.0` [79892101](https://github.com/gohugoio/hugo/commit/7989210120dbde78da3741e2ef01b13f4aa78692) [@bep](https://github.com/bep) [#4087](https://github.com/gohugoio/hugo/issues/4087)
|
||||
* Update `goorgeous` to `v1.1.0` [7f2ae3ef](https://github.com/gohugoio/hugo/commit/7f2ae3ef39f27a9bd26ddb9258b073a840faf491) [@chaseadamsio](https://github.com/chaseadamsio)
|
||||
* Add test for homepage content for all rendering engines [407c2402](https://github.com/gohugoio/hugo/commit/407c24020ef2db90cf33fd07e7522b2257013722) [@bep](https://github.com/bep) [#4166](https://github.com/gohugoio/hugo/issues/4166)
|
||||
* Add output formats definition to benchmarks [a2d81ce9](https://github.com/gohugoio/hugo/commit/a2d81ce983d45b5742c93bd472503c88286f099a) [@bep](https://github.com/bep)
|
||||
|
||||
## Fixes
|
||||
|
||||
### Templates
|
||||
|
||||
* Do not unescape input to `highlight` [c067f345](https://github.com/gohugoio/hugo/commit/c067f34558b82455b63b9ce8f5983b4b4849c7cf) [@bep](https://github.com/bep) [#4179](https://github.com/gohugoio/hugo/issues/4179)
|
||||
* Properly close image file in `imageConfig` [6d79beb5](https://github.com/gohugoio/hugo/commit/6d79beb5f67dbb54d7714c3195addf9d8e3924e8) [@bep](https://github.com/bep)
|
||||
* Fix `opengraph` video range template [23f69efb](https://github.com/gohugoio/hugo/commit/23f69efb3914946b39ce673fcc0f2e3a9ed9d878) [@drlogout](https://github.com/drlogout) [#4136](https://github.com/gohugoio/hugo/issues/4136)
|
||||
* Fix `humanize` for multi-byte runes [e7652180](https://github.com/gohugoio/hugo/commit/e7652180a13ce149041c48a1c2754c471df569c8) [@bep](https://github.com/bep) [#4133](https://github.com/gohugoio/hugo/issues/4133)
|
||||
|
||||
### Other
|
||||
|
||||
* Fix broken live reload without a server port. [25114986](https://github.com/gohugoio/hugo/commit/25114986086e5877a0b4108d8cf5e4e95f377241) [@sainaen](https://github.com/sainaen) [#4141](https://github.com/gohugoio/hugo/issues/4141)
|
||||
* Make sure all language homes are always re-rendered in fast render mode [72903be5](https://github.com/gohugoio/hugo/commit/72903be587e9c4e3644f60b11e26238ec03da2db) [@bep](https://github.com/bep) [#4125](https://github.com/gohugoio/hugo/issues/4125)
|
||||
* Do not `tolower` result from Page.GetParam [1c114d53](https://github.com/gohugoio/hugo/commit/1c114d539b0755724443fe28c90b12fe2a19085a) [@bep](https://github.com/bep) [#4187](https://github.com/gohugoio/hugo/issues/4187)
|
|
@ -1,18 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-01-02
|
||||
title: "Hugo 0.32.1: Two bugfixes"
|
||||
description: "Fixes image processing in shortcodes."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
---
|
||||
|
||||
This fixes 2 bugs from the Hugo 0.32 release.
|
||||
|
||||
* Fix image processing from shortcodes in non-server mode. [@bep](https://github.com/bep) [#4202](https://github.com/gohugoio/hugo/issues/4202)
|
||||
* Fix broken `hugo --renderToMemory`. Note that this is only useful for benchmark testing, as there is no easy way to actually view the result. [d36d71ed](https://github.com/gohugoio/hugo/commit/d36d71edd3b04df3b34edf4d108e3995a244c4f0) [@bep](https://github.com/bep) [#4212](https://github.com/gohugoio/hugo/issues/4212)
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-01-03
|
||||
title: "Hugo 0.32.2: One bugfix"
|
||||
description: "Fixes one issue with publishing of processed images when no cache."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
This is a bug-fix release with one important fix.
|
||||
|
||||
|
||||
* Handle publish of processed images to /public on fresh build with no image cache in /resources (as reported by one person in a Netlify build) [196da49c](https://github.com/gohugoio/hugo/commit/196da49c9d906fbae6d389fdd32b80c27cb38de4) [@bep](https://github.com/bep) [#4213](https://github.com/gohugoio/hugo/issues/4213)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-01-08
|
||||
title: "Hugo 0.32.3: Some important bug fixes"
|
||||
description: "Fixes multilingual resource (images etc.) handling etc."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
Hugo `0.32` was a big and [really cool](https://gohugo.io/news/0.32-relnotes/) release, and the [Hugo Forum](https://discourse.gohugo.io/) has been filled with questions from people wanting to upgrade their Hugo sites to be able to use the new image processing feature etc.
|
||||
|
||||
And with that we have discovered some issues, which this release should fix, mostly releated to multilingual sites:
|
||||
|
||||
* Fix multihost detection for sites without language definition [8969331f](https://github.com/gohugoio/hugo/commit/8969331f5be352939883074034adac6b7086ddc8) [@bep](https://github.com/bep) [#4221](https://github.com/gohugoio/hugo/issues/4221)
|
||||
* Fix hugo benchmark --renderToMemory [059e8458](https://github.com/gohugoio/hugo/commit/059e8458d690dbb9fcd3ebd58cfc61b062d3138e) [@bep](https://github.com/bep) [#4218](https://github.com/gohugoio/hugo/issues/4218)
|
||||
* Fix URLs for bundle resources in multihost mode [ab82a27d](https://github.com/gohugoio/hugo/commit/ab82a27d055c3aa177821d81a45a5c6e972aa29e) [@bep](https://github.com/bep) [#4217](https://github.com/gohugoio/hugo/issues/4217)
|
||||
* Fix sub-folder baseURL handling for Page resources [f25d8a9e](https://github.com/gohugoio/hugo/commit/f25d8a9e17fb65fa41dafdcbf0358853d68eaf45) [@bep](https://github.com/bep) [#4228](https://github.com/gohugoio/hugo/issues/4228)
|
||||
* Avoid processing and storing same image for each language [4b04db0f](https://github.com/gohugoio/hugo/commit/4b04db0f0855a1f54895d6c93c52dcea4b1ce3ca) [@bep](https://github.com/bep) [#4231](https://github.com/gohugoio/hugo/issues/4231)
|
||||
* Resources.ByType should return Resources [97c1866e](https://github.com/gohugoio/hugo/commit/97c1866e322284dec46db6f3d235807507f5b69f) [@bep](https://github.com/bep) [#4234](https://github.com/gohugoio/hugo/issues/4234)
|
||||
* Report build time on config.toml change [6feb1387](https://github.com/gohugoio/hugo/commit/6feb138785eeb9e813428d0df30010d9b5fb1059) [@bep](https://github.com/bep) [#4232](https://github.com/gohugoio/hugo/issues/4232)[#4224](https://github.com/gohugoio/hugo/issues/4224)
|
||||
* Fix handling of mixed-case taxonomy folders with content file [2d3189b2](https://github.com/gohugoio/hugo/commit/2d3189b22760e0a8995dae082a6bc5480f770bfe) [@bep](https://github.com/bep) [#4238](https://github.com/gohugoio/hugo/issues/4238)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-01-11
|
||||
title: "Hugo 0.32.4: Two bugfixes"
|
||||
description: "Fixes non-ASCII path handling for Page resources."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
---
|
||||
|
||||
This is a bug-fix release with two of important fixes.
|
||||
|
||||
* Fix non-ASCII path handling for Page resources [f0eecc6a](https://github.com/gohugoio/hugo/commit/f0eecc6a4f541838e9930c98bc982546f65c7a4f) [@bep](https://github.com/bep) [#4241](https://github.com/gohugoio/hugo/issues/4241)
|
||||
* Fix `--cleanDestinationDir` [5235a5bf](https://github.com/gohugoio/hugo/commit/5235a5bf5ef44b3789341e1d25b681a7bb14771a) [@biodranik](https://github.com/biodranik) [#4246](https://github.com/gohugoio/hugo/issues/4246)[#4248](https://github.com/gohugoio/hugo/issues/4248)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 69 KiB |
|
@ -1,76 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-01-18
|
||||
title: "Hugo 0.33: The New Kinder Surprise!"
|
||||
description: "Hugo 0.33 comes with resource (images etc.) metadata, `type` and `layout` for all page types, `url` in front matter for list pages …"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
Hugo `0.33` is the first main Hugo release of the new year, and it is safe to say that [@bep](https://github.com/bep) has turned off his lazy Christmas mode :smiley:
|
||||
|
||||
This is a full makeover of the layout selection logic with full custom `layout` and `type` support (many have asked for this). Also, Hugo now respects the `url` value in front matter for all page types, including sections. Also, you can now configure `uglyURLs` per section.
|
||||
|
||||
But this release is also a follow-up to the `0.32` release which was all about bundles with resources and powerful image processing. With this release it is now simple to add metadata to your images and other bundle resources.
|
||||
|
||||
[@bep](https://github.com/bep) has added a section with examples of both `resources` configuration in both `YAML` and `TOML` front matter in his [test site](http://hugotest.bep.is/resourcemeta/). The example below shows a sample of how it would look like in `YAML`:
|
||||
|
||||
```yaml
|
||||
date: 2017-01-17
|
||||
title: My Bundle With YAML Resource Metadata
|
||||
resources:
|
||||
- src: "image-4.png"
|
||||
title: "The Fourth Image"
|
||||
- src: "*.png"
|
||||
name: "my-cool-image-:counter"
|
||||
title: "The Image #:counter"
|
||||
params:
|
||||
byline: "bep"
|
||||
```
|
||||
|
||||
This release represents **41 contributions by 3 contributors** to the main Hugo code base.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 22553+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 448+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 197+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
* We have re-implemented and unified the template layout lookup logic. This has made it more powerful and much simpler to understand. We don't expect any sites to break because of this. We have tested lots of Hugo sites, including the 200 [themes](http://themes.gohugo.io/).
|
||||
* The `indexes` type is removed from template lookup. It's not in the documentation, and is a legacy term inherited from very old Hugo versions.
|
||||
* If you have sub-dirs in your shiny new bundles (e.g. `my-bundle/images`) and use the `*Prefix*` methods to find them, we have made an unintended change that affects you. See [this issue](https://github.com/gohugoio/hugo/issues/4295).
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Respect `Type` and `Layout` for list template selection [51dd462c](https://github.com/gohugoio/hugo/commit/51dd462c3958f7cf032b06503f1f200a6aceebb9) [@bep](https://github.com/bep) [#3005](https://github.com/gohugoio/hugo/issues/3005)[#3245](https://github.com/gohugoio/hugo/issues/3245)
|
||||
|
||||
### Core
|
||||
|
||||
* Allow `url` in front matter for list type pages [8a409894](https://github.com/gohugoio/hugo/commit/8a409894bdb0972e152a2eccc47a2738568e1cfc) [@bep](https://github.com/bep) [#4263](https://github.com/gohugoio/hugo/issues/4263)
|
||||
* Improve `.Site.GetPage` for regular translated pages. Before this change it was not possible to say "get me the current language edition of the given content page if possible." Now you can do that by doing a lookup without any extensions: `.Site.GetPage "page" "post/mypost"` [9409bc0f](https://github.com/gohugoio/hugo/commit/9409bc0f799a8057836a14ccdf2833a55902175e) [@bep](https://github.com/bep) [#4285](https://github.com/gohugoio/hugo/issues/4285)
|
||||
* Add front matter metadata to `Resource` [20c9b6ec](https://github.com/gohugoio/hugo/commit/20c9b6ec81171d1c586ea31d5d08b40b0edaffc6) [@bep](https://github.com/bep) [#4244](https://github.com/gohugoio/hugo/issues/4244)
|
||||
* Implement `Resources.ByPrefix` [46db900d](https://github.com/gohugoio/hugo/commit/46db900dab9c0e6fcd9d227f10a32fb24f5c8bd9) [@bep](https://github.com/bep) [#4266](https://github.com/gohugoio/hugo/issues/4266)
|
||||
* Make `GetByPrefix` work for Page resources [60c9f3b1](https://github.com/gohugoio/hugo/commit/60c9f3b1c34b69771e25a66906f150f460d73223) [@bep](https://github.com/bep) [#4264](https://github.com/gohugoio/hugo/issues/4264)
|
||||
* Make `Resources.GetByPrefix` case insensitive [db85e834](https://github.com/gohugoio/hugo/commit/db85e83403913cff4b8737b138932b28e5bf6160) [@bep](https://github.com/bep) [#4258](https://github.com/gohugoio/hugo/issues/4258)
|
||||
* Update `Chroma` and other third-party deps [64f0e9d1](https://github.com/gohugoio/hugo/commit/64f0e9d1c1d4ff2249fd9cf9749e70485002b36d) [@bep](https://github.com/bep) [#4267](https://github.com/gohugoio/hugo/issues/4267)
|
||||
* Remove superflous `BuildDate` logic [13d53b31](https://github.com/gohugoio/hugo/commit/13d53b31f19240879122d6b7e4aaeb60b5130a3c) [@bep](https://github.com/bep) [#4272](https://github.com/gohugoio/hugo/issues/4272)
|
||||
* Run benchmarks 3 times [b6ea6d07](https://github.com/gohugoio/hugo/commit/b6ea6d07d0b072d850fb066c78976acd6c2f5e81) [@bep](https://github.com/bep)
|
||||
* Support `uglyURLs` per section [57e10f17](https://github.com/gohugoio/hugo/commit/57e10f174e51cc5e1cf5f37eed30a0f3b153dd64) [@bep](https://github.com/bep) [#4256](https://github.com/gohugoio/hugo/issues/4256)
|
||||
* Update CONTRIBUTING.md [1046e936](https://github.com/gohugoio/hugo/commit/1046e9363f2e382fd0b4aac838735ae4cbbebe5a) [@vassudanagunta](https://github.com/vassudanagunta)
|
||||
* Support offline builds [d5803da1](https://github.com/gohugoio/hugo/commit/d5803da1befba5446d1b2c1ad16f6467dc7b3991) [@vassudanagunta](https://github.com/vassudanagunta)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Fix handling of mixed-case taxonomy folders with content file [2d3189b2](https://github.com/gohugoio/hugo/commit/2d3189b22760e0a8995dae082a6bc5480f770bfe) [@bep](https://github.com/bep) [#4238](https://github.com/gohugoio/hugo/issues/4238)
|
||||
* Fix handling of very long image file names [ecaf1451](https://github.com/gohugoio/hugo/commit/ecaf14514e06321823bdd10235cf23e7d654ba77) [@bep](https://github.com/bep) [#4261](https://github.com/gohugoio/hugo/issues/4261)
|
||||
* Update `Afero` to avoid panic on "file name is too long" [f8a119b6](https://github.com/gohugoio/hugo/commit/f8a119b606d55aa4f31f16e5a3cadc929c99e4f8) [@bep](https://github.com/bep) [#4240](https://github.com/gohugoio/hugo/issues/4240)
|
||||
* And now really fix the server watch logic [d4f8f88e](https://github.com/gohugoio/hugo/commit/d4f8f88e67f958b8010f90cb9b9854114e52dac2) [@bep](https://github.com/bep) [#4275](https://github.com/gohugoio/hugo/issues/4275)
|
||||
* Fix server without watch [4e524ffc](https://github.com/gohugoio/hugo/commit/4e524ffcfff48c017717e261c6067416aa56410f) [@bep](https://github.com/bep) [#4275](https://github.com/gohugoio/hugo/issues/4275)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 76 KiB |
|
@ -1,44 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-01-22
|
||||
title: "Hugo 0.34: Pattern matching to filter images and other resources"
|
||||
description: "Hugo 0.34 adds full glob with super-asterisk support, for example `*.jpg`."
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
Hugo `0.34` is a small release. It contains a few smaller bug-fixes, but more important is an overhaul of the API used to find images and other resources in your page bundles.
|
||||
|
||||
We have added two simple methods on the `Resources` object:
|
||||
|
||||
* `.Match` finds every resource matching a pattern. Examples: `.Match "images/*.jpg"` finds every JPEG image in `images` and `.Match "**.jpg"` finds every JPEG image in the bundle.
|
||||
* `.GetMatch` finds the first resource matching the pattern given.
|
||||
|
||||
**Note: The path separators used are Unix-style forward slashes, even on Windows.**
|
||||
|
||||
It uses [standard wildcard syntax](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm) with the addition of the `**`, aka super-asterisk, which matches across path boundaries.
|
||||
|
||||
Thanks to [@gobwas](https://github.com/gobwas/glob) for a fast and easy-to-use Glob library.
|
||||
|
||||
This release represents **5 contributions by 1 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 **25 contributions by 16 contributors**. A special thanks to [@bep](https://github.com/bep), [@rmetzler](https://github.com/rmetzler), [@chris-rudmin](https://github.com/chris-rudmin), and [@stkevintan](https://github.com/stkevintan) for their work on the documentation site.
|
||||
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 22689+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 448+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 197+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
* `Resources.GetByPrefix` and `Resources.ByPrefix` are deprecated. They still work, but will eventually be removed. Use `Resources.Match` (many) and `Resources.GetMatch` (one).
|
||||
* When filtering bundles pages in sub-folders, you need to include the sub-folder when matching. This was a bug introduced in `0.33` and gets it in line with images and other resources.
|
||||
|
||||
## Enhancements
|
||||
|
||||
* Add `Resources.Match` and `Resources.GetMatch` [94213801](https://github.com/gohugoio/hugo/commit/9421380168f66620cb73203e1267814b3086d805) [@bep](https://github.com/bep) [#4301](https://github.com/gohugoio/hugo/issues/4301)
|
||||
|
||||
## Fixes
|
||||
* Add validation for `defaultContentLanguage` [4d5e4f37](https://github.com/gohugoio/hugo/commit/4d5e4f379a890a3c6cbc11ddb40d77a90f14c015) [@bep](https://github.com/bep) [#4298](https://github.com/gohugoio/hugo/issues/4298)
|
||||
* Fix lookup of pages bundled in sub-folders in `ByPrefix` etc. [5d030869](https://github.com/gohugoio/hugo/commit/5d03086981b4a7d4bc450269a6a2e0fd22dbeed7) [@bep](https://github.com/bep) [#4295](https://github.com/gohugoio/hugo/issues/4295)
|
Binary file not shown.
Before Width: | Height: | Size: 86 KiB |
|
@ -1,102 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-01-31
|
||||
title: "Hugo 0.35: Headless Bundles!"
|
||||
description: "Headless Bundles, disable languages, improves fast render mode, and much more."
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
The most notable new feature in Hugo `0.35` is perhaps **Headless Bundles**.
|
||||
|
||||
This means that you in your `index.md` front matter can say:
|
||||
|
||||
```yaml
|
||||
headless: true
|
||||
```
|
||||
And
|
||||
|
||||
* it will have no `Permalink` and no rendered HTML in `/public`
|
||||
* it will not be part of `.Site.RegularPages` etc.
|
||||
|
||||
But you can get it by:
|
||||
|
||||
* `.Site.GetPage ...`
|
||||
|
||||
The use cases are many:
|
||||
|
||||
* Shared media libraries
|
||||
* Reusable page content "snippets"
|
||||
* ...
|
||||
|
||||
But this release contains more goodies than possible to sum up in one paragraph, so study the release notes carefully. It represents **42 contributions by 8 contributors** to the main Hugo code base.
|
||||
|
||||
[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@vassudanagunta](https://github.com/vassudanagunta), [@yanzay](https://github.com/yanzay), and [@robertbasic](https://github.com/robertbasic) for their ongoing contributions.
|
||||
|
||||
And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **28 contributions by 5 contributors**. A special thanks to [@bep](https://github.com/bep), [@kaushalmodi](https://github.com/kaushalmodi), [@regisphilibert](https://github.com/regisphilibert), and [@salim-b](https://github.com/salim-b) for their work on the documentation site.
|
||||
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 22967+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 448+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 197+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
* Deprecate `useModTimeAsFallback` [adfd4370](https://github.com/gohugoio/hugo/commit/adfd4370b67fd7181178bd6b3b1d07356beaac71) [@bep](https://github.com/bep) [#4351](https://github.com/gohugoio/hugo/issues/4351)
|
||||
* Deprecate CLI flags `canonifyURLs`, `pluralizeListTitles`, `preserveTaxonomyNames`, `uglyURLs` [f08ea02d](https://github.com/gohugoio/hugo/commit/f08ea02d24d42929676756950f3affaca7fd8c01) [@bep](https://github.com/bep) [#4347](https://github.com/gohugoio/hugo/issues/4347)
|
||||
* Remove undraft command [2fa70c93](https://github.com/gohugoio/hugo/commit/2fa70c9344b231c9d999bbafdfa4acbf27ed9f6e) [@robertbasic](https://github.com/robertbasic) [#4353](https://github.com/gohugoio/hugo/issues/4353)
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Update Twitter card to also consider images in `.Resources` [25d691da](https://github.com/gohugoio/hugo/commit/25d691daff57d7c6d7d0f63af3991d22e3f788fe) [@bep](https://github.com/bep) [#4349](https://github.com/gohugoio/hugo/issues/4349)
|
||||
* Seed random on init only [83c761b7](https://github.com/gohugoio/hugo/commit/83c761b71a980aee6331179b271c7e24e999e8eb) [@liguoqinjim](https://github.com/liguoqinjim)
|
||||
* Remove duplicate layout lookup layouts [b2fcbb1f](https://github.com/gohugoio/hugo/commit/b2fcbb1f9774aa1e929b8575c0e1ac366ab2fb73) [@bep](https://github.com/bep) [#4319](https://github.com/gohugoio/hugo/issues/4319)
|
||||
* Add "removable-media" interface to `snapcraft.yaml` [f0c0ece4](https://github.com/gohugoio/hugo/commit/f0c0ece44d55b6c2997cbd106d1bc099ea1a2fa7) [@anthonyfok](https://github.com/anthonyfok) [#3837](https://github.com/gohugoio/hugo/issues/3837)
|
||||
|
||||
### Other
|
||||
|
||||
* Add a way to disable one or more languages [6413559f](https://github.com/gohugoio/hugo/commit/6413559f7575e2653d76227a8037a7edbaae82aa) [@bep](https://github.com/bep) [#4297](https://github.com/gohugoio/hugo/issues/4297)[#4329](https://github.com/gohugoio/hugo/issues/4329)
|
||||
* Handle newly created files in Fast Render Mode [1707dae8](https://github.com/gohugoio/hugo/commit/1707dae8d3634006017eb6d040df4dbafc53d92f) [@yanzay](https://github.com/yanzay) [#4339](https://github.com/gohugoio/hugo/issues/4339)
|
||||
* Extract the Fast Render Mode logic into a method [94e736c5](https://github.com/gohugoio/hugo/commit/94e736c5e167a0ee70a528e1c19d64a47e7929c2) [@bep](https://github.com/bep) [#4339](https://github.com/gohugoio/hugo/issues/4339)
|
||||
* Remove unused code [ae5a45be](https://github.com/gohugoio/hugo/commit/ae5a45be6f0ee4d5c52b38fd28b22b55d9cd7b2d) [@bep](https://github.com/bep)
|
||||
* Add the last lookup variant for the `GetPage` index [3446fe9b](https://github.com/gohugoio/hugo/commit/3446fe9b8937610b8b628b2c212eb25888a7c1bb) [@bep](https://github.com/bep) [#4312](https://github.com/gohugoio/hugo/issues/4312)
|
||||
* Simplify bundle lookup via `.Site.GetPage`, `ref`, `relref` [517b6b62](https://github.com/gohugoio/hugo/commit/517b6b62389d23bfe41fe3ae551a691b11bdcaa7) [@bep](https://github.com/bep) [#4312](https://github.com/gohugoio/hugo/issues/4312)
|
||||
* Remove some now superflous Fast Render Mode code [feeed073](https://github.com/gohugoio/hugo/commit/feeed073c3320b09fb38168ce272ac88b987f1d2) [@bep](https://github.com/bep) [#4339](https://github.com/gohugoio/hugo/issues/4339)
|
||||
* Make resource counters for `name` and `title` independent [df20b054](https://github.com/gohugoio/hugo/commit/df20b05463fef42aba93d5208e410a7ecc56da5d) [@bep](https://github.com/bep) [#4335](https://github.com/gohugoio/hugo/issues/4335)
|
||||
* Provide .Name to the archetype templates [863a812e](https://github.com/gohugoio/hugo/commit/863a812e07193541b42732b0e227f3d320433f01) [@bep](https://github.com/bep) [#4348](https://github.com/gohugoio/hugo/issues/4348)
|
||||
* Only set `url` if permalink in metadata and remove duplicate confirm msg [3752348e](https://github.com/gohugoio/hugo/commit/3752348ef13ced8f6f528b42ee7d76a12a97ae5c) [@lildude](https://github.com/lildude) [#1887](https://github.com/gohugoio/hugo/issues/1887)
|
||||
* Start Resources :counter first time they're used [7b472e46](https://github.com/gohugoio/hugo/commit/7b472e46084b603045b87cea870ffc73ac1cf7e7) [@bep](https://github.com/bep) [#4335](https://github.com/gohugoio/hugo/issues/4335)
|
||||
* Update to Go 1.9.3 [a91aba1c](https://github.com/gohugoio/hugo/commit/a91aba1c1562259dffd321a608f38c38dd4d5aeb) [@bep](https://github.com/bep) [#4328](https://github.com/gohugoio/hugo/issues/4328)
|
||||
* Support pages without front matter [91bb774a](https://github.com/gohugoio/hugo/commit/91bb774ae4e129f7ed0624754b31479c960ef774) [@vassudanagunta](https://github.com/vassudanagunta) [#4320](https://github.com/gohugoio/hugo/issues/4320)
|
||||
* Add page metadata dates tests [3f0379ad](https://github.com/gohugoio/hugo/commit/3f0379adb72389954ca2be6a9f2ebfcd65c6c440) [@vassudanagunta](https://github.com/vassudanagunta)
|
||||
* Re-generate CLI docs [1e27d058](https://github.com/gohugoio/hugo/commit/1e27d0589118a114e49c032e4bd68b4798e44a5b) [@bep](https://github.com/bep)
|
||||
* Remove and update deprecation status [d418c2c2](https://github.com/gohugoio/hugo/commit/d418c2c2eacdc1dc6fffe839e0a90600867878ca) [@bep](https://github.com/bep)
|
||||
* Shorten the stale setup [4a7c2b36](https://github.com/gohugoio/hugo/commit/4a7c2b3695fe7b88861f2155ea7ef635fe425cd4) [@bep](https://github.com/bep)
|
||||
* Add a `GetPage` to the site benchmarks [a1956391](https://github.com/gohugoio/hugo/commit/a19563910eec5fed08f3b02563b9a7b38026183d) [@bep](https://github.com/bep)
|
||||
* Add headless bundle support [0432c64d](https://github.com/gohugoio/hugo/commit/0432c64dd22e4610302162678bb93661ba68d758) [@bep](https://github.com/bep) [#4311](https://github.com/gohugoio/hugo/issues/4311)
|
||||
* Merge matching resources params maps [5a0819b9](https://github.com/gohugoio/hugo/commit/5a0819b9b5eb9e79826cfa0a65f235d9821b1ac4) [@bep](https://github.com/bep) [#4315](https://github.com/gohugoio/hugo/issues/4315)
|
||||
* Add some general code contribution criteria [78c86330](https://github.com/gohugoio/hugo/commit/78c863305f337ed4faf3cf0a23675f28b0ae5641) [@bep](https://github.com/bep)
|
||||
* Tighten page kind logic, introduce tests [8125b4b0](https://github.com/gohugoio/hugo/commit/8125b4b03d10eb73f8aea3f9ea41172aba8df082) [@vassudanagunta](https://github.com/vassudanagunta)
|
||||
|
||||
## Fixes
|
||||
* Fix `robots.txt` in multihost mode [4d912e2a](https://github.com/gohugoio/hugo/commit/4d912e2aad39bfe8d76672cf53b01317792e02c5) [@bep](https://github.com/bep) [#4193](https://github.com/gohugoio/hugo/issues/4193)
|
||||
* Fix `--uglyURLs` from comand line regression [016398ff](https://github.com/gohugoio/hugo/commit/016398ffe2e0a073453cf46a9d6bf72d693c11e5) [@bep](https://github.com/bep) [#4343](https://github.com/gohugoio/hugo/issues/4343)
|
||||
* Avoid unescape in `highlight` [ebdd8cba](https://github.com/gohugoio/hugo/commit/ebdd8cba3f5965a8ac897833f313d772271de649) [@bep](https://github.com/bep) [#4219](https://github.com/gohugoio/hugo/issues/4219)
|
||||
* Fix Docker build [a34213f0](https://github.com/gohugoio/hugo/commit/a34213f0b5624de101272aab469ca9b6fe0c273f) [@skoblenick](https://github.com/skoblenick) [#4076](https://github.com/gohugoio/hugo/issues/4076)[#4077](https://github.com/gohugoio/hugo/issues/4077)
|
||||
* Fix language params handling [ae742cb1](https://github.com/gohugoio/hugo/commit/ae742cb1bdf35b81aa0ede5453da6b0c4a4fccf2) [@bep](https://github.com/bep) [#4356](https://github.com/gohugoio/hugo/issues/4356)[#4352](https://github.com/gohugoio/hugo/issues/4352)
|
||||
* Fix handling of top-level page bundles [4eb2fec6](https://github.com/gohugoio/hugo/commit/4eb2fec67c3a72a3ac98aa834dc56fd4504626d8) [@bep](https://github.com/bep) [#4332](https://github.com/gohugoio/hugo/issues/4332)
|
||||
* Fix `baseURL` server regression for multilingual sites [ed4a00e4](https://github.com/gohugoio/hugo/commit/ed4a00e46f2344320a22f07febe5aec4075cb3fb) [@bep](https://github.com/bep) [#4333](https://github.com/gohugoio/hugo/issues/4333)
|
||||
* Fix "date" page param [322c5672](https://github.com/gohugoio/hugo/commit/322c567220aa4123a5d707629c1bebd375599912) [@vassudanagunta](https://github.com/vassudanagunta) [#4323](https://github.com/gohugoio/hugo/issues/4323)
|
||||
* Fix typo in comment [912147ab](https://github.com/gohugoio/hugo/commit/912147ab896e69a450b7100c3d6bf81a7bf78b5a) [@yanzay](https://github.com/yanzay)
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 66 KiB |
|
@ -1,51 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-02-05
|
||||
title: "Hugo 0.36: Smart Image Cropping!"
|
||||
description: "Hugo 0.36 announces smart image cropping and some important bug fixes."
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
Hugo `0.36` announces **smart cropping** of images, using the [library](https://github.com/muesli/smartcrop) created by [muesli](https://github.com/muesli). We will work with him to improve this even more in the future, but this is now the default used when cropping images in Hugo.
|
||||
|
||||
Go [here](http://hugotest.bep.is/resourcemeta/smartcrop/) for a list of examples.
|
||||
|
||||
This release represents **7 contributions by 3 contributors** to the main Hugo code base.
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **9 contributions by 4 contributors**. A special thanks to [@bep](https://github.com/bep), [@Jibec](https://github.com/Jibec), [@Nick-Rivera](https://github.com/Nick-Rivera), and [@kaushalmodi](https://github.com/kaushalmodi) for their work on the documentation site.
|
||||
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 23100+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 448+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 197+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
Hugo now defaults to **smart crop** when cropping images, if you don't specify it when calling `.Fill`.
|
||||
|
||||
You can get the old default by adding this:
|
||||
|
||||
{{< code-toggle file="config" >}}
|
||||
[imaging]
|
||||
anchor = "center"
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Also, we have removed the superflous anchor name from the processed filenames that does not use this anchor, so it can be wise to run `hugo --gc` once to remove unused images.
|
||||
|
||||
## Enhancements
|
||||
* Add smart cropping [722086b4](https://github.com/gohugoio/hugo/commit/722086b4ed3e77d1aba6724474bec06d08e7de06) [@bep](https://github.com/bep) [#4375](https://github.com/gohugoio/hugo/issues/4375)
|
||||
|
||||
## Fixes
|
||||
* Ensure site templates can override theme templates [084cf419](https://github.com/gohugoio/hugo/commit/084cf4191b3c1e7590a4223fd9251019ef5d4c21) [@moorereason](https://github.com/moorereason) [#3505](https://github.com/gohugoio/hugo/issues/3505)
|
||||
* Add additional test to `TestTemplateLookupOrder` [fc06d5c1](https://github.com/gohugoio/hugo/commit/fc06d5c18bb1e47f90f0297aa8121ee0775e047d) [@moorereason](https://github.com/moorereason) [#3505](https://github.com/gohugoio/hugo/issues/3505)
|
||||
* Fix broken `TestTemplateLookupOrder` [9a367d9d](https://github.com/gohugoio/hugo/commit/9a367d9d06db6f6cf22121d0397c464ae36e7089) [@moorereason](https://github.com/moorereason)
|
||||
* Fix JSON array-based data file handling regression [4402c077](https://github.com/gohugoio/hugo/commit/4402c077754991df19c3bbab0c4a671dcfdc192c) [@vassudanagunta](https://github.com/vassudanagunta) [#4361](https://github.com/gohugoio/hugo/issues/4361)
|
||||
* Increase data directory test coverage [4743de0d](https://github.com/gohugoio/hugo/commit/4743de0d3c7564fc06972074e903d5502d204353) [@vassudanagunta](https://github.com/vassudanagunta) [#4138](https://github.com/gohugoio/hugo/issues/4138)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-02-15
|
||||
title: "Hugo 0.36.1: One Bugfix"
|
||||
description: "Fixes a multi-thread image processing issue."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
||||
---
|
||||
This release fixes a multi-thread issue when reprocessing and reusing images across pages. When doing something like this with the same image from a partial used in, say, both the home page and the single page:
|
||||
|
||||
```bash
|
||||
{{ with $img }}
|
||||
{{ $big := .Fill "1024x512 top" }}
|
||||
{{ $small := $big.Resize "512x" }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
There would be timing issues making Hugo in some cases trying to process the same image twice at the same time.
|
||||
|
||||
You would experience errors of type:
|
||||
|
||||
```bash
|
||||
png: invalid format: not enough pixel data
|
||||
```
|
||||
|
||||
This commit fixes that by adding a mutex per image. This should also improve the performance, slightly, as it avoids duplicate work.
|
||||
|
||||
The current workaround before this fix is to always operate on the original:
|
||||
|
||||
```bash
|
||||
{{ with $img }}
|
||||
{{ $big := .Fill "1024x512 top" }}
|
||||
{{ $small := .Fill "512x256 top" }}
|
||||
{{ end }}
|
||||
```
|
||||
This error was rare (no reports on GitHub or the discussion forum), but very hard to debug for the end user.
|
||||
|
||||
* Fix multi-threaded image processing issue [d8fdffb5](https://github.com/gohugoio/hugo/commit/d8fdffb55268464d54558d6f9cd3874b612dc7c7) [@bep](https://github.com/bep) [#4404](https://github.com/gohugoio/hugo/issues/4404)
|
||||
* Improve error message in .Render [08521dac](https://github.com/gohugoio/hugo/commit/08521dac8323403933a8fd11acfd16930af5f17d) [@bep](https://github.com/bep)
|
||||
* Bump Travis/Snapcraft to Go 1.9.4 [fc23a80f](https://github.com/gohugoio/hugo/commit/fc23a80ffd3878b9ba9a160ce37e0e1d8703faf3) [@bep](https://github.com/bep)
|
||||
* Improve error processing error message [2851af02](https://github.com/gohugoio/hugo/commit/2851af0225cdf6c4e47058979cd22949ed6d1fc0) [@bep](https://github.com/bep)
|
Binary file not shown.
Before Width: | Height: | Size: 182 KiB |
|
@ -1,76 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-02-27
|
||||
title: "Hugo 0.37: Preserve PNG Colour Palette"
|
||||
description: "Reduces processed PNG file sizes. And 0.37 is built with Go 1.10!"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
The main item in Hugo `0.37` is that we now properly preserve the colour palette when processing `PNG` images. We got reports from users experiencing their `PNG` images getting bigger in file size when scaled down. Now, if you, as an example, start out with a carefully chosen 8 bit colour palette (i.e. `PNG-8`), this is now what you will end up with. A special thanks to [@aitva](https://github.com/aitva) for doing the investigative work finding a proper fix for this issue.
|
||||
|
||||
This release represents **40 contributions by 5 contributors** to the main Hugo code base.
|
||||
|
||||
[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@vassudanagunta](https://github.com/vassudanagunta), [@kaushalmodi](https://github.com/kaushalmodi), and [@curttimson](https://github.com/curttimson) for their ongoing contributions.
|
||||
|
||||
And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **24 contributions by 8 contributors**. A special thanks to [@bep](https://github.com/bep), [@4RU](https://github.com/4RU), [@kaushalmodi](https://github.com/kaushalmodi), and [@mitchchn](https://github.com/mitchchn) for their work on the documentation site.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 23649+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 447+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 197+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
|
||||
* Hugo will now convert non-string `YAML` map keys to string. See [#4393](https://github.com/gohugoio/hugo/issues/4393) for more information. You will get a `WARNING` in the console if you are touched by this.
|
||||
* We have improved the `PNG` processing, and have incremented the version numbers on the URL for the processed `PNG` image. This will just work, but you may want to run `hugo --gc` to clean up some old stale images in the resource cache.
|
||||
|
||||
## Enhancements
|
||||
|
||||
### Templates
|
||||
|
||||
* Add template func for TOML/JSON/YAML docs examples conversion. This is mainly motivated by the needs of the Hugo docs site. [d382502d](https://github.com/gohugoio/hugo/commit/d382502d6dfa1c066545e215ba83e2e0a9d2c8d7) [@bep](https://github.com/bep) [#4389](https://github.com/gohugoio/hugo/issues/4389)
|
||||
|
||||
### Core
|
||||
|
||||
* Refactor tests for JSON, YAML and TOML equivalency, add coverage [82eefded](https://github.com/gohugoio/hugo/commit/82eefded1353f0198fd8fe9f7df1aa620d3d50eb) [@vassudanagunta](https://github.com/vassudanagunta)
|
||||
* Re-enable YAML data tests disabled in f554503f [e1728349](https://github.com/gohugoio/hugo/commit/e1728349930e2cc1b6580766473de98adb0f3e50) [@vassudanagunta](https://github.com/vassudanagunta)
|
||||
|
||||
### Other
|
||||
|
||||
* Preserve color palette for PNG images [799c654b](https://github.com/gohugoio/hugo/commit/799c654b0d39ec869c2da24d41de3636eb7157f0) [@bep](https://github.com/bep) [#4416](https://github.com/gohugoio/hugo/issues/4416)
|
||||
* Use `Floyd-Steinberg` dithering for PNGs [13ea1e7c](https://github.com/gohugoio/hugo/commit/13ea1e7c352852966f88ef119d9434bbb1ee62fa) [@bep](https://github.com/bep) [#4453](https://github.com/gohugoio/hugo/issues/4453)
|
||||
* Make `ge`, `le` etc. work with the Hugo Version number [0602135f](https://github.com/gohugoio/hugo/commit/0602135fd44b0cfa0a51b0ec6e451ae58ac95666) [@bep](https://github.com/bep) [#4443](https://github.com/gohugoio/hugo/issues/4443)
|
||||
* Update dependencies [eaf573a2](https://github.com/gohugoio/hugo/commit/eaf573a2778e79287b871b69f4959fd3082d8887) [@bep](https://github.com/bep) [#4418](https://github.com/gohugoio/hugo/issues/4418)
|
||||
* Update to Go 1.10 (!) Take 2 [a3f26e56](https://github.com/gohugoio/hugo/commit/a3f26e56368c62b0900a10d83a11b7783630963b) [@bep](https://github.com/bep)
|
||||
* Update to Go 1.10 (!) [ff10c15a](https://github.com/gohugoio/hugo/commit/ff10c15a93632043f7a7f6551a30487c9ef58c50) [@bep](https://github.com/bep)
|
||||
* Add WARNING for integer YAML keys [0816a97a](https://github.com/gohugoio/hugo/commit/0816a97a469f11d8e9706143975eaa532e29639b) [@bep](https://github.com/bep) [#4393](https://github.com/gohugoio/hugo/issues/4393)
|
||||
* Tune stringifyMapKeys [10a917df](https://github.com/gohugoio/hugo/commit/10a917dfdce8851666c5b89ebc02af6f6c84ab59) [@bep](https://github.com/bep)
|
||||
* Rename stringifyYAMLMapKeys to stringifyMapKeys [d4beef0d](https://github.com/gohugoio/hugo/commit/d4beef0d2bb8f6481fa80e1d938454a7d4e38814) [@bep](https://github.com/bep)
|
||||
* Add benchmarks for stringifyYAMLMapKeys [51213e0b](https://github.com/gohugoio/hugo/commit/51213e0be19fc19dbca9815afa95c73bd6d159c2) [@bep](https://github.com/bep)
|
||||
* Add support for `YAML` array data files [1fa24177](https://github.com/gohugoio/hugo/commit/1fa2417777d82b81bf37919ad02de4f5dcbf0d50) [@vassudanagunta](https://github.com/vassudanagunta) [#3890](https://github.com/gohugoio/hugo/issues/3890)
|
||||
* Account for array type data in data dir merge/override logic [bb549a0d](https://github.com/gohugoio/hugo/commit/bb549a0d57505a6b8f28930bb91a9ab44cbb3288) [@vassudanagunta](https://github.com/vassudanagunta) [#4366](https://github.com/gohugoio/hugo/issues/4366)
|
||||
* Add "target" and "rel" parameters to figure shortcode [2e95ec68](https://github.com/gohugoio/hugo/commit/2e95ec6844bf65a25485bdc8e2638e45788f2dcf) [@kaushalmodi](https://github.com/kaushalmodi)
|
||||
* image" property, not "twitter:image:src" [76d38d5e](https://github.com/gohugoio/hugo/commit/76d38d5e5322fc6220fb9e74f9ca0668606ebb5d) [@kaushalmodi](https://github.com/kaushalmodi)
|
||||
|
||||
## Fixes
|
||||
|
||||
### Core
|
||||
|
||||
* Continue `GitInfo` lookup on error [e9750d83](https://github.com/gohugoio/hugo/commit/e9750d831f749afa928d8a099af5889d18cb2484) [@bep](https://github.com/bep)
|
||||
* Fix paginator `URL` for sections with URL in front matter [9f740b37](https://github.com/gohugoio/hugo/commit/9f740b37cfb3278e34a5d085380ccd4d619dabff) [@bep](https://github.com/bep) [#4415](https://github.com/gohugoio/hugo/issues/4415)
|
||||
|
||||
### Other
|
||||
|
||||
* Fix bug in Site.assembleSections method [00868081](https://github.com/gohugoio/hugo/commit/00868081f624928d773a7b698654766f8cd70069) [@vassudanagunta](https://github.com/vassudanagunta) [#4447](https://github.com/gohugoio/hugo/issues/4447)
|
||||
* Update Blackfriday to fix footnote HTML5 validation error [492fea7c](https://github.com/gohugoio/hugo/commit/492fea7cd2bfcbdfe9f56aa0ae659cf62648833b) [@bep](https://github.com/bep) [#4433](https://github.com/gohugoio/hugo/issues/4433)
|
||||
* Fix `YAML` maps key type [16a5c745](https://github.com/gohugoio/hugo/commit/16a5c74519771138023f019fe535fa5b250dc50d) [@dmgawel](https://github.com/dmgawel) [#2441](https://github.com/gohugoio/hugo/issues/2441)
|
||||
* Remove `ERROR` on missing baseURL [55bd46a6](https://github.com/gohugoio/hugo/commit/55bd46a633d68f62e131457631ba839d6f876a55) [@bep](https://github.com/bep) [#4397](https://github.com/gohugoio/hugo/issues/4397)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-03-07
|
||||
title: "Hugo 0.37.1: One Bugfix"
|
||||
description: "Fixes SVG (and similar) handling as page resources."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
||||
---
|
||||
|
||||
This is a bug-fix release with a one important fix:
|
||||
|
||||
Image content such as `SVG` cannot be scaled with the built-in image processing methods, but it should still be possible to use them as page resources. This was a regression in Hugo `0.37` and is now fixed. [ba94abbf](https://github.com/gohugoio/hugo/commit/ba94abbf5dd90f989242af8a7027d67a572a6128) [@bep](https://github.com/bep) [#4455](https://github.com/gohugoio/hugo/issues/4455)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 68 KiB |
|
@ -1,66 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-04-02
|
||||
title: "Hugo 0.38: The Easter Egg Edition"
|
||||
description: "Hugo 0.38: Date and slug from filenames, multiple content dirs, config from themes, language merge func …"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
Hugo `0.38` is an **Easter egg** filled with good stuff. We now support fetching **date and slug from the content filename**, making the move from Jekyll even easier. And you can now set `contentDir` per language with intelligent merging, and themes can now provide configuration ... Also worth mentioning is several improvements in the [Chroma](https://github.com/alecthomas/chroma) highlighter, most notable support for Go templates.
|
||||
|
||||
We are working hard to get the documentation up-to-date with the new features, but you can also see them in action with the full source at [hugotest.bep.is](http://hugotest.bep.is/).
|
||||
|
||||
This release represents **39 contributions by 4 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 [@anthonyfok](https://github.com/anthonyfok), [@felicianotech](https://github.com/felicianotech), and [@paulcmal](https://github.com/paulcmal) for their ongoing contributions.
|
||||
|
||||
And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the themes site in pristine condition and to [@kaushalmodi](https://github.com/kaushalmodi) for his great work on the documentation site.
|
||||
|
||||
Also, a shoutout to [@regisphilibert](https://github.com/regisphilibert) for his work on the new [Code Toggle Shortcode](https://gohugo.io/getting-started/code-toggle/) on the Hugo docs site, which we will put to good use to improve all the configuration samples.
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **55 contributions by 18 contributors**. A special thanks to [@kaushalmodi](https://github.com/kaushalmodi), [@bep](https://github.com/bep), [@xa0082249956](https://github.com/xa0082249956), and [@paulcmal](https://github.com/paulcmal) for their work on the documentation site.
|
||||
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 24547+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 447+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 213+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
|
||||
* Hugo now allows partial redefinition `outputs` in your site configuration. This is what most people would expect, but it is still a change in behaviour. For details, see [#4487](https://github.com/gohugoio/hugo/issues/4487)
|
||||
* Before this release, Hugo flattened URLs of processed images in sub-folders. This worked fine but was not intentional. See [#4502](https://github.com/gohugoio/hugo/issues/4502).
|
||||
|
||||
## Enhancements
|
||||
|
||||
* Allow themes to define output formats, media types and params [e9c7b620](https://github.com/gohugoio/hugo/commit/e9c7b6205f94a7edac0e0df2cd18d1456cb26a06) [@bep](https://github.com/bep) [#4490](https://github.com/gohugoio/hugo/issues/4490)
|
||||
* Allow partial redefinition of the `ouputs` config [f8dc47ee](https://github.com/gohugoio/hugo/commit/f8dc47eeffa847fd0b51e376da355e3d957848a6) [@bep](https://github.com/bep) [#4487](https://github.com/gohugoio/hugo/issues/4487)
|
||||
* Add a way to merge pages by language [ffaec4ca](https://github.com/gohugoio/hugo/commit/ffaec4ca8c4c6fd05b195879ccd65acf2fd5a6ac) [@bep](https://github.com/bep) [#4463](https://github.com/gohugoio/hugo/issues/4463)
|
||||
* Extract `date` and `slug` from filename [68bf1511](https://github.com/gohugoio/hugo/commit/68bf1511f2be39b6576d882d071196e477c72c9f) [@bep](https://github.com/bep) [#285](https://github.com/gohugoio/hugo/issues/285)[#3310](https://github.com/gohugoio/hugo/issues/3310)[#3762](https://github.com/gohugoio/hugo/issues/3762)[#4340](https://github.com/gohugoio/hugo/issues/4340)
|
||||
* Add `Delete` method to delete key from `Scratch` [e46ab29b](https://github.com/gohugoio/hugo/commit/e46ab29bd24caa9e2cfa51f24ba15037750850d6) [@paulcmal](https://github.com/paulcmal)
|
||||
* Simplify Prev/Next [79dd7cb3](https://github.com/gohugoio/hugo/commit/79dd7cb31a941d7545df33b938ca3ed46593ddfd) [@bep](https://github.com/bep)
|
||||
* List Chroma lexers [2c54f1ad](https://github.com/gohugoio/hugo/commit/2c54f1ad48fe2a2f7504117d351d45abc89dcb1f) [@bep](https://github.com/bep) [#4554](https://github.com/gohugoio/hugo/issues/4554)
|
||||
* Add support for a `contentDir` set per language [eb42774e](https://github.com/gohugoio/hugo/commit/eb42774e587816b1fbcafbcea59ed65df703882a) [@bep](https://github.com/bep) [#4523](https://github.com/gohugoio/hugo/issues/4523)[#4552](https://github.com/gohugoio/hugo/issues/4552)[#4553](https://github.com/gohugoio/hugo/issues/4553)
|
||||
* Update Chroma [7a634898](https://github.com/gohugoio/hugo/commit/7a634898c359a6af0da52be17df07cae97c7937c) [@bep](https://github.com/bep) [#4549](https://github.com/gohugoio/hugo/issues/4549)
|
||||
* Add `.Site.IsServer` [1823c053](https://github.com/gohugoio/hugo/commit/1823c053c8900cb6ee53b8e5c02939c7398e34dd) [@felicianotech](https://github.com/felicianotech) [#4478](https://github.com/gohugoio/hugo/issues/4478)
|
||||
* Move to Ubuntu Trusty image [511d5d3b](https://github.com/gohugoio/hugo/commit/511d5d3b7681cb76822098f430ed6862232ca529) [@anthonyfok](https://github.com/anthonyfok)
|
||||
* Bump some deprecations [b6798ee8](https://github.com/gohugoio/hugo/commit/b6798ee8676c48f86b0bd8581ea244f4be4ef3fa) [@bep](https://github.com/bep)
|
||||
* Update Chroma to get `Go template support` [904a3d9d](https://github.com/gohugoio/hugo/commit/904a3d9ddf523d452d04d0b5814503e0ff17bd2e) [@bep](https://github.com/bep) [#4515](https://github.com/gohugoio/hugo/issues/4515)
|
||||
* Recover from error in server [f0052b6d](https://github.com/gohugoio/hugo/commit/f0052b6d0f8e113a50aeb6cd7bd34555dbf34a00) [@bep](https://github.com/bep) [#4516](https://github.com/gohugoio/hugo/issues/4516)
|
||||
* Spring test cleaning, take 2 [da880157](https://github.com/gohugoio/hugo/commit/da88015776645cc68b96e8b94030c95905df53ae) [@bep](https://github.com/bep)
|
||||
* Add docs for `lang.Merge` [70005364](https://github.com/gohugoio/hugo/commit/70005364a245ea3bc59c74192e1f4c56cb6879cf) [@bep](https://github.com/bep)
|
||||
* Remove archetype title/date warning [ac12d51e](https://github.com/gohugoio/hugo/commit/ac12d51e7ea3a0ffb7d8053a10b6bf6acf1235ae) [@bep](https://github.com/bep) [#4504](https://github.com/gohugoio/hugo/issues/4504)
|
||||
* Add docs on the new front matter configuration [0dbf79c2](https://github.com/gohugoio/hugo/commit/0dbf79c2f8cd5b1a5c91c04a8d677f956b0b8fe8) [@bep](https://github.com/bep) [#4495](https://github.com/gohugoio/hugo/issues/4495)
|
||||
* Refactor the GitInfo into the date handlers [ce6e4310](https://github.com/gohugoio/hugo/commit/ce6e4310febf5659392a41b543594382441f3681) [@bep](https://github.com/bep) [#4495](https://github.com/gohugoio/hugo/issues/4495)
|
||||
* Do not print build total when `--quiet` is set [50a03a5a](https://github.com/gohugoio/hugo/commit/50a03a5acc7c200c795590c3f4b964fdc56085f2) [@bep](https://github.com/bep) [#4456](https://github.com/gohugoio/hugo/issues/4456)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Fix freeze in invalid front matter error case [93e24a03](https://github.com/gohugoio/hugo/commit/93e24a03ce98d3212a2d49ad04739141229d0809) [@bep](https://github.com/bep) [#4526](https://github.com/gohugoio/hugo/issues/4526)
|
||||
* Fix path duplication/flattening in processed images [3fbc7553](https://github.com/gohugoio/hugo/commit/3fbc75534d1acda2be1c597aa77c919d3a02659d) [@bep](https://github.com/bep) [#4502](https://github.com/gohugoio/hugo/issues/4502)[#4501](https://github.com/gohugoio/hugo/issues/4501)
|
||||
* Fix SVG and similar resource handling [ba94abbf](https://github.com/gohugoio/hugo/commit/ba94abbf5dd90f989242af8a7027d67a572a6128) [@bep](https://github.com/bep) [#4455](https://github.com/gohugoio/hugo/issues/4455)
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
---
|
||||
date: 2018-04-05
|
||||
title: "Hugo 0.38.1: Some Live Reload Fixes"
|
||||
description: "Hugo 0.38.1 fixes some live reload issues introduced in 0.38."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
This is a bug-fix that is mainly motivated by some issues with server live reloading introduced in Hugo 0.38.
|
||||
|
||||
* Fix livereload for the home page bundle [f87239e4](https://github.com/gohugoio/hugo/commit/f87239e4cab958bf59ecfb1beb8cac439441a553) [@bep](https://github.com/bep) [#4576](https://github.com/gohugoio/hugo/issues/4576)
|
||||
* Fix empty BuildDate in "hugo version" [294c0f80](https://github.com/gohugoio/hugo/commit/294c0f8001fe598278c1eb8015deb6b98e8de686) [@anthonyfok](https://github.com/anthonyfok)
|
||||
* Fix some livereload content regressions [a4deaeff](https://github.com/gohugoio/hugo/commit/a4deaeff0cfd70abfbefa6d40c0b86839a216f6d) [@bep](https://github.com/bep) [#4566](https://github.com/gohugoio/hugo/issues/4566)
|
||||
* Update github.com/bep/gitmap to fix snap build [4d115c56](https://github.com/gohugoio/hugo/commit/4d115c56fac9060230fbac6181a05f7cc6d10b42) [@anthonyfok](https://github.com/anthonyfok) [#4538](https://github.com/gohugoio/hugo/issues/4538)
|
||||
* Fix two tests that are broken on Windows [26f34fd5](https://github.com/gohugoio/hugo/commit/26f34fd59da1ce1885d4f2909c5d9ef9c1726944) [@neurocline](https://github.com/neurocline)
|
||||
|
||||
|
||||
This release also contains some improvements:
|
||||
|
||||
* Add bash completion [874159b5](https://github.com/gohugoio/hugo/commit/874159b5436bc9080aec71a9c26d35f8f62c9fd0) [@anthonyfok](https://github.com/anthonyfok)
|
||||
* Handle mass content etc. edits in server mode [730b66b6](https://github.com/gohugoio/hugo/commit/730b66b6520f263af16f555d1d7be51205a8e51d) [@bep](https://github.com/bep) [#4563](https://github.com/gohugoio/hugo/issues/4563)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue