Skip to main content

No project description provided

Project description


toc-title: Table of contents

Pypi version Pypi Downloads Github Activity Python versions GitHub Actions License

mkquartodocs

Example

Make gorgeous reproducible documentation with quarto and mkdocs

It is a plugin for mkdocs that renders quarto markdown documents into github, so they are built with the rest of the documentation.

Why?

In many instances the documentation contains runnable code, and it makes sense that you verify that the code runs and keep the output of the code in sync with the current status of the document and software packages involved.

But mainly I really got tired of manually rendering documents and copying outpus.

Usage

  1. Install the dependencies: Installation
  2. Add the plugin to your configuration: Configuration
  3. Add .qmd files to your ./docs/ directoy
  4. Run mkdocs build

This will render code chunks and save the outputs! Check out https://quarto.org/ for more examples on how to use the format.

This ....

```{python}
print(1+2)
```

Will become this ...

:::: {.cell execution_count="1"}

print(1+2)

::: {.cell-output .cell-output-stdout} 3 ::: ::::

Installation

  1. Make sure you have quarto installed in your computer.

  2. Install mkquartodocs

pip install mkquartodocs

Configuration

Add mkquartodocs to your plugins in your mkdocs.yml

# Whatever is in your mkdocs.yml configuration file....
# ...

plugins:
  - mkquartodocs

Available configuration options:

  • quarto_path: Specifies where to look for the quarto executable.
  • keep_output: If true it will skip the cleanup step in the directory.
  • ignore: a python regular expressions that if matched will mark the file to not be rendered. Note that they need to be full matches
# Whatever is in your mkdocs.yml configuration file....
# ...

plugins:
  - mkquartodocs:
      quarto_path: /home/my_folder/some/weird/place/to/have/executables/quarto
      keep_output: true
      ignore: (.*broken.*.qmd)|(.*page[0-9].qmd)

Running

NOTHING !!! you do not have to run it manually!!

When you call mkdocs build, it should automatically find your .qmd files, render them, generate the output and clean after itself.

TODO

The things that need to/could be added to the project:

  • quarto project support
  • render in temporary directory, posibly with a 'safe' argument
  • addition of files not in the docs directory, 'include' argument
  • add readme to testing data
  • move INFO - mkquartodocs: Running RemoveCellDataPreprocessor to debug log

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

mkquartodocs-0.5.13.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

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

mkquartodocs-0.5.13-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file mkquartodocs-0.5.13.tar.gz.

File metadata

  • Download URL: mkquartodocs-0.5.13.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for mkquartodocs-0.5.13.tar.gz
Algorithm Hash digest
SHA256 b16e8b395702b680d88ce7b923088b69b803012965d0724e81049906c259cabc
MD5 46794562e3c58b5651d4fee1042ed193
BLAKE2b-256 64ef6fbe8eab011db3c0342e043a28d4f9d89575a9cf57828e0cb8f53ead0e87

See more details on using hashes here.

File details

Details for the file mkquartodocs-0.5.13-py3-none-any.whl.

File metadata

  • Download URL: mkquartodocs-0.5.13-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for mkquartodocs-0.5.13-py3-none-any.whl
Algorithm Hash digest
SHA256 102fba1af47d75424990d66d24afc73aca1cc97f5002601c960cabe02840545c
MD5 64a40e82120e5892c4288159a18f8080
BLAKE2b-256 b5bdd29e2d236164640aa6ed42bac3f818acafa169f373f977f552a8adb8b47d

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