Merge commit '3a44bf182fed5f34621f450114083a6dd7e88a07'

This commit is contained in:
Bjørn Erik Pedersen
2018-08-08 13:54:42 +02:00
19 changed files with 257 additions and 22 deletions

View File

@@ -13,7 +13,7 @@ menu:
weight: 120
weight: 120 #rem
draft: false
aliases: [/templates/404/]
aliases: []
toc: false
---

View File

@@ -15,7 +15,7 @@ menu:
weight: 10
sections_weight: 10
draft: false
aliases: [/templates/introduction/,/layouts/introduction/,/layout/introduction/, /templates/go-templates/]
aliases: [/layouts/introduction/,/layout/introduction/, /templates/go-templates/]
toc: true
---

View File

@@ -14,7 +14,6 @@ menu:
weight: 150
sections_weight: 150
draft: false
aliases: [/templates/rss/]
toc: true
---
@@ -100,7 +99,7 @@ In your `header.html` template, you can specify your RSS feed in your `<head></h
```go-html-template
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
```
@@ -108,7 +107,7 @@ If you only want the RSS link, you can query the formats:
```go-html-template
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
```