Skip to content

Commit 2e398d7

Browse files
Copilotjiacai2050
andauthored
添加 AI 辅助创作标注组件和贡献指南说明 (#116)
* Initial plan * 添加 AI 辅助标注相关组件和说明 Agent-Logs-Url: https://github.com/zigcc/zigcc.github.io/sessions/f2181d86-6e5b-4636-a0d4-efeb5d6deed8 Co-authored-by: jiacai2050 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jiacai2050 <[email protected]>
1 parent 240da42 commit 2e398d7

3 files changed

Lines changed: 45 additions & 0 deletions

File tree

assets/style.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,29 @@ blockquote p {
830830
margin: 0;
831831
}
832832

833+
/* -- AI Notice -- */
834+
835+
.ai-notice {
836+
margin: 1.5rem 0;
837+
padding: 0.875rem 1.25rem;
838+
background: #fffbeb;
839+
border: 1px solid #f59e0b;
840+
border-left: 4px solid #f59e0b;
841+
border-radius: 6px;
842+
color: #92400e;
843+
font-size: 0.95rem;
844+
line-height: 1.6;
845+
}
846+
847+
@media (prefers-color-scheme: dark) {
848+
.ai-notice {
849+
background: #1c1a0e;
850+
border-color: #b45309;
851+
border-left-color: #f59e0b;
852+
color: #fcd34d;
853+
}
854+
}
855+
833856
/* -- Code Blocks -- */
834857

835858
.code-block-container {

content/contributing.smd

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Zig 中文社区是一个开放的组织,我们致力于推广 Zig 在中文
2727
.custom = {
2828
.math = true, // 引入 Katex 数学公式支持
2929
.mermaid = true, // 引入 mermaid 图表渲染支持
30+
.ai_generated = true, // 标注文章使用了 AI 辅助创作
3031
},
3132
---
3233
```
@@ -42,6 +43,24 @@ Zig 中文社区是一个开放的组织,我们致力于推广 Zig 在中文
4243
- [Getting Started  |  WebP  |  Google for Developers](https://developers.google.com/speed/webp/docs/using)
4344

4445

46+
## [AI 辅助创作说明]($heading.id('ai-generated'))
47+
48+
如果文章内容使用了 AI(如 ChatGPT、Claude、Copilot 等)辅助生成,请在 frontmatter 中添加 `ai_generated = true`:
49+
50+
```ziggy
51+
.custom = {
52+
.ai_generated = true,
53+
},
54+
```
55+
56+
设置后,文章末尾会自动显示一个提示横幅,提醒读者该内容包含 AI 辅助生成的内容,需结合自身判断阅读。
57+
58+
**注意事项:**
59+
60+
- AI 生成的内容可能存在错误或不准确之处,请在发布前仔细校对
61+
- 作者对文章内容的准确性负责,AI 仅作为辅助工具
62+
- 鼓励在文章中说明 AI 的具体使用方式(如"使用 AI 辅助润色"、"使用 AI 生成初稿后人工校对"等)
63+
4564
## [本地预览]($heading.id('local-preview'))
4665

4766
1. 安装 `zine`,方法见 [Quick Start](https://zine-ssg.io/quickstart/),

layouts/post.shtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
<div :html="$page.toc()"></div>
6969
</div>
7070
<div :html="$page.content()"></div>
71+
<div class="ai-notice" :if="$page.custom.getOr('ai_generated', false)">
72+
⚠️ 本文包含 AI 辅助生成的内容,请结合自身判断阅读,作者对内容准确性负责。
73+
</div>
7174
<div id="prev-next" data-pagefind-ignore>
7275
<div :if="$page.prevPage?()">
7376
<a href="$if.link()">

0 commit comments

Comments
 (0)