Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

⚡️💡 Vite plugin for Handlebars, transforms hbs templates into HTML
https://github.com/vituum/vite-plugin-handlebars

Last synced: about 2 months ago
JSON representation

⚡️💡 Vite plugin for Handlebars, transforms hbs templates into HTML

Awesome Lists containing this project

README

        

npm package
node compatility

# ⚡️💡 ViteHandlebars

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

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

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

## Basic usage

```html

{{> "path/to/template.hbs"}}
```
or
```html

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

### Requirements

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