Coder Social home page Coder Social logo

example-mkdocs-basic's Introduction

Example: Basic MkDocs project for Read the Docs

Documentation Status

This example shows a basic MkDocs project with Read the Docs. You're encouraged to view it to get inspiration and copy & paste from the files in the source code. If you are using Read the Docs for the first time, have a look at the official Read the Docs Tutorial.

๐Ÿ“š docs/
A basic MkDocs project lives in docs/, it was generated using MkDocs defaults. All the *.md make up sections in the documentation.

โš™๏ธ .readthedocs.yaml
Read the Docs Build configuration is stored in .readthedocs.yaml.

โš™๏ธ mkdocs.yml
A basic MkDocs configuration is stored here, including a few extensions for MkDocs and Markdown. Add your own configurations here, such as extensions and themes. Remember that many extensions and themes require additional Python packages to be installed.

๐Ÿ“ docs/requirements.txt and docs/requirements.in
Python dependencies are pinned (uses pip-tools) here. Make sure to add your Python dependencies to requirements.txt or if you choose pip-tools, edit docs/requirements.in and remember to run to run pip-compile docs/requirements.in.

๐Ÿ’ก docs/api.md
We add our example Python module lumache in order to auto-generate an API reference. To do this, we use the ::: syntax, you can read more in the mkdocstrings documentation.

๐Ÿ’ก docs/usage.md
We also include some direct links to a function from the API reference, as well as embedding documentation for the example function lumache.get_random_recipe. This functionality is also from the mkdocstrings extension.

๐Ÿ’ก lumache.py
API docs are generated for this example Python module - they use docstrings directly in the documentation, notice how this shows up in the rendered documentation. We use the Sphinx convention for docstrings, however you are free to edit mkdocs.yml to change this option to google or numpy.

๐Ÿ”ข Git tags versioning
We use a basic versioning mechanism by adding a git tag for every release of the example project. All releases and their version numbers are visible on example-mkdocs-basic.readthedocs.io.

๐Ÿ“œ README.md
Contents of this README.md are visible on Github and included on the documentation index page (Don't Repeat Yourself).

โ‰๏ธ Questions / comments
If you have questions related to this example, feel free to can ask them as a Github issue here.

Example Project usage

This project has a standard MkDocs layout which is built by Read the Docs almost the same way that you would build it locally (on your own laptop!).

You can build and view this documentation project locally - we recommend that you activate a local Python virtual environment first:

# Install required Python dependencies (MkDocs etc.)
pip install -r docs/requirements.txt

# Run the mkdocs development server
mkdocs serve

Using the example in your own project

If you are new to Read the Docs, you may want to refer to the Read the Docs User documentation.

If you are copying this code in order to get started with your documentation, you need to:

  1. place your docs/ folder alongside your Python project. If you are starting a new project, you can adapt the pyproject.toml example configuration.
  2. use your existing project repository or create a new repository on Github, GitLab, Bitbucket or another host supported by Read the Docs.
  3. copy mkdocs.yml, .readthedocs.yaml and the docs/ folder into your project.
  4. customize all the files, replacing example contents.
  5. Rebuild the documenation locally to see that it works.
  6. Finally, register your project on Read the Docs, see Importing Your Documentation.

Read the Docs tutorial

To get started with Read the Docs, you may also refer to the Read the Docs tutorial. It provides a full walk-through of building an example project similar to the one in this repository.

example-mkdocs-basic's People

Contributors

benjaoming avatar pajjaecat avatar

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.