Use Jekyll collections
This commit is contained in:
parent
712b151de6
commit
1ca3ba1e82
@ -32,10 +32,10 @@ fit my idea of quality.
|
||||
## Adding a new language
|
||||
|
||||
* Add entry to `_data/languages.yml`
|
||||
* Copy links_en, and customise it for your language
|
||||
* Add your language to the if else in `_includes/header.html`
|
||||
* Copy en/ to your language code
|
||||
* Translate your language code folder
|
||||
* Copy `_en/` to your language code
|
||||
* Translate your language code folder.
|
||||
You can translate the file paths, just make sure you keep any ids the same.
|
||||
|
||||
## Using Jeykll
|
||||
|
||||
|
@ -4,3 +4,7 @@ sass:
|
||||
|
||||
gems:
|
||||
- jekyll-sitemap
|
||||
|
||||
collections:
|
||||
en:
|
||||
output: true
|
||||
|
@ -1,129 +0,0 @@
|
||||
- title: Introduction
|
||||
link: index.html
|
||||
|
||||
- hr: true
|
||||
|
||||
- title: Folder Structure
|
||||
description: Learn how to make a mod folder, including init.lua, depends.txt and more.
|
||||
num: 1
|
||||
link: chapters/folders.html
|
||||
|
||||
- title: Lua Scripts
|
||||
description: A basic introduction to Lua, including a guide on global/local scope.
|
||||
num: 2
|
||||
link: chapters/lua.html
|
||||
|
||||
- hr: true
|
||||
|
||||
- title: Nodes, Items, and Crafting
|
||||
description: Learn how to register node, items, and craft recipes using register_node, register_item, and register_craft.
|
||||
num: 3
|
||||
link: chapters/nodes_items_crafting.html
|
||||
|
||||
- title: Creating Textures
|
||||
description: An introduction to making textures in your editor of choice, an a guide on GIMP.
|
||||
num: 4
|
||||
link: chapters/creating_textures.html
|
||||
|
||||
- title: Node Drawtypes
|
||||
description: Guide to all drawtypes, including node boxes/nodeboxes and mesh nodes.
|
||||
num: 5
|
||||
link: chapters/node_drawtypes.html
|
||||
|
||||
- hr: true
|
||||
|
||||
- title: Basic Map Operations
|
||||
description: Basic operations like set_node and get_node
|
||||
num: 6
|
||||
link: chapters/environment.html
|
||||
|
||||
- title: Active Block Modifiers
|
||||
description: Learn how to make ABMs to change blocks.
|
||||
num: 7
|
||||
link: chapters/abms.html
|
||||
|
||||
- title: Node Metadata
|
||||
description: Using get_meta to obtain a NodeMetaRef
|
||||
num: 8
|
||||
link: chapters/node_metadata.html
|
||||
|
||||
- title: Lua Voxel Manipulators
|
||||
description: Learn how to use LVMs to speed up map operations.
|
||||
num: 9
|
||||
link: chapters/lvm.html
|
||||
|
||||
- hr: true
|
||||
|
||||
- title: Privileges
|
||||
description: Registering privs
|
||||
num: 10
|
||||
link: chapters/privileges.html
|
||||
|
||||
- title: Chat and Commands
|
||||
description: Register a chatcommand
|
||||
num: 11
|
||||
link: chapters/chat.html
|
||||
|
||||
- title: Chat Command Builder
|
||||
description: Use ChatCmdBuilder to make a complex chat command
|
||||
num: 12
|
||||
link: chapters/chat_complex.html
|
||||
|
||||
- title: Player Physics
|
||||
num: 13
|
||||
link: chapters/player_physics.html
|
||||
|
||||
- title: Formspecs
|
||||
num: 14
|
||||
link: chapters/formspecs.html
|
||||
|
||||
- title: HUD
|
||||
num: 15
|
||||
link: chapters/hud.html
|
||||
|
||||
- title: "SFINV: Inventory Formspec"
|
||||
num: 16
|
||||
link: chapters/sfinv.html
|
||||
|
||||
- hr: true
|
||||
|
||||
- title: ItemStacks
|
||||
num: 17
|
||||
link: chapters/itemstacks.html
|
||||
|
||||
- title: Inventories
|
||||
num: 18
|
||||
link: chapters/inventories.html
|
||||
|
||||
- hr: true
|
||||
|
||||
- title: Common Mistakes
|
||||
num: 19
|
||||
link: chapters/common_mistakes.html
|
||||
|
||||
- title: Automatic Error Checking
|
||||
description: Use LuaCheck as a linter to find errors
|
||||
num: 20
|
||||
link: chapters/luacheck.html
|
||||
|
||||
- title: Intro to Clean Architectures
|
||||
description: Separate logic from data and API calls using the MVC pattern - Model View Controller.
|
||||
num: 21
|
||||
link: chapters/mvc.html
|
||||
|
||||
- title: Automatic Unit Testing
|
||||
description: Write tests for your mods using Busted.
|
||||
num: 22
|
||||
link: chapters/unit_testing.html
|
||||
|
||||
- hr: true
|
||||
|
||||
- title: Releasing a Mod
|
||||
num: 23
|
||||
link: chapters/releasing.html
|
||||
|
||||
- title: More Resources
|
||||
num: 24
|
||||
link: chapters/readmore.html
|
||||
|
||||
- hr: true
|
@ -2,6 +2,8 @@
|
||||
title: Folder Structure
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 1.1
|
||||
description: Learn how to make a mod folder, including init.lua, depends.txt and more.
|
||||
---
|
||||
|
||||
## Introduction
|
||||
@ -23,7 +25,7 @@ minetest/mods.
|
||||
![Find the mod's folder]({{ page.root }}/static/folder_modfolder.jpg)
|
||||
|
||||
A "mod name" is used to refer to a mod. Each mod should have a unique mod name.
|
||||
Mod names can include letters, numbers, and underscores. A good mod name should
|
||||
Mod names can include letters, numbers, and underscores. A good mod name should
|
||||
describe what the mod does, and the folder which contains the components of a mod
|
||||
needs to be given the same name as the mod name.
|
||||
|
@ -2,6 +2,8 @@
|
||||
title: Lua Scripts
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 1.2
|
||||
description: A basic introduction to Lua, including a guide on global/local scope.
|
||||
---
|
||||
|
||||
## Introduction
|
@ -4,6 +4,7 @@ layout: default
|
||||
homepage: true
|
||||
no_header: true
|
||||
root: ../
|
||||
idx: 0.1
|
||||
---
|
||||
|
||||
<div id="header">
|
@ -2,6 +2,7 @@
|
||||
title: Inventories
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 5.2
|
||||
---
|
||||
|
||||
## Introduction
|
||||
@ -63,7 +64,7 @@ There are three types of inventory:
|
||||
### Player Inventories
|
||||
|
||||
A player inventory usually has two grids, one for the main inventory and one for crafting.
|
||||
Press i in game to see your player inventory.
|
||||
Press i in game to see your player inventory.
|
||||
|
||||
Use a player's name to get their inventory:
|
||||
|
@ -2,6 +2,7 @@
|
||||
title: ItemStacks
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 5.1
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,8 @@
|
||||
title: Creating Textures
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 2.2
|
||||
description: An introduction to making textures in your editor of choice, an a guide on GIMP.
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,8 @@
|
||||
title: Node Drawtypes
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 2.3
|
||||
description: Guide to all drawtypes, including node boxes/nodeboxes and mesh nodes.
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,8 @@
|
||||
title: Nodes, Items, and Crafting
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 2.1
|
||||
description: Learn how to register node, items, and craft recipes using register_node, register_item, and register_craft.
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,8 @@
|
||||
title: Active Block Modifiers
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 3.2
|
||||
description: Learn how to make ABMs to change blocks.
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,8 @@
|
||||
title: Basic Map Operations
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 3.1
|
||||
description: Basic operations like set_node and get_node
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,8 @@
|
||||
title: Lua Voxel Manipulators
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 3.4
|
||||
description: Learn how to use LVMs to speed up map operations.
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,8 @@
|
||||
title: Node Metadata
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 3.3
|
||||
description: Using get_meta to obtain a NodeMetaRef.
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,8 @@
|
||||
title: Chat and Commands
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 4.2
|
||||
description: Registering a chatcommand and handling chat messages with register_on_chat_message
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,8 @@
|
||||
title: Chat Command Builder
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 4.3
|
||||
description: Use ChatCmdBuilder to make a complex chat command
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,7 @@
|
||||
title: Formspecs
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 4.5
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,7 @@
|
||||
title: HUD
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 4.6
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,7 @@
|
||||
title: Player Physics
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 4.4
|
||||
---
|
||||
|
||||
## Introduction
|
||||
@ -57,7 +58,7 @@ Two overrides are needed to fully restore old movement behaviour:
|
||||
* new_move: whether the player uses new movement (default: true)
|
||||
* sneak_glitch: whether the player can use 'sneak elevators' (default: false)
|
||||
|
||||
## Mod Incompatibility
|
||||
## Mod Incompatibility
|
||||
|
||||
Please be warned that mods which override the same physics value of a player tend
|
||||
to be incompatible with each other. When setting an override, it overwrites
|
@ -2,6 +2,8 @@
|
||||
title: Privileges
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 4.1
|
||||
description: Registering privs.
|
||||
---
|
||||
|
||||
## Introduction
|
||||
@ -139,7 +141,7 @@ players privileges such as `give` and `server`, which have greater potential for
|
||||
|
||||
To add a privilege to `basic_privs` and adjust which privileges your moderators can
|
||||
grant and revoke from other players, you must change the `basic_privs` setting.
|
||||
To do this, you must edit the minetest.conf file.
|
||||
To do this, you must edit the minetest.conf file.
|
||||
|
||||
By default `basic_privs` has the following value:
|
||||
|
@ -2,6 +2,7 @@
|
||||
title: "SFINV: Inventory Formspec"
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 4.7
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,7 @@
|
||||
title: Common Mistakes
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 6.1
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,8 @@
|
||||
title: Automatic Error Checking
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 6.2
|
||||
description: Use LuaCheck to find errors
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,7 @@
|
||||
title: Intro to Clean Architectures
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 6.3
|
||||
---
|
||||
|
||||
## Introduction
|
@ -2,6 +2,7 @@
|
||||
title: Read More
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 6.6
|
||||
---
|
||||
|
||||
## List of Resources
|
@ -2,6 +2,7 @@
|
||||
title: Releasing a Mod
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 6.5
|
||||
---
|
||||
|
||||
## Introduction
|
||||
@ -155,7 +156,7 @@ best for you, as long as it meets these requirements:\\
|
||||
* **Stable** - The hosting website should be unlikely to shutdown without warning.
|
||||
* **Direct link** - You should be able to click a link on the forum and download the file
|
||||
without having to view another page.
|
||||
* **Virus Free** - Mods with malicious content are not wanted.
|
||||
* **Virus Free** - Mods with malicious content are not wanted.
|
||||
|
||||
### Github, or another VCS
|
||||
|
@ -2,6 +2,7 @@
|
||||
title: Automatic Unit Testing
|
||||
layout: default
|
||||
root: ../../
|
||||
idx: 6.4
|
||||
---
|
||||
|
||||
## Introduction
|
@ -14,25 +14,26 @@
|
||||
{% assign language = pathsplit[1] %}
|
||||
|
||||
{% if language == "en" %}
|
||||
{% assign links = site.data.links_en %}
|
||||
{% assign links = site.en | sort: "idx" %}
|
||||
|
||||
{% else %}
|
||||
{% assign language = "en" %}
|
||||
{% assign links = site.data.links_en %}
|
||||
{% assign links = site.en | sort: "idx" %}
|
||||
{% endif %}
|
||||
|
||||
{% assign num = 0 %}
|
||||
|
||||
<div id="container">
|
||||
<nav>
|
||||
{% for link in links %}
|
||||
{% if link.hr %}
|
||||
{% assign hr = true %}
|
||||
{% else %}
|
||||
<li><a href="{{ page.root }}{{ language }}/{{ link.link }}"
|
||||
class="{% if page.title == link.title %}selected{% endif %}{% if hr %} hr {% endif %}">
|
||||
{% if link.num %} {{ link.num }} - {% endif %}
|
||||
{{ link.title }}</a></li>
|
||||
{% assign hr = false %}
|
||||
{% endif %}
|
||||
{% assign idsplit = link.id | split: '/' %}
|
||||
{% assign section = idsplit[2] %}
|
||||
<li><a href="{{ link.url }}"
|
||||
class="{% if page.title == link.title %}selected{% endif %}{% if section != last_section and section != 'index' %} hr {% endif %}">
|
||||
{% if section != "index" %}{{ num }} - {% endif %}
|
||||
{{ link.title }}</a></li>
|
||||
{% assign last_section = section %}
|
||||
{% assign num = num | plus:1 %}
|
||||
{% endfor %}
|
||||
|
||||
<li><a href="{{ page.root }}lua_api.html" class="hr">Lua Modding API Reference</a></li>
|
||||
|
@ -1,10 +1,12 @@
|
||||
---
|
||||
---
|
||||
|
||||
{% assign pages = site.en | sort: "idx" %}
|
||||
|
||||
[
|
||||
{% for link in site.data.links_en %}
|
||||
{% if link.hr != true %}
|
||||
{% for link in pages %}
|
||||
{
|
||||
"idx": {{ link.idx }},
|
||||
"title": "{{ link.title }}",
|
||||
"loc": "https://rubenwardy.com/minetest_modding_book/en/{{ link.link }}",
|
||||
{% if link.description %}
|
||||
@ -13,7 +15,6 @@
|
||||
"priority": 1
|
||||
{% if link.num %}, "chapter_number": {{ link.num }}{% endif %}
|
||||
},
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user