neko/webpage/gen-api-docs.sh
2025-03-22 17:52:56 +01:00

16 lines
505 B
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Clean the API docs
docusaurus clean-api-docs all
# Generate the API docs
docusaurus gen-api-docs all
# Create README.md
mv docs/api/neko-api.info.mdx docs/api/README.mdx
# Replace all occurences of docs/api/neko-api with docs/v3/api
find docs/api -type f -exec sed -i 's/docs\/api\/neko-api/docs\/v3\/api/g' {} \;
# This regex removes (multiline) any span tag that contains "theme-doc-version-badge":
sed -i '/<span/{:a;N;/<\/span>/!ba;/theme-doc-version-badge/d}' docs/api/README.mdx