Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

站点总字数统计 #124

Closed
Lruihao opened this issue Apr 22, 2022 · 3 comments
Closed

站点总字数统计 #124

Lruihao opened this issue Apr 22, 2022 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@Lruihao
Copy link
Member

Lruihao commented Apr 22, 2022

站点总字数统计,累加单站点下所有文章字数

基本思路

{{- $localData:= newScratch -}}
{{- range (where .Site.Pages "Kind" "page" ) -}}
  {{- $localData.Add "totalWordCount" .WordCount -}}
{{- end -}}

参考

@Lruihao Lruihao added the enhancement New feature or request label Apr 22, 2022
@Lruihao Lruihao modified the milestone: v0.2.14 Apr 22, 2022
@Lruihao Lruihao self-assigned this Apr 28, 2022
@Lruihao Lruihao added this to the v0.2.14 milestone Apr 28, 2022
@Lruihao

This comment was marked as outdated.

@Lruihao Lruihao closed this as completed Apr 28, 2022
@Lruihao Lruihao reopened this May 1, 2022
@Lruihao Lruihao added bug Something isn't working help wanted Extra attention is needed and removed enhancement New feature or request labels May 1, 2022
@Lruihao
Copy link
Member Author

Lruihao commented May 2, 2022

🐛 可能因为 hugo 并发处理的问题?!,导致 Scratch 存储混乱,以至于 echarts、mapbox、mermaid、music、script、style、typeit shortcodes (用到 Scatch 储存数据的) 会失效。

在该问题彻底解决前,站点总字数统计 功能将不会开放!

若已知上述风险,并在可控范围,可手动修改 footer.html 模板:
https://github.com/Lruihao/FixIt/blob/v0.2.14/layouts/partials/footer.html#L57-L58

@Lruihao Lruihao removed this from the v0.2.14 milestone May 2, 2022
@Lruihao
Copy link
Member Author

Lruihao commented May 19, 2022

该功能,迁移至 section 页面

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Archived in project
Development

No branches or pull requests

1 participant