
足迹 是一个专为 Halo 2.0 博客平台开发的足迹插件。它能够帮助博主记录和展示自己的旅行足迹,让读者能够直观地了解博主去过的地方和相关故事。
足迹https://www.lik.cc/docs/halo-plugins
目前此插件为主题端提供了 /footprint 路由,模板为 footprint.html,也提供了 Finder API,可以将足迹列表渲染到任何地方。
路由信息
可在配置文件中进行更多自定义设置,包括:
<div>
<div th:each="footprint : ${footprints.items}" th:with="spec = ${footprint.spec}">
<a th:href="${spec.postLink}" target="_blank" th:text="${spec.title}"></a>
<div>
<img th:src="${spec.logo}" alt="avatar">
<a th:href="${spec.authorUrl}" target="_blank">
<span th:text="${spec.author}"></span>
</a>
</div>
</div>
<div th:if="${footprints.hasPrevious() || footprints.hasNext()}">
<a th:href="@{${footprints.prevUrl}}">
<span>上一页</span>
</a>
<span th:text="${footprints.page}"></span>
<a th:href="@{${footprints.nextUrl}}">
<span>下一页</span>
</a>
</div>
</div>获取全部订阅文章内容。
无
List<FootprintVo>
<div>
<div th:each="footprint : ${footprintFinder.listAll()}" th:with="spec = ${footprint.spec}">
<a th:href="${spec.postLink}" target="_blank" th:text="${spec.title}"></a>
<div >
<img th:src="${spec.logo}" alt="avatar">
<a th:href="${spec.authorUrl}" target="_blank">
<span th:text="${spec.author}"></span>
</a>
</div>
</div>
</div>根据分页参数获取订阅文章内容。
<th:block th:with="footprints = ${footprintFinder.list(1, 10)}">
<div>
<div th:each="footprint : ${footprints.items}" th:with="spec = ${footprint.spec}">
<a th:href="${spec.postLink}" target="_blank" th:text="${spec.title}"></a>
<div >
<img th:src="${spec.logo}" alt="avatar">
<a th:href="${spec.authorUrl}" target="_blank">
<span th:text="${spec.author}"></span>
</a>
</div>
</div>
</div>
<div>
<span th:text="${footprints.page}"></span>
</div>
</th:block>{
"metadata": {
"name": "string", // 唯一标识
"generateName": "string",
"version": 0,
"creationTimestamp": "2024-01-16T16:13:17.925131783Z", // 创建时间
},
"apiVersion": "footprint.lik.cc/v1alpha1",
"kind": "Footprint",
"spec": {
{
"name": "string", // 足迹名称
"description": "string", // 足迹描述
"longitude": "double", // 经度
"latitude": "double", // 纬度
"address": "string", // 地址
"footprintType": "string", // 足迹类型
"image": "string", // 足迹图片URL
"article": "string", // 管理文章URL
"createTime": "instant" // 创建时间
}
}
}{
"page": 0, // 当前页码
"size": 0, // 每页条数
"total": 0, // 总条数
"items": "List<#FootprintVo>", // 列表数据
"first": true, // 是否为第一页
"last": true, // 是否为最后一页
"hasNext": true, // 是否有下一页
"hasPrevious": true, // 是否有上一页
"totalPages": 0 // 总页数
}{
"page": 0, // 当前页码
"size": 0, // 每页条数
"total": 0, // 总条数
"items": "List<#FootprintVo>", // 列表数据
"first": true, // 是否为第一页
"last": true, // 是否为最后一页
"hasNext": true, // 是否有下一页
"hasPrevious": true, // 是否有上一页
"totalPages": 0, // 总页数
"prevUrl": "string", // 上一页链接
"nextUrl": "string" // 下一页链接
}# 克隆项目
git clone https://github.com/your-repo/halo-plugin-footprint.git
# 进入项目目录
cd halo-plugin-footprint
# 安装依赖
./gradlew build
# 打包
./gradlew clean build如果您在使用过程中遇到任何问题,或有任何建议,欢迎通过以下方式反馈:
我们非常欢迎各种形式的贡献,包括但不限于:
在提交贡献之前,请先阅读我们的贡献指南。
本项目采用 GPL-3.0 License 开源协议。
感谢所有贡献者对本项目的支持!
样式设计参考:困困鱼 & Thyuu