Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/vituum/vite-plugin-twig

⚡️🌱 Vite plugin for Twig, transforms twig templates into HTML
https://github.com/vituum/vite-plugin-twig

Last synced: about 1 month ago
JSON representation

⚡️🌱 Vite plugin for Twig, transforms twig templates into HTML

Lists

README

        

npm package
node compatility

# ⚡️🌱 ViteTwig

```js
import twig from '@vituum/vite-plugin-twig'

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

* Read the [docs](https://vituum.dev/plugins/twig.html) to learn more about the plugin options.
* Use with [Vituum](https://vituum.dev) to get multi-page support.

## Basic usage

```html

{{ title }}
```
or
```html

{
"template": "path/to/template.twig",
"title": "Hello world"
}
```

### Requirements

- [Node.js LTS (16.x)](https://nodejs.org/en/download/)
- [Vite](https://vitejs.dev/)