diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-03-30 17:08:25 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-04-02 10:32:47 +0200 |
commit | 92baa14fd3f45c0917c5988235cd1a0f8692f171 (patch) | |
tree | 130417443701331257f57f3d198eba2a037c079d /docs/content/en | |
parent | a55640de8e3944d3b9f64b15155148a0e35cb31e (diff) |
hugolib: Allow page-relative aliases
Fixes #5757
Diffstat (limited to 'docs/content/en')
-rw-r--r-- | docs/content/en/content-management/urls.md | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/content/en/content-management/urls.md b/docs/content/en/content-management/urls.md index 25bd09165..5ba9e758e 100644 --- a/docs/content/en/content-management/urls.md +++ b/docs/content/en/content-management/urls.md @@ -82,9 +82,13 @@ The following is a list of values that can be used in a `permalink` definition i ## Aliases -For people migrating existing published content to Hugo, there's a good chance you need a mechanism to handle redirecting old URLs. +Aliases can be used to create redirects to your page from other URLs. -Luckily, redirects can be handled easily with **aliases** in Hugo. + +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). ### Example: Aliases |