Commit df50dba5 authored by Martin Lowe's avatar Martin Lowe 🇨🇦 Committed by Christopher Guindon
Browse files

Duplicate meta description tags #213

parent 21ebe32c
......@@ -2,7 +2,7 @@
title: "News"
seo_title: "News"
seo_title: "News"
description: "This is an example of the Eclipse Foundation Solstice theme for Hugo."
description: "This is an example news page for the Eclipse Foundation Solstice theme for Hugo."
date: 2018-04-05T15:50:25-04:00
---
......
......@@ -2,7 +2,8 @@
title: "Single Page Example"
headline: "headline"
date: 2018-04-05T16:09:45-04:00
description: "description"
description: |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed imperdiet tortor id rhoncus pulvinar. Suspendisse nec aliquam ante. Sed vel convallis ex, ac elementum nisi. Nam eros lectus, tempus sit amet lorem at, laoreet blandit enim. Vestibulum metus justo, venenatis mollis ex quis, pretium ultricies orci. Pellentesque accumsan nulla ac leo convallis ornare. Cras rhoncus sapien lacus, vel tincidunt nibh lacinia ac. Vivamus vel egestas mi. Morbi nulla ante, rutrum quis congue non, luctus vehicula dui. Sed et nisi eu est egestas rhoncus.
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed imperdiet tortor id rhoncus pulvinar. Suspendisse nec aliquam ante. Sed vel convallis ex, ac elementum nisi. Nam eros lectus, tempus sit amet lorem at, laoreet blandit enim. Vestibulum metus justo, venenatis mollis ex quis, pretium ultricies orci. Pellentesque accumsan nulla ac leo convallis ornare. Cras rhoncus sapien lacus, vel tincidunt nibh lacinia ac. Vivamus vel egestas mi. Morbi nulla ante, rutrum quis congue non, luctus vehicula dui. Sed et nisi eu est egestas rhoncus.
......
......@@ -24,10 +24,12 @@
<meta name="robots" content="noindex">
<meta http-equiv="refresh" content="0; url={{ .Page.Params.redirect_url }}" />
{{ end }}
{{- with .Description | default .Summary | default .Site.Params.description }}
{{- with .Description | default .Summary }}
{{- with . | replaceRE "{{[\\s\\S]*?}}" " " | truncate 160 }}
<meta name="description" content="{{ . }}">
<meta property="og:description" content="{{ . }}">
<meta name="twitter:description" content="{{ . | truncate 200 }}">
<meta name="twitter:description" content="{{ . }}">
{{- end }}
{{- end }}
<meta name="author" content="{{ .Site.Author.name }}"/>
{{- with .Params.page_favicon | default .Site.Params.favicon | default "https://www.eclipse.org/favicon.ico"}}
......
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