From 6ff2cf4af79f472969b4182547424d2836a72eb8 Mon Sep 17 00:00:00 2001 From: Dave House Date: Mon, 15 Jan 2018 13:59:45 +0000 Subject: [PATCH] Add metalsmith tag-cleaner which removes

tags around images --- lib/metalsmith.js | 4 ++++ package.json | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/metalsmith.js b/lib/metalsmith.js index 0ac23e32e9..4097919a46 100644 --- a/lib/metalsmith.js +++ b/lib/metalsmith.js @@ -5,6 +5,7 @@ const inplace = require('metalsmith-in-place') // render templating syntax const layouts = require('metalsmith-layouts') // apply layouts to source files const markdown = require('metalsmith-markdown') // convert markdown files to html const metallic = require('metalsmith-metallic') // highlight code in markdown files +const tagcleaner = require('metalsmith-tagcleaner') // Use tag cleaner to remove

tags around images const permalinks = require('metalsmith-permalinks') // apply a permalink pattern to files const sass = require('metalsmith-sass') // convert Sass files to CSS using LibSass @@ -115,6 +116,9 @@ module.exports = metalsmith(__dirname) // __dirname defined by node.js: name of } })) + // Use tag cleaner to remove

tags around images + .use(tagcleaner()) + // apply a permalink pattern to files .use(permalinks()) diff --git a/package.json b/package.json index 738660e06b..353f20a20a 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "metalsmith-metallic": "^2.0.2", "metalsmith-permalinks": "^0.5.0", "metalsmith-sass": "^1.5.0", + "metalsmith-tagcleaner": "0.0.2", "nunjucks": "^3.0.1" } }