From 0553b07ac72e2a2b12d354c32443b70e40135248 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <17683872107czx> Date: Fri, 14 Jul 2023 13:52:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8B=E6=83=85=E9=93=BE=E6=8E=A5=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A8=A1=E7=89=88=EF=BC=8C=E6=94=AF=E6=8C=81=E5=8F=AF?= =?UTF-8?q?=E9=A2=84=E8=AE=BE=E6=96=87=E6=9C=AC=EF=BC=8C=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E4=B8=8D=E4=BC=9A=E5=87=BA=E7=8E=B0=E6=9C=AA?= =?UTF-8?q?=E7=9F=A5=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/modules/head.html | 6 +- templates/page_links.html | 186 ++++++++++++++++++++++++++++++++++++ theme.yaml | 4 + 3 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 templates/page_links.html diff --git a/templates/modules/head.html b/templates/modules/head.html index ef3c73a9..3a693e96 100644 --- a/templates/modules/head.html +++ b/templates/modules/head.html @@ -232,7 +232,7 @@ var GLOBAL_CONFIG = { // 页面类型 index,page,post,tag,category htmlType: [[${ htmlType }]], - postTitle: [[${ htmlType == 'post' ? post.spec.title : ''}]], + postTitle: [[${ htmlType == 'post' ? post.spec.title : htmlType == 'page' ? singlePage.spec.title : ''}]], isanchor: true, isPost: [[${htmlType == 'post'}]], isHome: [[${ htmlType == 'index'}]], @@ -295,6 +295,10 @@ if (GLOBAL_CONFIG.postTitle != '') title = GLOBAL_CONFIG.postTitle break; + case 'page': + if (GLOBAL_CONFIG.postTitle != '') + title = GLOBAL_CONFIG.postTitle + break; case 'archive': title = '归档' break; diff --git a/templates/page_links.html b/templates/page_links.html new file mode 100644 index 00000000..c5531b87 --- /dev/null +++ b/templates/page_links.html @@ -0,0 +1,186 @@ + + + + +
+ +
+
+ + + + +
+
+

🎣 钓鱼

+
+ +
+
+ + +
+ +
+ + + +

+ + [[${group.spec.displayName}]] ([[${group.links.size}]]) +

+ + + + + +
+
+ [[${link.spec.label}]] + + + + + +
+ +
+
+ + +
+
+
+ +
+ + + + + + +
+ + + + +
+ +
+ + +
+
+
+
+
评论
+ +
+ 你无需删除空行,直接评论以获取最佳展示效果 +
+
+ +
+ +
+
+ + +
+ +
+ + \ No newline at end of file diff --git a/theme.yaml b/theme.yaml index 8bd939eb..0fe1cd45 100644 --- a/theme.yaml +++ b/theme.yaml @@ -9,6 +9,10 @@ spec: website: https://liuzhihang.com customTemplates: page: + - name: 友情链接页面模版 + description: 支持可预设文本的友链 + screenshot: + file: page_links.html - name: 关于页面模版 description: 关于页面 screenshot: