From d1859dc8b2ec412392892baaad2a2a7d342035ef Mon Sep 17 00:00:00 2001 From: Kurt Kemple Date: Fri, 12 Jun 2020 16:36:41 -0400 Subject: [PATCH 01/24] implement-start-of-search --- .eleventy.js | 393 +++++++++++++++------------ 11ty/_includes/components/search.njk | 71 +++++ 11ty/_includes/layouts/index.njk | 1 - 11ty/index.njk | 1 + 11ty/search.njk | 13 + assets/css/base.scss | 2 +- assets/css/components/_search.scss | 4 + package-lock.json | 80 ++++-- package.json | 12 +- 9 files changed, 367 insertions(+), 210 deletions(-) create mode 100644 11ty/_includes/components/search.njk create mode 100644 11ty/search.njk create mode 100644 assets/css/components/_search.scss diff --git a/.eleventy.js b/.eleventy.js index 1e0da1ad2..ca01cb210 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,181 +1,216 @@ -const definitionPermalink = require('./11ty/helpers/definitionPermalink') -const renderDefinitionContentNextEntries = require('./11ty/shortcodes/renderDefinitionContentNextEntries') -const findExistingDefinition = require('./11ty/filters/helpers/findExistingDefinition') +const definitionPermalink = require('./11ty/helpers/definitionPermalink'); +const renderDefinitionContentNextEntries = require('./11ty/shortcodes/renderDefinitionContentNextEntries'); +const findExistingDefinition = require('./11ty/filters/helpers/findExistingDefinition'); +const removeMd = require('remove-markdown'); module.exports = function(config) { - // Add a filter using the Config API - config.addFilter('linkTarget', definitionPermalink) - - config.addFilter('linkIfExistsInCollection', (word, collection) => { - const existingDefinition = findExistingDefinition(word, collection) - - if (existingDefinition) { - return `${word}` - } - - return `${word}` - }) - - config.addFilter('linkSubTermIfDefined', (subTermData, collection) => { - const existingDefinition = findExistingDefinition(subTermData.full_title, collection) - - if (existingDefinition) { - return `${subTermData.text}` - } - - return `${subTermData.text}` - }) - - // just a debug filter to lazily inspect the content of anything in a template - config.addFilter('postInspect', function(post) { - console.log(post) - }) - - config.addShortcode('definitionFlag', (flag) => { - const cleanText = new Map([ - [ - 'avoid', - { - class: 'avoid', - text: 'Avoid' - } - ], - [ - 'better-alternative', - { - class: 'better', - text: 'Better alternate' - } - ], - [ - 'tool', - { - class: 'tool', - text: '' - } - ], - [ - 'warning', - { - class: 'warning', - text: '' - } - ] - ]) - - if (flag) { - const info = cleanText.get(flag.level.toLowerCase()) - - const sep = flag.text && info.text ? '—' : '' - const text = flag.text ? [ info.text, flag.text ].join(sep) : info.text - - return `

${text}

` - } - - return '

' - }) - - config.addShortcode('renderDefinitionContentNextEntries', renderDefinitionContentNextEntries) - - // NOTE (ovlb): this will not be remembered as the best code i’ve 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 - .getFilteredByGlob('./11ty/definitions/*.md') - .filter((word) => !word.data.skip_in_table_of_content) - .sort((a, b) => { - const { title: firstTitle } = a.data - const { title: secondTitle } = b.data - const sortA = firstTitle.toLowerCase().replace(/^-/, '') - const sortB = secondTitle.toLowerCase().replace(/^-/, '') - - // `localeCompare()` is super cool: http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare - return sortA.localeCompare(sortB) - }) - - const split = { - notLetters: { - title: '#', - definitions: [] - }, - aToE: { - title: 'A–E', - definitions: [] - }, - fToL: { - title: 'F–L', - definitions: [] - }, - mToS: { - title: 'M–S', - definitions: [] - }, - tToZ: { - title: 'T–Z', - definitions: [] - } - } - - allItems.forEach((word) => { - const { title } = word.data - const { notLetters, aToE, fToL, mToS, tToZ } = split - const sortableTitle = title.replace(/^-/, '') - - if (/^[a-e]/gim.test(sortableTitle)) { - return aToE.definitions.push(word) - } - - if (/^[f-l]/i.test(sortableTitle)) { - return fToL.definitions.push(word) - } - - if (/^[m-s]/i.test(sortableTitle)) { - return mToS.definitions.push(word) - } - - if (/^[t-z]/i.test(sortableTitle)) { - return tToZ.definitions.push(word) - } - - // no reg ex as the fallback to avoid testing for emojis and numbers - notLetters.definitions.push(word) - }) - - return Object.keys(split).map((key) => { - const { title, definitions } = split[key] - - return { title, definitions } - }) - }) - - config.addCollection('definedWords', (collection) => { - return collection - .getFilteredByGlob('./11ty/definitions/*.md') - .filter((word) => word.data.defined) - .sort((a, b) => { - // `localeCompare()` is super cool: http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare - return a.data.title.toLowerCase().localeCompare(b.data.title.toLowerCase()) - }) - }) - - const mdIt = require('markdown-it')({ - html: true - }) - const prism = require('markdown-it-prism') - const anchor = require('markdown-it-anchor') - - mdIt.use(prism) - mdIt.use(anchor) - - config.setLibrary('md', mdIt) - - // You can return your Config object (optional). - return { - dir: { - input: '11ty', - output: 'dist' - }, - templateFormats: [ 'njk', 'md' ], - htmlTemplateEngine: 'njk', - markdownTemplateEngine: 'njk' - } -} + // Add a filter using the Config API + config.addFilter('linkTarget', definitionPermalink); + + config.addFilter('linkIfExistsInCollection', (word, collection) => { + const existingDefinition = findExistingDefinition(word, collection); + + if (existingDefinition) { + return `${word}`; + } + + return `${word}`; + }); + + config.addFilter('linkSubTermIfDefined', (subTermData, collection) => { + const existingDefinition = findExistingDefinition( + subTermData.full_title, + collection + ); + + if (existingDefinition) { + return `${ + subTermData.text + }`; + } + + return `${subTermData.text}`; + }); + + // just a debug filter to lazily inspect the content of anything in a template + config.addFilter('postInspect', function(post) { + console.log(post); + }); + + config.addShortcode('definitionFlag', (flag) => { + const cleanText = new Map([ + [ + 'avoid', + { + class: 'avoid', + text: 'Avoid' + } + ], + [ + 'better-alternative', + { + class: 'better', + text: 'Better alternate' + } + ], + [ + 'tool', + { + class: 'tool', + text: '' + } + ], + [ + 'warning', + { + class: 'warning', + text: '' + } + ] + ]); + + if (flag) { + const info = cleanText.get(flag.level.toLowerCase()); + + const sep = flag.text && info.text ? '—' : ''; + const text = flag.text ? [info.text, flag.text].join(sep) : info.text; + + return `

${text}

`; + } + + return '

'; + }); + + config.addShortcode( + 'renderDefinitionContentNextEntries', + renderDefinitionContentNextEntries + ); + + // add full collection for search + config.addCollection('search', (collection) => { + return collection + .getFilteredByGlob('./11ty/definitions/*.md') + .sort((a, b) => { + // `localeCompare()` is super cool: http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare + return a.data.title + .toLowerCase() + .localeCompare(b.data.title.toLowerCase()); + }); + }); + + // add filter to strip Markdown formatting from search text + config.addFilter('stripMarkdown', (value) => { + return removeMd(value).replace(/[\s\s+,\n]/g, ' '); + }); + + // add filter to extract text from sub_terms in search template + config.addFilter('extractSubTermText', (value) => { + return value ? value.map((subterm) => subterm.text).join(',') : ''; + }); + + // NOTE (ovlb): this will not be remembered as the best code i’ve 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 + .getFilteredByGlob('./11ty/definitions/*.md') + .filter((word) => !word.data.skip_in_table_of_content) + .sort((a, b) => { + const { title: firstTitle } = a.data; + const { title: secondTitle } = b.data; + const sortA = firstTitle.toLowerCase().replace(/^-/, ''); + const sortB = secondTitle.toLowerCase().replace(/^-/, ''); + + // `localeCompare()` is super cool: http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare + return sortA.localeCompare(sortB); + }); + + const split = { + notLetters: { + title: '#', + definitions: [] + }, + aToE: { + title: 'A–E', + definitions: [] + }, + fToL: { + title: 'F–L', + definitions: [] + }, + mToS: { + title: 'M–S', + definitions: [] + }, + tToZ: { + title: 'T–Z', + definitions: [] + } + }; + + allItems.forEach((word) => { + const { title } = word.data; + const { notLetters, aToE, fToL, mToS, tToZ } = split; + const sortableTitle = title.replace(/^-/, ''); + + if (/^[a-e]/gim.test(sortableTitle)) { + return aToE.definitions.push(word); + } + + if (/^[f-l]/i.test(sortableTitle)) { + return fToL.definitions.push(word); + } + + if (/^[m-s]/i.test(sortableTitle)) { + return mToS.definitions.push(word); + } + + if (/^[t-z]/i.test(sortableTitle)) { + return tToZ.definitions.push(word); + } + + // no reg ex as the fallback to avoid testing for emojis and numbers + notLetters.definitions.push(word); + }); + + return Object.keys(split).map((key) => { + const { title, definitions } = split[key]; + + return { title, definitions }; + }); + }); + + config.addCollection('definedWords', (collection) => { + return collection + .getFilteredByGlob('./11ty/definitions/*.md') + .filter((word) => word.data.defined) + .sort((a, b) => { + // `localeCompare()` is super cool: http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare + return a.data.title + .toLowerCase() + .localeCompare(b.data.title.toLowerCase()); + }); + }); + + const mdIt = require('markdown-it')({ + html: true + }); + const prism = require('markdown-it-prism'); + const anchor = require('markdown-it-anchor'); + + mdIt.use(prism); + mdIt.use(anchor); + + config.setLibrary('md', mdIt); + + // You can return your Config object (optional). + return { + dir: { + input: '11ty', + output: 'dist' + }, + templateFormats: ['njk', 'md'], + htmlTemplateEngine: 'njk', + markdownTemplateEngine: 'njk' + }; +}; diff --git a/11ty/_includes/components/search.njk b/11ty/_includes/components/search.njk new file mode 100644 index 000000000..332b4c737 --- /dev/null +++ b/11ty/_includes/components/search.njk @@ -0,0 +1,71 @@ + + +{% block pageScript%} + + +{% endblock %} diff --git a/11ty/_includes/layouts/index.njk b/11ty/_includes/layouts/index.njk index c6ae1bb60..1d1dcb2ce 100644 --- a/11ty/_includes/layouts/index.njk +++ b/11ty/_includes/layouts/index.njk @@ -5,7 +5,6 @@
{{ content | safe }} {% include 'components/table-of-content.njk' %} -
{% endblock %} diff --git a/11ty/index.njk b/11ty/index.njk index 4403a0d21..8e3ef3abe 100644 --- a/11ty/index.njk +++ b/11ty/index.njk @@ -23,4 +23,5 @@ layout: layouts/index.njk
  • Follow us on Twitter @SelfDefinedApp.
  • + {% include 'components/search.njk' %} diff --git a/11ty/search.njk b/11ty/search.njk new file mode 100644 index 000000000..6394f3fd1 --- /dev/null +++ b/11ty/search.njk @@ -0,0 +1,13 @@ +--- +permalink: search.json +--- +[ +{%- for item in collections.search -%} + { + "url" : "{{ item.url }}", + "title" : "{{ item.data.title }}", + "subterms": "{{item.data.sub_terms | extractSubTermText }}", + "content" : "{{ item.templateContent | stripMarkdown }}" + }{% if not loop.last %},{% else %}{%- endif -%} +{%- endfor -%} +] diff --git a/assets/css/base.scss b/assets/css/base.scss index 95f69b42f..0e0d44290 100644 --- a/assets/css/base.scss +++ b/assets/css/base.scss @@ -19,7 +19,7 @@ // 5. Components @import 'components/word', 'components/lists', 'components/definitions', - 'components/flag'; + 'components/flag', 'components/search'; // 6. Page-specific styles @import './layouts/pages'; diff --git a/assets/css/components/_search.scss b/assets/css/components/_search.scss new file mode 100644 index 000000000..38e0651a5 --- /dev/null +++ b/assets/css/components/_search.scss @@ -0,0 +1,4 @@ +.search { + background-color: #000000; + color: #ffffff; +} diff --git a/package-lock.json b/package-lock.json index cdce57445..3df8cd82e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4843,6 +4843,34 @@ "pify": "^2.0.0", "pinkie-promise": "^2.0.0", "rimraf": "^2.2.8" + }, + "dependencies": { + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "^1.0.1" + } + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "requires": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + } } }, "delayed-stream": { @@ -6804,30 +6832,24 @@ "dev": true }, "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", + "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "dev": true, "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" }, "dependencies": { - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "^1.0.1" - } - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true } } }, @@ -12163,6 +12185,12 @@ "xtend": "^4.0.1" } }, + "remove-markdown": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.3.0.tgz", + "integrity": "sha1-XktmdJOpNXlyjz1S7MHbnKUF3Jg=", + "dev": true + }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -15276,6 +15304,16 @@ "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", "dev": true }, + "yaml-front-matter": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/yaml-front-matter/-/yaml-front-matter-4.1.0.tgz", + "integrity": "sha512-E2NKXUe8Amsf3kyLDK48c2gvnfom0Yj3m7455iVVg+G5UbX66V5iqFSpEUkQ+A3iJCKIz+mvAbkN7BQ+N0wiLA==", + "dev": true, + "requires": { + "commander": "^2.14.1", + "js-yaml": "^3.10.0" + } + }, "yargs": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.4.0.tgz", diff --git a/package.json b/package.json index 249d9bee8..91f0804b1 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "build": "concurrently npm:build:*", "build:css": "parcel build assets/css/base.scss --out-dir dist/assets/css/", "build:site": "eleventy", - "create-definitions": "bin/create-definitions", "lint": "concurrently npm:lint:*", "lint:css": "stylelint \"assets/css/**/*.scss\"", "lint:js": "eslint \"11ty/**/*.js\"", @@ -19,9 +18,6 @@ "watch": "eleventy --watch", "watch:css": "parcel watch assets/css/base.scss --out-dir dist/assets/css/" }, - "bin": { - "create-definitions": "bin/create-definitions" - }, "repository": { "type": "git", "url": "git+https://github.com/tatianamac/selfdefined.git" @@ -65,19 +61,19 @@ "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.3", "esm": "^3.2.25", + "globby": "^11.0.1", "husky": "^4.2.5", "lint-staged": "^10.2.7", "markdownlint-cli": "^0.23.1", "parcel-bundler": "^1.12.4", "prettier": "^1.19.1", + "remove-markdown": "^0.3.0", "sass": "^1.26.7", "slugify": "^1.4.0", "stylelint": "^13.5.0", "stylelint-config-recommended-scss": "^4.2.0", "stylelint-order": "^4.0.0", - "stylelint-scss": "^3.17.2" - }, - "engines": { - "node": "12" + "stylelint-scss": "^3.17.2", + "yaml-front-matter": "^4.1.0" } } From 59315c2fefbb1a01fe5068ce433e0d60f64a7fe3 Mon Sep 17 00:00:00 2001 From: Kurt Kemple Date: Fri, 12 Jun 2020 16:43:39 -0400 Subject: [PATCH 02/24] rename filter for removing markdown formatting --- .eleventy.js | 2 +- 11ty/search.njk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index ca01cb210..635fd2975 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -101,7 +101,7 @@ module.exports = function(config) { }); // add filter to strip Markdown formatting from search text - config.addFilter('stripMarkdown', (value) => { + config.addFilter('removeMarkdownFormatting', (value) => { return removeMd(value).replace(/[\s\s+,\n]/g, ' '); }); diff --git a/11ty/search.njk b/11ty/search.njk index 6394f3fd1..d0ad88df4 100644 --- a/11ty/search.njk +++ b/11ty/search.njk @@ -7,7 +7,7 @@ permalink: search.json "url" : "{{ item.url }}", "title" : "{{ item.data.title }}", "subterms": "{{item.data.sub_terms | extractSubTermText }}", - "content" : "{{ item.templateContent | stripMarkdown }}" + "content" : "{{ item.templateContent | removeMarkdownFormatting }}" }{% if not loop.last %},{% else %}{%- endif -%} {%- endfor -%} ] From 5e6a3a7bc574cd41ac80b3f7c1ad1bb033f128f5 Mon Sep 17 00:00:00 2001 From: Kurt Kemple Date: Fri, 12 Jun 2020 16:48:27 -0400 Subject: [PATCH 03/24] fix conflicts --- .eleventy.js | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 9aa2a698d..e68a60573 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,9 +1,8 @@ const definitionPermalink = require('./11ty/helpers/definitionPermalink'); const renderDefinitionContentNextEntries = require('./11ty/shortcodes/renderDefinitionContentNextEntries'); const findExistingDefinition = require('./11ty/filters/helpers/findExistingDefinition'); - -const removeMd = require('remove-markdown'); const pluginRss = require('@11ty/eleventy-plugin-rss'); +const removeMd = require('remove-markdown'); module.exports = function(config) { // Add a filter using the Config API @@ -96,28 +95,6 @@ module.exports = function(config) { renderDefinitionContentNextEntries ); - // add full collection for search - config.addCollection('search', (collection) => { - return collection - .getFilteredByGlob('./11ty/definitions/*.md') - .sort((a, b) => { - // `localeCompare()` is super cool: http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare - return a.data.title - .toLowerCase() - .localeCompare(b.data.title.toLowerCase()); - }); - }); - - // add filter to strip Markdown formatting from search text - config.addFilter('removeMarkdownFormatting', (value) => { - return removeMd(value).replace(/[\s\s+,\n]/g, ' '); - }); - - // add filter to extract text from sub_terms in search template - config.addFilter('extractSubTermText', (value) => { - return value ? value.map((subterm) => subterm.text).join(',') : ''; - }); - // NOTE (ovlb): this will not be remembered as the best code i’ve 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 @@ -200,6 +177,7 @@ module.exports = function(config) { }); }); + config.addCollection('definedWordsChronological', (collection) => { return collection .getFilteredByGlob('./11ty/definitions/*.md') .filter((word) => word.data.defined) @@ -210,6 +188,27 @@ module.exports = function(config) { }); }); + config.addCollection('search', (collection) => { + return collection + .getFilteredByGlob('./11ty/definitions/*.md') + .sort((a, b) => { + // `localeCompare()` is super cool: http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare + return a.data.title + .toLowerCase() + .localeCompare(b.data.title.toLowerCase()); + }); + }); + + // add filter to strip Markdown formatting from search text + config.addFilter('removeMarkdownFormatting', (value) => { + return removeMd(value).replace(/[\s\s+,\n]/g, ' '); + }); + + // add filter to extract text from sub_terms in search template + config.addFilter('extractSubTermText', (value) => { + return value ? value.map((subterm) => subterm.text).join(',') : ''; + }); + const mdIt = require('markdown-it')({ html: true }); From dc9e6b81797ddd267fa0f04a496ac8450dc66518 Mon Sep 17 00:00:00 2001 From: Kurt Kemple Date: Fri, 12 Jun 2020 17:19:35 -0400 Subject: [PATCH 04/24] remove unused dev dependencies --- package-lock.json | 32 -------------------------------- package.json | 4 +--- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index f75122d0d..b745e7548 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6804,28 +6804,6 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, - "globby": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", - "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" - }, - "dependencies": { - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - } - } - }, "globjoin": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", @@ -15251,16 +15229,6 @@ "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", "dev": true }, - "yaml-front-matter": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/yaml-front-matter/-/yaml-front-matter-4.1.0.tgz", - "integrity": "sha512-E2NKXUe8Amsf3kyLDK48c2gvnfom0Yj3m7455iVVg+G5UbX66V5iqFSpEUkQ+A3iJCKIz+mvAbkN7BQ+N0wiLA==", - "dev": true, - "requires": { - "commander": "^2.14.1", - "js-yaml": "^3.10.0" - } - }, "yargs": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.4.0.tgz", diff --git a/package.json b/package.json index 5e8fad70b..2f5432577 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,6 @@ "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.3", "esm": "^3.2.25", - "globby": "^11.0.1", "husky": "^4.2.5", "lint-staged": "^10.2.7", "markdownlint-cli": "^0.23.1", @@ -74,7 +73,6 @@ "stylelint": "^13.5.0", "stylelint-config-recommended-scss": "^4.2.0", "stylelint-order": "^4.0.0", - "stylelint-scss": "^3.17.2", - "yaml-front-matter": "^4.1.0" + "stylelint-scss": "^3.17.2" } } From 12de5619c7755c22f3b4e34a2bc330e523d441d7 Mon Sep 17 00:00:00 2001 From: Kurt Kemple Date: Fri, 12 Jun 2020 17:20:51 -0400 Subject: [PATCH 05/24] readd engine field --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 2f5432577..e2627c730 100644 --- a/package.json +++ b/package.json @@ -74,5 +74,8 @@ "stylelint-config-recommended-scss": "^4.2.0", "stylelint-order": "^4.0.0", "stylelint-scss": "^3.17.2" + }, + "engines": { + "node": "12" } } From e908972882e49d86d1521e70155dad440fe9f1cf Mon Sep 17 00:00:00 2001 From: Kurt Kemple Date: Sat, 20 Jun 2020 17:22:23 -0400 Subject: [PATCH 06/24] move search to serverless function --- 11ty/_includes/components/search.njk | 36 +++++----------------------- 11ty/search.njk | 1 + 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/11ty/_includes/components/search.njk b/11ty/_includes/components/search.njk index 332b4c737..38e23a30a 100644 --- a/11ty/_includes/components/search.njk +++ b/11ty/_includes/components/search.njk @@ -5,43 +5,18 @@ {% block pageScript%} - +{% endblock %} From 274f3b1a203b2362ebe2705c2d1e3e927f9547f6 Mon Sep 17 00:00:00 2001 From: Kurt Kemple Date: Sat, 8 Aug 2020 15:14:56 -0400 Subject: [PATCH 11/24] remove unused function in search component --- 11ty/_includes/components/search.njk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/11ty/_includes/components/search.njk b/11ty/_includes/components/search.njk index 47d0b4fb7..a6ab93bc7 100644 --- a/11ty/_includes/components/search.njk +++ b/11ty/_includes/components/search.njk @@ -10,11 +10,6 @@ -{% endblock %} + diff --git a/11ty/_includes/components/table-of-content.njk b/11ty/_includes/components/table-of-content.njk index bb1b265a9..b0b68e2de 100644 --- a/11ty/_includes/components/table-of-content.njk +++ b/11ty/_includes/components/table-of-content.njk @@ -1,5 +1,6 @@

    Terms

    + {% include 'components/search.njk' %}