
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@weh/markdown
Advanced tools
files arraynpm install --save @weh/markdown
const weh = require('@weh/weh')
const markdown = require('@weh/markdown')
// enter our main function:
// the main function should be an async function so that
// it automatically returns a promise
weh(async site => {
// we register our plugin...
site.use(markdown)
// ...and initiate the build process
return site
})
You can pass a custom filter as an option to markdown to include or exclude files.
A filter is a function that takes the arguments file, options, and files. file is the current file, options is the options object passed to markdown, and files is the entire array of files created by weh.
If the filter function returns true, markdown applies its transforms to the contents of the current file object. Otherwise the file object remains unchanged.
The default filter in markdown returns true only for files ending with .md:
function myCustomFilter (file, options, files) {
return file.path.endsWith('.md')
}
This is how you could use a filter to apply markdown to every file:
const weh = require('@weh/weh')
const markdown = require('@weh/markdown')
// custom filter function
// always returns true
function myCustomFilter (file, options, files) {
return true
}
weh(async site => {
// we register the markdown plugin with our custom filter function...
site.use(markdown, {filter: myCustomFilter})
// ...and initiate the build process
return site
})
All processed files are renamed to <filename>.html after being converted.
MIT (see LICENSE document)
FAQs
đź”» Markdown parsing plugin for the weh static site generator
We found that @weh/markdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.