Add script & config for generating HTML docs with LDoc

This commit is contained in:
Jordan Irwin 2021-07-12 08:58:55 -07:00
parent e75ee0ccd8
commit 958d45775c
2 changed files with 17 additions and 0 deletions

4
docs/config.ld Normal file
View file

@ -0,0 +1,4 @@
project = "Cleaner"
title = "Cleaner mod for Minetest"
format = "markdown"
boilerplate = false

13
docs/gendoc.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
docs="$(dirname $(readlink -f $0))"
root="$(dirname ${docs})"
config="${docs}/config.ld"
cd "${root}"
# Clean old files
rm -rf "${docs}/api"
# Create new files
ldoc -c "${config}" -d "${docs}/api" "${root}/api.lua"