Skip to content

docs: switch documentation to Clarify with minimal configuration - #5648

Open
yinxulai wants to merge 3 commits into
apolloconfig:masterfrom
yinxulai:clarify
Open

docs: switch documentation to Clarify with minimal configuration#5648
yinxulai wants to merge 3 commits into
apolloconfig:masterfrom
yinxulai:clarify

Conversation

@yinxulai

@yinxulai yinxulai commented Jul 22, 2026

Copy link
Copy Markdown

What's the purpose of this PR

Upgrade the Apollo documentation experience from the legacy Docsify presentation to Clarify with a deliberately minimal integration. Existing Markdown content remains unchanged and continues to be the source of truth; Clarify reads it directly from docs/.

A single JSON configuration provides the full site experience: bilingual navigation, grouped sections, search, light/dark themes, responsive layouts, footer links, and localized routes. This keeps future documentation work focused on content instead of site-specific scripts and injected UI configuration.

Which issue(s) this PR fixes

Fixes #5638

Brief changelog

  • Add docs/clarify.json with site metadata, English and Chinese locales, navigation, footer links, and layout settings.
  • Add minimal npm scripts for local development and production builds.
  • Ignore Clarify dependencies, generated output, and local logs.
  • Keep all existing documentation content unchanged.

Local development

Prerequisite: Node.js and npm.

cd docs
npm install
npm run dev

Open the URL printed by the command and visit /README, for example http://localhost:5173/README. If that port is already in use, Clarify automatically selects another one.

The development server watches documentation and configuration files and refreshes the site as they change.

Production build

cd docs
npm install
npm run build

The generated static site is written to docs/output/.

Validation

  • Started the development server with npm run dev.
  • Confirmed Clarify discovered and indexed 76 existing documentation pages.
  • Confirmed the JSON configuration loads bilingual navigation, search, theme controls, and footer links.

Preview

Apollo documentation powered by Clarify Apollo documentation page powered by Clarify

Checklist

  • Read the Contributing Guide.
  • Added a detailed description of what changed, how it works, and why.
  • Verified the documentation development server and generated navigation.
  • Run mvn clean test (not required for this documentation-only change).
  • Run mvn spotless:apply (not applicable to JSON/package metadata only).
  • Update CHANGES.md after the PR URL is available.

@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jul 22, 2026
@github-actions

Copy link
Copy Markdown

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds Clarify tooling and configuration for Apollo’s documentation site, including development/build scripts, bilingual navigation and localization, footer links, theme layout settings, and ignored generated documentation files.

Changes

Documentation configuration

Layer / File(s) Summary
Clarify tooling and generated-output setup
docs/package.json, .gitignore
Adds Clarify development and build scripts, the CLI development dependency, and ignore patterns for documentation dependencies, logs, and generated output.
Clarify site configuration
docs/clarify.ts, docs/clarify.json
Defines site metadata, grouped bilingual navigation, footer links, English and Chinese locale settings, and a 1200px theme width.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: nobodyiam

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: migrating the docs site to Clarify with a minimal configuration.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@yinxulai yinxulai changed the title Switch documentation to the new Clarify site draft: Switch documentation to the new Clarify site Jul 22, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/en/quick-start.mdx`:
- Around line 1-7: Replace the unfinished placeholder content in
docs/en/quick-start.mdx lines 1-7 with the restored English quick-start
documentation, or remove that page from navigation. Apply the same correction to
docs/zh/quick-start.mdx lines 1-7 using restored Chinese content, or remove it
from navigation; both localized pages must no longer expose placeholders.
🪄 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: e374e3a2-4200-4a1b-9a30-1b10c35614ab

📥 Commits

Reviewing files that changed from the base of the PR and between cdaedad and 2875aef.

⛔ Files ignored due to path filters (2)
  • doc/package-lock.json is excluded by !**/package-lock.json
  • docs/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (19)
  • .gitignore
  • docs/.nojekyll
  • docs/clarify-env.d.ts
  • docs/clarify.ts
  • docs/css/buble.css
  • docs/css/dark.css
  • docs/css/fonts.css
  • docs/css/pure.css
  • docs/css/vue.css
  • docs/en/deployment/quick-start-docker.mdx
  • docs/en/deployment/quick-start.mdx
  • docs/en/quick-start.mdx
  • docs/index.html
  • docs/package.json
  • docs/scripts/multiple-language-redirect.js
  • docs/zh/README.mdx
  • docs/zh/deployment/quick-start-docker.mdx
  • docs/zh/deployment/quick-start.mdx
  • docs/zh/quick-start.mdx
💤 Files with no reviewable changes (6)
  • docs/css/pure.css
  • docs/css/vue.css
  • docs/css/buble.css
  • docs/css/dark.css
  • docs/css/fonts.css
  • docs/scripts/multiple-language-redirect.js

Comment thread docs/en/quick-start.mdx Outdated
Comment on lines +1 to +7
# Prepare

Wait for content...

```bash
content for copy
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Restore or unpublish both placeholder quick-start pages.

