https://github.com/vituum/vite-plugin-nunjucks
⚡️💡 Vite plugin for Nunjucks, transforms njk templates into HTML
https://github.com/vituum/vite-plugin-nunjucks
Last synced: 5 months ago
JSON representation
⚡️💡 Vite plugin for Nunjucks, transforms njk templates into HTML
- Host: GitHub
- URL: https://github.com/vituum/vite-plugin-nunjucks
- Owner: vituum
- License: mit
- Created: 2022-08-17T12:07:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-17T11:51:32.000Z (over 1 year ago)
- Last Synced: 2024-09-19T09:21:46.797Z (7 months ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 10
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-vite - @vituum/vite-plugin-nunjucks - Nunjucks template engine support, transforms `.njk` templates to `.html`. (Plugins / Framework-agnostic Plugins)
- awesome-vite - @vituum/vite-plugin-nunjucks - Nunjucks template engine support, transforms `.njk` templates to `.html`. (Plugins / Framework-agnostic Plugins)
README
# ⚡💡️ ViteNunjucks
```js
import nunjucks from '@vituum/vite-plugin-nunjucks'export default {
plugins: [
nunjucks()
],
build: {
rollupOptions: {
input: ['index.njk.html']
}
}}
```* Read the [docs](https://vituum.dev/plugins/nunjucks.html) to learn more about the plugin options.
* Use with [Vituum](https://vituum.dev) to get multi-page support.## Basic usage
or
```html{{ title }}
```
or
```html{
"template": "path/to/template.njk",
"title": "Hello world"
}
```### Requirements
- [Node.js LTS (16.x)](https://nodejs.org/en/download/)
- [Vite](https://vitejs.dev/)