瀏覽代碼

Change deprecated RSS param; add RSS metadata to all pages

master
Chris Smith 5 年之前
父節點
當前提交
dc7396bff1
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. 4
    2
      site/layouts/partials/head.html

+ 4
- 2
site/layouts/partials/head.html 查看文件

@@ -21,8 +21,10 @@
21 21
     <link rel="stylesheet" href="/res/css/font-awesome.min.css">
22 22
     <link rel="stylesheet" href="/res/css/lightbox.min.css">
23 23
     <link rel="canonical" href="{{ .Permalink }}" />
24
-    {{ if .RSSLink }}
25
-      <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
24
+    {{ with .Site.GetPage "home" }}
25
+      {{ with .OutputFormats.Get "RSS" }}
26
+        <link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }} - all posts" />
27
+      {{ end }}
26 28
     {{ end }}
27 29
     {{ if $.IsPage }}
28 30
       <meta name="twitter:card" content="summary" />

Loading…
取消
儲存