all repos — py-vite @ f2f9eb9e25dfaf46f23f5d5e9d622b58d5f68c6a

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
 7[![forthebadge](https://forthebadge.com/images/badges/60-percent-of-the-time-works-every-time.svg)](https://forthebadge.com)
 8[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com)
 9[![forthebadge](https://forthebadge.com/images/badges/powered-by-electricity.svg)](https://forthebadge.com)
10[![forthebadge](https://forthebadge.com/images/badges/uses-git.svg)](https://forthebadge.com)
11
12Usage
13-----
14
15```console
16$ vite.py new <project-path>
17```
18
19Write your Markdown files in the `pages` directory and execute
20
21```console
22$ vite.py build <project-path>
23```
24
25**OR**
26
27```console
28$ vite.py build .  # to build the current directory
29```
30
31Rendered HTML will be in the `build` directory.
32
33Configuration
34-------------
35
36Not very sophisticated, but basic configuration can be acheived using
37  `config.py` found in the project directory.
38Example config:
39
40```python
41# config.py 
42title = ''
43author = ''
44header = ''
45footer = '' 
46template = 'index.html'  # default is index.html
47```
48
49Templating
50----------
51
52Vite uses Jinja2 templating. A basic example would be:
53
54```html
55<title> {{ title }} </title>
56
57<body>
58{{ body }}
59</body>
60
61<footer>
62{{ footer }}
63</footer>
64```
65
66Directory tree
67--------------
68
69    example
70    ├── build
71    │   └── test_page1
72    │       └── index.html
73    ├── config.py
74    ├── make.py -> /home/icyphox/code/vite/make.py
75    ├── pages
76    │   └── test_page1.md
77    └── templates
78        └── index.html
79
80TODO
81----
82
83- [x] Templating
84- [ ] CSS support
85- [ ] Implement a simple HTTP server (*later*)
86- [x] Add example site
87- [x] Basic config (`config.py`)
88
89
90## Credits
91_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>  
92_Hue_: [UltimateHackers/hue](https://github.com/UltimateHackers/hue)
93