Skip to main content

Build (web publish) Markdown and Massive Wiki sites.

Project description

markpub

PyPI version

MarkPub builds a static HTML website from a directory of Markdown files.
The website supports wiki-links, transclusion, and provides full-text search.

MarkPub installs configuration files that GitHub Pages and Netlify can use to automatically publish the HTML files on the web.

Requirements

  • Python 3.12 or higher.

Install

pip install markpub

Usage

Overview

markpub [--version] <command> [options]

Available commands:

  • init - Initialize a new MarkPub site
  • build - Build HTML website from Markdown files
  • theme-install - Install default theme in a directory

Commands

markpub init <directory>

Initialize a new MarkPub site in the specified directory. This creates:

  • .markpub/markpub.yaml - Site configuration file
  • Configuration files for GitHub Pages/Netlify deployment
  • Sidebar.md - Website navigation links displayed sidebar on webpages

Example:

markpub init my-wiki

markpub build [options]

Build a static website from Markdown files.

Required options:

  • -i, --input <directory> - Input directory containing Markdown files
  • -o, --output <directory> - Output directory for generated HTML files

Optional options:

  • --config, -c <file> - Path to YAML config file (default: ./markpub.yaml)
  • --theme, -t <directory> - Path to directory of HTML theme files (leave off to use the MarkPub-provided theme)
  • --root, -r <name> - Website root directory name (needed for GitHub Pages hosting)
  • --lunr - Create lunr search index (requires npm and lunr to be installed)
  • --commits - Include Git commit messages and times in All Pages

Examples:

# Basic build
markpub build -i my-wiki -o my-wiki-site

# Build with custom theme and search
markpub build -i my-wiki -o my-wiki-site --theme custom-theme --lunr

# Build for GitHub Pages with Git history
markpub build -i my-wiki -o my-wiki-site --root my-repo --commits

markpub theme-install <directory>

Install the default theme ('dolce') in the specified markpub directory.

Example:

markpub theme-install my-wiki

Getting Help

Use --help with any command for detailed usage information:

markpub --help
markpub init --help
markpub build --help
markpub theme-install --help

Documentation

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

markpub-1.1.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

markpub-1.1.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file markpub-1.1.0.tar.gz.

File metadata

  • Download URL: markpub-1.1.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.6.0

File hashes

Hashes for markpub-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c94874f77a7e1c57ab2e76b406e50ca4bde7f0f5339fa76067f8018ce543c935
MD5 abbbc854d3318006a35243da40f55273
BLAKE2b-256 40bcc577ed000ebbc9846deaa6bbcb47f7972cc607291e0c2ea2da7cf94d9f07

See more details on using hashes here.

File details

Details for the file markpub-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: markpub-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.6.0

File hashes

Hashes for markpub-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd5787f503e1a8b080e87ee765c1f8a207a105648a5f019f0e371901ca07e367
MD5 f1d30fe0e52f5c213b484c7836742b05
BLAKE2b-256 fc81249f3f3b4348998e08b7edb78072512a01ebbbe5e9fbcf5e86f0a81ce98c

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