all repos — py-vite @ 181a63cdd863e461c679c8f8c6a94abe39c1d032

the original vite, written in python

style: fix output
Anirudh icyph0x@pm.me
Fri, 15 Jun 2018 13:36:42 +0530
commit

181a63cdd863e461c679c8f8c6a94abe39c1d032

parent

792d013be0aab7846a57284cb91a075d774b4b19

1 files changed, 2 insertions(+), 4 deletions(-)

jump to
M vite/vite.pyvite/vite.py

@@ -67,8 +67,7 @@

def create_template(path): with open(os.path.join(path, 'templates', 'index.html'), 'w') as f: - f.write(""" -<!DOCTYPE html> + f.write("""<!DOCTYPE html> <html> <header> {{ header }}

@@ -108,13 +107,12 @@

def html_gen(): for page in os.listdir(PAGES_PATH): - print(page) if page == '_index.md': index_html = markdown_render(page) output = jinja_render(index_html, TEMPL_FILE) with open(os.path.join(BUILD_PATH, 'index.html'), 'w') as f: f.write(output) - print(run('Rendered index.html')) + print(run('Rendered _index.md')) else: html_text = markdown_render(page) html_file = os.path.splitext(os.path.join(BUILD_PATH, page))[0]