Include flag context in excerpt (#294)

* Added avoid flag text to meta descriptions

* Moved meta description logic to a shortcode

* Fixing nunjucks syntax error in base template head

Co-authored-by: Oscar <ovlb@users.noreply.github.com>
This commit is contained in:
Derek Murr
2020-09-01 15:39:23 -04:00
committed by GitHub
parent 019d80976d
commit 7aed7e3b90
5 changed files with 66 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
const definitionPermalink = require('./11ty/helpers/definitionPermalink');
const renderDefinitionContentNextEntries = require('./11ty/shortcodes/renderDefinitionContentNextEntries');
const metaDescriptionWithFlag = require('./11ty/shortcodes/metaDescriptionWithFlag');
const findExistingDefinition = require('./11ty/filters/helpers/findExistingDefinition');
const pluginRss = require('@11ty/eleventy-plugin-rss');
@@ -94,6 +95,8 @@ module.exports = function(config) {
renderDefinitionContentNextEntries
);
config.addShortcode('metaDescriptionWithFlag', metaDescriptionWithFlag);
// NOTE (ovlb): this will not be remembered as the best code ive written. if anyone seeing this has a better solution then the following to achieve sub groups of the definitions: i am happy to get rid of it
config.addCollection('tableOfContent', (collection) => {
const allItems = collection