fix(content): content hidden or broken by unclosed language blocks - #380
Open
AdingApkgg wants to merge 1 commit into
Open
AdingApkgg wants to merge 1 commit into
AdingApkgg wants to merge 1 commit into
Conversation
Several pages had a `::: en` / `::: zh-CN` block (or an inner `::: tip`
etc.) closed at the wrong place. markdown-it-container closes a block at
the first `:::` it finds, so the next block ended up nested in the
wrong language and was hidden from the readers of the other one, or a
leftover `:::` was shown as text:
- ecosystem: the olist-cdn-preheat entry was hidden in English; a stray
`::::` was shown as text
- drivers/115: Python requirements and QR code steps hidden in Chinese
- drivers/115_open: the "4. Notes" section hidden in English
- drivers/189: the tip hidden in Chinese
- drivers/thunder: the "3. Thunder X" heading hidden in English
- installation/reverse-proxy: step 1 of the aaPanel tutorial hidden in
Chinese (`::` typo); `::: note` is not a container, use `::: tip`
- installation/desktop, installation/worker, ecosystem/official_worker/
guide, seeds/design: `:::` shown as text, and English troubleshooting
items shown on the Chinese page (and vice versa)
Also:
- advanced/mcp: `{{ lang="..." }}` is not attribute syntax, the headings
showed "en" / "zh-CN" in both languages
- ecosystem/official_worker: the page URL has no trailing slash, so
`./guide` etc. resolved to /ecosystem/guide (404); use absolute links,
and point "architecture" / "faq" at the existing basic / about pages
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 7 tasks
This branch has not been deployed
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.
Description / 描述
修复现网文档中因语言块(
::: en/::: zh-CN)或内层容器没有在正确位置闭合,导致部分内容在某种语言下看不到、或:::被直接显示成文字的问题。只改内容,不涉及框架,基于当前的 Valaxy 写法。markdown-it-container 会在遇到的第一个
:::处结束容器,所以一旦某个块少写或多写了结束标记,后面的内容就会被嵌进另一种语言的块里,这种语言的读者就看不到它。某种语言下看不到的内容
ecosystem:英文页看不到 jiwangyihao/olist-cdn-preheat 这一条(HisAtri 的中文块没有闭合);另有一个多余的::::被显示成文字。drivers/115:中文页看不到「使用 Python 脚本获取 Cookie」前面的 Python 版本要求和扫码步骤。drivers/115_open:英文页看不到「4. Notes」一节。drivers/189:中文页看不到开头的提示。drivers/thunder:英文页看不到「3. Thunder X」章节标题,迅雷 X 的内容被挂在了第 2 节下面。installation/reverse-proxy:中文页看不到宝塔教程第 1 步(:::误写成了::);::: note不是可用的容器,被显示成文字,改为::: tip。:::显示成文字、中英文内容串到一起installation/desktop、installation/worker、ecosystem/official_worker/guide、seeds/design:外层和内层容器都用了:::,或者结束标记被 Prettier 合并进了引用块,导致:::显示成文字,部分英文常见问题出现在中文页(反之亦然)。外层改用::::,引用块后的结束标记单独成行。其他
advanced/mcp:{{ lang="en" }}不是属性语法,标题后面多显示了「en」「zh-CN」,而且中英文标题同时出现。改为{ lang="en" }。ecosystem/official_worker:页面 URL 结尾没有/,所以./guide等相对链接被解析成/ecosystem/guide,打开是 404。改为绝对链接;「设计架构」「常见问题」原来指向不存在的./architecture、./faq,改为现有的basic、about页面。Motivation and Context / 背景
这些问题都在现网上存在,与 #377 的 VitePress 迁移无关,可以单独合并。#377 中已经包含了同样的修复(按新目录结构),这个 PR 先把它们带到现在的站点上。
测试
valaxy build --ssg成功,151 个页面全部生成。:::被当成文字。<div lang="...">里(例如 115 的中文说明只在zh-CN块中,olist-cdn-preheat 的标题不再位于中文块内)。prettier --check通过。Checklist / 检查清单
我已阅读 CONTRIBUTING 文档。
我已使用 prettier 或其他适当的格式化工具格式化提交的代码或文档。
我已为所有支持语言(包括中文和英文)更新文档内容。 (若适用)
我已确认编写的文档或代码格式正确, 无语法错误, 拼写错误。
我已相应更新了相关仓库(若适用)。(不适用)
🤖 Generated with Claude Code