Skip to content

Commit 85d74d5

Browse files
xihalejiacai2050
andauthored
refactored by zine (#54)
* Remove obsolete files and configurations, including .gitignore, .gitmodules, and various content files related to Zig documentation and examples. This cleanup enhances project maintainability by eliminating unused resources. * Refactor markdown to SMD conversion script and update configurations. Changed source directory and author details, improved frontmatter handling, and enhanced error logging. Removed outdated posts and images, and added new content for the blog section. Updated styles in CSS files for better layout and presentation. * Add new CSS styles for code highlighting, update navigation arrows, and include SVG icons for left and right arrows. Create a cache file for ggshield secrets detection. Update Zig code block in documentation and enhance community news section in posts. * Add GitHub Actions workflow for deploying the website to GitHub Pages. This includes setup for Zine, building the project, and uploading artifacts for deployment. * Refactor CSS for code highlighting by introducing CSS variables for colors, improving maintainability and consistency across styles. * Update GitHub Actions workflow to deploy to the 'zine' branch instead of 'main'. * Refactor CSS variable for code foreground color in highlighting styles to improve clarity and maintainability. * Refactor CSS styles by removing unused logo width definition, adjusting body margin, and adding responsive design for max-width and display properties. Update base template to clean up commented code. * Add line-break property to anchor tags in CSS for improved text wrapping. * Remove obsolete layout files and update SMD files for improved content structure and clarity. Change layout references in monthly and post templates, and update links in various sections for consistency. * Refactor markdown to SMD conversion script, changing source directory and layout configuration. Remove outdated conversion scripts and update CSS styles for improved clarity and maintainability. Update SMD files with accurate dates and links for better content structure. * Refactor markdown files to standardize headings and improve content structure. Update CSS styles for code highlighting to include additional languages and enhance maintainability. Adjust various sections in SMD files for consistency and clarity. * Remove obsolete JavaScript file and standardize markdown headings across various SMD files for improved content structure. Update section titles to use consistent formatting, enhancing readability and organization. * Standardize section titles across multiple SMD files to improve content structure and readability. Update headings to include links for better navigation and consistency throughout the documentation. * Standardize section titles and improve content structure across multiple SMD files. Update headings to ensure consistent formatting and enhance navigation with appropriate links. Remove obsolete files and adjust layout templates for better organization and clarity. * Refactor link conversion scripts by removing obsolete files and updating the source directory configuration. Standardize link formatting in the remaining script for improved clarity and consistency across content. * Remove obsolete TODO.md file and update contributing guidelines in SMD files to reflect new formatting standards. Change section titles for consistency and clarify local preview instructions using 'zine' instead of 'Hugo'. * resolve change requests * Remove obsolete files including .cache_ggshield and _highlight.css. Update GitHub Actions workflow to support deployment from both 'zine' and 'main' branches. Enhance CSS styles for responsive navigation and improve layout templates with additional links. * Remove frpc.ini and README.org files, update zine.ziggy with the correct host URL, and delete .vscode/settings.json. This cleanup enhances project organization and ensures accurate site configuration. * trivial fix * add mirror workflow --------- Co-authored-by: jiacai2050 <dev@liujiacai.net>
1 parent ebda407 commit 85d74d5

File tree

171 files changed

+5408
-3254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+5408
-3254
lines changed

.github/workflows/autocorrect.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: AutoCorrect CI
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
autocorrect:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check source code
12+
uses: actions/checkout@v4
13+
14+
- name: AutoCorrect
15+
uses: huacnlee/autocorrect-action@v2
16+
17+
- name: Review Dog
18+
if: failure()
19+
uses: huacnlee/autocorrect-action@v2
20+
env:
21+
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
with:
23+
reviewdog: true

.github/workflows/examples.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/gh-pages.yml

Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,51 @@
1-
name: GitHub Pages
1+
name: Deploy the website to Github Pages
22

33
on:
44
push:
5-
branches:
6-
- main
7-
workflow_dispatch:
5+
branches: ["zine", "main"]
86

97
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
108
permissions:
119
contents: read
1210
pages: write
1311
id-token: write
1412

15-
concurrency:
16-
group: "pages"
17-
cancel-in-progress: true
18-
19-
# Default to bash
2013
defaults:
2114
run:
2215
shell: bash
2316

17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: true
21+
2422
jobs:
25-
build:
23+
deploy:
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
2627
runs-on: ubuntu-latest
2728
steps:
2829
- uses: actions/checkout@v4
2930
with:
30-
submodules: recursive
31-
- uses: peaceiris/actions-hugo@v2
31+
fetch-depth: 0 # Change if you need git info
32+
33+
- name: Setup Zine
34+
uses: kristoff-it/setup-zine@v1
3235
with:
33-
# hugo-version: "0.140.2"
34-
hugo-version: latest
35-
extended: true
36+
version: v0.10.2
37+
38+
- name: Build
39+
run: zine release
40+
3641
- name: Setup Pages
37-
id: pages
38-
uses: actions/configure-pages@v4
39-
- name: Build with Hugo
40-
env:
41-
# For maximum backward compatibility with Hugo modules
42-
HUGO_ENVIRONMENT: production
43-
HUGO_ENV: production
44-
run: |
45-
npm i -D postcss postcss-cli autoprefixer
46-
hugo mod get
47-
hugo \
48-
--minify \
49-
--baseURL "${{ steps.pages.outputs.base_url }}/"
42+
uses: actions/configure-pages@v5
43+
5044
- name: Upload artifact
5145
uses: actions/upload-pages-artifact@v3
5246
with:
53-
path: ./public
47+
path: "public"
5448

55-
deploy:
56-
environment:
57-
name: github-pages
58-
url: ${{ steps.deployment.outputs.page_url }}
59-
runs-on: ubuntu-latest
60-
needs: build
61-
steps:
6249
- name: Deploy to GitHub Pages
6350
id: deployment
6451
uses: actions/deploy-pages@v4

.github/workflows/lint.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/mirror.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Mirror
33
on:
44
push:
55
branches:
6-
- main
6+
- main**
77
workflow_dispatch:
88

99
jobs:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
# zig
77
zig-cache/
88
zig-out/
9+
10+
.cache_ggshield

.lintmdrc

Lines changed: 0 additions & 18 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
serve:
3-
hugo serve
3+
zine
44

55
lint:
66
npx @lint-md/cli **/*

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[![](https://github.com/zigcc/zigcc.github.io/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/zigcc/zigcc.github.io/actions/workflows/gh-pages.yml)
2+
3+
# Zig 语言中文社区
4+
5+
- <https://ziglang.cc>
6+
- 如果没有特殊声明,本网站内容均采用 [CC BY-NC-ND
7+
4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/) 协议
8+
9+
<center>
10+
<p>欢迎来到 Zig 语言中文社区!(Zig Chinese Community,简称:ZigCC)</p>
11+
<a href="https://discord.gg/UraRxD6WXD">
12+
<img src="https://img.shields.io/discord/1155469703846834187?label=Chat at Discord" />
13+
</a>
14+
<a href="/index.xml">
15+
<img src="https://img.shields.io/badge/rss-F88900.svg?style=flat&logo=RSS&logoColor=white&label=网站" />
16+
</a>
17+
<a href="https://ask.ziglang.cc/atom.xml">
18+
<img src="https://img.shields.io/badge/rss-F88900.svg?style=flat&logo=RSS&logoColor=white&label=论坛" />
19+
</a>
20+
</center>
21+
22+
> Zig Chinese Community is dedicated to sharing and spreading the use of
23+
> Zig language among Chinese users.
24+
25+
本网站使用 [zine](https://zine-ssg.io/) 进行构建,可参考 [quickstart](https://zine-ssg.io/quickstart/) 进行安装,网站预览命令:
26+
27+
``` bash
28+
# Serve the site
29+
zine
30+
```

0 commit comments

Comments
 (0)