Install MkDocs - Read the Docs Alternative - on Linux 🌱

What is MkDocs?

MkDocs is a fast, simple and downright gorgeous static site generator that's geared towards building project documentation. Documentation source files are written in Markdown, and configured with a single YAML configuration file. It is designed to be easy to use and can be extended with third-party themes, plugins, and Markdown extensions. - https://github.com/mkdocs/mkdocs

Installation

  1. Log into the Linux device
  2. Run the following commands in terminal
    # update software repositories
    sudo apt update
    # install available software updates
    sudo apt upgrade
    # install prerequisites
    sudo apt install wget apt-transport-https -y
    # install python
    sudo apt install python3-full python3-pip -y
    # install mkdocs
    sudo apt install mkdocs -y
    # create a mkdocs directory in user directory
    mkdir ~/mkdocs
    # change directory to mkdocs
    cd ~/mkdocs
    # create a mkdocs site
    mkdocs new mkdocs-demo
    # change directory to mkdocs-demo
    cd mkdocs-demo
    # start the demo site
    mkdocs serve
  3. Open a web browser and navigate to http://DNSorIP:8000

Read the Docs Theme

  1. Back in the terminal, press CTRL+C to kill the running process
  2. Run the following command
    # edit the mkdocs configuration file
    nano ./mkdocs.yml
  3. Add the following line to mkdocs.yml

    theme: readthedocs

  4. Press CTRL+O, Enter, CTRL+X to write the changes
  5. Run the following command to see the change
    # restart the demo site
    mkdocs serve

Source: https://www.mkdocs.org/getting-started/