all repos — py-vite @ 3dc2dd70f99cc6abc2db3567fcabbe01b1f4ef5c

the original vite, written in python

BREAKING: remove packaging garbage
Anirudh icyph0x@protonmail.com
Sat, 14 Apr 2018 14:37:09 +0530
commit

3dc2dd70f99cc6abc2db3567fcabbe01b1f4ef5c

parent

4a57261cd1ee7edf591e446ce6c38a1f76ad20ec

D MANIFEST.ini

@@ -1,1 +0,0 @@

-include README.rst
D README.rst

@@ -1,95 +0,0 @@

-.. raw:: html - - <h1 align="center"> - -:: - - <img width="400" src="https://xix.ph0x.me/vitelogo.png" alt="Vite"> - -.. raw:: html - - </h1> - - A simple and mnml static site generator; pronounced as /vit/ - -Usage ------ - -.. code:: console - - $ vite.py new <project-path> - -Write your Markdown files in the ``pages`` directory and execute - -.. code:: console - - $ vite.py build <project-path> - -**OR** - -.. code:: console - - $ make.py # at the project directory - -Rendered HTML will be in the ``build`` directory. - -Configuration -------------- - -Not very sophisticated, but basic configuration can be acheived using -``config.py`` found in the project directory. Example config: - -.. code:: python - - # config.py - title = '' - author = '' - header = '' - footer = '' - -Templating ----------- - -Vite uses Jinja2 templating. A basic example would be: - -.. code:: html - - <title> {{ title }} </title> - - <body> - {{ body }} - </body> - - <footer> - {{ footer }} - </footer> - -Directory tree --------------- - -:: - - example - ├── build - │   └── test_page1 - │   └── index.html - ├── config.py - ├── make.py -> /home/icyphox/code/vite/make.py - ├── pages - │   └── test_page1.md - └── templates - └── index.html - -TODO ----- - -- [x] Templating -- [ ] CSS support -- [ ] Implement a simple HTTP server (*later*) -- [x] Add example site -- [x] Basic config (``config.py``) - -Credits -------- - -*Logo credits*: Freepik from www.flaticon.com is licensed by CC 3.0 BY
D bin/install.sh

@@ -1,3 +0,0 @@

-#!/bin/bash - -
D setup.py

@@ -1,19 +0,0 @@

-import os -from setuptools import setup - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() - -setup( - name = 'Vite', - version = '1.0.0', - author = 'Anirudh Oppiliappan', - author_email = 'icyph0x@protonmail.com', - description = ('A simple and minimal static site generator.'), - license = 'MIT', - url = 'https://github.com/icyphox/vite', - packages = ['vite'], - install_requires = [ - 'markdown2', 'Jinja2', - ], - zip_safe=False)
D tests/test_create_project.py

@@ -1,12 +0,0 @@

-import unittest -from unittest.mock import MagicMock -import vite - -class ViteTest(unittest.TestCase): - def test_create_project(self): - mock_path = MagicMock('xD') - vite.create_project(mock_path) - mock_path.assert_called_with('xD') - -if __name__ == '__main__': - unittest.main()