Skip to content

02. Getting Started

James231 edited this page Jun 9, 2020 · 3 revisions

Here we describe how to get started using the latest release of the Documentation Templater from the GitHub Releases page. If you wish to build it youself from source, please see the Building from Source page.

Folder Structure

A Documentation Project consits of 3 folders: Input, Output and Template in directory together with the DocumentationTemplator.exe (or just `DocumentationTemplator file on OSX or Linux).

.Root Folder
├── Input
|  ├── page1.html
|  ├── page2.md
|  └── Page Subdirectory
|     └── page3.html
├── Output
|  ├── page1.html
|  ├── page2.html
|  └── page+subdirectory
|     └── page3.html
├── Template
|  └── ...
└── DocumentationTemplater.exe

Input Folder

The Input folder is where you will add the content for your documentation. Each .html or .md file will create a page in the documentation. You can put files in subdirectories to create dropdowns in the side navigation bar.

For example the following structure in the Input file:

─ page1.html
─ page2.md
─ Page Subdirectory
 └── page3.html

Will display 3 items in the root of the side navigation bar. The first page, the second page, and a dropdown with title Page Subdirectory which displays an additional page when opened.

The sample you downloaded from GitHub Releases page already has content in the Input folder. I suggest you examine this content before deleting it to write your own pages.

Output Folder

The Output folder will contain the generated documentation after it has been built. It will contain the same file/folder structure as in the Input folder except all files will be .html files and the file/folder names will be URL encoded so they work as webpages.

The HTML, CSS, and JavaScript content would have been minified to improve load times of your pages. The minification is performed using the WebMarkupMin package.

Template Folder

The Template folder contains .html files which acts as templates. This means when the tool is run, the content of the Input folder is injected into these templates to produce the output HTML documentation.

Using templates brings two benefits:

  • Your page files can be kept short, only containing the important content making them easy to maintain.
  • You can change the styling, layouts, or functionality of all documentation pages by only changing a couple of template files. You can also swap in entirely new templates if you want to give your documentation a new fresh look.

We will cover templates in more detail throughout the other pages of this Wiki.

Generating Documentation

To create the documentation, simply run the DocumentationTemplater.exe (or just DocumentationTemplater on OSX/Linux), and look in the Output folder to see the results.

To run the tool you can simply double click on it, or run it through a terminal.