fix: 解决重构后自定义页面问题

1. 添加模板回退机制,当找不到指定模板时自动使用page.hbs通用模板
2. 支持在页面配置中通过template字段指定使用的模板文件
3. 更新配置文件和文档,添加template字段使用说明

Closes #10
This commit is contained in:
Zuoling Rong
2025-05-09 16:12:49 +08:00
parent fb32f06f19
commit 4a5f44bc71
7 changed files with 98 additions and 3 deletions

View File

@@ -1,5 +1,9 @@
title: 技术文章
subtitle: 分享我的技术文章和学习笔记
# 指定使用的模板文件名现有页面模板可见templates\pages
template: articles
categories:
- name: 最新文章
icon: fas fa-pen

View File

@@ -1,5 +1,9 @@
title: 我的书签
subtitle: 从浏览器导入的书签收藏
# 指定使用的模板文件名现有页面模板可见templates\pages
template: bookmarks
categories:
- name: 技术资源
icon: fas fa-folder

View File

@@ -1,5 +1,9 @@
title: 友情链接
subtitle: 优秀的博主和朋友们
# 指定使用的模板文件名现有页面模板可见templates\pages
template: friends
categories:
- name: 技术博主
icon: fas fa-user-friends

View File

@@ -1,3 +1,9 @@
title: 欢迎使用
subtitle: 个人导航站点
# 指定使用的模板文件名现有页面模板可见templates\pages
template: home
categories:
- name: 常用网站
icon: fas fa-star

View File

@@ -1,5 +1,9 @@
title: 我的项目
subtitle: 这里展示了我的一些个人项目和开源贡献
# 指定使用的模板文件名现有页面模板可见templates\pages
template: projects
categories:
- name: 个人项目
icon: fas fa-code