Skip to content

Commit

Permalink
Add quicklink - Instant next-page navigations (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityatelange committed Apr 28, 2023
2 parents 4b83496 + dc70787 commit fc126f1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@
<link crossorigin="anonymous" rel="preload" as="fetch" href='{{ absURL "index.json" }}'>
<script defer src="{{ $searchcombo.Permalink }}" rel="preload" as="script"></script>
{{- end }}

{{- $quicklink := (slice (resources.GetRemote
"https://cdnjs.cloudflare.com/ajax/libs/quicklink/2.3.0/quicklink.umd.js")) |
resources.Concat "assets/quicklink.js" }}
<script crossorigin="anonymous" src="{{ $quicklink.RelPermalink }}" rel="preload" as="script"></script>
<script>
window.addEventListener('load', () => {
quicklink.listen();
});
</script>

0 comments on commit fc126f1

Please sign in to comment.