Use local version of alpineJS

This commit is contained in:
Tobias 2023-10-03 17:08:46 +02:00
parent fe9b687a08
commit 13ae0b04e1
Signed by: tobigr
GPG Key ID: 1081A7AAB3E37791
3 changed files with 22 additions and 3 deletions

View File

@ -231,4 +231,22 @@ privacy:
module: module:
hugoVersion: hugoVersion:
extended: true extended: true
min: "0.104.0" min: "0.104.0"
mounts:
- source: content
target: content
- source: static
target: static
- source: layouts
target: layouts
- source: data
target: data
- source: assets
target: assets
- source: node_modules
included_files: "*/alpinejs/dist/*"
target: assets
- source: i18n
target: i18n
- source: archetypes
target: archetypes

View File

@ -1,5 +1,6 @@
<!-- Footer section --> <!-- Footer section -->
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script> {{ $alpineJS := resources.Get "alpinejs/dist/cdn.min.js" | js.Build "js/alpinejs.min.js" }}
<script src="{{ $alpineJS.Permalink }}" defer></script>
{{ $js := resources.Get "js/darkmode.js" | js.Build }} {{ $js := resources.Get "js/darkmode.js" | js.Build }}
<script src="{{ $js.RelPermalink }}" defer></script> <script src="{{ $js.RelPermalink }}" defer></script>
<footer class="bg-gray-900"> <footer class="bg-gray-900">

View File

@ -5,7 +5,7 @@
"main": "index.js", "main": "index.js",
"devDependencies": { "devDependencies": {
"@tailwindcss/typography": "^0.5.10", "@tailwindcss/typography": "^0.5.10",
"alpinejs": "^3.13.0", "alpinejs": "^3.13.1",
"autoprefixer": "^10.4.16", "autoprefixer": "^10.4.16",
"concurrently": "^8.2.1", "concurrently": "^8.2.1",
"postcss": "^8.4.29", "postcss": "^8.4.29",