all repos — py-vite @ 915a86e13b2259f60a1632fbf9e9d1ec8f40ef20

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## PROJECT UNDERGOING MAJOR REWORK, DON'T BOTHER USING IT UNTIL THIS MESSAGE IS GONE
  6> A simple and mnml static site generator; pronounced as /vit/
  7
  8[![forthebadge](https://forthebadge.com/images/badges/60-percent-of-the-time-works-every-time.svg)](https://forthebadge.com)
  9[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com)
 10[![forthebadge](https://forthebadge.com/images/badges/powered-by-electricity.svg)](https://forthebadge.com)
 11[![forthebadge](https://forthebadge.com/images/badges/uses-git.svg)](https://forthebadge.com)
 12
 13Installation
 14------------
 15
 16Clone this repo and:
 17```console
 18$ pip3 install -r requirements.txt
 19```
 20**NOTE**: Don't delete the cloned repo, since `make.py` is symlinked upon project creation.
 21
 22Usage
 23-----
 24
 25```console
 26$ ./vite.py new <project-path>
 27```
 28Write your Markdown files in the `pages` directory and execute:
 29```console
 30$ ./make.py   # in project directory
 31```
 32Rendered HTML will be in the `build` directory.
 33
 34Finally, run:
 35```console
 36$ ./make.py serve
 37```
 38to serve the contents of the `build` directory.
 39
 40Configuration
 41-------------
 42
 43Not very sophisticated, but basic configuration can be acheived using
 44  `config.py` found in the project directory.
 45Example config:
 46
 47```python
 48# config.py 
 49title = ''
 50author = ''
 51header = ''
 52footer = '' 
 53template = 'index.html'  # default is index.html
 54```
 55
 56Templating
 57----------
 58
 59Vite uses Jinja2 templating.  
 60**NOTE**: Stylesheets, images and JS can be accessed from the `static` folder.
 61
 62A basic example would be:
 63```html
 64<link rel="stylesheet" href="../static/sakura-earthy.css">
 65
 66<title> {{ title }} </title>
 67
 68<body>
 69{{ body }}
 70</body>
 71
 72<footer>
 73{{ footer }}
 74</footer>
 75```
 76
 77Directory tree
 78--------------
 79
 80    example
 81    ├── build
 82    ├── config.py
 83    ├── make.py -> /home/icyphox/code/vite/make.py
 84    ├── pages
 85    ├── static
 86    └── templates
 87        └── index.html
 88
 89TODO
 90----
 91
 92- [x] Templating
 93- [x] CSS support
 94- [x] Implement a simple HTTP server (*later*)
 95- [x] Add example site
 96- [x] Basic config (`config.py`)
 97
 98
 99## Credits
100_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>  
101_Hue_: [UltimateHackers/hue](https://github.com/UltimateHackers/hue)
102