Skip to content

Commit

Permalink
add giscus
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Mar 31, 2024
1 parent ae3fc2d commit 973a274
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 35 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "themes/hugo-xmin"]
path = themes/hugo-xmin
url = https://github.com/jiacai2050/hugo-xmin.git
14 changes: 13 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ baseURL = 'https://ziglang.cc'
languageCode = 'en'
defaultContentLanguage = 'zh-cn'
title = 'Zig 语言中文社区'
theme = "hugo-xmin"

[[menu.main]]
name = "主页"
weight = 10
url = "/"
[[menu.main]]
name = "日报"
weight = 11
url = "https://github.com/zigcc/forum/issues"
[[menu.main]]
name = "月刊"
weight = 20
Expand Down Expand Up @@ -41,6 +44,15 @@ theme = "hugo-xmin"
description = ""
dateFormat = "Jan 2, 2006"
gitRepo = "https://github.com/zigcc/zigcc.github.io"
[params.giscus]
repo = "zigcc/zigcc.github.io"
repoId = "R_kgDOHr7nSg"
category = "Announcements"
categoryId = "DIC_kwDOHr7nSs4CQUsK"

[module]
[[module.imports]]
path = "github.com/jiacai2050/hugo-xmin"

[frontmatter]
date = [":filename", ":default", ":fileModTime"]
Expand Down
23 changes: 11 additions & 12 deletions content/_index.org
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
#+TITLE: Zig 语言中文社区
#+DATE: 2022-07-20T12:42:38+0800
#+LASTMOD: 2024-03-30T10:19:55+0800
#+LASTMOD: 2024-03-31T08:25:20+0800

{{< figure src="https://ziglang.cc/logo/zigcc-logo-2.svg" height="300px" >}}

