Closed medyagh closed 4 years ago
CC: @prasadkatti do you know how to the alias on the hugo site works?
I first learned about aliases last week when you asked me to add them on another page 😄. I can try to run the site locally and see if I can figure it out. Last time I tried make site
on my local, I was running into issues.
yes me too I am learning docsy https://www.docsy.dev/docs/ and hugo :) which we are using.
yes if you could please help us learn to use the alias correctly. that make a lot of broken links work
I first learned about aliases last week when you asked me to add them on another page . I can try to run the site locally and see if I can figure it out. Last time I tried
make site
on my local, I was running into issues.
https://gohugo.io/content-management/urls/#example-aliases-in-multilingual @prasadkatti it might be that we just need to add / in the begining
---
title: My New post
aliases: [/posts/my-old-url/]
---
@medyagh - yup, the leading /
is missing. I will fix it.
https://gohugo.io/content-management/urls/#aliases
Aliases comes in two forms:
- Starting with a / meaning they are relative to the BaseURL, e.g. /posts/my-blogpost/
- They are relative to the Page they’re defined in, e.g. my-blogpost or even something like ../blog/my-blogpost (new in Hugo 0.55).
@medyagh - If you run hugo server --debug
(debug mode), then it will show you a list of aliases created like this -
DEBUG 2020/04/19 11:27:06 creating alias: /docs/reference/networking/vpn redirecting to http://localhost:1313/docs/handbook/vpn_and_proxy/
Example:
this link https://minikube.sigs.k8s.io/docs/reference/networking/proxy doesnt work
the correct link is https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/
in that page I see there is an alias for it
but the alias doesnt seem to be working