Skip to content

Clone and copy markdown files from clice and catter repo, instead of linking to subdictionary.#1

Open
tsurumi-yizhou wants to merge 3 commits intomainfrom
fully-copy
Open

Clone and copy markdown files from clice and catter repo, instead of linking to subdictionary.#1
tsurumi-yizhou wants to merge 3 commits intomainfrom
fully-copy

Conversation

@tsurumi-yizhou
Copy link
Copy Markdown
Member

@tsurumi-yizhou tsurumi-yizhou commented Mar 31, 2026

Summary by CodeRabbit

  • New Features

    • Integrated Clice and Catter documentation directly into the documentation site.
    • Enhanced navigation with structured sections for all projects.
  • Documentation

    • Updated feature links to internal documentation routes across all language versions (English, French, Japanese, Chinese).
    • Improved localization support with dedicated navigation structures.
  • Chores

    • Updated automation workflows to latest versions.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

📝 Walkthrough

Walkthrough

Documentation 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

Cohort / File(s) Summary
CI/CD and Build Configuration
.github/workflows/publish-docs.yml, .gitignore
Updated GitHub Actions to v6, added build steps to clone external repositories and copy documentation into workspace directories before the VitePress build. Added ignore patterns for cloned directories.
VitePress Configuration
.vitepress/config.mts
Standardized syntax to double quotes and semicolons. Restructured locales to include themeConfig with nav and sidebar entries for /clice/ and /catter/ sections. Removed fr and ja locale declarations entirely.
Homepage Link Updates
en/index.md, fr/index.md, ja/index.md, zh/index.md
Replaced external documentation and GitHub URLs with internal site routes: Clice feature now links to /clice/guide/what-is-clice (or /zh/clice/... for Chinese locale), Catter feature now links to /catter/overview (or /zh/catter/... for Chinese locale).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 With whiskers twitching and nose held high,
We fetch the docs from clice's supply,
Catter's pages hop right in,
VitePress weaves them with a spin,
One home for all—documentation sin bin! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: migrating from external links to internally cloned and copied documentation files from clice and catter repositories.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fully-copy

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 46b5cba and 9a9c503.

📒 Files selected for processing (7)
  • .github/workflows/publish-docs.yml
  • .gitignore
  • .vitepress/config.mts
  • en/index.md
  • fr/index.md
  • ja/index.md
  • zh/index.md

Comment on lines +30 to +37
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/publish-docs.yml

Repository: 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.

Comment on lines +37 to +39
git clone https://github.com/clice-io/catter.git
cp -a catter/doc/. ./en/catter/
cp -a catter/doc/. ./zh/catter/
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

/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.

Comment on lines +6 to +7
clice/
catter/ No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
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.

Comment on lines 14 to +119
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',
}
}
})
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Check for French and Japanese locale files
fd -e md | grep -E "(fr|ja)" | head -20

Repository: clice-io/docs

Length of output: 80


🏁 Script executed:

# Check the current state of .vitepress/config.mts
cat -n .vitepress/config.mts | head -150

Repository: 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 -10

Repository: 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 -20

Repository: 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 -50

Repository: 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/null

Repository: 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.md

Repository: 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" | sort

Repository: 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.

@tsurumi-yizhou
Copy link
Copy Markdown
Member Author

@16bit-ykiko Bro please review this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant