mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Merge commit 'aa5ac36a3eb68b86c803caec703869efefc8447e'
This commit is contained in:
@@ -24,7 +24,7 @@ Hugo also depends on a lot of other great projects. A big thanks to all of our d
|
||||
- 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 "the Lazy Blogger"](http://gohugo.io/extras/menus.md#section-menu-for-the-lazy-blogger")
|
||||
- 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:
|
||||
|
@@ -2,7 +2,7 @@
|
||||
---
|
||||
date: 2021-07-30
|
||||
title: "Hugo 0.86.1: One Bug Fix"
|
||||
description: "This version fixes a of bug introduced in 0.86.0."
|
||||
description: "This version fixes a bug introduced in 0.86.0."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
BIN
docs/content/en/news/0.87.0-relnotes/featured.png
Normal file
BIN
docs/content/en/news/0.87.0-relnotes/featured.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 102 KiB |
@@ -1,18 +1,18 @@
|
||||
|
||||
---
|
||||
date: 2021-08-03
|
||||
title: "0.87.0"
|
||||
description: "0.87.0"
|
||||
title: "Localized Time and Dates and Numbers"
|
||||
description: "Hugo 0.87.0 brings time zone support, localized time and dates and numbers backed by CLDR, and more."
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
Hugo `0.87` brings two long sought-after features: Default time zone support (per language if needed) for dates without zone offset or location info, and localized time and dates and numbers (backed by [CLDR](https://en.wikipedia.org/wiki/Common_Locale_Data_Repository)).
|
||||
Hugo `0.87` brings two long sought-after features: Default time zone support (per language if needed) for dates without zone offset or location info, and localized time and dates and numbers (backed by [CLDR](https://en.wikipedia.org/wiki/Common_Locale_Data_Repository)).
|
||||
|
||||
For more information, see:
|
||||
|
||||
* The [time zone config](https://gohugo.io/getting-started/configuration/#timezone) documentation.
|
||||
* The [time.Format](https://gohugo.io/functions/dateformat/) documentation. This function will now give you localized dates (with weekdays and months in the current language). It supports all of Go's layout syntax, but also some predefined constants, e.g. `{{ .Date | time.Format ":date_long" }}`.
|
||||
* A set of new [localized number formatting ](https://gohugo.io/functions/lang/)
|
||||
* A set of new [localized number formatting ](https://gohugo.io/functions/lang/) functions.
|
||||
|
||||
Also in this release, we have switched to using [go-toml](https://github.com/pelletier/go-toml) for all things TOML in Hugo. A big thanks to [@pelletier](https://github.com/pelletier) for his work on the `v2` version. It's both faster than what we had and [TOML v1.0.0](https://toml.io/en/v1.0.0) compliant.
|
||||
|
||||
|
BIN
docs/content/en/news/0.88.0-relnotes/featured.png
Normal file
BIN
docs/content/en/news/0.88.0-relnotes/featured.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
@@ -1,12 +1,12 @@
|
||||
|
||||
---
|
||||
date: 2021-09-02
|
||||
title: "0.88.0"
|
||||
description: "0.88.0"
|
||||
title: "Go 1.17 Update"
|
||||
description: "Hugo 0.88.0 brings Go 1.17 support, a dependency refresh, and more."
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
The most important piece in this release is the Go 1.17 update. This release is built with that new Go version, but also and more importantly, the Hugo Modules logic has been updated to support Go's new way of (lazy) loading transitive dependencies. If you already have Go 1.17 installed, building existing Hugo Modules backed projects have not been an issue, but `hugo mod init` for a new project could give you _too new_ versions of transitive dependencies. Hugo 0.88 fixes this.
|
||||
The most important piece in this release is the Go 1.17 update. This release is built with that new Go version, but also and more importantly, the Hugo Modules logic has been updated to support Go's new way of (lazy) loading transitive dependencies. If you already have Go 1.17 installed, building existing Hugo Modules backed projects have not been an issue, but `hugo mod init` for a new project could give you _too new_ versions of transitive dependencies. Hugo 0.88 fixes this.
|
||||
|
||||
This release represents **26 contributions by 6 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 [@dependabot[bot]](https://github.com/apps/dependabot), [@helfper](https://github.com/helfper), and [@wzshiming](https://github.com/wzshiming) for their ongoing contributions.
|
||||
|
||||
@@ -26,7 +26,7 @@ Hugo now has:
|
||||
|
||||
### Templates
|
||||
|
||||
* Handle nil values in time.AsTime" [abd969a6](https://github.com/gohugoio/hugo/commit/abd969a670852f9ed57c1a26434445aa985706fe) [@bep](https://github.com/bep)
|
||||
* Handle nil values in time.AsTime [abd969a6](https://github.com/gohugoio/hugo/commit/abd969a670852f9ed57c1a26434445aa985706fe) [@bep](https://github.com/bep)
|
||||
* Handle nil values in time.AsTime [3e110728](https://github.com/gohugoio/hugo/commit/3e11072892ca31bb76980ee38890a4bd92d83dfd) [@bep](https://github.com/bep) [#8865](https://github.com/gohugoio/hugo/issues/8865)
|
||||
|
||||
### Other
|
||||
@@ -39,13 +39,13 @@ Hugo now has:
|
||||
* Avoid failing with "module not found" for hugo mod init and similar [a0489c2d](https://github.com/gohugoio/hugo/commit/a0489c2dfd3ceb4d0702de0da7a4af3eabce05e5) [@bep](https://github.com/bep) [#8940](https://github.com/gohugoio/hugo/issues/8940)
|
||||
* Update to Go 1.17 [0fc2ce9e](https://github.com/gohugoio/hugo/commit/0fc2ce9e4bf0524994a861b7300e4332f6f8d390) [@bep](https://github.com/bep) [#8930](https://github.com/gohugoio/hugo/issues/8930)
|
||||
* Remove Pygments from snapcraft.yml [32569285](https://github.com/gohugoio/hugo/commit/32569285c181c8798ef594c12d3cfd7f9a252a04) [@anthonyfok](https://github.com/anthonyfok)
|
||||
* bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0" [5a46eefb](https://github.com/gohugoio/hugo/commit/5a46eefbc6da3463b796ada8d15902be197455a3) [@bep](https://github.com/bep) [#8920](https://github.com/gohugoio/hugo/issues/8920)
|
||||
* bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0 [5a46eefb](https://github.com/gohugoio/hugo/commit/5a46eefbc6da3463b796ada8d15902be197455a3) [@bep](https://github.com/bep) [#8920](https://github.com/gohugoio/hugo/issues/8920)
|
||||
* Add tabindex when code is not highlighted [7a15edaf](https://github.com/gohugoio/hugo/commit/7a15edafe240471c072d3548b72ccda0271ffd8f) [@helfper](https://github.com/helfper)
|
||||
* bump github.com/evanw/esbuild from 0.12.17 to 0.12.22 [2f0945ba](https://github.com/gohugoio/hugo/commit/2f0945bafe501103abe97b2f2b5566b28ec48e52) [@dependabot[bot]](https://github.com/apps/dependabot)
|
||||
* bump golang.org/x/text from 0.3.6 to 0.3.7 [7ba3f3d2](https://github.com/gohugoio/hugo/commit/7ba3f3d201e386cb9c7c15df5a6cc1c4b46473bd) [@dependabot[bot]](https://github.com/apps/dependabot)
|
||||
* bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0 [f7016524](https://github.com/gohugoio/hugo/commit/f70165242b98e3ee182fbac08bf2893a7f09e961) [@dependabot[bot]](https://github.com/apps/dependabot)
|
||||
* Prevent minifier from removing quoutes around post-processed attributes [bc0743ed](https://github.com/gohugoio/hugo/commit/bc0743ed8eafc3c2d9b21a1e8f1b05d64b85e8ba) [@bep](https://github.com/bep) [#8884](https://github.com/gohugoio/hugo/issues/8884)
|
||||
* Avoid too many watch file handles causing the server to fail to start" [ffa2fe61](https://github.com/gohugoio/hugo/commit/ffa2fe61172aa0d892234b23d1497c77a6a7f5c4) [@bep](https://github.com/bep)
|
||||
* Prevent minifier from removing quotes around post-processed attributes [bc0743ed](https://github.com/gohugoio/hugo/commit/bc0743ed8eafc3c2d9b21a1e8f1b05d64b85e8ba) [@bep](https://github.com/bep) [#8884](https://github.com/gohugoio/hugo/issues/8884)
|
||||
* Avoid too many watch file handles causing the server to fail to start [ffa2fe61](https://github.com/gohugoio/hugo/commit/ffa2fe61172aa0d892234b23d1497c77a6a7f5c4) [@bep](https://github.com/bep)
|
||||
* Remove some pygments references [d966f5d0](https://github.com/gohugoio/hugo/commit/d966f5d08d7f75f1ae9acd94e292bf61de2adf0d) [@helfper](https://github.com/helfper)
|
||||
* Avoid too many watch file handles causing the server to fail to start [3f38c785](https://github.com/gohugoio/hugo/commit/3f38c785b7208440e2a9dd9a80cb39d4ae23e676) [@wzshiming](https://github.com/wzshiming) [#8904](https://github.com/gohugoio/hugo/issues/8904)
|
||||
* bump github.com/getkin/kin-openapi from 0.68.0 to 0.74.0 [24589c08](https://github.com/gohugoio/hugo/commit/24589c0814bc5d21565470bec6215ee792f1655e) [@dependabot[bot]](https://github.com/apps/dependabot)
|
||||
@@ -60,8 +60,3 @@ Hugo now has:
|
||||
* Fix import order for ./foo when both ./foo.js and ./foo/index.js exists [cf73cc2e](https://github.com/gohugoio/hugo/commit/cf73cc2ececd4e794df09ea382a38ab18960d84e) [@bep](https://github.com/bep) [#8945](https://github.com/gohugoio/hugo/issues/8945)
|
||||
* Fix it so disableKinds etc. does not get merged in from theme [f4ffeea7](https://github.com/gohugoio/hugo/commit/f4ffeea71dd3d044a2628bbb5d6634680667398f) [@bep](https://github.com/bep) [#8866](https://github.com/gohugoio/hugo/issues/8866)
|
||||
* Fix `lang.FormatPercent` description [d6c8cd77](https://github.com/gohugoio/hugo/commit/d6c8cd771834ae2913658c652e30a9feadc2a7b7) [@salim-b](https://github.com/salim-b)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
|
||||
---
|
||||
date: 2021-09-04
|
||||
title: "Hugo 0.88.1: A couple of Bug Fixes"
|
||||
description: "This version fixes a couple of bugs introduced in 0.88.0."
|
||||
title: "Hugo 0.88.1: One Fix"
|
||||
description: "This version fixes a release issue introduced in 0.88.0."
|
||||
categories: ["Releases"]
|
||||
images:
|
||||
- images/blog/hugo-bug-poster.png
|
||||
|
@@ -1,78 +0,0 @@
|
||||
---
|
||||
title: "HTTP/2 Server Push in Hugo"
|
||||
date: 2017-07-24T18:36:00+02:00
|
||||
description: >
|
||||
As every page in Hugo can be output to multiple formats, it is easy to create Netlify's _redirects and _headers files on the fly.
|
||||
categories: [blog]
|
||||
keywords: []
|
||||
slug: "http2-server-push-in-hugo"
|
||||
aliases: []
|
||||
author: bep
|
||||
images:
|
||||
- images/gohugoio-card-1.png
|
||||
---
|
||||
|
||||
**Netlify** recently announced support for [HTTP/2 server push](https://www.netlify.com/blog/2017/07/18/http/2-server-push-on-netlify/), and we have now added it to the **gohugo.io** sites for the main `CSS` and `JS` bundles, along with server-side 301 redirect support.
|
||||
|
||||
If you navigate to https://gohugo.io and look in the Chrome developer network console, you should now see `Push` as the new source ("Initiator") for the `CSS` and `JSS`:
|
||||
|
||||
{{< figure src="/images/blog/hugo-http2-push.png" caption="Network log for https://gohugo.io" >}}
|
||||
|
||||
**Setting up this in Hugo was easy:**
|
||||
|
||||
## 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/).
|
||||
|
||||
```toml
|
||||
[outputs]
|
||||
home = [ "HTML", "RSS", "REDIR", "HEADERS" ]
|
||||
|
||||
[mediaTypes]
|
||||
[mediaTypes."text/netlify"]
|
||||
suffix = ""
|
||||
delimiter = ""
|
||||
|
||||
[outputFormats]
|
||||
[outputFormats.REDIR]
|
||||
mediatype = "text/netlify"
|
||||
baseName = "_redirects"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
[outputFormats.HEADERS]
|
||||
mediatype = "text/netlify"
|
||||
baseName = "_headers"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
```
|
||||
## 2. Add Template For the _headers File
|
||||
|
||||
Add `layouts/index.headers`:
|
||||
|
||||
```bash
|
||||
/*
|
||||
X-Frame-Options: DENY
|
||||
X-XSS-Protection: 1; mode=block
|
||||
X-Content-Type-Options: nosniff
|
||||
Referrer-Policy: origin-when-cross-origin
|
||||
*/
|
||||
Link: <{{ "dist/app.bundle.js" | relURL }}>; rel=preload; as=script
|
||||
Link: <{{ "dist/main.css" | relURL }}>; rel=preload; as=style
|
||||
```
|
||||
The template above creates both a security header definition and a HTTP/2 server push configuration.
|
||||
|
||||
Also note that this is a template for the home page, so the full `Page` with its `Site` and many variables are available. You can also use `partial` to include other templates.
|
||||
|
||||
|
||||
## 3. Add Template For the _redirects File
|
||||
Add `layouts/index.redir`:
|
||||
```bash
|
||||
# Netlify redirects. See https://www.netlify.com/docs/redirects/
|
||||
{{ range $p := .Site.Pages -}}
|
||||
{{ range .Aliases }}
|
||||
{{ . | printf "%-35s" }} {{ $p.RelPermalink -}}
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
```
|
||||
The template above creates 301 redirects for your [aliases](/content-management/urls/#aliases), so you will probably want to turn off aliases in your `config.toml`: `disableAliases = true`.
|
||||
|
Reference in New Issue
Block a user