Clone and copy markdown files from clice and catter repo, instead of linking to subdictionary.#1
Clone and copy markdown files from clice and catter repo, instead of linking to subdictionary.#1tsurumi-yizhou wants to merge 3 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughDocumentation sources from Clice and Catter projects are now integrated into the VitePress site. The GitHub Actions workflow clones these repositories and copies their documentation directories. Configuration adds locale-specific navigation and sidebars for these new sections, and homepage feature links redirect from external URLs to internal routes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/publish-docs.yml:
- Around line 37-39: The workflow currently clones catter/doc into both
./en/catter/ and ./zh/catter/, causing /zh/catter to be identical to /catter and
preventing localization; update .github/workflows/publish-docs.yml so that it
either copies a dedicated Chinese source tree (e.g., copy catter/doc-zh or
catter/doc/zh into ./zh/catter/) or only creates a symlink/redirect to the
shared English content and adjust .vitepress/config.mts accordingly (ensure
/zh/catter/overview and /zh/catter/api point to actual Chinese files or to the
shared paths explicitly) so the Chinese nav can diverge from the English one.
- Around line 30-37: The two git clone invocations (the one cloning the clice
repo before the cp lines and the one cloning catter) must be pinned to explicit
refs: replace each plain git clone with a clone that checks out a specific tag
or commit SHA (e.g. use git clone --branch <TAG_OR_BRANCH> --single-branch
--depth 1 <REPO_URL> or clone then git fetch && git checkout <COMMIT_SHA>) so
the published docs are reproducible; update the clone commands that reference
"git clone https://github.com/clice-io/clice.git" and "git clone
https://github.com/clice-io/catter.git" to include the chosen tag or SHA and
document/bump those refs intentionally when upstream changes are desired.
In @.gitignore:
- Around line 6-7: The .gitignore entries "clice/" and "catter/" are unanchored
and will match directories at any depth; update the patterns used in the
.gitignore file by anchoring them to the repository root (prefix with a leading
"/") so they only ignore root-level dirs named clice and catter rather than any
nested occurrences.
In @.vitepress/config.mts:
- Around line 14-119: The locales object currently only defines root and zh
while fr and ja pages exist but are orphaned and the Japanese page contains
Chinese (/zh/) links; update the locales configuration (the locales object) to
add entries for "fr" and "ja" mirroring the structure used for "zh" and "root"
(provide proper label, lang, link, and themeConfig.nav and themeConfig.sidebar
entries) and correct any nav/sidebar link paths in the ja content to point to
/ja/... (or remove the fr/ja index files if you prefer not to support those
locales); ensure the new entries reference the same sidebar item keys used for
other locales (e.g., nav, sidebar, themeConfig) so VitePress recognizes the
locale roots.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9b852dfc-5465-4ab7-a633-b9b6240b7aa8
📒 Files selected for processing (7)
.github/workflows/publish-docs.yml.gitignore.vitepress/config.mtsen/index.mdfr/index.mdja/index.mdzh/index.md
| git clone https://github.com/clice-io/clice.git | ||
| cp -a clice/docs/en/. ./en/clice/ | ||
| cp -a clice/docs/zh/. ./zh/clice/ | ||
|
|
||
| - name: Clone&Copy Catter | ||
| shell: bash | ||
| run: | | ||
| git clone https://github.com/clice-io/catter.git |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n .github/workflows/publish-docs.ymlRepository: clice-io/docs
Length of output: 1472
Pin the imported docs to explicit refs.
Both git clone calls (clice and catter repos) pull whatever is on the upstream default branch at build time. This makes deploys non-reproducible: the same commit in this repo can publish different content later, or start failing when upstream changes land. Use a tag or commit SHA for each repo and bump it intentionally here.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/publish-docs.yml around lines 30 - 37, The two git clone
invocations (the one cloning the clice repo before the cp lines and the one
cloning catter) must be pinned to explicit refs: replace each plain git clone
with a clone that checks out a specific tag or commit SHA (e.g. use git clone
--branch <TAG_OR_BRANCH> --single-branch --depth 1 <REPO_URL> or clone then git
fetch && git checkout <COMMIT_SHA>) so the published docs are reproducible;
update the clone commands that reference "git clone
https://github.com/clice-io/clice.git" and "git clone
https://github.com/clice-io/catter.git" to include the chosen tag or SHA and
document/bump those refs intentionally when upstream changes are desired.
| git clone https://github.com/clice-io/catter.git | ||
| cp -a catter/doc/. ./en/catter/ | ||
| cp -a catter/doc/. ./zh/catter/ |
There was a problem hiding this comment.
/zh/catter is sourced from the exact same files as /catter.
Line 39 copies the same catter/doc tree into the Chinese prefix, while .vitepress/config.mts exposes separate /zh/catter/overview and /zh/catter/api navigation. If Catter is meant to be localized, this prevents the Chinese section from ever diverging from the English one. Either copy a dedicated zh source tree or point the Chinese entry at the shared docs explicitly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/publish-docs.yml around lines 37 - 39, The workflow
currently clones catter/doc into both ./en/catter/ and ./zh/catter/, causing
/zh/catter to be identical to /catter and preventing localization; update
.github/workflows/publish-docs.yml so that it either copies a dedicated Chinese
source tree (e.g., copy catter/doc-zh or catter/doc/zh into ./zh/catter/) or
only creates a symlink/redirect to the shared English content and adjust
.vitepress/config.mts accordingly (ensure /zh/catter/overview and /zh/catter/api
point to actual Chinese files or to the shared paths explicitly) so the Chinese
nav can diverge from the English one.
| clice/ | ||
| catter/ No newline at end of file |
There was a problem hiding this comment.
Anchor these ignore rules to repo root to avoid over-matching.
clice/ and catter/ currently match directories with those names at any depth (including en/clice/, zh/catter/). If only temporary clone dirs at repository root should be ignored, use leading /.
🔧 Proposed fix
-clice/
-catter/
+/clice/
+/catter/📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| clice/ | |
| catter/ | |
| /clice/ | |
| /catter/ |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.gitignore around lines 6 - 7, The .gitignore entries "clice/" and "catter/"
are unanchored and will match directories at any depth; update the patterns used
in the .gitignore file by anchoring them to the repository root (prefix with a
leading "/") so they only ignore root-level dirs named clice and catter rather
than any nested occurrences.
| locales: { | ||
| root: { | ||
| label: 'English', | ||
| lang: 'en-US', | ||
| link: '/', | ||
| label: "English", | ||
| lang: "en-US", | ||
| link: "/", | ||
| themeConfig: { | ||
| nav: [ | ||
| { text: "Home", link: "/" }, | ||
| { text: "Clice", link: "/clice/guide/what-is-clice" }, | ||
| { text: "Catter", link: "/catter/overview" }, | ||
| ], | ||
| sidebar: { | ||
| "/clice/": [ | ||
| { | ||
| text: "Guide", | ||
| items: [ | ||
| { text: "What is clice", link: "/clice/guide/what-is-clice" }, | ||
| { text: "Quick Start", link: "/clice/guide/quick-start" }, | ||
| { text: "Configuration", link: "/clice/guide/configuration" }, | ||
| ], | ||
| }, | ||
| { | ||
| text: "Design", | ||
| items: [ | ||
| { text: "Index", link: "/clice/design/index" }, | ||
| { text: "Architecture", link: "/clice/design/architecture" }, | ||
| { text: "Compilation", link: "/clice/design/compilation" }, | ||
| { text: "Header Context", link: "/clice/design/header-context" }, | ||
| { text: "Template Resolver", link: "/clice/design/template-resolver" }, | ||
| ], | ||
| }, | ||
| { | ||
| text: "Development", | ||
| items: [ | ||
| { text: "Build", link: "/clice/dev/build" }, | ||
| { text: "Contribution", link: "/clice/dev/contribution" }, | ||
| { text: "Extension", link: "/clice/dev/extension" }, | ||
| { text: "Test and Debug", link: "/clice/dev/test-and-debug" }, | ||
| ], | ||
| }, | ||
| ], | ||
| "/catter/": [ | ||
| { | ||
| text: "Catter", | ||
| items: [ | ||
| { text: "Overview", link: "/catter/overview" }, | ||
| { text: "API", link: "/catter/api" }, | ||
| ], | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| }, | ||
| zh: { | ||
| label: '简体中文', | ||
| lang: 'zh-CN', | ||
| link: '/zh' | ||
| label: "简体中文", | ||
| lang: "zh-CN", | ||
| link: "/zh", | ||
| themeConfig: { | ||
| nav: [ | ||
| { text: "首页", link: "/zh/" }, | ||
| { text: "Clice", link: "/zh/clice/guide/what-is-clice" }, | ||
| { text: "Catter", link: "/zh/catter/overview" }, | ||
| ], | ||
| sidebar: { | ||
| "/zh/clice/": [ | ||
| { | ||
| text: "指南", | ||
| items: [ | ||
| { text: "什么是 clice", link: "/zh/clice/guide/what-is-clice" }, | ||
| { text: "快速开始", link: "/zh/clice/guide/quick-start" }, | ||
| { text: "配置", link: "/zh/clice/guide/configuration" }, | ||
| ], | ||
| }, | ||
| { | ||
| text: "设计", | ||
| items: [ | ||
| { text: "索引", link: "/zh/clice/design/index" }, | ||
| { text: "架构", link: "/zh/clice/design/architecture" }, | ||
| { text: "编译", link: "/zh/clice/design/compilation" }, | ||
| { text: "头文件上下文", link: "/zh/clice/design/header-context" }, | ||
| { text: "模板解析器", link: "/zh/clice/design/template-resolver" }, | ||
| ], | ||
| }, | ||
| { | ||
| text: "开发", | ||
| items: [ | ||
| { text: "构建", link: "/zh/clice/dev/build" }, | ||
| { text: "参与贡献", link: "/zh/clice/dev/contribution" }, | ||
| { text: "扩展", link: "/zh/clice/dev/extension" }, | ||
| { text: "测试与调试", link: "/zh/clice/dev/test-and-debug" }, | ||
| ], | ||
| }, | ||
| ], | ||
| "/zh/catter/": [ | ||
| { | ||
| text: "Catter", | ||
| items: [ | ||
| { text: "Overview", link: "/zh/catter/overview" }, | ||
| { text: "API", link: "/zh/catter/api" }, | ||
| ], | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| }, | ||
| fr: { | ||
| label: 'Français', | ||
| lang: 'fr-FR', | ||
| link: '/fr', | ||
| }, | ||
| ja: { | ||
| label: '日本語', | ||
| lang: 'ja-JP', | ||
| link: '/ja', | ||
| } | ||
| } | ||
| }) | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check for French and Japanese locale files
fd -e md | grep -E "(fr|ja)" | head -20Repository: clice-io/docs
Length of output: 80
🏁 Script executed:
# Check the current state of .vitepress/config.mts
cat -n .vitepress/config.mts | head -150Repository: clice-io/docs
Length of output: 6108
🏁 Script executed:
# Look for any locale configuration in the repository
fd -e mts -o -e ts -o -e js | xargs grep -l "locales" | head -10Repository: clice-io/docs
Length of output: 173
🏁 Script executed:
# Check if fr/ja files exist and their content
ls -la fr/ ja/ 2>/dev/null | head -20Repository: clice-io/docs
Length of output: 408
🏁 Script executed:
# Check git diff to see changes to these files in the PR
git diff HEAD fr/index.md ja/index.md 2>/dev/null | head -50Repository: clice-io/docs
Length of output: 39
🏁 Script executed:
# Check git status for these files
git status fr/index.md ja/index.md 2>/dev/nullRepository: clice-io/docs
Length of output: 122
🏁 Script executed:
# Check content of French and Japanese index files
cat fr/index.md
echo "---"
cat ja/index.mdRepository: clice-io/docs
Length of output: 1655
🏁 Script executed:
# Check if there are more localized pages under fr/ and ja/
find fr ja -type f -name "*.md" | sortRepository: clice-io/docs
Length of output: 80
fr and ja locale files exist but are not configured in the locales object.
fr/index.md and ja/index.md are present in the repository, but the locales configuration at lines 14–119 includes only root and zh. VitePress relies on the locales object to recognize locale roots and populate the translation menu, leaving these files orphaned from the i18n system. Additionally, the Japanese file contains broken links pointing to /zh/ (Chinese locale paths) instead of its own locale paths. Either add fr and ja locale entries with corrected link paths, or remove the localized homepages.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.vitepress/config.mts around lines 14 - 119, The locales object currently
only defines root and zh while fr and ja pages exist but are orphaned and the
Japanese page contains Chinese (/zh/) links; update the locales configuration
(the locales object) to add entries for "fr" and "ja" mirroring the structure
used for "zh" and "root" (provide proper label, lang, link, and themeConfig.nav
and themeConfig.sidebar entries) and correct any nav/sidebar link paths in the
ja content to point to /ja/... (or remove the fr/ja index files if you prefer
not to support those locales); ensure the new entries reference the same sidebar
item keys used for other locales (e.g., nav, sidebar, themeConfig) so VitePress
recognizes the locale roots.
|
@16bit-ykiko Bro please review this |
Summary by CodeRabbit
New Features
Documentation
Chores