Files
docs/versioned_docs/version-2.0/developer-guide/theme/finder-apis/site-stats.md
Ryan Wang 36a4db6796 docs: refine the field descriptions of the theme VO (#133)
完善主题开发文档关于 VO 字段的描述。

/kind documentation

Fixes https://github.com/halo-dev/docs/issues/122

```release-note
None
```
2022-12-08 04:54:10 +00:00

779 B

title, description
title description
站点统计 站点统计 - SiteStatsFinder

getStats()

siteStatsFinder.getStats()

描述

获取站点的统计信息。

参数

返回值

#SiteStatsVo

示例

<ul th:with="stats = ${siteStatsFinder.getStats()}">
  <li th:text="${stats.visit}"></li>
  <li th:text="${stats.post}"></li>
</ul>

类型定义

SiteStatsVo

{
  "visit": 0,                                   // 访问数量
  "upvote": 0,                                  // 点赞数量
  "comment": 0,                                 // 评论数量
  "post": 0,                                    // 文章数量
  "category": 0                                 // 分类数量
}