Skip to content
Permalink
Browse files

examples: Replace .RSSLink

Fixes #6037
  • Loading branch information...
bep committed Oct 14, 2019
1 parent 653e685 commit 46cafdbaca13866f32db04c0cc28374e30ec5914
Showing with 3 additions and 1 deletion.
  1. +3 −1 examples/blog/layouts/partials/header.html
@@ -6,5 +6,7 @@
<title>{{ .Title }} - {{ .Site.BaseURL }}</title>
<link rel="canonical" href="{{ .Permalink }}">
{{ partial "header.includes.html" . }}
{{ if .RSSLink }}<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />{{ end }}
{{ with .OutputFormats.Get "RSS" -}}
{{ printf "<link href=%q rel=\"alternate\" type=%q title=%q />" .Permalink .MediaType .Title | safeHTML }}
{{- end }}
</head>

1 comment on commit 46cafdb

@gj52

This comment has been minimized.

Copy link

gj52 commented on 46cafdb Oct 16, 2019

what does %q here ???
from my header.html (HTML5)

{{ range $index, $name := slice "ATOM" "RSS" "JSON" }}
{{ with $.OutputFormats.Get $name -}}
<link href={{.RelPermalink}} rel=alternate type={{ .MediaType }} title="{{ site.Title | safeHTML }}" />
{{- end }}
{{ end }}

Please sign in to comment.
You can’t perform that action at this time.