Skip to main content

The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions

Project description

mkdocs-techdocs-core

This is the base Mkdocs plugin used when using Mkdocs with Spotify's TechDocs. It is written in Python and packages all of our Mkdocs defaults, such as theming, plugins, etc in a single plugin.

Python Package

Usage

$ pip install mkdocs-techdocs-core

Once you have installed the mkdocs-techdocs-core plugin, you'll need to add it to your mkdocs.yml.

site_name: Backstage Docs

nav:
  - Home: index.md
  - Developing a Plugin: developing-a-plugin.md

plugins:
  - techdocs-core

Running Locally

You can install this package locally using pip and the --editable flag used for making developing Python packages.

pip install --editable .

You'll then have the techdocs-core package available to use in Mkdocs and pip will point the dependency to this folder.

Running with Docker

In the parent Dockerfile we add this folder to the build and install the package locally in the container. In the future, we'll probably move away from this approach and have it download directly from a Python registry (and this folder will publish to one).

See the README.md located in the techdocs-container/ folder for more details on how to build and run the Docker container.

Linting

pip install -r requirements.txt
python -m black src/

Note: This will write to all Python files in src/ with the formatted code. If you would like to only check to see if it passes, simply append the --check flag.

MkDocs plugins and extensions

The TechDocs Core MkDocs plugin comes with a set of extensions and plugins that mkdocs supports. Below you can find a list of all extensions and plugins that are included in the TechDocs Core plugin:

Plugins:

Extensions:

Changelog

0.0.13

  • Fixed issue where the whole temp directory could be included in the built site output. #7

0.0.12

0.0.11

0.0.10

  • Pin Markdown version to fix issue with Graphviz

0.0.9

  • Change development status to 3 - Alpha

0.0.8

  • Superfences and Codehilite doesn't work very well together (squidfunk/mkdocs-material#1604) so therefore the codehilite extension is replaced by pymdownx.highlight
  • Uses pymdownx extensions v.7.1 instead of 8.0.0 to allow legacy_tab_classes config. This makes the techdocs core plugin compatible with the usage of tabs for grouping markdown with the following syntax:
    ```java tab="java 2"
        public void function() {
            ....
        }
    ```

as well as the new

    === "Java"

    ```java
    public void function() {
        ....
    }
    ```

The pymdownx extension will be bumped too 8.0.0 in the near future.

  • pymdownx.tabbed is added to support tabs to group markdown content, such as codeblocks.

  • "PyMdown Extensions includes three extensions that are meant to replace their counterpart in the default Python Markdown extensions." Therefore some extensions has been taken away in this version that comes by default from pymdownx.extra which is added now (https://facelessuser.github.io/pymdown-extensions/usage_notes/#incompatible-extensions)

0.0.7

  • Fix an issue with configuration of emoji support

0.0.6

  • Further adjustments to versions to find ones that are compatible

0.0.5

  • Downgrade some versions of markdown extensions to versions that are more stable

0.0.4

  • Added support for more mkdocs extensions
    • mkdocs-material
    • mkdocs-monorepo-plugin
    • plantuml-markdown
    • markdown_inline_graphviz_extension
    • pygments
    • pymdown-extensions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs-techdocs-core-0.0.13.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_techdocs_core-0.0.13-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-techdocs-core-0.0.13.tar.gz.

File metadata

  • Download URL: mkdocs-techdocs-core-0.0.13.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for mkdocs-techdocs-core-0.0.13.tar.gz
Algorithm Hash digest
SHA256 13af4d120b4e784b2738e2b7d5f7a5c92622fba0ed297804b9311f6283b8850a
MD5 b4dd4afd49be1ec9d37632da2de1f3a3
BLAKE2b-256 491c5c318968739b58a934bbbf2da854cbf488c7da3926073820b449f9c80412

See more details on using hashes here.

File details

Details for the file mkdocs_techdocs_core-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_techdocs_core-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for mkdocs_techdocs_core-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 fcb512088d3b4768ea002ff903b433ff89b08a30cce0139693cf36cca23ed50a
MD5 5437e6cb7081708146bdfcf5136c0679
BLAKE2b-256 2b30511099594d5128c13f703daef2d4770517f7433f8cc7593b58932ed3c0f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page