Giter VIP home page Giter VIP logo

inspircd-docs's Introduction

About

InspIRCd is a modular C++ Internet Relay Chat (IRC) server for UNIX-like and Windows systems.

This repository contains the sources for the documentation available at docs.inspircd.org.

Development

The documentation is built with MkDocs. You can install this along with all of the other dependencies using pip using the following command:

pip3 install -r requirements.txt .

Depending on your system you may need to run this as root for a system-wide install.

Once the dependencies are installed you can run the site using the following command:

mkdocs serve

Documentation Structure

Content

Most of it is in docs/3/, which is the documentation of the current major release. The core documentation directly in it, and module documentation in a subfolder. Each module is documented by a YAML file, that is formatted by the MkDocs extension using mkdocs_inspircd/templates/module.md.j2. The data is also interpreted by the documentation to generate tables in the core documentation (eg. to provide a list of all commands of all modules).

docs/4/ contains preparatory work for the next major release.

MkDocs extension

mkdocs_inspircd/ contains an extension for MkDocs, that does two things:

Rendering module documentation

All module pages are very similar in structure, so we decided to generate them from data files instead of repeating the markdown code. This avoids inconsistencies, and easier changes in the structure; and to access module information programmatically.

To do this, the MkDocs extension implements the on_files hook, so MkDocs detects .yml files as source files (as if they were .md).

It also implements the on_page_read_source hook to convert the YAML content to Markdown on the fly, because MkDocs tries to parse it. This is done simply by rendering mkdocs_inspircd/templates/module.md.j2 with the YAML content as context.

Jinja templating for Markdown

Some pages, like docs/3/channel-modes.md, use dynamic data to populate tables (eg. the table of all plugins' channel modes) without duplicating data from plugins. This is done by the on_page_markdown hook, which is executed just before MkDocs parses renders Markdown. This hook interprets Markdown documents as if they were Jinja templates, and passes them module data in the context; which produces the final Markdown document.

License

This documentation is licensed under the same license as InspIRCd (GPLv2).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.