all repos — py-vite @ f2f9eb9e25dfaf46f23f5d5e9d622b58d5f68c6a

the original vite, written in python

README.rst (view raw)

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