[[https://ziglang.org/][Zig]] 语言中文社区,致力于分享、传播 Zig 语言在中文用户内的使用。
#+begin_quote
[[https://ziglang.org/][Zig]] 语言中文社区(Zig Chinese Community,简称:ZigCC),致力于分享、传播 Zig 语言在中文用户内的使用。

[[/post/2023/09/05/hello-world/][欢迎 Zig 爱好者向本网站供稿]]
#+end_quote


#+BEGIN_EXPORT html
<a href="https://discord.gg/UraRxD6WXD">
<img src="https://img.shields.io/discord/1155469703846834187?label=Chat at Discord" />
</a>
<a href="/index.xml">
<img src="https://img.shields.io/badge/rss-F88900.svg?style=flat&logo=rss&logoColor=white" />
<img src="https://img.shields.io/badge/rss-F88900.svg?style=flat&logo=RSS&logoColor=white&label=网站" />
</a>
<a href="https://ask.ziglang.cc/atom.xml">
<img src="https://img.shields.io/badge/rss-F88900.svg?style=flat&logo=RSS&logoColor=white&label=论坛" />
</a>
#+END_EXPORT

Expand All @@ -29,18 +37,9 @@
- [[https://ziglang.cc/zig-cookbook/][Zig Cookbook]] :: A collection of simple Zig programs that demonstrate good practices to accomplish common programming tasks
- [[https://github.com/zigcc/zig-idioms][zigcc/zig-idioms]] :: Common idioms used in Zig
- [[https://github.com/zigcc/awesome-zig][zigcc/awesome-zig]] :: A collection of some awesome public Zig programming language projects.
* RSS 订阅
- [[https://ask.ziglang.cc/atom.xml][论坛]]
- [[file:monthly/index.xml][月刊]]
* 月刊
社区内的最新进展,信息来源:[[https://zig.news/top/month][Zig NEWS]]、[[https://zigmonthly.org/][Zig monthly]]、[[https://lobste.rs/t/zig][Lobsters]]、[[https://www.reddit.com/r/Zig/][Reddit]]、[[https://discu.eu/weekly/zig/][Zig weekly newsletter]]、[[https://ziggit.dev/][Ziggit]]、[[https://github.com/zigcc/forum/discussions/new?labels=%E6%9C%88%E5%88%8A&category=general][用户推荐]]

* 更新日志
- 2024-03-29 :: 使用自定义域名 ziglang.cc
- 2022-12-10 :: 切换主题 [[https://github.com/zwbetz-gh/cupper-hugo-theme][cupper-hugo]] --> [[https://github.com/yihui/hugo-xmin][hugo-xmin]]
- 2022-07-20 :: 首次上线

* 社区供稿
参见:[[https://ziglang.cc/post/2023/09/05/hello-world/]]

* 文章列表
3 changes: 0 additions & 3 deletions content/monthly/_index.md

This file was deleted.

7 changes: 7 additions & 0 deletions content/monthly/_index.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#+TITLE: 月刊
#+DATE: 2024-03-31T07:54:47+0800
#+LASTMOD: 2024-03-31T07:55:34+0800
#+AUTHOR: Jiacai Liu

社区内的最新进展,信息来源:[[https://zig.news/top/month][Zig NEWS]]、[[https://zigmonthly.org/][Zig monthly]]、[[https://lobste.rs/t/zig][Lobsters]]、[[https://www.reddit.com/r/Zig/][Reddit]]、[[https://discu.eu/weekly/zig/][Zig weekly newsletter]]、[[https://ziggit.dev/][Ziggit]]、[[https://github.com/zigcc/forum/discussions/new?labels=%E6%9C%88%E5%88%8A&category=general][用户推荐]]
* 文章列表
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module zigcc

go 1.22.0

require github.com/jiacai2050/hugo-xmin v0.0.0-20240331002158-babdf0d1d9b1 // indirect
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/jiacai2050/hugo-xmin v0.0.0-20240331002158-babdf0d1d9b1 h1:lJWRfn1mAZmc5H7E1cugTYVW5FmJVmzkNrVAt3u2pns=
github.com/jiacai2050/hugo-xmin v0.0.0-20240331002158-babdf0d1d9b1/go.mod h1:jk1RPrG0skT7WfLL98t2ocbOh1LCETPVHiKEKJO/Kso=
43 changes: 31 additions & 12 deletions layouts/partials/content_footer.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
<h1>
建议/反馈✉️
</h1>
<ol>
<li>关注<a href="https://github.com/zigcc/.github/raw/main/zig_mp.png">微信公众号</a>,加微信群与更多人一起畅聊 Zig
</li>
<li>
发现内容错误或链接失效?欢迎<a href="{{ .Site.Params.gitRepo }}/blob/main/content/{{ .File.Path }}">提交 PR</a>
</li>
<li>想要分享 Zig 使用经验,欢迎给我们<a href="/post/2023/09/05/hello-world/">供稿</a>
</li>
</ol>

<h1>
建议/反馈✉️
</h1>
<ol>
<li>关注<a href="https://github.com/zigcc/.github/raw/main/zig_mp.png">微信公众号</a>,加微信群与更多人一起畅聊 Zig
</li>
<li>
发现内容错误或链接失效?欢迎<a href="{{ .Site.Params.gitRepo }}/blob/main/content/{{ .File.Path }}">提交 PR</a>
</li>
<li>想要分享 Zig 使用经验,欢迎给我们<a href="/post/2023/09/05/hello-world/">供稿</a>
</li>
</ol>
{{- if .Site.Params.giscus.repo }}
<script src="https://giscus.app/client.js"
data-repo="{{ .Site.Params.giscus.repo}}"
data-repo-id="{{ .Site.Params.giscus.repoId}}"
data-category="{{ .Site.Params.giscus.category}}"
data-category-id="{{ .Site.Params.giscus.categoryId}}"
data-mapping="pathname"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="top"
data-theme="preferred_color_scheme"
data-lang="zh-CN"
data-loading="lazy"
crossorigin="anonymous"
async>
</script>
<noscript>Please enable JavaScript to view the <a href="https://github.com/giscus/giscus">comments powered by giscus.</a></noscript>
{{- end }}
4 changes: 1 addition & 3 deletions layouts/partials/foot_custom.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<hr/>
<p>
&copy; <a href="/">ZigCC</a> 2022 – {{ now.Year }}
| <a href="https://github.com/zigcc/zigcc.github.io">GitHub</a>
| <a rel="me" href="https://mastodon.social/@liujiacai">Mastodon</a>
| <a href="/index.xml">RSS</a>
| <a href="https://discord.gg/UraRxD6WXD">Discord</a>
| <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/">BY-NC-ND 4.0</a>
</p>
<script>
Expand Down
1 change: 0 additions & 1 deletion themes/hugo-xmin
Submodule hugo-xmin deleted from b499e0

0 comments on commit 973a274

Please sign in to comment.