mirror of
https://github.com/sipeed/sipeed_wiki.git
synced 2026-11-09 17:44:31 -06:00
断链图片一直在悄悄累积(本次清理前有 230 处),而且线上看不出来: teedoc-upload 只上传不删除对象存储里已移除的文件,旧副本把断链盖住了, 所以页面看起来正常。CI 里也从来没有任何链接检查。 - tools/check_image_links.py:只认 markdown ![]() 与 <img src>, 先剥离代码块以免把 `convert in.jpg out.jpg` 这类示例当成引用, 并按 site_config 的 route 解析站点绝对路径。 - tools/known_broken_images.txt:当前仍存在的 121 处已知断链基线。 CI 对不在基线中的断链报错,基线只许减不许增。 - .github/workflows/check_links.yml:push 与 PR 均运行。 - README:建议 --depth=1 浅克隆并解释原因——文档站的历史里保留了 每张图的所有旧版本(约 1GB),而贡献者只需要当前版本。
56 lines
2.1 KiB
Markdown
Executable File
56 lines
2.1 KiB
Markdown
Executable File
Sipeed wiki source docs
|
|
=====
|
|
|
|
Sipeed official Wiki: [wiki.sipeed.com](https://wiki.sipeed.com)
|
|
|
|
|
|
## Contributing and article sharing
|
|
|
|
You are welcome to contribute to the wiki, fixing error, adding content, or sharing your article are all welcome.
|
|
|
|
Fork this repo and change docs, then create a `Pull Request`.
|
|
|
|
More contribute doc :
|
|
* [中文](./share_docs/zh/readme.md)
|
|
* [English](./share_docs/en/readme.md)
|
|
|
|
|
|
## Preview locally
|
|
|
|
```bash
|
|
git clone --depth=1 https://github.com/sipeed/sipeed_wiki.git
|
|
cd sipeed_wiki
|
|
uv sync
|
|
uv run teedoc serve
|
|
```
|
|
|
|
`uv sync` creates/updates the `.venv` from [`pyproject.toml`](./pyproject.toml) and `uv.lock`, which already includes `teedoc` and all plugins used by this site (so `teedoc install` is not needed).
|
|
Install [uv](https://docs.astral.sh/uv/) first if you don't have it.
|
|
|
|
### Why `--depth=1`
|
|
|
|
This is a documentation site, so most of the repo is images. Git keeps every past revision
|
|
of every one of them forever, including large originals that have since been replaced by
|
|
compressed versions. A full clone therefore downloads roughly **1 GB of history** even
|
|
though you only ever need the current version of each file.
|
|
|
|
`--depth=1` fetches just the latest commit and skips all of that. Editing docs and opening
|
|
a pull request works exactly the same from a shallow clone. Use a full clone only when you
|
|
actually need the history (`git log`, `git blame`, `git bisect`) — you can always deepen a
|
|
shallow clone later with `git fetch --unshallow`.
|
|
|
|
When adding images, please keep them small (ideally under 300 KB, 500 KB max): anything
|
|
committed here stays in the history for good, so an oversized image costs every future
|
|
contributor bandwidth even after it is deleted. See [AGENTS.md](./AGENTS.md) for the full
|
|
image and authoring guidelines.
|
|
|
|
More build tool usage see [teedoc](http://github.com/teedoc/teedoc)
|
|
|
|
## For administrator
|
|
|
|
GitHub action will automatically push changed doc to cloud server.
|
|
But if you did some special things like force commit, some files maybe missing on server, manually trigger the publish_upload_all action to build doc and upload all files to server.
|
|
|
|
|
|
|