Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add documentation #54

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target
soldr.db
crates/ui/static
index.html
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
16 changes: 16 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Docs

## Requirements

- mdbook - https://rust-lang.github.io/mdBook/index.html
- mdbook-mermaid - https://github.com/badboy/mdbook-mermaid

## Modifying Docs

Build the docs and start a local webserver:

```
mdbook serve
```

You can leave the server running even while you edit the content of the docs. The docs will be automatically rebuilt the output and automatically refresh your web browser.
24 changes: 24 additions & 0 deletions docs/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[book]
authors = ["Herman J. Radtke III"]
language = "en"
multilingual = false
src = "src"
title = "Soldr"


[preprocessor.mermaid]
command = "mdbook-mermaid"

[output.html]
git-repository-url = "https://github.com/hjr3/soldr/tree/main/docs"
edit-url-template = "https://github.com/hjr3/soldr/edit/main/docs/{path}"
additional-js = ["mermaid.min.js", "mermaid-init.js"]

[output.html.search]
limit-results = 20
use-boolean-and = true
boost-title = 2
boost-hierarchy = 2
boost-paragraph = 1
expand = true
heading-split-level = 2
1 change: 1 addition & 0 deletions docs/mermaid-init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mermaid.initialize({startOnLoad:true});
1,648 changes: 1,648 additions & 0 deletions docs/mermaid.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Introduction](../../README.md)

# Getting Started

- [Installation](installation.md)
- [Configuration](configuration.md)
19 changes: 19 additions & 0 deletions docs/src/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Configuration

Soldr is designed to start running without requiring a configuration file.

You can configure soldr by creating a configuration file in the [TOML](https://toml.io) format.

Example:

```toml
database_url = "sqlite:soldr.db?mode=rwc"
management_listener = "0.0.0.0:3443"
ingest_listener = "0.0.0.0:3000"
```

The repository also includes `soldr.example.toml` for reference.

- `database_url` - the SQLite database connection string
- `management_listener` - the ip address and port for the management API
- `ingest_listener` - the ip address and port for the proxy
13 changes: 13 additions & 0 deletions docs/src/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Installation

Soldr is not currently pre-packaged.

To install:

- `git clone https://github.com/hjr3/soldr.git`
- `cd soldr`
- `just install build-ui`
- If you do not have `just` installed, you can manually run the commands from the file.
- `cargo build --release` will create two targets:
- `target/release/soldr` - this is the proxy and the management API
- `target/release/ui` - this a file server that serves the management UI. The management UI is optional.