A Blog & RSS system written in Rust based on Luke Smith's LB.

Overview

OB - Oliver's Blog Script

A Blog and RSS system written in Rust.

Features

  • Converts blog entries written in Markdown into HTML.   ✍🏻
  • Keeps a rolling blog page.    🔎
  • Keeps an RSS feed which includes blog posts in full.    📰
  • Creates entries in the rolling blog page that are easily modifiable with CSS.    ⚡️
  • One command to delete entries from the RSS feed, rolling blog and standalone entries simultaneously.    🚀
  • Works on MacOS, Linux and Windows.    🖥
  • Less than 350 lines of code.    🏝
  • Blazingly fast.    🔥

Installation

Install Rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install OB:

cargo install ob

Setup

You will need to create four files:

  • A Rolling Blog File where the blog entries will be listed.
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Your Blog</title>
    <meta charset="utf-8"/>
  </head>
  <body>
    <h1>Blog Updates</h1>
    <ul>
      <!-- OB -->
    </ul>
  </body>
</html>
  • A Template to be filled out with the content of a blog post.
<!DOCTYPE html>
<html lang="en">
  <head>
    <title></title>
    <meta charset="utf-8"/>
  </head>
  <body>
    <!-- OB -->
  </body>
</html>
  • An RSS feed.
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="rss.css" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Blog Title</title>
    <description>Description</description>
    <language>en-us</language>
    <link>https://your_blog.com/rss.xml</link>
    <atom:link href="https://your_blog.com/rss.xml" rel="self" type="application/rss+xml" />

    <!-- OB -->
  </channel>
</rss>
  • A configuration file containing the paths to your blog index, template and rss files.
    It should also include the address of where the blog entries will be hosted, the maximum number of posts on the rss feed and whether to include images or not.
{
    "blog": "index.html",
    "template": "template.html",
    "rss": "rss.xml",
    "items": 4,
    "blog_address": "https://your_blog.com/blog/",
    "images": true
}

Markers

For the system to work, add the following comment line to the Rolling Blog File, Template and RSS feed (as above).

<!-- OB -->

When you publish a blog post, it will be added directly below that line in the proper format.

Usage

USAGE:
    ob [FLAGS]

FLAGS:
    -d, --delete     Delete an entry
    -h, --help       Prints help information
    -n, --new        Create a new draft
    -p, --publish    Publish a daft
    -V, --version    Prints version information

The first time ob is used it will create a folder at: /blog.

When you create a new draft it will be located at: /blog/drafts.
When you publish a new draft it will be located at: /blog/example.html.

Example usage:

ob --new

You can see an example on my blog or OB's website located in the /docs folder.

You might also like...
A web application to configuration Caddy based on MoonZoon.

Cream A web application to configuration Caddy based on MoonZoon. MoonZoon is a Rust Fullstack Framework. Live demo Run on a local machine Check you'v

📝 Web-based, reactive Datalog notebooks for data analysis and visualization
📝 Web-based, reactive Datalog notebooks for data analysis and visualization

Percival is a declarative data query and visualization language. It provides a reactive, web-based notebook environment for exploring complex datasets, producing interactive graphics, and sharing results.

JLM: A research compiler based on the RVSDG IR

JLM: A research compiler based on the RVSDG IR Jlm is an experimental compiler/optimizer that consumes and produces LLVM IR. It uses the Regionalized

Based on the Book Computer Graphics from Scratch
Based on the Book Computer Graphics from Scratch

raytracing_basic v1 Description Based on the Book Computer Graphics from Scratch Dependencies Good Web Game Build and run cargo build --release

A WebGPU implementation based on the excellent wgpu crate.

A WebGPU implementation based on the excellent wgpu crate.

🪪 Session-based user authentication for Axum.

axum-login 🪪 Session-based user authentication for Axum. 🎨 Overview axum-login is a Tower middleware providing session-based user authentication for

Layers, extractors and template engine wrappers for axum based Web MVC applications

axum-template Layers, extractors and template engine wrappers for axum based Web MVC applications Getting started Cargo.toml [dependencies] axum-templ

