Skip to main content

Another static site generator

Project description

beemo

A Python-based static site generator to build my website bennuttall.com

PyPI

Content

Content and templates for my site are at github.com/bennuttall/web-content. If you wish to use this project for your own website, this repo will be a useful reference.

Features

  • Content as markdown and/or HTML
  • Pages
  • Posts
  • Tags
  • Archives (index, years and months)
  • XML sitemap
  • Atom feed
  • Custom Chameleon templates
  • Custom CSS, JS and other static files

Usage

Create content directories e.g. posts, pages, static and templates.

Posts

Populate your posts directory with your blog posts. Each post must be in its own directory but can be organised in any hierarchy e.g. by year, year/month or just flat. Post directories must contain a meta.yml and an index.md and can contain images in an images directory, used within your post.

Pages

Populate your pages directory with your pages. Each page must be in its own directory but can be organised in any hierarchy e.g. by year, year/month or just flat. Post directories must contain a meta.yml and an index.md.

Static

Any files in your static directory will be copied into the site build root. Keep your CSS files and such in this directory.

Templates

Create Chameleon templates for your site in the templates directory. See the Chameleon docs for reference.

Configuration

The Beemo config file is a YAML file specifying some basic config about your site build.

For example, here pages_dir and posts_dir are both specified, and the site will be built with both pages and blog posts:

posts_dir: content/posts
pages_dir: content/pages
static_dir: static
templates_dir: templates
blog_root: blog
output_dir: www

If pages_dir is not specified, the site will be built without pages (i.e. blog only mode), e.g:

posts_dir: posts
static_dir: static
templates_dir: templates
output_dir: www

If posts_dir is not specified, the site will be built without pages (i.e. pages only mode), e.g:

pages_dir: pages
static_dir: static
templates_dir: templates
output_dir: www

If posts_dir is specified, this comes with archives, tag indexes and such which cannot currently be disabled.

Environment variables

The only environment variable required is BEEMO_CONFIG which must point to your site's config file:

export BEEMO_CONFIG=config.yml

Install

Install the latest release with:

pip install beemo

Development

Create a virtual environment and run make develop to install the library and its dependencies.

This can be served locally with e.g. python -m http.server -d www and viewed at e.g. http://localhost:8000.

Build

Build your site by running the command beemo with the environment variable BEEMO_CONFIG set pointing at a valid config file. It will build your site into your configured output_dir.

Examples

Licence

Project details


Download files

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

Source Distribution

beemo-0.2.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beemo-0.2.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file beemo-0.2.0.tar.gz.

File metadata

  • Download URL: beemo-0.2.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for beemo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 87197fd41abdc20fdbc50f9ced74e98b782c600f4d0232752743946fc51865bd
MD5 c7c0402ffd8b1ebece0e0b5a90f3f36d
BLAKE2b-256 1308bf11e9f969ce9db3164e4ab6c6ef29d659f983375a04dbebb1f42e34031e

See more details on using hashes here.

File details

Details for the file beemo-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: beemo-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for beemo-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a53ee08643c134a920746027bdebfa8062a59cb4293f06bee0c543878a35af4
MD5 c95e94947da6276f2586477d34372bb5
BLAKE2b-256 f4a2dcaf232314148b5131015c4ebd44d20e2fa642d07d4edcaa345023654eeb

See more details on using hashes here.

Supported by

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