Skip to content

Commit

Permalink
Use instant.page instead of instantclick via hugo modules
Browse files Browse the repository at this point in the history
  • Loading branch information
yochem committed Oct 28, 2024
1 parent 53ebc58 commit 2164c5d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.hugo_build.lock
/public/
/resources/_gen/
/vendor/
13 changes: 0 additions & 13 deletions assets/instantclick.min.js

This file was deleted.

5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/yochem/yochem.github.io

go 1.23.1

require github.com/gohugoio/hugo-mod-jslibs/instantpage v0.5.1 // indirect
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github.com/gohugoio/hugo-mod-jslibs/instantpage v0.5.1 h1:Aig+0MOPXiuQNZpnxOMS4uwUsnyq41JnQzGW4Gk3o7Y=
github.com/gohugoio/hugo-mod-jslibs/instantpage v0.5.1/go.mod h1:N4EUbbL7Cw4Yq+GHeK3MUSiOJQbzfuUFRyvBKvnVBR8=
github.com/instantpage/instant.page v5.1.0+incompatible/go.mod h1:GXVDktwI+K4T9o5mcK2NYDqPFxAUrB9U9goR9oG1SaI=
4 changes: 4 additions & 0 deletions hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ menus:
- name: Contact
pageRef: /contact
weight: 4

module:
imports:
- path: github.com/gohugoio/hugo-mod-jslibs/instantpage
6 changes: 2 additions & 4 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ <h1 lang="nl" translate="no">
{{- block "content" . -}}
{{- end -}}
</main>

<footer>
<hr>
<nav>
Expand All @@ -45,9 +46,6 @@ <h1 lang="nl" translate="no">
</nav>
</footer>

{{ with resources.Get "instantclick.min.js" }}
<script src="{{ .RelPermalink }}" data-no-instant></script>
<script data-no-instant>InstantClick.init();</script>
{{ end }}
{{ partialCached "jslibs/instantpage/script-src.html" "-" }}
</body>
</html>

0 comments on commit 2164c5d

Please sign in to comment.