AI 专业名词百科

可搜索 · 分类 · 创建 · 编辑 · 评论

开发与写作指南 | Dev Guide

简体中文 English

简体中文

这份文档面向希望「多看一点细节」的朋友:
如果你想了解仓库结构、术语文件的 Front Matter 模板,或者在本地跑站点、改前端交互,可以从这里开始。

仓库结构

仓库组织与站点结构大致对应:

术语文件与 Front Matter 模板

所有术语都位于 _terms/ 目录中,每个术语对应一个 Markdown 文件。

文件命名:

Front Matter 模板与字段说明:

---
id: your-id
title: 中文名
title_en: English Name
category: foundation # 或 model/training/inference/rag/multimodal/framework/safety/product/modelsuite
type: core # 或 model/tool/concept
aliases: [别名1, 别名2]
keywords: [关键词A, 关键词B]
brief: 术语一句话简介
meta: [额外元信息1, 2]
---

关于「怎么把一个术语写得好懂又有用」,请参考单独的写作指南文档:WRITING.md

本地开发与预览

如果你希望在本地跑一份站点、边改边看效果,可以这样:

bundle install
bundle exec jekyll serve
# 打开 http://127.0.0.1:4000${BASEURL}

或使用 Makefile 中封装的命令:

make install   # 安装依赖(等价于 bundle install)
make serve     # 本地预览(等价于 bundle exec jekyll serve --livereload)
make build     # 构建站点(等价于 bundle exec jekyll build)
make clean     # 清理 _site/ 等构建输出

建议在发起较大改动的 PR 前至少跑一遍构建:

bundle exec jekyll build

如果想模拟生产环境压缩与 SEO 插件行为,可使用:

JEKYLL_ENV=production bundle exec jekyll build

前端与结构改动建议

如果你打算修改前端或站点结构(例如搜索行为、筛选逻辑、布局等),可以参考下面的约定:

在改动结构或样式后,建议在桌面和移动端各看一圈,确保基础可用性(文字可读、按钮可点、布局不明显错乱)。

评论系统(giscus)配置

术语详情页使用 giscus 提供评论区,基于页面的 pathname 映射到讨论串。

默认配置写在 _layouts/term.html 中,主要通过以下几个 data-* 属性控制:

这些值可以在 giscus 官方网站根据你的仓库生成,然后替换到模板中。
如果你 Fork 本仓库并在自己名下部署,请务必把这些配置改成你自己的仓库,避免评论写到上游仓库下。


English

This document is for contributors who want more detail:
project structure, term file format, local development, and front-end changes.

Project Structure

The repository layout roughly mirrors the site:

Term Files and Front Matter

All term entries live under _terms/, one Markdown file per term.

File Naming

Front Matter Template and Fields

---
id: your-id
title: Chinese Name
title_en: English Name
category: foundation # or model/training/inference/rag/multimodal/framework/safety/product/modelsuite
type: core # or model/tool/concept
aliases: [alias-1, alias-2]
keywords: [keyword-a, keyword-b]
brief: One-sentence summary
meta: [extra info 1, extra info 2]
---

For guidance on how to write clear and helpful term entries, please refer to the separate writing guide: WRITING.md.

Local Development

To run the site locally for preview:

bundle install
bundle exec jekyll serve
# Visit http://127.0.0.1:4000${BASEURL}

Or use the Makefile helpers:

make install   # install Ruby dependencies
make serve     # run local server with livereload
make build     # build the site
make clean     # clean build output like _site/

Before opening a PR with significant changes, it is recommended to run:

bundle exec jekyll build

For a production-like build with minification and SEO plugins:

JEKYLL_ENV=production bundle exec jekyll build

Front-end and Structural Changes

If you are changing the front end or site structure (e.g., search behavior, filters, layout):

After structural or styling changes, preview on both desktop and mobile to ensure basic usability.

Comments with giscus

Each term page embeds a giscus discussion thread based on the page pathname.

Configuration lives in _layouts/term.html via these data-* attributes:

You can generate the correct values on the giscus website for your repository and paste them into the template.
If you deploy a fork under your own account, make sure to update these fields so comments go to your repo instead of the upstream.