@visual-framework/vf-eleventy--extensions

1.0.0-alpha.11 • Public • Published

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.

  1. a project based off vf-eleventy

  2. yarn add @visual-framework/vf-eleventy--extensions

  3. in eleventy.js you should have:

const vfEleventyExtension = require("@visual-framework/vf-eleventy--extensions");
config.addPlugin(vfEleventyExtension);
  1. in gulpfile.js you should have:
global.vfDocsPath = __dirname + '/node_modules/\@visual-framework/vf-eleventy--extensions/fractal/docs';

Package Sidebar

Install

npm i @visual-framework/vf-eleventy--extensions

Weekly Downloads

0

Version

1.0.0-alpha.11

License

MIT

Unpacked Size

23.7 kB

Total Files

17

Last publish

Collaborators

  • bhushan-ebi
  • pacope92
  • ebiwebdev
  • sandykadam
  • khawkins98