Build environment for docs.icinga.com
Go to file
root ae67d418bc Merge branch 'master' into snapshot 2017-09-21 14:00:48 +02:00
projects Update README.md + archive.md 2017-07-19 09:51:05 +02:00
theme Fix side menu height for Safari 2017-07-19 15:47:18 +02:00
.gitignore Initial commit 2017-07-18 13:36:11 +02:00
Gemfile Initial commit 2017-07-18 13:36:11 +02:00
README.md Update README.md + archive.md 2017-07-19 09:51:05 +02:00
build-docs.rb Fix that branch checkouts always pull master instead of origin branch 2017-09-21 13:58:55 +02:00
config.yml Use icinga/icinga2 support/2.7 branch for docs hot-fixes 2017-08-08 14:02:40 +02:00
mkdocs.template.yml Fix broken 'Download' link 2017-08-16 15:42:49 +02:00

README.md

Icinga Documentation

This repository includes everything for building the documentation for all tools in the Icinga ecosystem.

The build-docs.rb script clones each configured project to the specified directory and switches to the specified branch. It searches for *.md files within the configured directory and creates documentation sections out of the found files. The ordering is defined by the file names. The capitalized name of each file is used as a title for this documentation section. The script will generate the mkdocs.yml

Configuration

config.yml

This file defines generally for which projects documentation should be build. All settings are required.

Option Description
projects_dir Directory where all projects are stored
projects Array of projects
git Git repository
ref Branch or Tag to check out
latest If set to true, the project will be cloned into a latest directory.
target Target directory within projects_dir
docs_dir Directory that includes the *.md files
category If set, the projects will be displayed under this category

Example:

projects_dir: 'projects'
projects:
  Icinga 2:
    git: 'https://github.com/Icinga/icinga2.git'
    ref: 'tags/v2.6.3'
    target: 'icinga2'
    docs_dir: 'doc'
  Icinga Web 2:
    git: 'https://github.com/Icinga/icingaweb2.git'
    ref: 'tags/v2.4.1'
    target: 'icingaweb2'
    docs_dir: 'doc'

mkdocs.template.yml

This file is used as a template for the final mkdocs.yml. Default settings and some other configuration options are here.

Run Development Server

To see a live preview of the documentation you can run a development server that will refresh automatically on changes.

Install mkdocs and the material theme:

user@localhost ~/ $ pip install mkdocs
user@localhost ~/ $ pip install mkdocs-material

Clone this repository and install dependencies:

user@localhost ~/ $ git clone https://github.com/Icinga/icinga-docs-tools.git
user@localhost ~/ $ cd icinga-docs-tools
user@localhost ~/ $ bundle install --path vendor
user@localhost ~/ $ bundle exec build-docs.rb

Run server:

user@localhost ~/ $ mkdocs serve

You should be able to access the documentation now in your browser by calling the address https://localhost:8000