Versioned static-site deployments for prebuilt static directories
Project description
versite
versite is a versioned static-site deployment tool for prebuilt static site directories. It manages a deployment branch containing multiple published site versions, aliases, redirects, and per-version metadata.
Why it exists
versite focuses on deployment branch management only. It copies a prebuilt static site into a versioned path, updates versions.json, manages aliases and redirects, and commits the result to the deployment branch.
It does not:
- build MkDocs sites
- build Jekyll sites
- run custom build commands
- rewrite generated asset URLs after a site is built
Installation
pip install -e .
versite --help
Configuration
versite reads versite.yml if present. The config loader only uses lightweight YAML parsing.
remote: origin
branch: gh-pages
deploy_prefix: ""
alias_type: redirect
redirect_template: null
push: false
CLI flags override config values.
Prebuilt Site Deployment
Deploy expects a prebuilt static site directory:
versite deploy 1.0 latest --site-dir path/to/site
versite publishes the contents of --site-dir into the deployment branch under the version path, updates versions.json, manages aliases, and writes redirects when needed.
If the generated site needs a versioned base path, that must be handled during the build step before versite sees the output. versite does not rewrite generated HTML, CSS, JavaScript, or asset URLs after the fact.
Migration Examples
MkDocs:
VERSION=1.0
VERSITE_VERSION="$VERSION" MIKE_DOCS_VERSION="$VERSION" mkdocs build --clean --site-dir dist/site
versite deploy "$VERSION" latest --site-dir dist/site
Jekyll:
VERSION=1.0
bundle exec jekyll build --destination dist/site --baseurl "/$VERSION"
versite deploy "$VERSION" latest --site-dir dist/site
For Jekyll and other generators that emit root-based asset or page URLs, build with the correct base path for the versioned deployment location.
Command Reference
versite deploy VERSION [ALIAS...] --site-dir path/to/site
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-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--site-dir DIR--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:
branch: gh-pages
alias_type: redirect
push: false
Migration From mike
mike deployroughly maps to building the site first and then runningversite deploy --site-dir ....mike list,delete,alias,retitle,props, andset-defaultroughly map to the sameversitesubcommands.- Unlike
mike,versitedoes not run MkDocs builds. - Shared deployment settings should move into
versite.yml.
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
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.2.tar.gz.
File metadata
- Download URL: versite-0.0.2.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e33a8837774dcdb6a15844a0f7ee4d34977842d9e7f1f3d22870a597cfb76216
|
|
| MD5 |
8c04b74ade132a750619967c9268f5c8
|
|
| BLAKE2b-256 |
2a04ab53e02f14622c192e95723749b26d25813c66b46fbf9c8f112e55d3545c
|
Provenance
The following attestation bundles were made for versite-0.0.2.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.2.tar.gz -
Subject digest:
e33a8837774dcdb6a15844a0f7ee4d34977842d9e7f1f3d22870a597cfb76216 - Sigstore transparency entry: 1540132005
- Sigstore integration time:
-
Permalink:
PrimerPages/versite@59fab1987d3fa451634e3e4f175bc80b51c659eb -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/PrimerPages
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@59fab1987d3fa451634e3e4f175bc80b51c659eb -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file versite-0.0.2-py3-none-any.whl.
File metadata
- Download URL: versite-0.0.2-py3-none-any.whl
- Upload date:
- Size: 13.1 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 |
b55f1805e779f0feba792221987e6ecaea2633fc90226497713aac2f85f28509
|
|
| MD5 |
0ceae7c6fe7bbe84eb74929204d7e689
|
|
| BLAKE2b-256 |
b1e5d68629096ec3b460de1b2a2f38a17c1e6b2ca2ceaac6d6f503f99fa6ff09
|
Provenance
The following attestation bundles were made for versite-0.0.2-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.2-py3-none-any.whl -
Subject digest:
b55f1805e779f0feba792221987e6ecaea2633fc90226497713aac2f85f28509 - Sigstore transparency entry: 1540132209
- Sigstore integration time:
-
Permalink:
PrimerPages/versite@59fab1987d3fa451634e3e4f175bc80b51c659eb -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/PrimerPages
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@59fab1987d3fa451634e3e4f175bc80b51c659eb -
Trigger Event:
workflow_dispatch
-
Statement type: