2019-04-12 14:29:29 +02:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2022-06-18 15:09:33 +02:00
|
|
|
# Split lua_api.md on top level headings
|
|
|
|
cat ../lua_api.md | csplit -sz -f docs/section - '/^=/-1' '{*}'
|
2019-04-12 14:29:29 +02:00
|
|
|
|
|
|
|
cat > mkdocs.yml << EOF
|
|
|
|
site_name: Minetest API Documentation
|
|
|
|
theme:
|
|
|
|
name: readthedocs
|
|
|
|
highlightjs: False
|
|
|
|
extra_css:
|
|
|
|
- css/code_styles.css
|
|
|
|
- css/extra.css
|
|
|
|
markdown_extensions:
|
|
|
|
- toc:
|
|
|
|
permalink: True
|
2023-10-03 20:34:24 +02:00
|
|
|
- pymdownx.superfences
|
|
|
|
- pymdownx.highlight:
|
|
|
|
css_class: codehilite
|
2024-01-26 22:10:57 +01:00
|
|
|
- gfm_admonition
|
2019-04-12 14:29:29 +02:00
|
|
|
plugins:
|
|
|
|
- search:
|
|
|
|
separator: '[\s\-\.\(]+'
|
|
|
|
nav:
|
|
|
|
- "Home": index.md
|
|
|
|
EOF
|
|
|
|
|
|
|
|
mv docs/section00 docs/index.md
|
|
|
|
|
|
|
|
for f in docs/section*
|
|
|
|
do
|
|
|
|
title=$(head -1 $f)
|
|
|
|
fname=$(echo $title | tr '[:upper:]' '[:lower:]')
|
|
|
|
fname=$(echo $fname | sed 's/ /-/g')
|
|
|
|
fname=$(echo $fname | sed "s/'//g").md
|
|
|
|
mv $f docs/$fname
|
|
|
|
echo "- \"$title\": $fname" >> mkdocs.yml
|
|
|
|
done
|
|
|
|
|
|
|
|
mkdocs build --site-dir ../../public
|