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: 3 months ago
JSON representation
⚡️🌱 Vite plugin for Twig, transforms twig templates into HTML
- Host: GitHub
- URL: https://github.com/vituum/vite-plugin-twig
- Owner: vituum
- License: mit
- Created: 2022-08-11T15:13:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-08T16:09:53.000Z (about 1 year ago)
- Last Synced: 2024-09-26T05:58:23.882Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 41 KB
- Stars: 17
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-vite - @vituum/vite-plugin-twig - Twig template engine support, transforms `.twig` templates to `.html`. (Plugins / Framework-agnostic Plugins)
- awesome-vite - @vituum/vite-plugin-twig - Twig template engine support, transforms `.twig` templates to `.html`. (Plugins / Framework-agnostic Plugins)
README
# ⚡️🌱 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/)