diff options
| author | Reorx <novoreorx@gmail.com> | 2022-04-10 23:40:31 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-04-10 23:40:35 +0800 |
| commit | ef802995804ee7f7a18cc716cc689b141236daaa (patch) | |
| tree | 918293f20c245f10050246a2e609bb965db6c03b /layouts | |
| parent | 7dc044f2ba55a7f1eed37ebc6446f46b71f57ea0 (diff) | |
add EnableInstantPage param
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/partials/head.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b921452..ecce55c 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -151,3 +151,11 @@ {{- template "partials/templates/twitter_cards.html" . }} {{- template "partials/templates/schema_json.html" . }} {{- end -}} + +{{- /* InstantPage.js */}} +{{- if (.Param "EnableInstantPage") }} +{{- $instantpage := slice (resources.Get "js/instantpage.js") | resources.Concat "assets/js/instantpage.js" | minify }} +<script defer crossorigin="anonymous" src="{{ $instantpage.RelPermalink }}" type="module" + {{- if site.Params.assets.disableFingerprinting }}integrity="{{ $instantpage.Data.Integrity }}"{{- end }} +></script> +{{- end }} |
