mirror of
https://github.com/mleem97/gregWiki.git
synced 2026-04-11 03:29:19 +02:00
Merge Docusaurus site: all content under docs/, align with gregFramework split layout
- Move markdown and wiki-import tree into docs/; keep app shell at repo root - Point docusaurus docs path to docs/; edit links to mleem97/gregWiki - Sync and i18n scripts use gregWiki root and ../.wiki under gregFramework - Sidebars: workspace layout from root docs ids; plugins under mods/extensions - Fix redirects, module catalog URLs, release note paths, and wiki-import category keys - Update repo inventory for split repos; Dockerfile for single-repo context Made-with: Cursor
This commit is contained in:
38
scripts/write-wiki-import-category-keys.mjs
Normal file
38
scripts/write-wiki-import-category-keys.mjs
Normal file
@@ -0,0 +1,38 @@
|
||||
/** Idempotent: add unique Docusaurus sidebar keys for wiki-import subfolders. */
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
const pairs = [
|
||||
['Contributors/Guides', 'wiki-import-contributors-guides'],
|
||||
['Contributors/Reference', 'wiki-import-contributors-reference'],
|
||||
['Contributors/Troubleshooting', 'wiki-import-contributors-troubleshooting'],
|
||||
['EndUser/Guides', 'wiki-import-enduser-guides'],
|
||||
['EndUser/Reference', 'wiki-import-enduser-reference'],
|
||||
['EndUser/Troubleshooting', 'wiki-import-enduser-troubleshooting'],
|
||||
['ModDevs/Guides', 'wiki-import-moddevs-guides'],
|
||||
['ModDevs/Reference', 'wiki-import-moddevs-reference'],
|
||||
['ModDevs/Troubleshooting', 'wiki-import-moddevs-troubleshooting'],
|
||||
['TechnicalReference/Guides', 'wiki-import-techref-guides'],
|
||||
['TechnicalReference/Reference', 'wiki-import-techref-reference'],
|
||||
['TechnicalReference/Troubleshooting', 'wiki-import-techref-troubleshooting'],
|
||||
];
|
||||
|
||||
const bases = [
|
||||
path.resolve(import.meta.dirname, '../docs/wiki-import'),
|
||||
path.resolve(
|
||||
import.meta.dirname,
|
||||
'../i18n/de/docusaurus-plugin-content-docs/current/wiki-import',
|
||||
),
|
||||
];
|
||||
|
||||
for (const base of bases) {
|
||||
if (!fs.existsSync(base)) continue;
|
||||
for (const [rel, key] of pairs) {
|
||||
const dir = path.join(base, rel);
|
||||
if (!fs.existsSync(dir)) continue;
|
||||
const target = path.join(dir, '_category_.json');
|
||||
const body = JSON.stringify({ key }, null, 2) + '\n';
|
||||
fs.writeFileSync(target, body);
|
||||
console.log('wrote', target);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user