Compare commits
4 Commits
6ec711f7ed
...
fd51c7c0bb
| Author | SHA1 | Date | |
|---|---|---|---|
| fd51c7c0bb | |||
| c5c433edb5 | |||
| 54dc751dca | |||
| 655dc8e90f |
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1940,7 +1940,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86"
|
checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "loremaster"
|
name = "loreweaver"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
members = [
|
members = [
|
||||||
"tavern",
|
"tavern",
|
||||||
"bard",
|
"bard",
|
||||||
"loremaster",
|
"loreweaver",
|
||||||
"blog_test"]
|
"blog_test"]
|
||||||
|
|
||||||
resolver = "2" # Enables modern dependency resolution
|
resolver = "2" # Enables modern dependency resolution
|
||||||
|
|||||||
49
README.md
Normal file
49
README.md
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# Tavernworks
|
||||||
|
|
||||||
|
Tavernworks is a modular blog system written in Rust. It is designed to parse,
|
||||||
|
compile, and serve structured blog content using a cohesive set of themed
|
||||||
|
libraries. The system is centered around the `tavern` content engine and is
|
||||||
|
supported by a publisher CLI and a rendering frontend.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
TavernWorks consists of the following components:
|
||||||
|
|
||||||
|
### tavern
|
||||||
|
|
||||||
|
The core library that defines the data model, parses content, and provides the
|
||||||
|
API to read and write blog data. It is responsible for turning a repository of
|
||||||
|
Markdown files and metadata into an in-memory structure or database.
|
||||||
|
|
||||||
|
### loreweaver
|
||||||
|
|
||||||
|
A command-line tool that uses `tavern` to compile a blog repository into a
|
||||||
|
SQLite database. It reads a `Tavern.toml` metadata file and outputs a portable
|
||||||
|
database that can be served or inspected.
|
||||||
|
|
||||||
|
### bard
|
||||||
|
|
||||||
|
A Dioxus-based frontend library that renders blog content from the database.
|
||||||
|
It provides components to create a full blog UI using data produced by
|
||||||
|
`loreweaver`.
|
||||||
|
|
||||||
|
### blog_test
|
||||||
|
|
||||||
|
A test project that verifies the full system from content to rendering. It is
|
||||||
|
used to validate that blog repositories are parsed, compiled, and rendered
|
||||||
|
correctly across all components.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Copyright & License
|
||||||
|
|
||||||
|
Copyright 2025 CyberMages LLC
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this library except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS
|
||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "bard"
|
name = "bard"
|
||||||
version = "0.0.23"
|
version = "0.3.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "Dioxus components that will display a Tavern blogging system Blog."
|
description = "Dioxus components that will display a Tavern blogging system Blog."
|
||||||
repository = "/CyberMages/tavern"
|
repository = "/CyberMages/tavern"
|
||||||
|
|||||||
@ -1,7 +1,72 @@
|
|||||||
# Tavern
|
# Bard
|
||||||
|
|
||||||
A blogging system that will allow you to write your blog in Markdown and then
|
Bard is the frontend rendering library for the Tavernworks blog system.
|
||||||
display it in HTML using Dioxus.
|
It provides Dioxus components for rendering blog content that has been compiled
|
||||||
|
into a SQLite database by Loreweaver and parsed by the Tavern engine.
|
||||||
|
|
||||||
|
Bard supports both server-side and client-side rendering and is designed to be
|
||||||
|
integrated into Dioxus applications.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Dioxus components for routing and rendering blog pages
|
||||||
|
- Works with content stored in a SQLite database
|
||||||
|
- Compatible with `dioxus-web` and `dioxus-desktop`
|
||||||
|
- Optional server integration via Axum for local hosting
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To use Bard in a Dioxus application, you must:
|
||||||
|
|
||||||
|
1. Initialize the database using `bard::init_database`.
|
||||||
|
2. Add the `Router::<bard::Page>` component to your app.
|
||||||
|
3. Optionally, define routes that include Bard under your own layout.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#[component]
|
||||||
|
fn App() -> Element {
|
||||||
|
rsx! {
|
||||||
|
Router::<Page> {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Routable, Clone, PartialEq)]
|
||||||
|
pub enum Page {
|
||||||
|
#[layout(Navbar)]
|
||||||
|
#[route("/")]
|
||||||
|
Home {},
|
||||||
|
|
||||||
|
#[child("/blog")]
|
||||||
|
Bard
|
||||||
|
{
|
||||||
|
child: bard::Page
|
||||||
|
},
|
||||||
|
|
||||||
|
#[route("/:..route")]
|
||||||
|
PageNotFound { route: Vec<String> }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Server-side Initialization
|
||||||
|
|
||||||
|
To serve the blog using Axum and load the database:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
tokio::runtime::Runtime::new()
|
||||||
|
.unwrap()
|
||||||
|
.block_on(async move {
|
||||||
|
bard::init_database("path/to/tavern.db").await;
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
Enable the following Cargo features as needed:
|
||||||
|
|
||||||
|
- `server`: Enables Axum support for database-backed serving
|
||||||
|
- `web`: Enables Dioxus web support
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "blog_test"
|
name = "blog_test"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
authors = ["Myrddin Dundragon <myrddin@cybermages.tech>"]
|
authors = ["Myrddin Dundragon <myrddin@cybermages.tech>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@ -103,13 +103,11 @@ pub enum Page
|
|||||||
#[route("/")]
|
#[route("/")]
|
||||||
Home {},
|
Home {},
|
||||||
|
|
||||||
// #[nest("/blog")]
|
#[child("/blog")]
|
||||||
#[child("/blog")]
|
Bard
|
||||||
Bard
|
{
|
||||||
{
|
child: bard::Page
|
||||||
child: bard::Page
|
},
|
||||||
},
|
|
||||||
// #[end_nest]
|
|
||||||
|
|
||||||
#[route("/:..route")]
|
#[route("/:..route")]
|
||||||
PageNotFound { route: Vec<String> }
|
PageNotFound { route: Vec<String> }
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
# Loremaster
|
|
||||||
|
|
||||||
Converts a blog repository into an SQLite database using the Tavern blog system.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Copyright & License
|
|
||||||
|
|
||||||
Copyright 2025 CyberMages LLC
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this library except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "loremaster"
|
name = "loreweaver"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "Converts a blog repository into an SQLite database using the Tavern blog system."
|
description = "Converts a blog repository into an SQLite database using the Tavern blog system."
|
||||||
repository = "/CyberMages/tavern"
|
repository = "/CyberMages/tavern"
|
||||||
42
loreweaver/README.md
Normal file
42
loreweaver/README.md
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Loreweaver
|
||||||
|
|
||||||
|
Loreweaver is a command-line tool that compiles a blog repository into a SQLite
|
||||||
|
database using the Tavernworks blog system. It acts as a publisher that reads
|
||||||
|
a metadata configuration file and processes the blog content via the `tavern`
|
||||||
|
engine.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Reads a `Tavern.toml` metadata file to configure the compilation
|
||||||
|
- Converts Markdown blog repositories into portable SQLite databases
|
||||||
|
- Simple CLI interface with configurable input and output paths
|
||||||
|
- Built on top of the `tavern` library for content parsing and data handling
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Run Loreweaver with the default configuration file and output:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
loreweaver --config Tavern.toml --output tavern.db
|
||||||
|
```
|
||||||
|
|
||||||
|
Specify custom paths for config or output files:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
loreweaver --config path/to/config.toml --output path/to/output.db
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Copyright & License
|
||||||
|
|
||||||
|
Copyright 2025 CyberMages LLC
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this library except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS
|
||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tavern"
|
name = "tavern"
|
||||||
version = "0.2.9"
|
version = "0.3.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "A blogging system that will allow you to write your blog in Markdown and then display it in HTML using Dioxus."
|
description = "A blogging system that will allow you to write your blog in Markdown and then display it in HTML using Dioxus."
|
||||||
repository = "/CyberMages/tavern"
|
repository = "/CyberMages/tavern"
|
||||||
|
|||||||
@ -1,7 +1,28 @@
|
|||||||
# Tavern
|
# Tavern
|
||||||
|
|
||||||
A blogging system that will allow you to write your blog in Markdown and then
|
Tavern is the core content engine of the Tavernworks blog system.
|
||||||
display it in HTML using Dioxus.
|
It provides the data model, parsing logic, and database interaction necessary
|
||||||
|
to convert a Markdown-based blog repository into a structured, queryable form.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Parses blog content from Markdown files and metadata.
|
||||||
|
- Converts content into an in-memory model or stores it in SQLite.
|
||||||
|
- Provides an async API to query and manipulate blog data.
|
||||||
|
- Designed to be extensible and integrated into CLI tools or frontends.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
As a library, `tavern` can be embedded in Rust applications or CLI tools
|
||||||
|
to handle blog content processing and storage.
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use tavern::{Tavern, Database};
|
||||||
|
|
||||||
|
let tavern = Tavern::from_config_file("Tavern.toml");
|
||||||
|
let database = Database::open("blog.db").await?;
|
||||||
|
database.insert_tavern(&tavern).await?;
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user