mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
Merge commit '07b8d9466dfb59c429c1b470a0443337bc0aeefe'
This commit is contained in:
@@ -33,9 +33,9 @@ Hugo `0.18` was bringing full-parallel page rendering, so workarounds depending
|
||||
|
||||
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
|
||||
|
||||
|
@@ -23,10 +23,12 @@ In `layouts/partials/mystyles.css`:
|
||||
|
||||
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):
|
||||
|
||||
[params]
|
||||
[params.colors]
|
||||
main = "green"
|
||||
text = "blue"
|
||||
{{< 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):
|
||||
|
||||
|
@@ -8,14 +8,14 @@ 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, put this in your site `config.toml`:
|
||||
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:
|
||||
|
||||
|
||||
```bash
|
||||
{{< 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)).
|
||||
|
||||
|
@@ -25,12 +25,13 @@ Hugo now has:
|
||||
## 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 to your `config.toml`:
|
||||
You can get the old default by adding this:
|
||||
|
||||
```toml
|
||||
{{< 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
|
||||
|
@@ -13,7 +13,7 @@ This is a bug-fix release with a couple of important fixes. After getting feedba
|
||||
|
||||
It adds support for overlapping file mounts, even for the filesystems where we walk down the directory structure. One relevant example that is fixed by this release:
|
||||
|
||||
```toml
|
||||
{{< code-toggle file="config" >}}
|
||||
[module]
|
||||
[[module.mounts]]
|
||||
source="content1"
|
||||
@@ -21,7 +21,7 @@ target="content"
|
||||
[[module.mounts]]
|
||||
source="content2"
|
||||
target="content/docs"
|
||||
```
|
||||
{{< /code-toggle >}}
|
||||
|
||||
The above is obviously both common and very useful. This was never an issue with the situations where you load a specific file/directory (e.g. `resources.Get "a/b/c/d/sunset.jpg"`).
|
||||
|
||||
|
@@ -6,12 +6,12 @@ description: "Native inline, recursive import support in PostCSS/Tailwind, \"dep
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
This release adds [inline `@import`](/hugo-pipes/postcss/#options) support to `resources.PostCSS`, with imports relative to Hugo's virtual, composable file system. Another useful addition is the new `build` [configuration section](/getting-started/configuration/#configure-build). As an example in `config.toml`:
|
||||
This release adds [inline `@import`](/hugo-pipes/postcss/#options) support to `resources.PostCSS`, with imports relative to Hugo's virtual, composable file system. Another useful addition is the new `build` [configuration section](/getting-started/configuration/#configure-build). As an example:
|
||||
|
||||
```toml
|
||||
{{< code-toggle file="config" >}}
|
||||
[build]
|
||||
useResourceCacheWhen = "always"
|
||||
```
|
||||
{{< /code-toggle >}}
|
||||
|
||||
The above will tell Hugo to _always_ use the cached build resources inside `resources/_gen` for the build steps requiring a non-standard dependency (PostCSS and SCSS/SASS). Valid values are `never`, `always` and `fallback` (default).
|
||||
|
||||
|
@@ -10,7 +10,7 @@ The two main items in Hugo 0.67.0 is custom HTTP header support in `hugo server`
|
||||
|
||||
Being able to [configure HTTP headers](https://gohugo.io/getting-started/configuration/#configure-server) in your development server means that you can now verify how your site behaves with the intended Content Security Policy settings etc., e.g.:
|
||||
|
||||
```toml
|
||||
{{< code-toggle file="config" >}}
|
||||
[server]
|
||||
[[server.headers]]
|
||||
for = "/**.html"
|
||||
@@ -21,7 +21,7 @@ X-XSS-Protection = "1; mode=block"
|
||||
X-Content-Type-Options = "nosniff"
|
||||
Referrer-Policy = "strict-origin-when-cross-origin"
|
||||
Content-Security-Policy = "script-src localhost:1313"
|
||||
```
|
||||
{{< /code-toggle >}}
|
||||
|
||||
**Note:** This release also changes how raw HTML files inside /content is processed to be in line with the documentation. See [#7030](https://github.com/gohugoio/hugo/issues/7030).
|
||||
|
||||
|
@@ -46,13 +46,13 @@ We have added a `force` flag to the [server redirects](https://gohugo.io/getting
|
||||
|
||||
This is set to default `false`. If you want the old behaviour you need to add this flag to your configuration:
|
||||
|
||||
```toml
|
||||
{{< code-toggle file="config" >}}
|
||||
[[redirects]]
|
||||
from = "/myspa/**"
|
||||
to = "/myspa/"
|
||||
status = 200
|
||||
force = true
|
||||
```
|
||||
{{< /code-toggle >}}
|
||||
|
||||
## Enhancements
|
||||
|
||||
|
@@ -128,12 +128,12 @@ There are several [Hugo Modules](https://gohugo.io/hugo-modules/)-related improv
|
||||
|
||||
## Minify - Keep Comments
|
||||
|
||||
Keep comments when running `hugo --minify` with a new setting in config.toml.
|
||||
Keep comments when running `hugo --minify` with a new setting:
|
||||
|
||||
```toml
|
||||
{{< code-toggle file="config" >}}
|
||||
[minify.tdewolff.html]
|
||||
keepComments = true
|
||||
```
|
||||
{{< /code-toggle >}}
|
||||
|
||||
The default value for this setting is `false`.
|
||||
|
||||
|
BIN
docs/content/en/news/0.82.0-relnotes/featured.png
Normal file
BIN
docs/content/en/news/0.82.0-relnotes/featured.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
@@ -1,12 +1,12 @@
|
||||
|
||||
---
|
||||
date: 2021-03-21
|
||||
title: "0.82.0"
|
||||
description: "0.82.0"
|
||||
title: "Hugo 0.82: Mostly bugfixes"
|
||||
description: "Mostly bug fixes, but some useful improvements with Markdown attributes."
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
This is a small release, mostly a maintainance/bugfix release. But also notable is that you can now add custom Markdown attributes (e.g. CSS classes) to code fences ([aed7df62](https://github.com/gohugoio/hugo/commit/aed7df62a811b07b73ec5cbbf03e69e4bbf00919) [@bep](https://github.com/bep) [#8278](https://github.com/gohugoio/hugo/issues/8278)) and that you can use the attribute lists in title render hooks (`.Attributes`; see [cd0c5d7e](https://github.com/gohugoio/hugo/commit/cd0c5d7ef32cbd570af00c50ce760452381df64e) [@bep](https://github.com/bep) [#8270](https://github.com/gohugoio/hugo/issues/8270)).
|
||||
This is a small release, mostly a maintainance/bugfix release. But also notable is that you can now add custom Markdown attributes (e.g. CSS classes) to code fences ([aed7df62](https://github.com/gohugoio/hugo/commit/aed7df62a811b07b73ec5cbbf03e69e4bbf00919) [@bep](https://github.com/bep) [#8278](https://github.com/gohugoio/hugo/issues/8278)) and that you can use the attribute lists in title render hooks (`.Attributes`; see [cd0c5d7e](https://github.com/gohugoio/hugo/commit/cd0c5d7ef32cbd570af00c50ce760452381df64e) [@bep](https://github.com/bep) [#8270](https://github.com/gohugoio/hugo/issues/8270)).
|
||||
|
||||
This release represents **28 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 [@moorereason](https://github.com/moorereason), and [@gzagatti](https://github.com/gzagatti) 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 [@davidsneighbour](https://github.com/davidsneighbour), [@coliff](https://github.com/coliff) and [@kaushalmodi](https://github.com/kaushalmodi) for all the great work on the documentation site.
|
||||
|
@@ -1,8 +1,8 @@
|
||||
|
||||
---
|
||||
date: 2021-04-20
|
||||
title: "Hugo 0.82.1: A couple of Bug Fixes"
|
||||
description: "This version fixes a couple of bugs introduced in 0.82.0."
|
||||
title: "Hugo 0.82.1: One Bug Fix"
|
||||
description: "This version fixes a bug introduced in 0.82.0."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
@@ -23,7 +23,8 @@ If you navigate to https://gohugo.io and look in the Chrome developer network co
|
||||
## 1. Configure Netlify Output Formats
|
||||
|
||||
Add a new custom media type and two new output formats to `config.toml`. For more on output formats in Hugo, see [Custom Output Formats](/templates/output-formats/).
|
||||
```bash
|
||||
|
||||
```toml
|
||||
[outputs]
|
||||
home = [ "HTML", "RSS", "REDIR", "HEADERS" ]
|
||||
|
||||
|
Reference in New Issue
Block a user