diff --git a/.eleventy.js b/.eleventy.js index 6f37b0a..806faf3 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -101,7 +101,7 @@ module.exports = eleventyConfig => { eleventyConfig.addPassthroughCopy(path) ); - // social icons and manifest to root directory + // social icons to root directory eleventyConfig.addPassthroughCopy({ 'src/assets/images/favicon/*': '/' }); diff --git a/config/utils/index.js b/config/utils/index.js index 3cdbf2e..fb6c64b 100644 --- a/config/utils/index.js +++ b/config/utils/index.js @@ -1,6 +1,6 @@ const slugify = require('slugify'); -/** Converts the given string to a slug form. */ +/** Converts string to a slug form. */ const slugifyString = str => { return slugify(str, { replacement: '-', @@ -9,7 +9,7 @@ const slugifyString = str => { }); }; -/** Helper to throw an error if the provided argument is not of the expected. */ +/** throw an error if the provided argument is not of the expected. */ const throwIfNotType = (arg, expectedType) => { if (typeof arg !== expectedType) { throw new Error( diff --git a/readme.md b/readme.md index 8afe3fb..fbae2a0 100644 --- a/readme.md +++ b/readme.md @@ -80,7 +80,7 @@ npm start ### Creating a production build -Minify JS, inline and minify CSS. +Minify JS, CSS and HTML. ``` npm run build diff --git a/src/assets/filters/md.js b/src/assets/filters/md.js deleted file mode 100644 index 75b6ffd..0000000 --- a/src/assets/filters/md.js +++ /dev/null @@ -1,28 +0,0 @@ -const md = require('markdown-it')(); - -/** - * Render content as inline markdown if single line, or full - * markdown if multiline - * @param {string} [content] - * @param {import('markdown-it').Options} [opts] - * @return {string|undefined} - */ -module.exports = (content, opts) => { - if (!content) { - return; - } - - if (opts) { - md.set(opts); - } - - let inline = !content.includes('\n'); - - // If there's quite a bit of content, we want to make sure - // it's marked up for readability purposes - if (inline && content.length > 200) { - inline = false; - } - - return inline ? md.renderInline(content) : md.render(content); -};