-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document dynamic generation of Netlify _redirects
file
#1170
Comments
Doks can handle this (similar to the TND approach). Not documented that well though — yet 😉 Redirect rules can be appended to The default {{- range $p := .Site.Pages -}}
{{- range .Aliases }}
{{ . }} {{ $p.RelPermalink -}}
{{- end }}
{{- end -}}
# /docs/1.0/prologue/ /docs/1.0/prologue/introduction/
# /docs/1.0/help/ /docs/1.0/help/how-to-update/
# /docs/1.0/ /docs/1.0/prologue/introduction/
# /docs/ /docs/1.0/prologue/introduction/
#
# /docs/0.1/* https://v0-1-0--doks-versioning-poc.netlify.app/docs/0.1/:splat 200
# /docs/0.2/* https://v0-2-0--doks-versioning-poc.netlify.app/docs/0.2/:splat 200 See also the Netlify docs: Redirects and rewrites. Hugo Aliases are usually handled by To be added to the Doks docs! |
_redirects
file
Oh, excellent, that's just what I was hoping for. Thank you! |
Handled by Netlify's Redirects and rewrites in |
Thanks, Henk. However, I still don't see anything in the docs about this. And it actually looks like Using |
You're right! Would surely be interesting to re-add/base upon Regis' Redirects Hugo Module with Netlify. I'm thinking of making this a Hyas integration |
I have URLs in my site which look like this:
I would like users who navigate to
/episode/15/
to be redirected to the full URL with post slug. While this can be done withalias:
in the front matter, it's cleaner to dynamically generate the Netlify_redirects
file.I have done this on another site with the TND Redirects Netlify module. But it looks like Doks may have its own way to do this already:
config.toml:
I don't see any information in the docs about how to use this output format, though. So I'd like to know if this is already possible, or if I should try to integrate TND Redirects Netlify instead.
The text was updated successfully, but these errors were encountered: