breb 0.4.0

the blog/reblog library and command-line tool
Documentation

blog/reblog

blog/reblog aims to provide a platform for folks with strong interests to write at length about them. do you like getting in-depth with things and talking about them? are you a huge nerd about something you want to write about? then it's for you, whatever your interests are.

that's the "blog" in blog/reblog, but it's not just that. you can't write in a vacuum. everyone who writes has to read; books, blogs, anything. the reblogging is sharing and responding to each other's words, providing not just more to think and write about, but the inspiration to do it.

so in sum: blog/reblog gives you a place to write, and lots of reasons to do it.

installation and usage

right now, installation is a bit complex, as is usage. it's still in pre-alpha -- it'll probably stay frustrating for a little while.

because it's just a library for now, you need a working rust development environment, because you'll be writing some code. create a new rust binary with the right dependency:

# create a directory to hold your blog
cargo new --bin my-blog
cd my-blog
# add the blog-reblog dependency
cargo add breb

then you can "configure" it by writing a main.rs that looks like:

use breb::quick::*;

fn main() {
  let navs = vec![
    ("about", "/about"),
    ("history", "/history"),
    ("herstory", "/herstory"),
    ("rss", "/feed.xml"), // not actually rss but users were getting confused
  ];
  let config = Blog::builder()
    .url("https://blog.example.com/")
    .name("official example blog")
    .author(Author::new("exemplar").email("contact@example.com"))
    .template_file_named("base", "template.html")
    .serve(AsIs::new("/s/", "s/"))
    .serve(
      Posts::new("/posts/", "en/posts/")
        .index("en")
        .navs(navs.clone())
    )
    .serve(
      Pages::new("/", "en/pages/")
        .navs(navs.clone())
    )
    .feed(Feed::atom("/feed.xml").index("en").len(20));
  // provide a reasonable cli to generate or (locally) serve this blog
  run(config);
}

for now, for details about what your options are, check the api reference. eventually, expect to see docs here. (by then there should be a config file, though.)

once you've configured it like that, you can run it easily:

cargo run

this being a normal rust binary, you can add as much other functionality as you want: custom web-based or native guis, robust command-line arguments, etc.

project planning

...all occurs on my website. currently, as i'm the only developer, it's a read-only page.