about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2024-12-10 06:34:36 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2024-12-10 06:34:36 +0700
commit5d731a5eed9b635c4a4466ddca4b34fc542bd335 (patch)
tree376dcd7074e86d3e6fc710a8d8cf108bbb0bdc03
parentb5820adaab7e93f0c231fdbd5dbefd9121717de5 (diff)
downloadblog-5d731a5eed9b635c4a4466ddca4b34fc542bd335.tar.gz
Fix RSS title and content type
-rw-r--r--layouts/_default/rss.xml4
-rw-r--r--layouts/partials/head.html4
2 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index cb728d9..59b0fef 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -8,10 +8,10 @@
 {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
   <channel>
-    <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
+    <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} – {{ end }}{{ .Site.Title }}{{ end }}</title>
     <link>{{ .Permalink }}</link>
     <description>{{ .Site.Title }}{{ if ne  .Title  .Site.Title }}{{ with .Title }} ({{.}}){{ end }}{{ end }}</description>
-    <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
+    <generator>Hugo - gohugo.io</generator>{{ with .Site.LanguageCode }}
     <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
     <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
     <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index a44b75c..ba2b934 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -10,8 +10,8 @@
 <meta name="description" content="{{ .Site.Params.Description }}">
 
 {{ with .OutputFormats.Get "rss" -}}
-<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}"
-                       href="{{ .Permalink}}" title="$.Site.Title" />
+<link rel="{{ .Rel }}" type="{{ .MediaType.Type | htmlUnescape }}"
+		       href="{{ .Permalink}}" title="{{ $.Site.Title }}" />
 {{ end -}}
 
 <link rel="icon" type="image/x-icon" href="/favicon.ico">