
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
dgeni-front-matter
Advanced tools
Process YAML Front Matter blocks from Markdown files.
const packagePath = __dirname;
/* create dgeni application */
const pkg = new Package("my-package", [require("dgeni-front-matter")]);
/* configure dgeni to process all markdown files with frontmatter */
pkg.config(function (readFilesProcessor) {
readFilesProcessor.sourceFiles = [
{
include: "**/*.md",
basePath: ".",
fileReader: "frontMatterFileReader",
},
];
});
doc.docType
defaults to front-matter
but can be set by adding docType
front matter property.doctype.frontmatter
is always set to true
.All properties from front matter are assigned to doc
.
Given a markdown file such as:
---
foo: bar
---
lorem ipsum
The doc
object would be:
{
docType: 'front-matter',
frontMatter: true,
content: 'lorem ipsum',
foo: "bar"
}
Templates for rendering documents are searched as following:
${ doc.template }
${ doc.id }.${ doc.docType }.template.html
${ doc.id }.template.html
${ doc.docType }.template.html
FAQs
dgeni front-matter package
The npm package dgeni-front-matter receives a total of 597 weekly downloads. As such, dgeni-front-matter popularity was classified as not popular.
We found that dgeni-front-matter 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
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.