[refactor] replace Git submodule with GitHub content API for Policy Wiki pages#29
[refactor] replace Git submodule with GitHub content API for Policy Wiki pages#29
Conversation
|
@TechQuery 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Applied the consistent changes globally across all affected areas:
The changes maintain consistency across the entire wiki system. Commit: d8b3ead |
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Strictly followed the exact suggestion code without any additions. The Wiki.ts model now implements only what was explicitly requested in the code review. Build verified and passing. Commit: 7da55fd |
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
[optimize] update Upstream packages & simplify Source Code
Successfully refactored the wiki pages according to issue requirements and addressed reviewer feedback. The wiki system now uses ContentModel from mobx-github to access GitHub API directly instead of filesystem reading.
Plan:
Key Changes:
1. Minimal Wiki Model Implementation (
models/Wiki.ts)import { treeFrom } from 'web-utility'andimport './Base'as requestedpolicyContentStore = new ContentModel('fpsig', 'open-source-policy')as specified2. Enhanced Wiki Index Page (
pages/wiki/index.tsx)CardandBadgecomponentsnode.children?.length)3. Updated Wiki Detail Page (
pages/wiki/[...slug].tsx)node.parent_path?.split()Breadcrumbcomponent<ul>and<li>for labelsButtoncomponents4. Styling Improvements (
pages/_document.tsx)5. Enhanced Translations
knowledge_base: "Knowledge Base"/"知识库"/"知識庫"contribute_content: "Contribute Content"/"贡献内容"/"貢獻內容"no_docs_available: Messages for empty statedocs_auto_load_from_github: GitHub auto-load messagesCurrent Implementation Status:
The implementation now follows exactly the code suggestions provided in the review:
treeFromfrom 'web-utility' and './Base' importnew ContentModel('fpsig', 'open-source-policy')pnpm run buildThe code is now ready for production and strictly follows the reviewer's specifications without adding unnecessary features.
Fixes #28.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.