Adding initial README files.

This commit is contained in:
2025-09-25 11:38:05 -04:00
parent 54dc751dca
commit c5c433edb5
3 changed files with 140 additions and 5 deletions

49
README.md Normal file
View 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

View File

@ -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
--- ---

View File

@ -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?;
```
--- ---