Skip to content

kalgynirae/websleydale

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wb
 
 

Websleydale is the minimalist static site generator used to build lumeh.org. Its feature set is limited to what lumeh.org requires, so it is fairly minimal and runs very fast.

Requirements

  • Python 3.8 or later
  • pipenv (for installing dependencies)

Setup

  1. Clone this repo and cd into it.
  2. Run pipenv sync to create the virtualenv and install dependencies.
  3. Place a symlink to the wb script somewhere in your PATH. (For example, if you already have a ~/bin directory in your PATH, you can run ln -s --relative wb ~/bin/ to create such a symlink.)

Usage

First, create a websleydalerc.py file in your project's root directory (see the example below).

Then, run wb in the same directory as the websleydalerc.py file whenever you want to build your project.

Example websleydalerc.py

Given the following source files:

.
├── index.md
├── memes/
│   └── loss.jpg
├── style.sass
└── templates/
    └── page.html

A corresponding websleydalerc.py might look like this:

from websleydale import Site, build, dir, jinja, markdown, root, sass

site = Site(
    name="My Website",
    tree={
        # Process 'index.md' as Markdown and render it using the 'page.html'
        # Jinja template, and write the result as 'index.html' in the output dir
        "index.html": jinja(markdown(root / "index.md"), template="page.html"),

        # Process 'style.sass' as a Sass stylesheet and write the result as
        # 'style.css' in the output dir
        "style.css": sass(root / "style.sass"),

        # Copy all contents of the 'memes' directory into a directory called
        # 'memes' in the output dir
        "memes": dir(root / "memes"),
    },
)
build(site, dest="out")

For a full example, see lumeh.org's config.

About

A narrow-minded but very fast static site generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published