all repos — py-vite @ 1c0979dfbe8e2b7b7bac7f1cfe36d3327ad3d7c5

the original vite, written in python

README.md (view raw)

 1<h1 align="center">
 2	<img width="400" src="https://xix.ph0x.me/vitelogo.png" alt="Vite">
 3</h1>
 4
 5Vite
 6====
 7
 8> A simple and mnml static site generator; pronounced as /vit/
 9
10Usage
11-----
12
13```console
14$ vite.py new <project-path>
15```
16
17Write your Markdown files in the `pages` directory and execute
18
19```console
20$ vite.py build <project-path>
21```
22
23**OR**
24
25```console
26$ make.py  # at the project directory
27```
28
29Rendered HTML will be in the `build` directory.
30
31Configuration
32-------------
33
34Not very sophisticated, but basic configuration can be acheived using
35  `config.py` found in the project directory.
36Example config:
37
38```python
39# config.py 
40title = ''
41author = ''
42header = ''
43footer = '' 
44```
45
46Templating
47----------
48
49Vite uses Jinja2 templating. A basic example would be:
50
51```html
52<title> {{ title }} </title>
53
54<body>
55{{ body }}
56</body>
57
58<footer>
59{{ footer }}
60</footer>
61```
62
63Directory tree
64--------------
65
66    example
67    ├── build
68    │   └── test_page1
69    │       └── index.html
70    ├── config.py
71    ├── make.py -> /home/icyphox/code/vite/make.py
72    ├── pages
73    │   └── test_page1.md
74    └── templates
75        └── index.html
76
77TODO
78----
79
80- [x] Templating
81- [ ] CSS support
82- [ ] Implement a simple HTTP server (*later*)
83- [x] Add example site
84- [x] Basic config (`config.py`)
85