Skip to main content

Warhol — Website Assembler Requiring Hardly any Other Libraries

Make a website from Markdown and HTML snippets

Current popular static-website generators are complex beasts, with advanced templating languages, and complicated, fragile and (e.g. Node) dependency-heavy example styles. This package is the antidote: a simple, minimal-dependency package for wrapping HTML and Markdown content pages in site-standard header/footer/etc snippets. It's HTML, not rocket science.

Using Warhol

Use warhol init to initialise a project directory with the basic structure and a simple template.

The warhol build command merges pages from the content/ directory with headers, footers, and box "asides" loaded from the include/ directory. Any Markdown .md files in the content directory tree are converted to HTML, and staged in the .build directory. The final stage is injection of includes and template parameters, which augment the cache contents and write out to the public/ directory.

Parameters are mostly defined as URL-regex maps in the config.toml config file. The default behaviour is for the build step to create a directory and index.html file in place of each (non-index) HTML file, so the webpage URLs do not have .html suffixes; this can be disabled via a regex match in the config file.

The generated site in the public/ directory can be viewed directly with a web browser, but as URLs are internally specified relative to the HTTP server root and index.html pages are assumed to be implicitly loaded, it's best to run a local web server. The warhol serve command does this, from the public/ dir by default.

Example

TODO: walk through init, list dir contents, customize, view, watch warhol build

TODO's

  • allow Markdown-based includes? Would require a restructure, but...
  • test and early-exit for either markdown or pandoc if .md's found
  • allow replacement of the site-root leading slash with a configurable string
  • allow regex capture-group injection into templates... needs subst map?!?
  • parallel processing for MD -> HTML
  • unify build and serve modes behind a single command?
  • is there a use for JustHTML or BeautifulSoup?
  • use inotify to auto-trigger updates?
  • single-source the version string for PyPI.

Metadata

Release files for warhol 0.0.5

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

Source distribution (sdist)

Source distribution for warhol 0.0.5
File Size Uploaded
warhol-0.0.5.tar.gz 2.6 MB Details

Built distribution (wheel)

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

Total release size: 5.3 MB

Release files / warhol-0.0.5.tar.gz

Download URL warhol-0.0.5.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
7d578a17b9aeb0b8f8f800495993eafb3b29e66a1760ddc7cea5af69e8179486
BLAKE2b-256 checksum
How to use checksums
b2251493004b6c9587471ba743b68edcd437b383ca5115399640b067c8da7c45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / warhol-0.0.5-py3-none-any.whl

Download URL warhol-0.0.5-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
516ac43a28e613c55f2fde66449bb96f4b6c738ba2f69056a23cc945e943341e
BLAKE2b-256 checksum
How to use checksums
7df07484d58a375f61957f4552201db58ad0cf8935acd6a802fcf2988822fc61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release history Release notifications | RSS feed

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.6

2 release files

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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