feat: 插件适配页面与系统完善(v0.1.0)

- 修复 /categories、/tags 因变量为 List 误用 .items 导致的 500
- 新增 layout.html 布局契约,消除插件页面 fallback 警告
- 适配 plugin-moments / plugin-photos / plugin-links(含友链申请表单与 RSS 订阅页)
- 适配 halo-weread-plugin(书架页)、留言板单页模板
- 适配 plugin-extra-api 的代码高亮与暗色样式
- 修复暗黑模式评论区不可见(补充 color-scheme 与兜底样式)
- 更新元数据:作者暖心向阳335、版本 0.1.0、requires >=2.26.0
This commit is contained in:
2026-09-28 16:50:09 +08:00
parent 2ed0c768a4
commit 8e6dccbd09
35 changed files with 3986 additions and 301 deletions
+39 -8
View File
@@ -1,14 +1,45 @@
<include src="layout.html">
<include src="partials/layout.html">
<template name="head">
<title th:text="|${category.spec.displayName} - ${site.title}|">Category Archive</title>
<title th:text="|${category.spec.displayName} - ${site.title}|">
Category
</title>
<th:block
th:with="seoTitle=${category.spec.displayName}, seoUrl=${site.url + category.status.permalink}, seoDesc=${category.spec.description}, seoImage=${category.spec.cover}, seoType='website'"
>
<include src="seo.html"></include>
</th:block>
</template>
<h1 th:text="|Category: ${category.spec.displayName}|"></h1>
<p th:if="${category.spec.description}" th:text="${category.spec.description}"></p>
<div class="container">
<!-- 分类标题 -->
<div class="category-header">
<h1 class="category-title" th:text="${category.spec.displayName}">
Category
</h1>
<p
class="category-description"
th:if="${not #strings.isEmpty(category.spec.description)}"
th:text="${category.spec.description}"
></p>
</div>
<ul class="post-list">
<include src="post-card.html"></include>
</ul>
<!-- 文章列表 -->
<div class="post-list" th:if="${not #lists.isEmpty(posts.items)}">
<th:block th:each="post : ${posts.items}">
<th:block
th:replace="~{modules/post-card :: post-card(post=${post})}"
></th:block>
</th:block>
</div>
<include src="pagination.html"></include>
<!-- 空状态 -->
<div class="no-results" th:if="${#lists.isEmpty(posts.items)}">
<p th:text="#{list.empty}">Nothing found here.</p>
</div>
<!-- 分页 -->
<th:block
th:replace="~{modules/pagination :: pagination(context = |${category.status.permalink}/|, prevUrl = ${posts.prevUrl}, nextUrl = ${posts.nextUrl}, totalPages = ${posts.totalPages}, page = ${posts.page}, hasPrevious = ${posts.hasPrevious()}, hasNext = ${posts.hasNext()})}"
></th:block>
</div>
</include>