Code Monkey home page Code Monkey logo

concordium.github.io's Introduction

Concordium Documentation

Before contributing please read and follow the principles outlined in

The documentation is written in reStructuredText (Link to the basics).

For building the documentation we use Sphinx and the theme from ReadTheDocs with minor design tweaks.

Sphinx supplies a number of useful "directives" (The sphinx equivalent of LaTeX commands) for stuff like code highlighting, remarks, warnings and so on.

Additionally, we have enabled the extension for todo directives

.. todo::

   Write a todo here

Todos are shown as warnings when building the docs.

To generate SVG graphics, we use the Graphviz extension.

Installation

Linux

Install python3 and the python package manager pip3.

To install the python dependencies run:

pip3 install -r requirements.txt

Install graphviz:

  • Ubuntu: sudo apt install graphviz

macOS

On macOS

brew install python3 graphviz
pip3 install -r requirements.txt

Windows

Install python3 and select a python installer, e.g. this one. Download and run the launcher. Make sure to select "Add Python to PATH" at the bottom before proceeding with the install.

After that from a terminal run

pip3 install -r requirements.txt

from the root of this repository.

If you want the graphs to render properly you also need to install the dot tool, which is part of the graphviz package.

Development

To watch the doc files and automate the build run:

macOS and Linux

make dev

and navigate to localhost:8000.

Before committing, make sure to run the linter and fix all the errors reported:

make lint

Windows

./make.bat dev

and navigate to localhost:8000.

Before committing, make sure to try to build and fix any warnings that are reported.

./make.bat html

Note: In make dev we disable the cache on build as this tends to cause inconsistencies. If the build time becomes too slow, it might be worth enabling again by removing -E.

Building the docs

Run the following command:

make html

To check for dead links (also done by the CI), run:

make linkcheck

Style guide

Language

  • For a user guide, prefer second person and imperative ("click on X").
  • Keep sentences short.
  • Prefer present continuous ("is") over future ("will be").
  • Prefer active voice ("the baker adds a block") over passive voice ("a block is added").

Formatting

Headers

Use sentence-style capitalization, i.e., only capitalize the first letter of a header.

Be consistent in the use of characters for creating headers; use the following for each level of header:

========
Header 1
========

Header 2
========

Header 3
--------

Header 4
^^^^^^^^

Header 5
~~~~~~~~

Terminal commands

Use code-block:: console to show content from a terminal and prepend commands with $ without a space in between.

A space is added between $ and the command through CSS. This solution makes only the command itself copyable, thereby improving the user-experience.

Example:

.. code-block:: console

   $echo Hello, world!
   Hello, world!

Buttons and clickable elements

Use bold to highlight keyboard buttons and clickable elements (e.g., "Press Enter", "Select Next").

Emphasis

  • Use italics for text emphasis (e.g., when introducing a new term: "Obtain an identity from an identity provider.").
  • After the term is introduced avoid emphasising it again in the same text.

Code formatting for this repository

Indentation

Use three spaces for indentation. This aligns the directive name (note::) with the content of the directive (This line...).

Add an empty line between a directive and its content.

Example that follows both rules:

.. note::

   This line has three spaces in front of it and it has an empty line above it.

License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

CC BY-SA 4.0

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.