diff --git a/web/_data/build.js b/web/_data/build.js new file mode 100644 index 0000000..a98747f --- /dev/null +++ b/web/_data/build.js @@ -0,0 +1,3 @@ +/* 构建期资产版本号:每次 build 变化,模板里作 ?v= 后缀破浏览器缓存, + 避免旧版 JS/CSS(同 URL)被缓存后在新版页面上执行。 */ +module.exports = { rev: Date.now().toString(36) }; diff --git a/web/_includes/base.njk b/web/_includes/base.njk index 22fba22..e72d1f8 100644 --- a/web/_includes/base.njk +++ b/web/_includes/base.njk @@ -8,10 +8,12 @@ {% if description %}{% endif %} {# 真相源:tokens.css = App 原型 tokens.css 主题A 拷贝;site.css 镜像 atoms.css。 全站零外链(无 Google Fonts / unpkg):字体走系统栈(与 App 真机一致),图标走内联雪碧图。 #} - - + + {% if pageExtraCss %}{% endif %} +{# auth.js 放 head 同步加载:页面内联脚本(checkout/登录态判断)在 body 中就要用 jiuAuth #} + {% if pageStyle %}{% endif %}
@@ -22,6 +24,6 @@ {% include "footer.njk" %} - +