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
+23 -17
View File
@@ -1,22 +1,28 @@
<include src="layout.html">
<include src="partials/layout.html">
<template name="head">
<title th:text="|Categories - ${site.title}|">Categories</title>
<title th:text="|#{categories.title} - ${site.title}|">Categories</title>
<th:block
th:with="seoTitle=#{categories.title}, seoUrl=${site.url + site.routes.categoriesUri}, seoDesc=null, seoImage=${site.logo}, seoType='website'"
>
<include src="seo.html"></include>
</th:block>
</template>
<h1>Categories</h1>
<ul class="category-list">
<li th:each="cat : ${categories.items}">
<a
th:href="@{${cat.status.permalink}}"
th:text="|${cat.spec.displayName} (${cat.postCount})|"
class="category"
></a>
</li>
</ul>
<div class="container">
<div class="category-header">
<h1 class="category-title" th:text="#{categories.title}">
Categories
</h1>
</div>
<nav class="pagination" th:if="${categories.hasPrevious() || categories.hasNext()}">
<a th:if="${categories.hasPrevious()}" th:href="@{${categories.prevUrl}}">Previous</a>
<span th:text="|${categories.page} / ${categories.totalPages}|"></span>
<a th:if="${categories.hasNext()}" th:href="@{${categories.nextUrl}}">Next</a>
</nav>
<div class="category-list" th:if="${not #lists.isEmpty(categories)}">
<th:block
th:replace="~{modules/category-tree :: category-tree(cats=${categories})}"
></th:block>
</div>
<div class="no-results" th:if="${#lists.isEmpty(categories)}">
<p th:text="#{list.empty}">Nothing found here.</p>
</div>
</div>
</include>