Skip to content

Commit

Permalink
docs: update issue 349
Browse files Browse the repository at this point in the history
  • Loading branch information
toFrankie committed Aug 16, 2024
1 parent 0c6eb2e commit ca30e2d
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions archives/2024/349.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 使用 GitHub 作为博客之后,可以利用 GitHub Actions 做哪些
number: '#349'
link: 'https://github.com/toFrankie/blog/issues/349'
created_at: '2024-08-12 23:47:51'
updated_at: '2024-08-16 20:48:56'
updated_at: '2024-08-17 00:28:35'
labels:
- '2024'
- 生活随笔
Expand Down Expand Up @@ -42,8 +42,24 @@ labels:

也可以自定义 GitHub Workflow,在 issue 被创建、被编辑,或定时任务,将 Issue 内容保存到仓库内。

> 如果你用 [Github Blogger](https://github.com/toFrankie/github-blogger) 来管理文章,可以省略第一条,因为每一次内容变更它都会提交到仓库,存放于 archives 目录。
> 如果你用 [Github Blogger](https://github.com/toFrankie/github-blogger) 来管理文章,可以省略第一个,因为每一次内容变更它都会提交到仓库,存放于 archives 目录。
## 仓库访问数据

在仓库 Insights - Traffic 处可以看到近两周的一些数据。

> 具有仓库推送权限的任何人都可以查看其流量,包括完整克隆(不是提取)、过去 14 天的访问者、推荐站点以及流量图中的热门内容。
由于只能看到最近 14 天的数据,如果要统计总访问量,可以创建一个定时任务的 Workflow 将数据保存到仓库内。

如果要将访问量展示在 README 里,可以将上述数据统计的数据,生成一个 SVG 图片,然后 README.md 中引用该图片文件即可。

> 可参考[这里](https://github.com/toFrankie/blog/tree/main/scripts)
> 我还看到另一个方案 [Hints](https://github.com/88250/hits),当你在 README.md 引入他的图片之后,每访问 README 一次,也就是 Get 一次图片,那么访问量 +1,原理应该跟埋点差不多。缺点也明显,只有访问 README 才会被统计,访问 issue 等流量无法统计。
## 文章统计



未完待续...

0 comments on commit ca30e2d

Please sign in to comment.