-
Notifications
You must be signed in to change notification settings - Fork 6
[add] Recipe Wiki pages for CookLikeHOC repository with code refactoring #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[add] Recipe Wiki pages for CookLikeHOC repository with code refactoring #38
Conversation
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot 在主导航栏的知识库菜单下面加一个菜谱链接,并在菜谱主页标题下面注明感谢老乡鸡餐饮公司及开源菜谱仓库原作者。
…ared components, and BadgeBar Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests
Comment |
This PR implements a new recipes section that provides access to Chinese cooking recipes from the CookLikeHOC repository, following the same pattern as the existing policy pages.
What's Added
New Recipe Pages:
/recipes
- Index page showing all 238 recipes organized in hierarchical categories (主食, 炒菜, 汤, etc.)/recipes/[...slug]
- Individual recipe pages with full markdown content renderingNavigation Integration:
GitHub Integration:
recipeContentStore
inmodels/Wiki.ts
targeting theGar-b-age/CookLikeHOC
repositoryAcknowledgment Section:
Multilingual Support:
Added translation keys in all supported languages:
Code Refactoring & Improvements
Shared Components:
ContentTree
component (components/Layout/ContentTree.tsx
)UI Component Upgrades:
BadgeBar
component frommobx-restful-table
Translation Cleanup:
github_document_description
across all pagesImplementation Details
The implementation follows the exact same patterns as the existing policy pages:
ContentModel
frommobx-github
for repository accessgetStaticProps
andgetStaticPaths
Live Example
The updated recipes homepage now features the acknowledgment section and improved navigation:
The recipe page for 宫保鸡丁 (Kung Pao Chicken) demonstrates the complete functionality:
Features include:
Files Changed
components/Navigator/MainNavigator.tsx
- Added recipes link to Wiki dropdowncomponents/Layout/ContentTree.tsx
- New shared component for tree renderingmodels/Wiki.ts
- AddedrecipeContentStore
for CookLikeHOC repositorypages/recipes/index.tsx
- Recipe index page with acknowledgment and shared componentpages/recipes/[...slug].tsx
- Dynamic recipe pages with BadgeBar componentpages/policy/index.tsx
- Refactored to use shared ContentTree componentpages/policy/[...slug].tsx
- Updated to use BadgeBar componenttranslation/*.ts
- Updated translation keys in all languagesThis provides seamless access to hundreds of Chinese cooking recipes while maintaining full consistency with the existing codebase architecture and improving code quality through refactoring.
Created from VS Code via the GitHub Pull Request extension.
Created from VS Code via the GitHub Pull Request extension.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.