First attempt at some documentation

This commit is contained in:
Lennart
2025-04-17 21:17:41 +02:00
parent 63ee4d7d53
commit b724021c4c
6 changed files with 198 additions and 0 deletions

42
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: docs
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- name: Set up build cache
uses: actions/cache/restore@v4
with:
key: mkdocs-material-${{ hashfiles('.cache/**') }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs build --clean
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: site
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
- name: Save build cache
uses: actions/cache/save@v4
with:
key: mkdocs-material-${{ hashfiles('.cache/**') }}
path: .cache

18
docs/index.md Normal file
View File

@@ -0,0 +1,18 @@
# RustiCal
a CalDAV/CardDAV server
!!! warning
RustiCal is **not production-ready!**
There can be changes to the database without migrations and there's no guarantee that all endpoints are secured yet.
If you still want to play around with it in its current state, absolutely feel free to do so but know that not even I use it productively yet.
## Features
- easy to backup, everything saved in one SQLite database
- [WebDAV Push](https://github.com/bitfireAT/webdav-push/) support, so near-instant synchronisation to DAVx5
- lightweight (the container image contains only one binary)
- adequately fast (I'd say blazingly fast™ :fire: if I did the benchmarks to back that claim up)
- deleted calendars are recoverable
- Nextcloud login flow (In DAVx5 you can login through the Nextcloud flow and automatically generate an app token)
- [OpenID Connect](setup/oidc.md) support (with option to disable password login)

39
docs/installation.md Normal file
View File

@@ -0,0 +1,39 @@
# Installation
## Manual
```sh
cargo install --locked --git https://github.com/lennart-k/rustical
```
## Docker
```sh
docker run \
-p 4000:4000 \
-v YOUR_DATA_DIR:/var/lib/rustical/ \
-v YOUR_CONFIG_TOML:/etc/rustical/config.toml \
-v YOUR_PRINCIPALS_TOML:/etc/rustical/principals.toml \
ghcr.io/lennart-k/rustical
```
## Configuration
### TOML
### Environment variables
The options in `config.toml` can also be configured using environment variables. Names translate the following:
```toml title="config.toml"
[data_store.toml]
path = "asd"
```
becomes `RUSTICAL_DATA_STORE__TOML__PATH`.
Every variable is
- uppercase
- prefixed by `RUSTICAL_`
- Dots become `__`
- Arrays are JSON-encoded

3
docs/rfcs.md Normal file
View File

@@ -0,0 +1,3 @@
# RFCs
Collection of RFCs relevant to this project

34
docs/setup/oidc.md Normal file
View File

@@ -0,0 +1,34 @@
# OpenID Connect
You can set up RustiCal with an OpenID Connect identity provider
## Example: Authelia
```toml title="RustiCal configuration"
[frontend.oidc]
name = "Authelia"
issuer = "https://auth.example.com"
client_id = "rustical"
client_secret = "secret..."
claim_userid = "preferred_username" # (1)!
scopes = ["openid", "profile", "groups"]
require_group = "app/rustical" # (2)!
allow_sign_up = false
```
1. Can be either `preferred_username` or `sub`
2. Optional: You can require a user to be in a certain group to use RustiCal
```yaml title="Authelia configuration"
identity_providers:
oidc:
clients:
- client_id: rustical
client_secret: secret...
public: false
consent_mode: implicit
scopes: [openid, profile, groups]
token_endpoint_auth_method: client_secret_basic
redirect_uris:
- https://rustical.example.com/frontend/login/oidc/callback
```

62
mkdocs.yml Normal file
View File

@@ -0,0 +1,62 @@
site_name: RustiCal Documentation
site_url: https://lennart-k.github.io/rustical/
site_description: a CalDAV/CardDAV server
repo_name: lennart-k/rustical
repo_url: https://github.com/lennart-k/rustical
theme:
name: material
palette:
- media: "(prefers-color-scheme)"
toggle:
icon: material/link
name: Switch to light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: indigo
accent: indigo
toggle:
icon: material/toggle-switch
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: black
accent: indigo
toggle:
icon: material/toggle-switch-off
name: Switch to system preference
font:
text: Roboto
code: Roboto Mono
favicon: assets/favicon.png
icon:
logo: logo
features:
- content.code.copy
- content.code.annotate
- content.tooltips
- navigation.indices
- navigation.tabs
markdown_extensions:
- fenced_code
- smarty
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- admonition
- attr_list
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
nav:
- Home: index.md
- Installation: installation.md
- OpenID Connect: setup/oidc.md
- RFCs: rfcs.md