Skip to main content

A simple and minimal static site generator.

Project description

Vite

A simple and mnml static site generator that Just Works™

forthebadge forthebadge forthebadge forthebadge

Installation

$ pip install vite

Usage

$ vite new <project-path>

Write your Markdown files in the pages directory and execute:

$ vite build   # in project directory

Rendered HTML will be in the build directory.

Finally, run:

$ vite serve  # also in the project directory

to serve the contents of the build directory.

Configuration

Not very sophisticated, but basic configuration can be acheived using config.py found in the project directory. Example config:

# config.py 
title = ''
author = ''
header = ''
footer = '' 
template = 'index.html'  # default is templates/index.html

Templating

Vite uses Jinja2 templating, so template files must be placed in a separate templates/ directory.
NOTE: Stylesheets, images and JS can be accessed from the static folder.
ANOTHER NOTE: index.html, i.e. your website's homepage, should be _index.md in the pages/ directory.

A basic example would be:

<link rel="stylesheet" href="../static/sakura-earthy.css">

<title> {{ title }} </title>

<body>
{{ body }}
</body>

<footer>
{{ footer }}
</footer>

Directory tree

example
├── build
├── config.py
├── pages
│   └── test.md
├── static
└── templates
    └── index.html

TODO

  • Templating
  • CSS support
  • Implement a simple HTTP server (later)
  • Add example site
  • Basic config (config.py)
  • Parsing frontmatter (JSON, YAML, TOML)
  • Better support for home page (main index.html page)

Credits

Logo credits: Freepik from www.flaticon.com is licensed by CC 3.0 BY
Hue: UltimateHackers/hue

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

vite-1.2.3-py3.6.egg (8.5 kB view hashes)

Uploaded Source

vite-1.2.3-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page