A static site generator made in python.
Project description
vai
✨ Key Features
- 📱 Responsive Design: Looks great on any devices — no extra setup required.
- 🔎 Full-Text Search: Automatically builds a search index for all your pages and headings.
- 🎨 Syntax Highlighting: Beautiful code blocks out of the box.
- 💅 Custom Blocks: Create admonitions for notes, warnings, and tips.
- ⚙️ Simple Configuration: Control your site's navigation from a single
config.yamlfile. - 📦 Zero Dependencies: The final site is just pure HTML, CSS, and JS. No backend needed.
- 🐢 Live Reload Server: See your changes instantly as you write. However, it is not as robust as other alternative such as VitePress. You may have to manually refersh at times. u can
Ctrl+rfor quick refresh though.
⚡ Quick Start Guide
1. Installation
pip install vai
2. Initialize Your Project
This command creates the necessary folder structure in your current directory.
vai init
This will create the following structure:
src_md/ # Markdown content
static/ # CSS, JS, and image assets
templates/ # HTML templates
config.yaml # Site configuration
3. Start the Development Server
vai run
Your site is now running at http://localhost:6600. The server will automatically rebuild and refresh the browser when changes are made to src_md/, static/, or config.yaml.
4. Build for Production
vai build
This will generate your final static site in the dist/ folder. You can host this on any static web server.
🧠 Understanding the Stucture
Writing Content in src_md/
Vai uses folder and file names to build the site structure and sidebar.
- Uses a
number-Namepattern for ordering. - Folders = sidebar section.
- Markdown files = pages.
Example:
src_md/
├── 1-Introduction/
│ ├── 1-Welcome.md
│ └── 2-Installation-Guide.md
└── 2-Advanced-Features/
└── 1-Search.md
Resulting URLs:
/introduction/welcome//introduction/installation-guide//advanced-features/search/
Configuring the Site with config.yaml
This file controls the header, navigation, and metadata (e.g., GitHub repo link). It's easy to understand and modify.
🎨 Customizing the Look
- Modify the site's CSS in
static/style.css. - Replace images/logos in the
static/folder.
📚 Special Markdown Features
Page Metadata
Add a title and date to any page by including a metadata block at the top:
+++
title: My Custom Page Title
date: January 1, 2024
+++
# Welcome to my page
...
Admonition Blocks
Use call-out blocks for notes, warnings, and expandable content.
:::note
This is a helpful note for the reader.
:::
:::warning Custom Warning Title
This is a critical warning with a custom title.
:::
:::details Click to Expand
This content is hidden by default and can be expanded.
:::
more example and visual showcase in the documentation
🚀 Deployment
General Hosting (Netlify, Vercel, etc.)
-
Run:
vai build -
Upload the contents of the
dist/folder to your host.
GitHub Pages
-
In
config.yaml, set:github_repo_name: YOUR_REPO_NAME # Note: it is case sensitive
-
Run:
vai build --github
-
Push the contents of the
dist/folder to thegithub-pagesbranch.
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 vai_ssg-0.0.19.tar.gz.
File metadata
- Download URL: vai_ssg-0.0.19.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59765b06d91018d464be2a14203f2b5dfd73c3426f0dd731815b12434b581302
|
|
| MD5 |
049b1dc5deb6b9a57f1d163a6d3b36f4
|
|
| BLAKE2b-256 |
879ffff6d6fcf577b7cef7e2e8624bb20f93dca011ee0ff6417091c010bfaa5f
|
Provenance
The following attestation bundles were made for vai_ssg-0.0.19.tar.gz:
Publisher:
publish-to-pypi.yml on Nareshix/vai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vai_ssg-0.0.19.tar.gz -
Subject digest:
59765b06d91018d464be2a14203f2b5dfd73c3426f0dd731815b12434b581302 - Sigstore transparency entry: 231140647
- Sigstore integration time:
-
Permalink:
Nareshix/vai@a245307262fccc714bb945effb671dec3f6372d5 -
Branch / Tag:
refs/tags/v0.0.19 - Owner: https://github.com/Nareshix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@a245307262fccc714bb945effb671dec3f6372d5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vai_ssg-0.0.19-py3-none-any.whl.
File metadata
- Download URL: vai_ssg-0.0.19-py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af67ef22d3cc1e2df4dcca077b0344ecc62435f5c3a8d3eb632f28921e7f82af
|
|
| MD5 |
f98e8ced6fccec4902bc8e287348c9fb
|
|
| BLAKE2b-256 |
1c3aa82106c4a61a71c076cfba0c5c9236cc6e3a5e11713723d4a7e4c506cdf9
|
Provenance
The following attestation bundles were made for vai_ssg-0.0.19-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on Nareshix/vai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vai_ssg-0.0.19-py3-none-any.whl -
Subject digest:
af67ef22d3cc1e2df4dcca077b0344ecc62435f5c3a8d3eb632f28921e7f82af - Sigstore transparency entry: 231140651
- Sigstore integration time:
-
Permalink:
Nareshix/vai@a245307262fccc714bb945effb671dec3f6372d5 -
Branch / Tag:
refs/tags/v0.0.19 - Owner: https://github.com/Nareshix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@a245307262fccc714bb945effb671dec3f6372d5 -
Trigger Event:
push
-
Statement type: