10 unstable releases (3 breaking)

0.4.0 Dec 28, 2023
0.3.0 Nov 14, 2023
0.2.2 Nov 9, 2023
0.2.1 Jul 6, 2023
0.1.1 Jan 25, 2023

#678 in Text processing

Download history 8/week @ 2023-10-29 53/week @ 2023-11-05 48/week @ 2023-11-12 19/week @ 2023-11-19 48/week @ 2023-11-26 5/week @ 2023-12-03 4/week @ 2023-12-10 11/week @ 2023-12-17 69/week @ 2023-12-24 6/week @ 2023-12-31 15/week @ 2024-01-07 8/week @ 2024-01-14 5/week @ 2024-01-21 32/week @ 2024-01-28 11/week @ 2024-02-04 49/week @ 2024-02-11

97 downloads per month

Apache-2.0

115KB
3K SLoC

Eric's Blog Generator

Crates.io docs.rs

This is my very un-creatively named static site generator with an emphasis on blogging. EBG is primarily meant to power https://theincredibleholk.org. You're welcome to use it for your own site if you want, but at this point that's likely to be fairly labor-intensive. For example, EBG does not yet include any pre-defined themes so you would have to make one from scratch and the theme-making process is poorly documented.

EBG is inspired by Octopress and Jekyll, and perhaps even largely compatible because I developed EBG to do an in-place upgrade from my Octopress-powered blog. Over time it has begun to diverge somewhat in order to support my own desires, and will likely continue to diverge in the future.


lib.rs:

This crate provides the core functionality of Eric's Blog Generator.

It is primarily meant to be driven by the ebg binary, but in theory it can be used as a library if you try hard enough.

The site generator process goes through several phases:

  1. Indexing
  2. Rendering
  3. Generation

In a more traditional compiler, these phases correspond roughly to parsing, compilation, and linking.

The program is largely serial right now, but the hope is it can be pipelined and parallelized to be an exceptionally fast site generator.

Indexing

The indexing phase is responsible for reading the site's configuration and all the source files. The end result is a data structure that can be used to compute metadata about the site, links between pages, etc.

Rendering

The rendering phase is responsible for taking any markdown source pages and generating the HTML for them.

Generation

The final step is to write out all the rendered contents into the destination directory. Many files are copied directly, but this also generates HTML pages from the rendered markdown contents of the last phase.

Dependencies

~29–45MB
~736K SLoC