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 that Just Works™
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
12Installation
13------------
14
15```console
16$ pip install vite
17```
18Usage
19-----
20
21```console
22$ vite new <project-path>
23```
24Write your Markdown files in the `pages` directory and execute:
25```console
26$ vite build # in project directory
27```
28Rendered HTML will be in the `build` directory.
29
30Finally, run:
31```console
32$ vite serve # also in the project directory
33```
34to serve the contents of the `build` directory.
35
36Configuration
37-------------
38
39Not very sophisticated, but basic configuration can be acheived using
40 `config.py` found in the project directory.
41Example config:
42
43```python
44# config.py
45title = ''
46author = ''
47header = ''
48footer = ''
49template = 'index.html' # default is index.html
50```
51
52Templating
53----------
54
55Vite uses Jinja2 templating.
56**NOTE**: Stylesheets, images and JS can be accessed from the `static` folder.
57
58A basic example would be:
59```html
60<link rel="stylesheet" href="../static/sakura-earthy.css">
61
62<title> {{ title }} </title>
63
64<body>
65{{ body }}
66</body>
67
68<footer>
69{{ footer }}
70</footer>
71```
72
73Directory tree
74--------------
75
76 example
77 ├── build
78 ├── config.py
79 ├── pages
80 │ └── test.md
81 ├── static
82 └── templates
83 └── index.html
84
85TODO
86----
87
88- [x] Templating
89- [x] CSS support
90- [x] Implement a simple HTTP server (*later*)
91- [x] Add example site
92- [x] Basic config (`config.py`)
93- [ ] Parsing frontmatter (JSON, YAML, TOML)
94- [ ] Better support for home page (main `index.html` page)
95
96
97## Credits
98_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>
99_Hue_: [UltimateHackers/hue](https://github.com/UltimateHackers/hue)
100