From d6821ab71b7de05f2b5b1b4039c4c8ecb3011c05 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Mon, 8 Apr 2024 15:16:37 +0800 Subject: [PATCH] extract help scripts --- _includes/head.html | 1 - _layouts/help.html | 17 ++----- _layouts/helpz.html | 3 -- _src/entrypoints/help.js | 86 +++++++++++++++++++++++++++++++ _src/entrypoints/helpz.js | 103 ++++++++++++++++++++++++++++++++++++++ _src/lib/mirrorid.js | 1 + package.json | 3 ++ 7 files changed, 198 insertions(+), 16 deletions(-) create mode 100644 _src/entrypoints/help.js create mode 100644 _src/entrypoints/helpz.js create mode 100644 _src/lib/mirrorid.js diff --git a/_includes/head.html b/_includes/head.html index ec8b47e..a27a560 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -36,7 +36,6 @@ {% endunless %} - {% if page.legacy %} diff --git a/_layouts/help.html b/_layouts/help.html index 3e4122b..acef950 100644 --- a/_layouts/help.html +++ b/_layouts/help.html @@ -13,15 +13,6 @@ {% endif %} - - - {% assign help_pages = site.categories["help"] | sort: 'mirrorid' %}
@@ -56,9 +47,11 @@ {% include footer.html %} - - - + +{% capture entry %}{% if page.layout == "helpz" %}helpz{% else %}help{% endif %}{% endcapture %} +{% include vite_script.html entry=entry %}