Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNate Finch <nate.finch@gmail.com>2016-10-15 14:35:32 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-10-15 16:25:05 +0300
commit10a773cde7a7d5860512917ae2aa14b683318000 (patch)
tree2210c46781c6040a8fdc2783eda7b9957f53e167 /docs
parent8b43d39ef312e5b9e3549aa8fa75a1464a467ae8 (diff)
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
Diffstat (limited to 'docs')
-rw-r--r--docs/content/extras/aliases.md8
-rw-r--r--docs/content/templates/overview.md2
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/content/extras/aliases.md b/docs/content/extras/aliases.md
index 9d20e12ba..da861387c 100644
--- a/docs/content/extras/aliases.md
+++ b/docs/content/extras/aliases.md
@@ -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 \ No newline at end of file
diff --git a/docs/content/templates/overview.md b/docs/content/templates/overview.md
index 99eb00432..3b41a6641 100644
--- a/docs/content/templates/overview.md
+++ b/docs/content/templates/overview.md
@@ -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.