# vite > A simple and mnml static site generator that Just Works™ [![forthebadge](https://forthebadge.com/images/badges/60-percent-of-the-time-works-every-time.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/powered-by-electricity.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/uses-git.svg)](https://forthebadge.com)

Vite demo

Installation ------------ ```console $ pip install vite ``` Usage ----- ```console $ vite new ``` Write your Markdown files in the `pages` directory and execute: ```console $ vite build # in project directory ``` Rendered HTML will be in the `build` directory. Finally, run: ```console $ vite serve # also in the project directory ``` to serve the contents of the `build` directory. Configuration ------------- Not very sophisticated, but basic configuration can be acheived using `config.py` found in the project directory. Example config: ```python # config.py title = '' author = '' header = '' footer = '' template = 'index.html' # default is templates/index.html ``` Templating ---------- Vite uses Jinja2 templating, so template files must be placed in a separate `templates/` directory. A basic example would be: ```html {{ title }} {{ body }} ``` ### 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: ```markdown --- template: foo.html --- ## markdown here ... ``` ### Notes on templating - Stylesheets, images and JS can be accessed from the `static` folder. - `index.html`, i.e. your website's homepage, should be `_index.md` in the `pages/` directory. Directory tree -------------- example ├── build ├── config.py ├── pages │   └── test.md ├── static └── templates └── index.html TODO ---- - [x] Templating - [x] CSS support - [x] Implement a simple HTTP server (*later*) - [x] Add example site - [x] Basic config (`config.py`) - [x] Parsing frontmatter (JSON, YAML, TOML) for per-page options - [x] Better support for home page (main `index.html` page) - [ ] More powerful frontmatter (title, date, draft status, etc.) - [ ] Deeper directories under `pages/` (supports only one level now, breaks otherwise) - [ ] Tagging system