| Crates.io | ob |
| lib.rs | ob |
| version | 1.0.10 |
| created_at | 2021-09-02 16:45:51.248407+00 |
| updated_at | 2021-12-13 20:58:47.764324+00 |
| description | A Blog and RSS system written in Rust. |
| homepage | |
| repository | https://github.com/OliverBrotchie/ob |
| max_upload_size | |
| id | 446071 |
| size | 90,307 |
A Blog and RSS system written in Rust.
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install OB:
cargo install ob
You will need to create four files:
<!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>
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8"/>
</head>
<body>
<!-- OB -->
</body>
</html>
<?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>
{
"blog": "index.html",
"template": "template.html",
"rss": "rss.xml",
"items": 4,
"blog_address": "https://your_blog.com/blog/",
"images": true
}
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:
ob <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
delete Deletes an entry
edit Edit a published entry
help Prints this message or the help of the given subcommand(s)
new Create a new draft
publish Publish a daft
regen Regenerates all blog entries
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
/docs folder.