vite
A simple and mnml static site generator that Just Works™
Installation
$ pip install vite
Usage
$ vite init path/to/project
$ vite new blog/some-post.md # `pages/` is implied
This creates pages/blog/some-post.md.
And then:
$ vite build # in project directory
Rendered HTML will be in the build directory.
Finally, run:
$ vite serve # also in the project directory
Configuration
Not very sophisticated, but basic configuration can be acheived using
config.py found in the project directory.
Example config:
# config.py
title = ''
author = ''
header = ''
footer = ''
template = 'index.html' # default is templates/index.html
post_build = [] # list of commands to run post-build
Templating
Vite uses Jinja2 templating, so template files must be placed in a separate templates/ directory.
A basic example would be:
<link rel="stylesheet" href="/static/sakura-earthy.css">
<title> {{ title }} </title>
<body>
{{ body }}
</body>
<footer>
{{ footer }}
</footer>
Specifying per-page templates
Vite allows for specifying a unique template, per page. This is acheived by including YAML frontmatter at the top of the Markdown file, like so:
---
template: foo.html
title: Some fancy buzzwords here
subtitle: Cool catch phrase here
date: 2019-08-09
---
## markdown here
...
Notes on templating
- Stylesheets, images and JS can be accessed from the
staticfolder. index.html, i.e. your website's homepage, should be_index.mdin thepages/directory.
Directory tree
example
├── build
├── config.py
├── pages
│ └── test.md
├── static
└── templates
└── index.html
TODO
- Templating
- CSS support
- Implement a simple HTTP server (later)
- Add example site
- Basic config (
config.py) - Parsing frontmatter (JSON, YAML, TOML) for per-page options
- Better support for home page (main
index.htmlpage) - More powerful frontmatter (title, date, draft status, etc.) (draft status is incomplete)
-
Deeper directories under(not happening)pages/(supports only one level now, breaks otherwise) -
Tagging system(not happening)
Metadata
Release files for vite 1.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vite-1.5.2.linux-x86_64.tar.gz | 8.8 kB | Without provenance | Details for vite-1.5.2.linux-x86_64.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vite-1.5.2-py3-none-any.whl | Python 3 | none | any | Details for vite-1.5.2-py3-none-any.whl |
Total release size: 15.3 kB
Release files / vite-1.5.2.linux-x86_64.tar.gz
| Download URL | vite-1.5.2.linux-x86_64.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ee8c9c9268842bedf35ff43cdcb381978cb546175c996867171f4101922660e
|
|
BLAKE2b-256 checksum How to use checksums |
219c78b6f188ea2bb040d209414fb83802d475307eedd8c9f314fa2bc93d69d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / vite-1.5.2-py3-none-any.whl
| Download URL | vite-1.5.2-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7617e46b83b002a3d1f894e91cc682d4f18a66180a6f6a01667b8acd01bee0be
|
|
BLAKE2b-256 checksum How to use checksums |
c0a417b84773b8e0cdc402edb669d36e5f755ee0578e4c629ab8abb3d4dda3d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for vite 1.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.