Merge commit 'efa74c5c6e6ff1daddeb5834ea7c69bed2acf171'

This commit is contained in:
Bjørn Erik Pedersen
2020-06-16 14:19:31 +02:00
74 changed files with 112 additions and 156 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

View File

@@ -1,12 +1,12 @@
---
date: 2020-05-31
title: "0.72.0"
description: "0.72.0"
title: URL rewrites in dev server
description: "Hugo 0.72.0 comes with dev server redirects and URL rewrites, Goldmark typography extension fixes, Scratch.Values."
categories: ["Releases"]
---
This is a rather small release, its probably main motivation being the fixes in Goldmark's [Typographer extension](https://github.com/gohugoio/hugo/commit/432885c499849efb29d3e50196f377fe0e908333).
This is a rather small release, its probably main motivation being the fixes in Goldmark's [Typographer extension](https://github.com/gohugoio/hugo/commit/432885c499849efb29d3e50196f377fe0e908333).
This release also adds [redirect and URL rewrite support](https://gohugo.io/getting-started/configuration/#configure-server) to the development server, with mostly Netlify-compatible configuration syntax. This is especially useful if you're building a [SPA](https://en.wikipedia.org/wiki/Single-page_application) with client-side routing.

View File

@@ -12,7 +12,7 @@ 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.
**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`:
@@ -44,7 +44,7 @@ baseName = "_headers"
isPlainText = true
notAlternative = true
```
## 2. Add Template For the _headers File
## 2. Add Template For the _headers File
Add `layouts/index.headers`:
@@ -63,9 +63,7 @@ The template above creates both a security header definition and a HTTP/2 server
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
## 3. Add Template For the _redirects File
Add `layouts/index.redir`:
```bash
# Netlify redirects. See https://www.netlify.com/docs/redirects/