Skip to content

[AAASM-3550] ✨ (docs): Add local search to the Docusaurus site#176

Merged
Chisanan232 merged 2 commits into
masterfrom
v0.0.1/AAASM-3550/docusaurus_local_search
Jun 22, 2026
Merged

[AAASM-3550] ✨ (docs): Add local search to the Docusaurus site#176
Chisanan232 merged 2 commits into
masterfrom
v0.0.1/AAASM-3550/docusaurus_local_search

Conversation

@Chisanan232

Copy link
Copy Markdown
Contributor

Target

  • Task summary:

    Add offline/local search to the Node SDK Docusaurus site (node-sdk/website/) so readers can find docs without an external service. Uses @easyops-cn/docusaurus-search-local — a community theme that builds a client-side search index at build time (zero external service, no Algolia account).

  • Task tickets:

    • Task ID: AAASM-3550.
    • Relative task IDs:
      • N/A.
    • Relative PRs:
      • N/A.
  • Key point change (optional):

    Two small commits:

    1. Add dependency@easyops-cn/docusaurus-search-local@^0.55.2 added to website/package.json devDependencies and website/pnpm-lock.yaml updated. 0.55.2 declares peer support for @docusaurus/theme-common ^2 || ^3 and React ^19, matching this site (Docusaurus 3.10.1, React 19).

    2. Wire it in — registered the theme in the themes array of docusaurus.config.ts, alongside the existing @docusaurus/theme-mermaid. Because docs are served at the site root (routeBasePath: "/") and there is no blog, the indexer is pointed at / with blog/page indexing off:

      [
        require.resolve("@easyops-cn/docusaurus-search-local"),
        {
          hashed: true,
          indexDocs: true,
          indexBlog: false,
          indexPages: false,
          docsRouteBasePath: "/",
          language: ["en"],
        },
      ],

    As-is: no search box. To-be: a working search box (and /search page) backed by a build-time index for every version channel.

Effecting Scope

  • Action Types:

    • ✨ Adding new something
      • 🟢 No breaking change
      • 🟠 Has breaking change
    • ✏️ Modifying existing something
      • 🟢 No breaking change
      • 🟠 Has breaking change
    • 🚮 Removing something
    • 🔧 Fixing bug
    • ♻️ Refactoring something
    • 🍀 Improving something (performance, code quality, security, etc.)
    • 🚀 Release
  • Scopes:

    • 🧩 SDK public API
    • 🪡 API client and transport
    • 🤖 Framework hooks
    • 🫀 Data model and types
    • ⛑️ Error handling
    • 🧪 Testing
      • 🧪 Unit testing
      • 🧪 Integration testing
      • 🧪 End-to-end testing
    • 🚀 Building
      • 🤖 CI/CD
      • 🔗 Dependencies
      • 📦 Project configurations
    • 📚 Documentation
  • Additional description:

    Docs-site config only. No SDK runtime / public API changes.

Description

  • Added @easyops-cn/docusaurus-search-local (^0.55.2) to website/package.json devDependencies + refreshed website/pnpm-lock.yaml.
  • Registered the search theme in website/docusaurus.config.ts (themes array) with hashed, indexDocs, docsRouteBasePath: "/", language: ["en"].

How to verify

cd website
pnpm install
pnpm build      # MUST succeed; the search plugin runs at build time
  • Build result: [SUCCESS] Generated static files in "build".
  • The search plugin generated build/search-index.json (~403 KB of real content) for the root and every version channel (/next/, all vX.Y.Z snapshots), plus a /search page (build/search/index.html).
  • Pre-existing typedoc TS2304/TS2591/TS2584 warnings on ../src/** (missing @types/node in the typedoc parse context) are emitted on master too, with or without this change, and do not fail the build.

Closes AAASM-3550.

🤖 Generated with Claude Code

Chisanan232 and others added 2 commits June 22, 2026 21:41
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Chisanan232

Copy link
Copy Markdown
Contributor Author

Claude Code — review result

CI green — full suite passes: CodeQL, SonarCloud, build, codecov/patch, coverage-and-analysis, module-smoke (18/20/22), napi-build, quality, and test (18/20/22/24, ubuntu-latest). (The Windows test-matrix cells — pre-existing failure tracked in AAASM-3544 — are not triggered on this PR, so they don't affect it.) No fails to ignore.

Scope vs AAASM-3550 — fully covered. Docusaurus ships no search by default; this adds offline/local search via @easyops-cn/docusaurus-search-local in two small, focused commits (add the devDep + refresh website/pnpm-lock.yaml, then register it in the themes array of docusaurus.config.ts). Plugin 0.55.2 cleanly matches the site's Docusaurus 3 / React 19. Verified pnpm build succeeds and generates search-index.json for the root and every version channel, plus a /search page. The pre-existing typedoc TS2304/... warnings were confirmed present on master too (unrelated).

Ready for approval + merge.

@Chisanan232 Chisanan232 merged commit a834c04 into master Jun 22, 2026
17 checks passed
@Chisanan232 Chisanan232 deleted the v0.0.1/AAASM-3550/docusaurus_local_search branch June 22, 2026 13:49
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