vf-eleventy--extensions
This project supports vf-eleventy
-based
projects with reusable componentised code, modules and config.
What's here and what it does
-
index.js
: the main Eleventy plugin
Config
-
config/vfEleventyCommonConfig.js
: Reusable config for sane defaults and to load the below tags and filters
Nunjucks tags
in ./tags/
-
codeblock.js
: outputs highlight code markup -
markdwon_tag.js
: process a text area as markdown -
render.js
: port-fork-enhancement of the Fractal render extension for Nunjucks for 11ty and the VF -
spaceless.js
: trim unneeded whitespace
Nunjucks filters
in ./filters/
-
markdown.js
: process a string as markdown -
section.js
: split the content into excerpt and remainder -
path.js
: catch references to the "path" filter which is not part of 11ty and results in obtuse error codes
Assorted utilities
In ./utils/
-
vf-build-search-index.gulpfile.js
: scans compiled html to make a JS object search index
Usage
Note: Projects utilising vf-eleventy
make use of this package by defualt.
-
a project based off
vf-eleventy
-
yarn add @visual-framework/vf-eleventy--extensions
-
in
eleventy.js
you should have:
const vfEleventyExtension = require("@visual-framework/vf-eleventy--extensions");
config.addPlugin(vfEleventyExtension);
- in
gulpfile.js
you should have:
global.vfDocsPath = __dirname + '/node_modules/\@visual-framework/vf-eleventy--extensions/fractal/docs';