mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-08-04 04:58:55 -04:00
Replace aliases with Netlify's _redirects
See https://github.com/gohugoio/hugo/issues/3613 See https://github.com/gohugoio/hugo/issues/3614
This commit is contained in:
parent
5b0e2ea06f
commit
c1ab9894e8
17
config.toml
17
config.toml
@ -2,10 +2,27 @@ title = "Hugo: A Fast and Flexible Website Generator"
|
||||
baseurl = "http://gohugo.io/"
|
||||
MetaDataFormat = "yaml"
|
||||
pluralizeListTitles = false
|
||||
# We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below).
|
||||
disableAliases = true
|
||||
|
||||
[blackfriday]
|
||||
plainIDAnchors = true
|
||||
|
||||
[outputs]
|
||||
home = [ "HTML", "RSS", "REDIR" ]
|
||||
|
||||
[mediaTypes]
|
||||
[mediaTypes."text/netlify"]
|
||||
suffix = ""
|
||||
delimiter = ""
|
||||
|
||||
[outputFormats]
|
||||
[outputFormats.REDIR]
|
||||
mediatype = "text/netlify"
|
||||
baseName = "_redirects"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
|
||||
[params]
|
||||
description = "Documentation of Hugo, a fast and flexible static site generator built with love by spf13, bep and friends in Go"
|
||||
author = "Steve Francia (spf13) and friends"
|
||||
|
6
layouts/index.redir
Normal file
6
layouts/index.redir
Normal file
@ -0,0 +1,6 @@
|
||||
# Netlify redirects. See https://www.netlify.com/docs/redirects/
|
||||
{{ range $p := .Site.Pages -}}
|
||||
{{ range .Aliases }}
|
||||
{{ . | printf "%-35s" }} {{ $p.RelPermalink -}}
|
||||
{{ end -}}
|
||||
{{- end -}}
|
Loading…
x
Reference in New Issue
Block a user