Skip to content

Commit

Permalink
Speedup using instantclick.io
Browse files Browse the repository at this point in the history
Inspired by mcmaster-carr.com
  • Loading branch information
yochem committed Oct 22, 2024
1 parent 04aed5e commit 53ebc58
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
13 changes: 13 additions & 0 deletions assets/instantclick.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,10 @@
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}

{{- if .Params.noindex -}}
<meta name="robots" content="noindex" />
{{- end -}}
{{ if .Params.noindex }}<meta name="robots" content="noindex">{{ end }}

{{ with resources.Get "style.css" }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{ end }}
{{ with resources.Get "favicon.ico" }}
<link rel="icon" href="{{ .RelPermalink }}">
{{ end }}
{{ with resources.Get "style.css" }}<link rel="stylesheet" href="{{ .RelPermalink }}">{{ end }}
{{ with resources.Get "favicon.ico" }}<link rel="icon" href="{{ .RelPermalink }}">{{ end }}
</head>

<body>
Expand All @@ -50,5 +44,10 @@ <h1 lang="nl" translate="no">
{{- end }}
</nav>
</footer>

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

0 comments on commit 53ebc58

Please sign in to comment.