chore: Enhance Docusaurus configuration and update image paths

- Added explicit configuration for static directories in Docusaurus.
- Updated npm script to ensure multiple screenshot paths are created and populated.
- Adjusted image paths in documentation to use relative links for better compatibility.
This commit is contained in:
StarFleetCPTN
2025-04-12 13:43:28 -07:00
parent 3d103cb6f6
commit 05d4861dbb
4 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc",
"deploy-gh-pages": "GIT_USER=StarFleetCPTN USE_SSH=true yarn deploy",
"prepare-screenshots": "node -e \"const fs = require('fs'); if (!fs.existsSync('./static/screenshots')) { fs.mkdirSync('./static/screenshots', { recursive: true }); fs.readdirSync('../screenshots').forEach(file => { if (!fs.existsSync('./static/screenshots/' + file)) { fs.copyFileSync('../screenshots/' + file, './static/screenshots/' + file); } }); }\""
"prepare-screenshots": "node -e \"const fs = require('fs'); const paths = ['./static/screenshots', './static/img/screenshots']; paths.forEach(path => { if (!fs.existsSync(path)) { fs.mkdirSync(path, { recursive: true }); } }); fs.readdirSync('../screenshots').forEach(file => { paths.forEach(path => { const targetFile = path + '/' + file; if (!fs.existsSync(targetFile)) { fs.copyFileSync('../screenshots/' + file, targetFile); } }); });\""
},
"dependencies": {
"@docusaurus/core": "3.7.0",