mirror of
https://github.com/Anduin2017/HowToCook.git
synced 2026-05-14 03:01:27 +08:00
Fix: exclude en/ and site/ from readme/mkdocs auto-generation
The i18n migration introduced en/ and site/ directories, which were being scanned by getAllMarkdown() and incorrectly mixed into the nav generation. Changes: - Add 'en' to ignorePaths: prevents 379 English files from polluting nav - Add 'site' to ignorePaths: prevents built site artifacts from being scanned The star difficulty system and README/properdocs.yml generation now only processes Chinese source files (dishes/, tips/) while respecting the i18n structure: - README.md: 385 entries (all Chinese), with star difficulty index - properdocs.yml: 375 nav entries (dishes + tips), Chinese only - starsystem/: 358 recipes organized by difficulty (1-5 stars) - i18n plugin: separate /en/ site built by properdocs, not generated by script Docker build verified: npm run build → node readme-generate.js ✓ properdocs build with i18n: both zh and en locales ✓ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2
.github/readme-generate.js
vendored
2
.github/readme-generate.js
vendored
@@ -7,7 +7,7 @@ const MKDOCS_PATH = 'properdocs.yml';
|
||||
const dishesFolder = 'dishes';
|
||||
const starsystemFolder = 'starsystem';
|
||||
|
||||
const ignorePaths = ['.git', 'README.md', 'node_modules', 'CONTRIBUTING.md', '.github'];
|
||||
const ignorePaths = ['.git', 'README.md', 'node_modules', 'CONTRIBUTING.md', '.github', 'en', 'site'];
|
||||
|
||||
const categories = {
|
||||
vegetable_dish: {
|
||||
|
||||
Reference in New Issue
Block a user