HTTP Proxy based solution for real-time interception and prioritization of SQL queries.
HTTP Proxy based solution for real-time interception and prioritization of SQL queries.

starproxy ⚠️ starproxy is a prototype: Not currently used in production, but will likely be some day. Table of Contents starproxy Table of Contents Ba

OpenAPI-based test coverage analysis tool that helps teams improve integration test coverage in CI/CD pipelines
OpenAPI-based test coverage analysis tool that helps teams improve integration test coverage in CI/CD pipelines

Ready-to-use OpenAPI test coverage analysis tool that helps teams improve integration CoveAPI is an advanced test coverage analysis tool based on the

Comments
  • link error

    link error

    Why is there no .html for the link inserted into index.html. For example:

    					<!-- OB -->
    <li id='90699696897703'><a href='blog/90699696897703'><h3>test</h3><span>by c</span><time datetime='Wed, 17 Nov 2021 00:36:07 +0000'>Wed, 17 Nov 2021</time></a></li>
    
    
    opened by 1024chen 3
  • Feature: Article Editing

    Feature: Article Editing

    Allow for the editing of articles.

    • The inner HTML of an article should be extracted and moved into the drafts folder.
    • When the user is done, they should then be able to use the -p command to save the changes.
    • The changes should be edited in both the RSS feed and published article.
    enhancement 
    opened by OliverBrotchie 0
Owner
Oliver Brotchie
A developer from Edinburgh who loves minimalist programming and Rust.
Oliver Brotchie
Turn GitHub into an RSS reader

NotCraft::NotFeed An RSS reader running entirely from your GitHub repo. Free hosting on GitHub Pages. No ads. No third party tracking. No need for bac

NotCraft 22 Nov 30, 2022
A RSS forwarder

newsfrwdr Checks inputs for new entries and forwards them to outputs (based on name/tag). For now, the only inputs it supports are rss feeds. Inspired

null 10 Dec 13, 2022
👦 🗞 Paperboy is a GitHub template that delivers RSS by email.

Paperboy Paperboy is a GitHub template that delivers RSS by email. Why? Free, no trackers, easy to set up, and does the job. Usage Click on "use this

Eduardo Stuart 12 Jul 5, 2022
A minimal and flexible blog generator based on GitHub Gists.

gisture Utilizing GitHub Gists as a Blogging Platform A minimal and flexible blog generator based on GitHub Gists with SEO, Templating, Syntax Highlig

Mufeed VH 26 Dec 27, 2022
Yew + Axum + blog = Yab

Yew + Axum + blog = Yab

STUDIO RSBM 13 Dec 5, 2022
Diana is a GraphQL system for Rust that's designed to work as simply as possible out of the box

Diana is a GraphQL system for Rust that's designed to work as simply as possible out of the box, without sacrificing configuration ability. Unlike other GraphQL systems, Diana fully supports serverless functions and automatically integrates them with a serverful subscriptions system as needed, and over an authenticated channel. GraphQL subscriptions are stateful, and so have to be run in a serverful way. Diana makes this process as simple as possible.

null 0 Aug 3, 2021
A Rust GraphQL system with full support for subscriptions and authentication that works out of the box.

Diana is a GraphQL system for Rust that's designed to work as simply as possible out of the box, without sacrificing configuration ability.

arctic_hen7 36 Dec 19, 2022
Implementation of the RealWorld backend API spec in Actix, Rust's powerful actor system and most fun web framework.

Actix codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API. ❗ (2021/05/13) This cod

Allen 475 Jan 2, 2023
A GUI frontend in Rust based on web-view

neutrino I am not working anymore on this project. If you want to become a maintainer of neutrino, please answer to this issue. Preamble Docs | Repo |

null 287 Nov 25, 2022
Murasaki is a Fast, Secure, and Reliable Webkit based web browser.

Murasaki is a Fast, Secure, and Reliable Webkit based web browser. Table of Contents Goals Status Usage License Goals Security: Be secure, and not com

Moon Laboratories 5 Nov 17, 2021