Skip to main content

mkprof

A companion tool for mkdocs-material for building and running a blog that natively supports Jupyter notebooks as articles.

If you think of of mkdocs as something like a table saw, then mkprof is a table saw jig, like a cross-cut sled. It is a doohicky you add to a general purpose tool that makes a specific set of operations safer, more repeatable, and faster.

Why is it called mkprof? Well, professors mentor doctoral candidates, and if mkdocs makes docs, then... look, naming things is hard and I was tired.

mkprof metadata TUI — adding frontmatter to a notebook post

What it does

  • Converts .ipynb notebooks in your posts directory to mkdocs-compatible Markdown, extracting figures, handling asset paths, and adding a notebook download link
  • Provides an interactive TUI that prompts for any missing blog frontmatter (title, date, description, tags, authors) with content-aware pre-filling
  • Lints and auto-formats Markdown posts (mdformat, spell check, MathJax compatibility checks)
  • Skips conversion when the generated .md is already newer than its source notebook
  • mkprof init scaffolds a complete, opinionated site: hooks.py with nav injection and recent-posts support, MathJax, dark/light palette toggle, tags, Blog section open by default in the sidebar (via a small script that sets Material's accordion checkbox, not navigation.expand), and a CSS file with stubs for figures, photographs, tables, DataFrames, code blocks, and the recent-posts admonition — structural rules with color placeholders so you start with a working layout and make your own color decisions

mkprof is a pre-processor: it runs before mkdocs build, transforming notebooks into Markdown that mkdocs-material already knows how to handle.

Requirements

Installation

pip install mkprof

Quick start

Fresh site

mkprof init mysite
cd mysite
mkprof serve

mkprof init scaffolds a ready-to-use mkdocs-material site with the blog plugin and mkprof pre-configured. Drop .ipynb notebooks into docs/blog/posts/ and run mkprof to convert and build.

Existing mkdocs-material site

pip install mkprof
# run from your site root (the directory containing mkdocs.yml)
mkprof

mkprof reads your existing mkdocs.yml to locate docs_dir and your blog posts directory. No extra config file is required for a standard layout.

For non-standard layouts or per-site overrides, add an extra.mkprof section to your mkdocs.yml:

extra:
  mkprof:
    posts_dir: docs/content/posts   # default: derived from blog plugin config
    drafts_dir: _drafts             # default: drafts
    default_author: yourslug        # default: inferred from authors.yml

Commands

mkprof              TUI: convert notebooks + prompt to build or serve
mkprof serve        TUI: convert notebooks + start mkdocs dev server
mkprof build        TUI: convert notebooks + run mkdocs build
mkprof convert      headless: convert notebooks only (CI-safe, no prompts)
mkprof init [DIR]   scaffold a new site (default: current directory)

mkprof, mkprof serve, and mkprof build launch a Textual TUI that prompts interactively for any missing blog frontmatter and lets you move incomplete posts to drafts.

mkprof convert is non-interactive: it logs to stdout, skips notebooks that are missing metadata without prompting, and exits non-zero on conversion errors. Use it in CI:

- run: mkprof convert && mkdocs build

How it fits with mkdocs

mkprof is intentionally not a mkdocs plugin. It runs as a separate step before mkdocs build, generating standard Markdown that mkdocs-material handles natively. This keeps the conversion logic decoupled from mkdocs internals and makes it straightforward to adapt when Zensical matures.

License

MIT

Metadata

Release files for mkprof 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkprof 0.1.2
File Size Uploaded Provenance
mkprof-0.1.2.tar.gz 297.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mkprof 0.1.2
File Interpreter ABI Platform
mkprof-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 338.9 kB

Release files / mkprof-0.1.2.tar.gz

Download URL mkprof-0.1.2.tar.gz
Size 297.1 kB
Tags Source
SHA-256 checksum
How to use checksums
17363a164749d8b46d4d6d77947da82d42dfb000591860c09d1a8494a4e56d66
BLAKE2b-256 checksum
How to use checksums
0dfc66f76f8dbfd2c518cf81b39fcdf2a295ef2c34bb91fd5c482b1a646f22a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 27, 2026.

Transparency log

Release files / mkprof-0.1.2-py3-none-any.whl

Download URL mkprof-0.1.2-py3-none-any.whl
Size 41.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0c0db1ef282532d3ceddf5bbe09c668c7f1f230ac60d2618599ea023fcf2db6
BLAKE2b-256 checksum
How to use checksums
0e0423ab0affb5480a7617186dc84faf5d474b9034f931b131d2018b0cf3344c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 27, 2026.

Transparency log

Security for mkprof 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mkprof-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page