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.1.tar.gz (6.5 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.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for warhol-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1b8740955461c7e51640ef3dc6a640932b2c4d4bbe1c07b8722ffb56513ef454
MD5 5ac02ef04a230c70feddf6b51397e71e
BLAKE2b-256 3186eef24b1fc73f6d68eff40dd3d83d46fcae1c29fd6d41526a6a02b0eb1237

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for warhol-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbf62928383dd2b4addf13e2c834d93ee83df85eb8ff7c014ce7ee59193e896d
MD5 4798153f15b32354c75db5fa961f06a1
BLAKE2b-256 f55bf8010bee6a7e909fb315d972870b52f1ec2cb8bcd8f76fbddea91e62903d

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