kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.59k stars 4.9k forks source link

alias on the website docs doesnt seem to work #7750

Closed medyagh closed 4 years ago

medyagh commented 4 years ago

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

---
title: "Proxies & VPN's"
weight: 6
description: >
  How to use minikube with a VPN or HTTP/HTTPS Proxy
aliases:
  - docs/reference/networking/vpn
  - docs/reference/networking/proxy
---

but the alias doesnt seem to be working

medyagh commented 4 years ago

CC: @prasadkatti do you know how to the alias on the hugo site works?

prasadkatti commented 4 years ago

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.

medyagh commented 4 years ago

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

medyagh commented 4 years ago

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/]
---
prasadkatti commented 4 years ago

@medyagh - yup, the leading / is missing. I will fix it.

prasadkatti commented 4 years ago

https://gohugo.io/content-management/urls/#aliases

Aliases comes in two forms:

  1. Starting with a / meaning they are relative to the BaseURL, e.g. /posts/my-blogpost/
  2. 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).
prasadkatti commented 4 years ago

@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/