Skip to main content

A static site generator made in python.

Project description

vai

✨ Key Features

  • 🔎 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.yaml file.
  • 📦 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+r for 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-Name pattern 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.)

  1. Run:

    vai build
    
  2. Upload the contents of the dist/ folder to your host.

GitHub Pages

  1. In config.yaml, set:

    github_repo_name: YOUR_REPO_NAME # Note: it is case sensitive
    
  2. Run:

    vai build --github
    
  3. Push the contents of the dist/ folder to the github-pages branch.

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

vai_ssg-0.0.18.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vai_ssg-0.0.18-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

Details for the file vai_ssg-0.0.18.tar.gz.

File metadata

  • Download URL: vai_ssg-0.0.18.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

Hashes for vai_ssg-0.0.18.tar.gz
Algorithm Hash digest
SHA256 9fd27513892a84cc634aa9da03570b9880ccfc1f54c48a67e3a8287064c25229
MD5 1d81b7b2494b0855c4169d3259d110e7
BLAKE2b-256 87303ad390329ccc7a0d31aec3ecd2ebbcf448279bb6efa619aaeb827b6fd85a

See more details on using hashes here.

Provenance

The following attestation bundles were made for vai_ssg-0.0.18.tar.gz:

Publisher: publish-to-pypi.yml on Nareshix/vai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vai_ssg-0.0.18-py3-none-any.whl.

File metadata

  • Download URL: vai_ssg-0.0.18-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

Hashes for vai_ssg-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 4eb656bff6acfa37e2aec1d95f4f207908a32c279c580e875abb347be3028571
MD5 ad7a621cc7242c8688d70e02f97153dd
BLAKE2b-256 1b377d9a5dc08b031d333ab91d62575710d7d1c34fde840d7d2a1fae6eec60c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for vai_ssg-0.0.18-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Nareshix/vai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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