1
0
Fork 0
mirror of https://github.com/GuerillaStudio/vanillalist.git synced 2024-12-30 11:51:57 +00:00

Add meta description

This commit is contained in:
Tixie 2021-03-01 04:02:37 +01:00
parent 06f8e58dc1
commit fb478ded93
3 changed files with 3 additions and 1 deletions

View file

@ -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}` }

View file

@ -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 }}"/>

View file

@ -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",
}; };
} }