Voile for Server Owners
At the end of this topic, you will have entire documentation with few topics (and sub-topics), ready for adding your own topics.
1. Installing Voile
Please, see Installing (server) topic.
2. Understanding configuration
After you've installed Voile, there will be new directory in mods folder: IwakuraEnterprises_Voile.
In this folder you'll be able to find the configuration file, folder for storing documentations and folder for various UI-related errors.
For now, let's keep all settings unchanged, in the default configuration.
3. Creating first documentation
You may define all server documentations at mods/IwakuraEnterprises_Voile/documentation/index.json. Within this file you'll be able to add, remove, disable or enable your server-specific documentation. Let's create your first documentation:
Let's also create directory MyDocumentation next to the index.json file you have just edited.
This will:
Define new documentation in group
MyGroup, with IDMyDocumentation, with user-friendly nameMy first documentation.The ID is used as the root directory for the documentation. In this example, the directory
mods/IwakuraEnterprises_Voile/documentation/MyDocumentationwill contain all the markdown files for the documentation.The group and ID are used when referencing specific documentation's topic. The user-friendly name is shown to the player in the documentation list on the left side of the interface.
Mark the documentation as enabled. Disabled documentations are not shown to the player.
Put the documentation first in the documentation list. Sort indexes are sorted from the lowest to highest. This allows you to control the order of documentations.
4. Writing the documentation
Documentation's content is stored in topics. Topic is a page with name, description, author and content. It can also contain sub-topics.
You may create topics by creating markdown files. Each markdown file is a topic. These terms may be used interchangeably in this topic: topic is markdown file ~ markdown file is topic.
Let's create your first topic called home.md in folder IwakuraEnterprises_Voile/documentation/MyDocumentation:
After saving the topic, you can run /docs-reload command to reload the Voile's configuration and documentations. After reopening the interface with /voile, you'll be able to see your first documentation on the left side! After you verify you can see it, continue to the next chapter.
5. Sub-topics (and the growing complexity)
First-level topics are nice and all, but you may also create sub-topics. This is a great way to organize topics in categories so players can easily find what they are looking for. You can create sub-topics by defining them in topics. Let's create our first sub-topic called My second topic.
Creating second topic
Next to home.md, let's create another file called second-topic.md:
Editing the first topic
To reference the second topic, let's add sub-topics field:
You can try and use /docs-reload to see your changes. You should be able to see the new topic under the first one.
6. Sub-topics in subfolders
Having all sub-topics on the same level is quite messy. Let's change that! For our next third topic, we will create folder called sub-topics next to our two markdown files (very original, I know). Inside that folder, we will create new markdown file called third-topic.md
Current structure
Our documentation structure should now look something like this:
Contents of third topic
The third topic is in MyDocumentation/sub-topics/third-topic.md
Editing the first topic
Instead of specifying the topic's ID (usually the name of the file), let's specify the subfolder itself. This will include all sub-topics in that folder. However, it will not include any other subsequent subfolders.
After you reload the Voile, there should be now three topics. Good job!
7. What's next?
You have successfully created your first documentation. You can now apply skills you've learned to create awesome documentations for your server! You may also see other topics that will teach you more advanced skills, such as color formatting or adding topic-linking buttons.
Topic Identifiers - creating references to other topics
Formatting - Formatting in Voile's Markdown