Skip to content

Commit

Permalink
feat: support instant page
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Mar 2, 2020
1 parent b9cea3b commit 6a9876b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config-examples/en-us/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,13 @@ uglyURLs = false
# Note: https://github.com/francoischalifour/medium-zoom


######################################
# Instant Page

enableInstantPage = true
# Note: https://github.com/instantpage/instant.page


######################################
# 404 Page

Expand Down
7 changes: 7 additions & 0 deletions config-examples/zh-cn/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,13 @@ uglyURLs = false
# 说明:https://github.com/francoischalifour/medium-zoom


######################################
# Instant Page

enableInstantPage = true
# 说明:https://github.com/instantpage/instant.page


######################################
# 404 页面

Expand Down
4 changes: 4 additions & 0 deletions layouts/partials/script.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
{{ partial "third-party/medium-zoom.html" . }}
{{ end }}

{{ if .Site.Params.enableInstantPage }}
{{ partial "third-party/instant-page.html" . }}
{{ end }}

{{ partial "third-party/service-worker.html" . }}

{{ partial "third-party/busuanzi.html" . }}
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/third-party/instant-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script src="https://cdn.jsdelivr.net/npm/instant.page@3.0.0/instantpage.min.js" type="module" defer></script>

0 comments on commit 6a9876b

Please sign in to comment.