Implement support for alias templates

This change adds a canonical alias.html template that is used for page
redirects, and passes the page as data to the template under .Page

Fixes #2533
Closes #2576
This commit is contained in:
Nate Finch
2016-10-15 07:35:32 -04:00
committed by Bjørn Erik Pedersen
parent 8b43d39ef3
commit 10a773cde7
5 changed files with 86 additions and 14 deletions

View File

@@ -94,3 +94,11 @@ Assuming a baseurl of `mysite.tld`, the contents of the html file will look some
```
The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case.
## Customizing
You may customize this alias page by creating an alias.html template in the
layouts folder of your site. In this case, the data passed to the template is
* Permalink - the link to the page being aliased
* Page - the Page data for the page being aliased

View File

@@ -71,4 +71,6 @@ Used to render the XML sitemap
### [404](/templates/404/)
This template will create a 404.html page used when hosting on GitHub Pages
### [Alias](/extras/aliases/#customizing)
This template will override the default page used to create aliases of pages.