Versioned static-site deployments with builder isolation
Project description
versite
versite is a generic versioned static-site deployment tool inspired by mike, but it is not coupled to MkDocs. It manages a deployment branch containing multiple published site versions, aliases, redirects, and per-version metadata. Only versite deploy is allowed to invoke a site builder.
Why it exists
mike is tightly centered on MkDocs. versite separates the problem into two layers:
- A versioned static-site manager that edits
versions.json, alias paths, redirects, and the target git branch. - A command-based builder runner that invokes builders as external subprocesses only during
deploy.
That separation means non-build commands stay fast and reliable:
versite listversite deleteversite aliasversite retitleversite propsversite set-defaultversite serve
Those commands do not import MkDocs, load MkDocs config, run MkDocs plugin hooks, invoke Jekyll, or shell out to any builder.
Installation
pip install -e .
versite --help
Configuration
versite reads versite.yml if present. The config loader only uses lightweight YAML parsing.
builder: mkdocs
remote: origin
branch: gh-pages
deploy_prefix: ""
alias_type: redirect
redirect_template: null
push: false
builders:
mkdocs:
command:
- mkdocs
- build
- --clean
- --config-file
- "{config_file}"
- --site-dir
- "{output_dir}"
config_file: mkdocs.yml
jekyll:
command:
- bundle
- exec
- jekyll
- build
- --source
- "{source}"
- --destination
- "{output_dir}"
source: .
CLI flags override config values.
MkDocs usage
MkDocs support is implemented only as a command template. versite never imports mkdocs.
versite deploy 1.0 latest --builder mkdocs
versite list
versite set-default latest
versite delete 0.9
During deploy, the MkDocs builder receives:
VERSITE_VERSION=<version>MIKE_DOCS_VERSION=<version>
Jekyll usage
Jekyll support is also command-template based.
versite deploy 1.0 latest --builder jekyll
versite list
versite alias 1.0 stable
versite set-default latest
versite does not import Jekyll-related Python libraries. It only runs the configured command during deploy.
Custom builders
Custom builders can be added through versite.yml without changing Python code:
builder: custom
builders:
custom:
command:
- npm
- run
- build
- --
- --outDir
- "{output_dir}"
Example:
versite deploy 1.0 latest --builder custom
Command reference
versite deploy VERSION [ALIAS...]
versite list [IDENTIFIER]
versite delete [IDENTIFIER...] [--all]
versite alias IDENTIFIER [ALIAS...]
versite retitle IDENTIFIER TITLE
versite props IDENTIFIER [PROP]
versite set-default IDENTIFIER
versite serve
Important options:
--config-file FILE--builder NAME-r, --remote REMOTE-b, --branch BRANCH-m, --message MESSAGE-p, --push--allow-empty--deploy-prefix PATH--alias-type {redirect,copy,symlink}-T, --template FILE--ignore-remote-status--source DIR--output-dir DIR--build-command ...-q, --quiet--json
Alias modes
redirect: writes static HTML redirects. This is the default and works well on GitHub Pages.copy: copies the deployed version directory into each alias directory.symlink: creates symlink aliases in the target branch for compatibility-focused setups.
GitHub Pages
versite is designed for branch-based static hosting. A common setup is gh-pages with redirect aliases and a root index.html redirect created by set-default.
Example MkDocs config:
builder: mkdocs
branch: gh-pages
alias_type: redirect
builders:
mkdocs:
command:
- mkdocs
- build
- --clean
- --config-file
- "{config_file}"
- --site-dir
- "{output_dir}"
config_file: mkdocs.yml
Example Jekyll config:
builder: jekyll
branch: gh-pages
alias_type: redirect
builders:
jekyll:
command:
- bundle
- exec
- jekyll
- build
- --source
- "{source}"
- --destination
- "{output_dir}"
source: .
Migration from mike
mike deployroughly maps toversite deploy --builder mkdocs.mike list,delete,alias,retitle,props, andset-defaultroughly map to the sameversitesubcommands.- Unlike
mike, non-build commands do not load MkDocs config. - Shared deployment settings should move into
versite.yml. VERSITE_VERSIONis the generic build env var. MkDocs builders also receiveMIKE_DOCS_VERSIONfor compatibility.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file versite-0.0.1.tar.gz.
File metadata
- Download URL: versite-0.0.1.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3010706d79e8cc10a98fde7948189abe203bebf43ee87751502c94b54e59db1
|
|
| MD5 |
3f6d134f4140862e24195ac2142b62e5
|
|
| BLAKE2b-256 |
b85c09bee2b78b4d10370663bfda6521aaaf0f6f00d45525d03216eaf76ee1d4
|
Provenance
The following attestation bundles were made for versite-0.0.1.tar.gz:
Publisher:
release.yml on PrimerPages/versite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
versite-0.0.1.tar.gz -
Subject digest:
f3010706d79e8cc10a98fde7948189abe203bebf43ee87751502c94b54e59db1 - Sigstore transparency entry: 1498699253
- Sigstore integration time:
-
Permalink:
PrimerPages/versite@48f3d9b166d9b594d77997ddfd0564d305e6f4cd -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/PrimerPages
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@48f3d9b166d9b594d77997ddfd0564d305e6f4cd -
Trigger Event:
release
-
Statement type:
File details
Details for the file versite-0.0.1-py3-none-any.whl.
File metadata
- Download URL: versite-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45ee0a778c77aa408b9dfd51a01ab1d3c67fe0ad5fd32c21ed975c8243f2acaa
|
|
| MD5 |
f78560d944e05b26d14469052c090deb
|
|
| BLAKE2b-256 |
a43e4b6665ddcdb6bc5c0ef682fbface5d8fbc050b9272071c91ec854e749d91
|
Provenance
The following attestation bundles were made for versite-0.0.1-py3-none-any.whl:
Publisher:
release.yml on PrimerPages/versite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
versite-0.0.1-py3-none-any.whl -
Subject digest:
45ee0a778c77aa408b9dfd51a01ab1d3c67fe0ad5fd32c21ed975c8243f2acaa - Sigstore transparency entry: 1498699406
- Sigstore integration time:
-
Permalink:
PrimerPages/versite@48f3d9b166d9b594d77997ddfd0564d305e6f4cd -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/PrimerPages
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@48f3d9b166d9b594d77997ddfd0564d305e6f4cd -
Trigger Event:
release
-
Statement type: