blob: 4560b1f0dc445ae88ac17e53516d755ffe65ac6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
For AlpineJS >= v3, see https://github.com/gohugoio/hugo-mod-jslibs-dist/tree/main/alpinejs
## Description
This module wraps [AlpineJS](https://github.com/alpinejs/alpine).
This module also packages [Alpine Turbolinks Adapter](https://github.com/SimoTod/alpine-turbolinks-adapter) by [@SimoTod](https://github.com/SimoTod).
## Installation
First, add the module import to your site or theme component's configuration's module section:
```toml
[module]
[[imports]]
path = "github.com/gohugoio/hugo-mod-jslibs/alpinejs"
```
Then add the script source in the head section of your template (typically in the `baseof.html`):
```html
<head>
{{ partialCached "jslibs/alpinejs/script-src.html" "-" }}
</head>
```
Note, if used with Turbolinks, the order matters:
```html
{{ partialCached "jslibs/alpinejs/script-src.html" "-" }}
{{ partialCached "jslibs/turbolinks/script-src.html" "-" }}
```
|