1
0
Fork 0
mirror of https://github.com/GuerillaStudio/vanillalist.git synced 2024-12-21 00:21: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) => {
let endTitle = site.name
let endTitle = `${site.name}${site.description}`
let paginationSuffix = (pagination && pagination.pageNumber) ? ` (page ${pagination.pageNumber + 1})` : ''
if (title) { endTitle = `${title}${site.name}` }
if (pageUrl === '/') { endTitle = `${site.name}${site.description}` }

View file

@ -9,6 +9,7 @@
page.url,
pagination %}
</title>
<meta name="description" content="{{ description or site.description }}">
<link rel="canonical" href="{% include 'canonical.njk' | url %}"/>
{% include 'favicons.njk' %}
<link rel="stylesheet" href="{{ '/css/style.css' | url }}"/>

View file

@ -5,6 +5,7 @@ class Main {
return {
layout: "layouts/search.njk",
title: "Search",
description: "Search JavaScript Vanilla Plugins",
permalink: "/search/index.html",
};
}