mirror of
https://github.com/GuerillaStudio/vanillalist.git
synced 2024-12-21 08:31:55 +00:00
Add meta description
This commit is contained in:
parent
06f8e58dc1
commit
fb478ded93
3 changed files with 3 additions and 1 deletions
|
@ -32,7 +32,7 @@ module.exports = function (eleventyConfig) {
|
||||||
});
|
});
|
||||||
|
|
||||||
eleventyConfig.addShortcode("titleGenerator", (title, site, pageUrl, pagination) => {
|
eleventyConfig.addShortcode("titleGenerator", (title, site, pageUrl, pagination) => {
|
||||||
let endTitle = site.name
|
let endTitle = `${site.name} • ${site.description}`
|
||||||
let paginationSuffix = (pagination && pagination.pageNumber) ? ` (page ${pagination.pageNumber + 1})` : ''
|
let paginationSuffix = (pagination && pagination.pageNumber) ? ` (page ${pagination.pageNumber + 1})` : ''
|
||||||
if (title) { endTitle = `${title} • ${site.name}` }
|
if (title) { endTitle = `${title} • ${site.name}` }
|
||||||
if (pageUrl === '/') { endTitle = `${site.name} • ${site.description}` }
|
if (pageUrl === '/') { endTitle = `${site.name} • ${site.description}` }
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
page.url,
|
page.url,
|
||||||
pagination %}
|
pagination %}
|
||||||
</title>
|
</title>
|
||||||
|
<meta name="description" content="{{ description or site.description }}">
|
||||||
<link rel="canonical" href="{% include 'canonical.njk' | url %}"/>
|
<link rel="canonical" href="{% include 'canonical.njk' | url %}"/>
|
||||||
{% include 'favicons.njk' %}
|
{% include 'favicons.njk' %}
|
||||||
<link rel="stylesheet" href="{{ '/css/style.css' | url }}"/>
|
<link rel="stylesheet" href="{{ '/css/style.css' | url }}"/>
|
||||||
|
|
|
@ -5,6 +5,7 @@ class Main {
|
||||||
return {
|
return {
|
||||||
layout: "layouts/search.njk",
|
layout: "layouts/search.njk",
|
||||||
title: "Search",
|
title: "Search",
|
||||||
|
description: "Search JavaScript Vanilla Plugins",
|
||||||
permalink: "/search/index.html",
|
permalink: "/search/index.html",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue