1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Use .md extension for markdown files

Linking to line numbers is brittle, linking to sections/headings is better.

If you still want to link to a line number, you can append ?plain=1 to GitHub's URL
This commit is contained in:
rubenwardy 2022-06-18 14:09:33 +01:00
parent 5cd6a22dd3
commit b1786e88ac
11 changed files with 20 additions and 20 deletions

View file

@ -947,7 +947,7 @@ Setting-related
---------------
* `minetest.settings`: Settings object containing all of the settings from the
main config file (`minetest.conf`). Check lua_api.txt for class reference.
main config file (`minetest.conf`). Check lua_api.md for class reference.
* `minetest.setting_get_pos(name)`: Loads a setting from the main settings and
parses it as a position (in the format `(1,2,3)`). Returns a position or nil.

View file

@ -5,7 +5,7 @@ Introduction
-------------
The main menu is defined as a formspec by Lua in `builtin/mainmenu/`
Description of formspec language to show your menu is in `lua_api.txt`
Description of formspec language to show your menu is in `lua_api.md`
Callbacks
@ -77,7 +77,7 @@ Filesystem
* `destination` folder to extract to
* returns true/false
* `core.sound_play(spec, looped)` -> handle
* `spec` = `SimpleSoundSpec` (see `lua_api.txt`)
* `spec` = `SimpleSoundSpec` (see `lua_api.md`)
* `looped` = bool
* `core.sound_stop(handle)`
* `core.get_video_drivers()`
@ -338,7 +338,7 @@ Settings
* `core.settings:save()` -> nil, save all settings to config file
For a complete list of methods of the `Settings` object see
[lua_api.txt](https://github.com/minetest/minetest/blob/master/doc/lua_api.txt)
[lua_api.md](https://github.com/minetest/minetest/blob/master/doc/lua_api.md)
Worlds
@ -371,7 +371,7 @@ Helpers
* `fgettext(string, ...)` -> string
* same as `fgettext_ne()`, but calls `core.formspec_escape` before returning result
* `core.parse_json(string[, nullvalue])` -> something (possible in async calls)
* see `core.parse_json` (`lua_api.txt`)
* see `core.parse_json` (`lua_api.md`)
* `dump(obj, dumped={})`
* Return object serialized as a string
* `string:split(separator)`

View file

@ -4,8 +4,8 @@
MARKDOWN_FILE=$(pip show markdown | awk '/Location/ { print $2 }')/markdown/extensions/codehilite.py
patch -N -r - $MARKDOWN_FILE lua_highlight.patch || true
# Split lua_api.txt on top level headings
cat ../lua_api.txt | csplit -sz -f docs/section - '/^=/-1' '{*}'
# Split lua_api.md on top level headings
cat ../lua_api.md | csplit -sz -f docs/section - '/^=/-1' '{*}'
cat > mkdocs.yml << EOF
site_name: Minetest API Documentation

View file

@ -51,7 +51,7 @@ unsure, just test your texture pack in-game.
Texture modifiers
-----------------
See lua_api.txt for texture modifiers
See lua_api.md for texture modifiers
Special textures
----------------
@ -209,7 +209,7 @@ Here are targets you can choose from:
Nodes support all targets, but other items only support 'inventory'
and 'wield'.
¹ : `N` is an integer [0,255]. Sets align_style = "world" and scale = N on the tile, refer to lua_api.txt for details.
¹ : `N` is an integer [0,255]. Sets align_style = "world" and scale = N on the tile, refer to lua_api.md for details.
### Using the special targets