breb 0.1.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. but even when we're writing about the same things, it's hard to feel a sense of community from the writing alone. we're all yelling into the void, just in the same direction. that's the reblogging.

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: 

```sh
# 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: 

```rs
use breb::quick::*;

fn main() {
  boilerplate(blog);
}

fn blog(in_dir: std::path::PathBuf) -> FinishedBuilder {
  Blog::builder()
    .base_dir(in_dir)
    .base_url("https://genderphas.ing/")
    .name("genderphasing")
    .author(Author::new("nic; genderphasing").email("nic@genderphas.ing"))
    .serve(AsIs::new("/s/", "s/"))
    .serve(Posts::new("/posts", "posts/")
      .nav("about", "/about")
      .nav("archive", "/archive")
      .nav("atom", "/feed.xml"))
    .serve(Pages::new("/", "pages/")
      .nav("about", "/about")
      .nav("archive", "/archive")
      .nav("atom", "/feed.xml"))
    .serve(Feed::atom("/feed.xml"))
}
```

for now, for details about what your options are, [check the api reference](https://docs.rs/breb). eventually, expect to see docs here. 

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

```sh
cargo run
```

this being a normal rust binary, you can add as much other functionality as you want: custom [web-based](https://tauri.app/) or [native](https://www.egui.rs/) guis, [robust command-line arguments](https://crates.io/crates/clap), etc.

## short-term plans

even in the limited scope of current development, there's still a lot of missing features. i've broken them into release milestones, mostly for my own tracking, and there's zero guarantee that these will be delivered in any particular order.

- ### 0.2: the meat on the bones

  adding a bunch of crucial usability features to make this more broadly useful.

  - a config file, so you don't need to build a custom binary
  - some way to do templating for auto-generated indices and the like
  - some way to pass in templates, since they're hardcoded for now
  - rss 2.0 feed generation (since it won't be too much extra work)

## longer-term plans

right now, blog/reblog is in a very pre-alpha state. i have the immediate plans listed above, but i also have a longer-term vision for this. this is a personal project, so there's no timeline here, but it'll provide structure to keep me motivated to keep working on this.

1. **blog/reblog crate**: a rust library for doing the static site generation, with a thin wrapper for this blog in particular. technically published, but not really meant to be used yet.
2. **blog/reblog ssg**: a robust, cli-based frontend to that crate. parses markdown, convenient tools for writing and managing posts, and a cli-based way to "reblog".
3. **blog/reblog cms**: a web-based, single-blog-ish frontend. meant for self-hosting, but probably usable for community-hosting too. has a nice web ui over all of the functionality, including rss reading and reblogging.
4. finally, **blog-reblog.net**: a fully functional, multi-user social media site. for any given user, this acts like the cms, but it has an actual concept of "users". probably a much better community-hosted cms.

right now, i'm on phase one. you can [use the crate yourself](https://crates.io/crates/breb), if you want, but it's not very user-friendly yet.