From 6a9876b67fd9306471c98ee9195e269da9788eb9 Mon Sep 17 00:00:00 2001 From: reuixiy Date: Mon, 2 Mar 2020 15:58:16 +0800 Subject: [PATCH] feat: support instant page --- config-examples/en-us/config.toml | 7 +++++++ config-examples/zh-cn/config.toml | 7 +++++++ layouts/partials/script.html | 4 ++++ layouts/partials/third-party/instant-page.html | 1 + 4 files changed, 19 insertions(+) create mode 100644 layouts/partials/third-party/instant-page.html diff --git a/config-examples/en-us/config.toml b/config-examples/en-us/config.toml index 14b2b892..34007c04 100644 --- a/config-examples/en-us/config.toml +++ b/config-examples/en-us/config.toml @@ -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 diff --git a/config-examples/zh-cn/config.toml b/config-examples/zh-cn/config.toml index 39403e65..df674405 100644 --- a/config-examples/zh-cn/config.toml +++ b/config-examples/zh-cn/config.toml @@ -1209,6 +1209,13 @@ uglyURLs = false # 说明:https://github.com/francoischalifour/medium-zoom + ###################################### + # Instant Page + + enableInstantPage = true + # 说明:https://github.com/instantpage/instant.page + + ###################################### # 404 页面 diff --git a/layouts/partials/script.html b/layouts/partials/script.html index 801822e8..6d50b60b 100644 --- a/layouts/partials/script.html +++ b/layouts/partials/script.html @@ -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" . }} diff --git a/layouts/partials/third-party/instant-page.html b/layouts/partials/third-party/instant-page.html new file mode 100644 index 00000000..08e8a94c --- /dev/null +++ b/layouts/partials/third-party/instant-page.html @@ -0,0 +1 @@ +