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.10.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

mkquartodocs-0.5.10-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mkquartodocs-0.5.10.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.5 Linux/6.5.0-1025-azure

File hashes

Hashes for mkquartodocs-0.5.10.tar.gz
Algorithm Hash digest
SHA256 4f84dd99bef092b5cc9344784f68b75bc7d1dce67f204f198920220a442320b0
MD5 fb8a721aa58142cd62632b79aa431b54
BLAKE2b-256 6cb822f2c11eac896e9a45ea1c5281d1ec577ce1b20c1079b9e3e3fbe1b7f480

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mkquartodocs-0.5.10-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.5 Linux/6.5.0-1025-azure

File hashes

Hashes for mkquartodocs-0.5.10-py3-none-any.whl
Algorithm Hash digest
SHA256 209c3e39572ee290f22241f978b654a43327b9b8e56b71792acaa8d4ea840904
MD5 0b016e09938bef3ff6361ef19792bfdd
BLAKE2b-256 779d7ebe8b69320db04a0c13965f8e0cbc5f756972caee04b2c3e9b65373803a

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