mirror of
https://github.com/halo-dev/docs.git
synced 2025-10-27 23:20:21 +00:00
docs: update documentation for Halo 2.1 (#162)
为 Halo 2.1 更新文档。 see https://github.com/halo-dev/halo/releases/tag/v2.1.0 /kind documentation ```release-note None ```
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: 站点统计
|
||||
description: 站点统计 - SiteStatsFinder
|
||||
---
|
||||
|
||||
## getStats()
|
||||
|
||||
```js
|
||||
siteStatsFinder.getStats()
|
||||
```
|
||||
|
||||
### 描述
|
||||
|
||||
获取站点的统计信息。
|
||||
|
||||
### 参数
|
||||
|
||||
无
|
||||
|
||||
### 返回值
|
||||
|
||||
[#SiteStatsVo](#sitestatsvo)
|
||||
|
||||
### 示例
|
||||
|
||||
```html
|
||||
<ul th:with="stats = ${siteStatsFinder.getStats()}">
|
||||
<li th:text="${stats.visit}"></li>
|
||||
<li th:text="${stats.post}"></li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
## 类型定义
|
||||
|
||||
### SiteStatsVo
|
||||
|
||||
```json title="SiteStatsVo"
|
||||
{
|
||||
"visit": 0, // 访问数量
|
||||
"upvote": 0, // 点赞数量
|
||||
"comment": 0, // 评论数量
|
||||
"post": 0, // 文章数量
|
||||
"category": 0 // 分类数量
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user