Both localized root pages contain unfinished placeholder text rather than documentation.

  • docs/en/quick-start.mdx#L1-L7: restore the English quick-start content or remove the page from navigation.
  • docs/zh/quick-start.mdx#L1-L7: restore the Chinese quick-start content or remove the page from navigation.
📍 Affects 2 files
  • docs/en/quick-start.mdx#L1-L7 (this comment)
  • docs/zh/quick-start.mdx#L1-L7
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/en/quick-start.mdx` around lines 1 - 7, Replace the unfinished
placeholder content in docs/en/quick-start.mdx lines 1-7 with the restored
English quick-start documentation, or remove that page from navigation. Apply
the same correction to docs/zh/quick-start.mdx lines 1-7 using restored Chinese
content, or remove it from navigation; both localized pages must no longer
expose placeholders.

@yinxulai

Copy link
Copy Markdown
Author

#5638

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jul 25, 2026
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jul 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/package.json (1)

8-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Make the docs toolchain reproducible.

Please verify that a lockfile is committed for the docs package and used by CI; otherwise the caret range on Line 9 can allow later CLI releases to change the build. If no lockfile is intended, pin the CLI version explicitly. npm recommends committing lockfiles for reproducible CI installs, and npm ci requires one. (docs.npmjs.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/package.json` around lines 8 - 10, Make the docs toolchain reproducible
by ensuring the docs package has a committed lockfile that CI uses with npm ci;
if a lockfile is not intended, replace the caret range for `@clarify-labs/cli` in
devDependencies with an exact pinned version.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/package.json`:
- Around line 8-10: Make the docs toolchain reproducible by ensuring the docs
package has a committed lockfile that CI uses with npm ci; if a lockfile is not
intended, replace the caret range for `@clarify-labs/cli` in devDependencies with
an exact pinned version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f1851b5c-14e5-4dea-85df-fff3f5963744

📥 Commits

Reviewing files that changed from the base of the PR and between 6cd90bf and 34541d5.

📒 Files selected for processing (2)
  • docs/clarify.json
  • docs/package.json

@yinxulai

Copy link
Copy Markdown
Author

@nobodyiam 我提供了一个极小的 PR 来完成了初步的尝试,对文档内容零改动,我提供了一份站点配置(甚至也是可选的,我只是为了让目录看起来更友好),对于 packages.json 来说,也不是必须的,可以通过在 ci 中安装并使用 clarify 来构建项目是一样的,除此之外,有非常大量的关于 docsify 的配置和奇怪的注入类代码都可以删除,使用 clarify 可以让团队只需要关注文档内容。

@yinxulai yinxulai changed the title draft: Switch documentation to the new Clarify site docs: switch documentation to Clarify with minimal configuration Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

是否愿意考虑基于 Clarify 迁移项目文档?

1 participant