vituum / vite-plugin-nunjucks

⚡️💡 Vite plugin for Nunjucks, transforms njk templates into HTML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm package node compatility

⚡💡️ ViteNunjucks

import nunjucks from '@vituum/vite-plugin-nunjucks'

export default {
    plugins: [
        nunjucks()
    ],
    build: {
        rollupOptions: {
            input: ['index.njk.html']
        }
    }

}
  • Read the docs to learn more about the plugin options.
  • Use with Vituum to get multi-page support.

Basic usage

or

<!-- index.njk with index.njk.json -->
{{ title }}

or

<!-- index.json  -->
{
  "template": "path/to/template.njk",
  "title": "Hello world"
}

Requirements

About

⚡️💡 Vite plugin for Nunjucks, transforms njk templates into HTML

License:MIT License


Languages

Language:JavaScript 100.0%