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: 7 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 (about 3 years ago)
 - Default Branch: main
 - Last Pushed: 2023-12-08T16:09:53.000Z (almost 2 years ago)
 - Last Synced: 2025-04-15T18:03:40.593Z (7 months ago)
 - Language: JavaScript
 - Homepage:
 - Size: 41 KB
 - Stars: 18
 - 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/)