Skip to main content

A vanilla Bootstrap 4 theme

Project description

Bootstrap 4 theme for MkDocs

A vanilla Bootstrap 4 theme.


Screenshot

Screenshot of Bootstrap4 theme for MkDocs

Quick start

First install the package:

$ pip install mkdocs-theme-bootstrap4

Then enable it:

theme:
    name: bootstrap4

Configuration

Place these additional options under the theme: section of your mkdocs.yml configuration to change the theme's behaviour.

# Show next/previous links between pages?
next_previous: true

Bootstrap features

Some Bootstrap components require the addition of additional CSS classes. To enable these, add the following plugins in mkdocs.yml:

plugins:
    - bootstrap4-blockquotes
    - bootstrap4-tables

Hacking

First, install the dependencies:

  • Python 2, for some of our dependencies.
  • Python 3, for the package build process.
  • Yarn, for managing frontend dependencies.

Ensure that Python 2 is found on your path before Python 3, else you'll get errors from node-gyp later. If you're unable to do this, set the environment variable npm_config_python to a command that'll launch Python 2 (py -2 on Windows, python2 elsewhere).

On Windows:

  • It's easiest to not put Python on your path and instead rely on the py CLI.
  • You'll need the build tools necessary to install native dependencies: npm install -g --production windows-build-tools.

To get completion working in your editor, set up a virtual environment in the root of this repository and install MkDocs:

$ pip3 install --user --upgrade setuptools twine wheel
$ python3 -m venv venv
$ . venv/bin/activate
$ pip install -r requirements.txt

To install the plugin onto a local MkDocs site in editable form:

$ pip install --editable /path/to/mkdocs-theme-bootstrap4

Upgrading dependencies

To upgrade the dependencies, install pip-upgrader:

. venv/bin/activate
pip install -r requirements.dev.txt

Then proceed to update the dependencies:

pip-upgrade requirements.dev.txt

The node dependencies can be updated with Yarn:

yarn upgrade

Releasing

Build the distributable package:

$ python3 setup.py sdist bdist_wheel

Push it to the PyPI test instance:

$ python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

Test it inside a virtual environment:

$ pip install --index-url https://test.pypi.org/simple/ --no-deps mkdocs-drawio-exporter

Let's go live:

$ python3 -m twine upload dist/*

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-theme-bootstrap4-0.4.0.tar.gz (771.4 kB view details)

Uploaded Source

Built Distribution

mkdocs_theme_bootstrap4-0.4.0-py3-none-any.whl (774.4 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-theme-bootstrap4-0.4.0.tar.gz.

File metadata

  • Download URL: mkdocs-theme-bootstrap4-0.4.0.tar.gz
  • Upload date:
  • Size: 771.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for mkdocs-theme-bootstrap4-0.4.0.tar.gz
Algorithm Hash digest
SHA256 de7a31fe910eb95acb1b22c95326d276edaf3b159a9db545d98b1741286f8a8a
MD5 582acd43fd4a511eb3769d0907c56795
BLAKE2b-256 0f2c49c28d40fb133a8ff01a72d30641fb16c8407f9518648995cbba46f38ea3

See more details on using hashes here.

File details

Details for the file mkdocs_theme_bootstrap4-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_theme_bootstrap4-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 774.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for mkdocs_theme_bootstrap4-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d72298742287bdbf234d481d428e922e5ed4cdbedd33cb73c2bb663319a4be37
MD5 38746f1b7dd1a2fcc85c4c14d1e794c1
BLAKE2b-256 008da57ad9f64c51218005a7afdb0a91e4bc819e68bf54907e58df5a605640d7

See more details on using hashes here.

Supported by

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