all repos — py-vite @ f45e3de024c6abb079ba4a537e0d03f86070d329

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