
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
transform-yaml-markdown
Advanced tools
transform a folder of markdown files with yaml frontmatter to html
transform a folder of markdown files with yaml frontmatter to html
npm i transform-yaml-markdown
transform-yaml-markdown <source> <destination> [render] [postRender]
The render and postRender functions should be exported as common.js functions.
render gets a data object passed with the meta data and raw markdown from the current file, a collection of all other files in the current directory and a collection of all files. It should return a Promise that fulfills with the rendered HTML.
example: render.js
module.exports = function(currentFile, filesInCurrentFolder, allFiles) {
return Promise.resolve(
'<code>'
+JSON.stringify(currentFile, null, 2)+' of '+allFiles.length
+'\n'
+JSON.stringify(filesInCurrentFolder, null, 2)
+'</code>'
);
};
postRender receives a collection of rendered files including a renderedPath property and should also return a Promise that fulfills whenever your post render hook is done.
example: post-render.js
module.exports = function postRender(renderedFiles) {
console.log('number of rendered files: %i', renderedFiles.length);
return Promise.resolve(renderedFiles);
};
By default the command tries to load render.js and post-render.js from the current working directory if not specified.
The MIT License (MIT) Maximilian Hoffmann
FAQs
transform a folder of markdown files with yaml frontmatter to html
We found that transform-yaml-markdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.