Skip to content

feat: modernize documentation navigation - #21

Merged
Htkym merged 3 commits into
mainfrom
chore/lithosharp-0.3.0
Sep 8, 2026
Merged

Htkym merged 3 commits into
mainfrom
chore/lithosharp-0.3.0

Conversation

@Htkym

@Htkym Htkym commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Enable LithoSharp 0.3.0 local search for the documentation site.
  • Replace duplicate English/Japanese sidebar entries with one language-appropriate navigation set.
  • Add an accessible EN/JA switcher and keep previous/next links within the selected language.
  • Localize Japanese document chrome and preserve public output staging that excludes LithoSharp ownership metadata.

Validation

  • Release build succeeded with zero warnings and errors.
  • Fresh site generation succeeded with search.html and search-index.json.
  • Japanese and English navigation, lang attributes, language switchers, and same-language pagination were smoke-tested.

Copilot AI lite review requested due to automatic review settings September 8, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The language switcher logic currently behaves incorrectly on pages without a real EN/JA pair (e.g., it can navigate away unexpectedly and/or misapply aria-current).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the LithoSharp-based documentation site generator to enable local search and to provide a cleaner, language-aware documentation UI (EN/JA), including localized chrome, a language switcher, and same-language pagination for key pages.

Changes:

  • Switched the site generator to a custom PlotreeDocsTemplate wrapper around DocsSiteTemplate with EnableSearch = true.
  • Replaced the default docs sidebar with a language-specific navigation set and localized key chrome strings for Japanese pages.
  • Injected an EN/JA switcher into the docs header and rewrote pagination for the manual/privacy pages to stay within the selected language.
File summaries
File Description
tools/Plotree.Site/Program.cs Uses the new template and adds CSS for the language switcher UI.
tools/Plotree.Site/PlotreeDocsTemplate.cs Implements HTML post-processing for language-aware sidebar, header switcher injection, JP chrome localization, and same-language pagination.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/Plotree.Site/PlotreeDocsTemplate.cs
Comment thread tools/Plotree.Site/PlotreeDocsTemplate.cs
@Htkym

Htkym commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

レビュー指摘を反映しました。GetLanguagePair を nullable に変更し、翻訳ペアが存在するマニュアル/プライバシーポリシーの4ページだけ EN/JA スイッチャーを表示します。トップページ、検索、サポートページでは表示せず、意図しないページ遷移と �ria-current の誤判定を防ぎます。Release build と生成後の paired/unpaired ページのスモークチェックも成功しています。

@Htkym
Htkym disabled auto-merge September 8, 2026 15:50
@Htkym
Htkym merged commit ad2fab9 into main Sep 8, 2026
4 checks passed
@Htkym
Htkym deleted the chore/lithosharp-0.3.0 branch September 8, 2026 15:50
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.

2 participants