Skip to main content

Website Assembler Requiring Hardly any Other Libraries -- a minimal static-site builder

Project description

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 HTML snippets. It's HTML, not rocket science.

The 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, 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 public directory can be viewed directly with a web browser, but as URLs are internally specified relative to the HTTP server root, it's best to run a local web server. The serve command does this.

TODO:

  • test and early-exit for either markdown or pandoc if .md's found
  • add a global no-extensions on/off flag in config?
  • allow regex capture-group injection into templates... needs subst map?!?
  • parallel processing for MD -> HTML
  • unify build and serve modes behind a single command?
  • use for JustHTML or BeautifulSoup?
  • use inotify to auto-trigger updates?

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

warhol-0.0.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

warhol-0.0.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file warhol-0.0.2.tar.gz.

File metadata

  • Download URL: warhol-0.0.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for warhol-0.0.2.tar.gz
Algorithm Hash digest
SHA256 448ca84522eab226cb42c9c691c220b8da475ea35a2b8996464e5a8c45e95c5e
MD5 8031dad47f0dc241f4fd4d9e05530022
BLAKE2b-256 ccda9f07c40500574b0d28dff25a68eef9aa7bc44f46f10a4e03cff0e56cce99

See more details on using hashes here.

File details

Details for the file warhol-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: warhol-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for warhol-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb0c35cd4d14f8c803a044c5b556219184c0ffce9caad09928f7d6ca30c69c4e
MD5 a881290dde14dcfcde342cf765b18bfb
BLAKE2b-256 b01d54730f4412f2d8a734699964d17e67b986aabf45b8f5e768cc99c8f0b902

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