Files
gregWiki/scripts/write-wiki-import-category-keys.mjs
Marvin 331847013d docs: update docusaurus configuration and documentation structure
- Revised the tagline in `docusaurus.config.js` for improved clarity on the documentation's focus.
- Removed German localization support from the configuration to streamline the user experience.
- Updated navigation items in the sidebar to better reflect the current structure, emphasizing player and developer resources.
- Enhanced the README and various documentation files to clarify the repository layout and improve accessibility for users.
- Adjusted links and descriptions throughout the documentation to ensure consistency and accuracy.

This commit aims to enhance the overall clarity and usability of the documentation.
2026-04-10 02:26:32 +02:00

33 lines
1.4 KiB
JavaScript

/** 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/legacy/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);
}
}