Repository navigation
fix(docs): 站点域名指向修正与文档格式清理 - #32
Merged
Merged
Conversation
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 issue #31(文档检查)。
检查方式
通读了
docs/**/*.md、README.md、docs/public/下的sitemap.xml、rss.xml、robots.txt、llms.txt,以及docs/.vitepress/config.mts;用 markdownlint-cli2 全量跑了一遍(MD025/MD013/MD033 等均为已知的误报场景,见下方说明),内容层面逐项核对了首页卡片链接、栏目页 description 与「本栏目内容」表格的对应关系、以及手维护列表与实际页面清单的一致性。发现并修复的问题
1. 站点域名指向错误(内容问题,最重要)
config.mts的siteUrl以及手维护的sitemap.xml、rss.xml、robots.txt、llms.txt全部写着https://hjx-25pc1.xyz,但验证发现主域实际是一个 Astro 的班级门户(有「首页/动态/关于」导航,/sitemap.xml在该域返回 404),VitePress 文档站实际部署在https://docs.hjx-25pc1.xyz(README 的「访问文档站」链接也指向这里,门户上的「文档」入口同样指向这里)。也就是说:robots.txt声明的 Sitemap 指向一个 404 地址;sitemap.xml、rss.xml、llms.txt里所有页面 URL 都指向主域,爬虫抓到的是门户而不是文档页;docs.子域响应里的 canonical 写的就是hjx-25pc1.xyz,即当前线上产物已经因为这个配置产生了自指向错误。本次统一修正为
https://docs.hjx-25pc1.xyz,并已构建验证:dist/**/*.html中的 canonical、og:url 均已更新为新域名。2. 手维护清单遗漏页面
/class/7s-original在侧边栏中登记,但sitemap.xml和llms.txt都没有收录。已补齐(llms.txt 里顺带标注了 7s 与 7s-original 的「修订版 / 原始存档」关系,便于 LLM 爬虫理解两者区别)。3. 格式问题
README.md:TypeScript 徽章的图片 URL 中间断行,导致logoColor=white被截到下一行,徽章无法正确渲染,已合并为一行;另清理了「当前状态」与「技术栈」之间的连续空行。config.mts:siteDescription字符串里混用了两个半角逗号(知识库,系统整理…工具,助力),该字符串会被注入每个页面的 meta description,按站内中文标点惯例改为全角。docs/class/7s.md:tip 中链接后多了一个空格再接句号(](7s-original.md) 。),已去掉。检查后确认没有问题的部分
link均与卡片标题对应,无占位链接。/guide/writing、/guide/contributing、相对链接7s-original.md)全部可达,构建无死链告警。7s-original.md的标题尾冒号、列表前空行等 markdownlint 告警属于「原始文件存档」的刻意保留,未做改动。验证
pnpm docs:build通过,构建产物中 canonical / og:url 已确认指向新域名。sitemap.xml、rss.xml通过 XML 解析校验;sitemap 现含 12 个 URL,与页面清单一致。GLM Flash| 𝕏