Commit 11d70afa authored by Zhou Fang's avatar Zhou Fang
Browse files

#197 Fixed meta tags may include shortcodes and or JS code

parent f9c7f136
......@@ -4,7 +4,7 @@ seo_title: "hugo-solstice-theme"
#headline: "hugo-solstice-theme"
#subtitle: "Subtitle"
#seo_title: "Home"
description: "This is an example of the Eclipse Foundation Solstice theme for Hugo."
# description: "This is an example of the Eclipse Foundation Solstice theme for Hugo."
#tagline: "Tagline"
#links: [[href: "about/", text: "About"], [href: "news/", text: "News"]]
date: 2018-04-05T15:50:25-04:00
......
......@@ -4,7 +4,8 @@ seo_title: "hugo-solstice-theme"
#headline: "hugo-solstice-theme"
#subtitle: "Subtitle"
#seo_title: "Home"
description: "This is an example of the Eclipse Foundation Solstice theme for Hugo."
# description: "This is an example of the Eclipse Foundation Solstice theme for Hugo."
summary: "<p>This is only to show Hugo plainify functionality. We should NOT include any HTML tags here.</p>"
#tagline: "Tagline"
#links: [[href: "about/", text: "About"], [href: "news/", text: "News"]]
date: 2018-04-05T15:50:25-04:00
......
......@@ -24,7 +24,7 @@
<meta name="robots" content="noindex">
<meta http-equiv="refresh" content="0; url={{ .Page.Params.redirect_url }}" />
{{ end }}
{{- with .Description | default .Summary }}
{{- with .Description | default .Page.Params.summary | default .Site.Params.description | plainify }}
{{- with . | replaceRE "{{[\\s\\S]*?}}" " " | truncate 160 }}
<meta name="description" content="{{ . }}">
<meta property="og:description" content="{{ . }}">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment