Skip to content

Commit 693b3ac

Browse files
committed
Add missing meta description tag to head
1 parent 83469a9 commit 693b3ac

File tree

8 files changed

+8
-0
lines changed

8 files changed

+8
-0
lines changed

_data/metadata.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"title": "Eleventy Netlify Boilerplate",
3+
"description": "A template for building a simple blog website with the Eleventy static site generator, Netlify CMS, and with deployment to Netlify.",
34
"url": "https://eleventy-netlify-boilerplate.netlify.app"
45
}

_includes/components/head.njk

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<link rel="dns-prefetch" href="https://identity.netlify.com">
44
<meta name="viewport" content="width=device-width, initial-scale=1.0">
55
<title>{{ renderData.title or title or metadata.title }}</title>
6+
<meta name="description" content="{{ metaDescription or renderData.metaDescription or metadata.description }}">
67
<script async src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
78
{% set css %}
89
{% include "assets/css/inline.css" %}

author.njk

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ permalink: "authors/{{ author | slug }}/"
99
renderData:
1010
author: "{{ author }}"
1111
title: "Posts by {{ author }}"
12+
metaDescription: "An archive of all posts by the author: {{ author }}."
1213
---
1314

1415
<h1>{{ renderData.title | safe }}</h1>

authors.njk

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Authors
3+
metaDescription: This page lists all of the Blog's authors.
34
layout: layouts/base.njk
45
pagination:
56
data: collections.authors

pages/about.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: About us
3+
metaDescription: This is a sample meta description. If one is not present in your page/post's front matter, the default metadata.desciption will be used instead.
34
date: 2017-01-01T00:00:00.000Z
45
permalink: /about/index.html
56
eleventyNavigation:

pages/blog.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
layout: layouts/blog.njk
33
title: Blog
4+
metaDescription: A sample Blog page listing various posts and authors.
45
date: 2017-01-01
56
permalink: /blog/index.html
67
eleventyNavigation:

pages/contact.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
layout: layouts/contact.njk
33
title: Get in touch
4+
metaDescription: This is a sample meta description. If one is not present in your page/post's front matter, the default metadata.desciption will be used instead.
45
section: contact
56
date: 2018-01-01
67
permalink: /contact/index.html

posts/firstpost.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: This is the first example post
3+
metaDescription: This is a sample meta description. If one is not present in your page/post's front matter, the default metadata.desciption will be used instead.
34
date: 2019-01-01T00:00:00.000Z
45
author: John Appleseed
56
summary: Why contemplating our mortality can be a powerful catalyst for change

0 commit comments

Comments
 (0)