Become a backer or sponsor to support our work.
A super lightweight (less then 50 lines code) snackbar module for Hugo, used to show short messages to clients, such as results of actions.
Module | github.com/hugomods/snackbar |
---|---|
Stats |
hugo.yaml
1module:
2 imports:
3 - path: github.com/hugomods/snackbar
hugo.toml
1[module]
2 [[module.imports]]
3 path = 'github.com/hugomods/snackbar'
hugo.json
1{
2 "module": {
3 "imports": [
4 {
5 "path": "github.com/hugomods/snackbar"
6 }
7 ]
8 }
9}
1@import "mods/snackbar/scss/index";
The path is relative to assets
folder.
1import snackbar from 'mods/snackbar/js/index.ts';
2
3snackbar.add('Greeting from snackbar');