Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metalsmith tag-cleaner which removes <p> tags around images from markdown #132

Merged
merged 1 commit into from
Jan 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/metalsmith.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <p> 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

Expand Down Expand Up @@ -115,6 +116,9 @@ module.exports = metalsmith(__dirname) // __dirname defined by node.js: name of
}
}))

// Use tag cleaner to remove <p> tags around images
.use(tagcleaner())

// apply a permalink pattern to files
.use(permalinks())

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}