Giter Club home page Giter Club logo

emlid-docs's Introduction

Emlid docs

This is a repo containing all Emlid docs

Dependencies

We use mkdocs to build the docs and Pipenv to manage the dependencies.

  • python3
  • python3-pip
git clone https://github.com/emlid/emlid-docs
pip3 install pipenv
cd emlid-docs
pipenv install

Editing docs with templates

Adding new templates

To add new template you need to create a jinja2 template in emlid-docs/docs/templates/ with .mdx extension and add an entry to 'templates' section of one or several .yml config files in following format.

templates:  # <- this should already be in the file
    destination: '<template-name.mdx>'

Where destination is the name of the file in docs_dir (docs_dir is specified in each .yml file) directory, that is going to be rendered via template.

And template_name name is the name of the actual template file with .mdx extension that must be placed inside emlid-docs/doc/templates directory.

Without these entries template will be ignored.

Example:

templates:
    index.md: 'index.mdx'
    power-supply.md: 'power-supply.mdx'

Updating docs after editing templates (Generating markdown)

Template building script takes the path to .yml file as an argument and rebuilds docs from every template specified in .yml. This should be run after making any changes to templates.

cd emlid-docs
pipenv run python build.py <target>
# Where <target> is .yml config file.
# example
pipenv run python build.py reachm-plus.yml 

Generating HTML

cd emlid-docs
pipenv run mkdocs build -f <target>.yml -d <dir>

This will build the <target> and save the generated docs to <dir>.

You can also pipenv run mkdocs serve -f <target>.yml to take a look at the docs on your local machine.

To preview changes in html after rendering templates automatically run pipenv run python update_serve.py <target>.yml. This essentially executes build.py and mkdocs serve -f in one command.

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.