浏览代码

Add RSS link to header (#1019)

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
Alexandre Neto 3 月之前
父节点
当前提交
5c1de702ad
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      layouts/partials/header.html

+ 4 - 0
layouts/partials/header.html

@@ -18,3 +18,7 @@
 
 
   <link rel="icon" type="image/png" href="{{ $favicon }}" />
   <link rel="icon" type="image/png" href="{{ $favicon }}" />
 {{end}}
 {{end}}
+
+{{ with .OutputFormats.Get "rss" -}}
+  {{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
+{{ end }}