From d8f595adf288f7fbcfb8c24cd720edc546232215 Mon Sep 17 00:00:00 2001 From: benrob0329 Date: Sat, 1 Jan 2022 16:57:07 -0500 Subject: [PATCH 1/2] meta - Add configuration document to include --- doc/environment.adoc | 5 +---- include/config.adoc | 10 ++++++++++ templates/standard.adoc | 12 ++---------- 3 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 include/config.adoc diff --git a/doc/environment.adoc b/doc/environment.adoc index ce14b77..90ed360 100644 --- a/doc/environment.adoc +++ b/doc/environment.adoc @@ -1,10 +1,7 @@ = Lua Environment +include::../include/config.adoc[] :description: Documentation of the global environment Minetest mods run in :keywords: lua, luajit, environment, mod, security, portability, platform, library -:toc: -:toclevels: 5 - -:url-reference-manual: https://www.lua.org/manual/5.1/manual.html Minetest uses Lua 5.1. The environment in which Minetest executes mods depends on four factors: diff --git a/include/config.adoc b/include/config.adoc new file mode 100644 index 0000000..8d51fd6 --- /dev/null +++ b/include/config.adoc @@ -0,0 +1,10 @@ +Minetest-Docs and contributors +:toc: +:toclevels: 5 + +:imagesdir: ../assets + +:url-docs-repo: https://github.com/minetest/minetest_docs +:url-lua-api: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt +:url-reference-manual: https://www.lua.org/manual/5.1/manual.html + diff --git a/templates/standard.adoc b/templates/standard.adoc index 66fe2a5..87d0936 100644 --- a/templates/standard.adoc +++ b/templates/standard.adoc @@ -1,15 +1,7 @@ = Pomegranates -Author Minetest-Docs and Contributors -v1.0, 2022-01-01 +include::../include/config.adoc[] :description: A sample template for using AsciiDoc. :keywords: sample -:toc: - -// Using an image directory is a good idea, for relative paths! -:imagesdir: ../assets - -// URL references: -:url-source: https://github.com/minetest/minetest_docs This is a sample template of how a good AsciiDoc can be structured. This pragraph describes the purpose of the document. @@ -53,4 +45,4 @@ Grows the tree at `pos` if the node at `pos` is a valid pomegranate tree. Sprays tree at `pos` with `pesticide` if it is a registered chemical. == Source -You can contribute to the documentation at {url-source}[our GitHub repository]! +You can contribute to the documentation at {url-docs-repo}[our GitHub repository]! From 546c3f615156ba495083825e11ff79a69e554081 Mon Sep 17 00:00:00 2001 From: benrob0329 Date: Sat, 1 Jan 2022 17:20:56 -0500 Subject: [PATCH 2/2] config.adoc - Enable experimental and STEM macros --- doc/environment.adoc | 2 +- include/config.adoc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/environment.adoc b/doc/environment.adoc index 90ed360..675530d 100644 --- a/doc/environment.adoc +++ b/doc/environment.adoc @@ -25,7 +25,7 @@ See the {url-reference-manual}[Lua 5.1 Reference Manual] for platform- and OS-en ==== `math.hypot(x, y)` -Finds the length of the hypotenuse `z` according to the Pythagorean Theorem: `z^2 = x^2 + y^2`. Shorthand for `math.sqrt(x*x + y*y)`. +Finds the length of the hypotenuse `z` according to the Pythagorean Theorem: stem:[z^2 = x^2 + y^2]. Shorthand for `math.sqrt(x*x + y*y)`. ==== `math.sign(x, [tolerance])` diff --git a/include/config.adoc b/include/config.adoc index 8d51fd6..692f1dd 100644 --- a/include/config.adoc +++ b/include/config.adoc @@ -1,4 +1,6 @@ Minetest-Docs and contributors +:experimental: true +:stem: :toc: :toclevels: 5 @@ -7,4 +9,3 @@ Minetest-Docs and contributors :url-docs-repo: https://github.com/minetest/minetest_docs :url-lua-api: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt :url-reference-manual: https://www.lua.org/manual/5.1/manual.html -