Skip to content

Commit

Permalink
Miscellaneous doc fixups (#561)
Browse files Browse the repository at this point in the history
* Miscellaneous doc fixups

* Format TOML
  • Loading branch information
aumetra authored Jul 30, 2024
1 parent 82f2f00 commit cd8caa8
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 22 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ fred = { version = "9.0.3", features = [
"full-tracing",
"i-scripts",
"sha-1",
"unix-sockets",
] }
garde = { version = "0.20.0", features = [
"derive",
Expand Down
7 changes: 6 additions & 1 deletion web/src/content/docs/configuration/database.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ title: Database
description: Configure the database used by Kitsune
---

import { Aside } from "@astrojs/starlight/components";

Kitsune requires a PostgreSQL installation that it can connect to since we make usage of Postgres-specific features, such as their full-text search.

You can find instructions on creating a database (along with password-protected user) [here](https://medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91e).

> We supported SQLite in the past (before v0.0.1-pre.1), but the support has been dropped due to a high maintenance burden and rather little expected usage.
<Aside>
We supported SQLite in the past (before v0.0.1-pre.1) but the support has been
dropped due to a high maintenance burden and rather little expected usage.
</Aside>

## Database URL structure

Expand Down
12 changes: 9 additions & 3 deletions web/src/content/docs/configuration/instance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Instance
description: Configure miscellaneous aspects of your instance
---

import { Aside } from "@astrojs/starlight/components";

Kitsune has a number of configurations that change how your instance works.

```toml
Expand Down Expand Up @@ -32,7 +34,11 @@ For example, getting the username `äumeträ` would automatically reserve these

and so on..

> **Note**: This doesn't allow you to sign up with emoji, such as 🎈. It will still require your name to be alphanumeric, just in any alphabet that unicode supports!
<Aside>
This doesn't allow you to sign up with emoji, such as 🎈. It will still
require your name to be alphanumeric, just in any alphabet that unicode
supports!
</Aside>

This is opt-in, since we aren't quite sure yet how other fediverse software, such as Mastodon, handles non-ASCII usernames.

Expand All @@ -42,9 +48,9 @@ This changes the name of the instance displayed on the landing page and returned

## `description`

Similar to `name`, this setting adjusts the description on the landing page and the one returned via the metadata endpoints.
<Aside type="tip">This field is interpreted as raw HTML</Aside>

> **Note**: This field is interpreted as raw HTML
Similar to `name`, this setting adjusts the description on the landing page and the one returned via the metadata endpoints.

## `character-limit`

Expand Down
11 changes: 8 additions & 3 deletions web/src/content/docs/configuration/job-scheduler.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Job Scheduler
description: Configure the Job Scheduler of Kitsune
---

import { Aside } from "@astrojs/starlight/components";

Kitsune uses the database to store and retrieve jobs that have to be run.
There are options to tune the job scheduler to your specific needs.

Expand All @@ -20,9 +22,12 @@ We utilize Redis streams and transactional Lua scripting to ensure no jobs are l

## `job-workers`

<Aside type="caution">
Each activity delivery is a job, and each of the delivery jobs run multiple
connections concurrently. Raising this job worker limit too high without also
increasing the maximum file descriptors might lead to weird issues.
</Aside>

This option configures how many jobs are run concurrently at the same time.

Each job is a lightweight task inside Kitsune's async runtime, so you can raise this well above what you'd raise a thread limit to.

> **Caution**: Each activity delivery is a job, and each of the delivery jobs run multiple connections concurrently.
> Raising this job worker limit too high without also increasing the maximum file descriptors might lead to weird issues.
13 changes: 8 additions & 5 deletions web/src/content/docs/configuration/language-detection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Language detection
description: Configure the language detection of Kitsune
---

import { Aside } from "@astrojs/starlight/components";

In order to classify posts better, Kitsune attempts to automatically guess the language a post is written in to improve the search experience by using language-specific tokenization.

It can do that through a number of language detection backends.
Expand All @@ -12,14 +14,15 @@ The currently supported backends are:
- `whatlang`: Use the [whatlang](https://github.com/greyblake/whatlang-rs) library (recommended)
- `whichlang`: Use the [whichlang](https://github.com/quickwit-oss/whichlang) library

### Note on the backends
<Aside>
In general you should prefer the `whatlang` backend as it offers reliability calculations and covers a wide range of languages.

In general you should prefer the `whatlang` backend as it offers reliability calculations and covers a wide range of languages.
`whichlang` is generally _faster_ than `whatlang` but has less supported languages and doesn't offer any reliability calculations, meaning the classifications might be _way off_
and won't ever fall back on the default language.

`whichlang` is generally _faster_ than `whatlang` but has less supported languages and doesn't offer any reliability calculations, meaning the classifications might be _way off_
and won't ever fall back on the default language.
You probably don't want to use the `none` backend unless you are 100% confident that the language detection is too resource intensive for your installation (which is extremely unlikely!)

You probably don't want to use the `none` backend unless you are 100% confident that the language detection is too resource intensive for your installation (which is extremely unlikely!)
</Aside>

## Configuration

Expand Down
6 changes: 5 additions & 1 deletion web/src/content/docs/configuration/messaging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ title: Messaging
description: Configure the internal messaging channels used by Kitsune
---

> Note that this is currently unused configuration but required nonetheless!
import { Aside } from "@astrojs/starlight/components";

<Aside type="caution">
This is currently unused configuration but required nonetheless!
</Aside>

Kitsune uses messaging services to exchange events for cache invalidation, notification delivery, etc.
To offer flexibility and to make self-hosting as easy as possible, we have multiple such backends.
Expand Down
7 changes: 6 additions & 1 deletion web/src/content/docs/configuration/oidc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ title: OIDC (OpenID Connect)
description: Configure the OpenID Connect support of Kitsune
---

> This feature is gated behind the `oidc` compile-time feature (enabled by default)
import { Aside } from "@astrojs/starlight/components";

<Aside type="tip">
This feature is gated behind the `oidc` compile-time feature (enabled by
default)
</Aside>

OpenID Connect (OIDC) is a technology to provide Single Sign-On (SSO) that it shared across multiple services.
This is useful if you, for example, want to run Kitsune together with a bunch of other services and don't want to maintain multiple logins.
Expand Down
15 changes: 11 additions & 4 deletions web/src/content/docs/configuration/storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ title: Storage
description: Configure the storage used by Kitsune
---

import { Aside } from "@astrojs/starlight/components";

As a microblogging platform, Kitsune also offers users the ability to attach images, videos, and audio to their posts.
We offer multiple different storage backends to store the attachments to.

> **Note**: You might want to increase the upload limit by tweaking the `max-upload-size` parameter in your configuration; the number is the upload limit in bytes.
> The default set by the example configuration is 5MiB.
<Aside type="tip">
You might want to increase the upload limit by tweaking the `max-upload-size`
parameter in your configuration. The default set by the example configuration
is 5MiB.
</Aside>

## File System

Expand Down Expand Up @@ -63,11 +68,13 @@ These keys are given to you when creating your bucket. Make sure you keep these

### Notes on "get_object" requests

<Aside type="caution">
This is not final, we might change how S3 uploads are handled
</Aside>

Currently Kitsune proxies all the S3 accesses, meaning each media access results in a "get object" request.
For example, Cloudflare R2 has a "no egress fee policy" which, due to this implementation detail, doesn't apply to Kitsune.

> This is not final, we might change how S3 uploads are handled
### Migrating from file-system storage to S3

The migration is pretty simple. Upload all the files from your upload directory into the S3 bucket (while preserving the same file hierarchy) and change the configuration.
Expand Down
4 changes: 4 additions & 0 deletions web/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ hero:
- text: Check out the code
link: https://github.com/kitsune-soc/kitsune
icon: external
- text: Configuration reference
link: /configuration/cache
icon: setting
variant: secondary
---

import { Card, CardGrid } from "@astrojs/starlight/components";
Expand Down
9 changes: 7 additions & 2 deletions web/src/content/docs/running/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Installation
description: Install Kitsune on your own server
---

import { Aside } from "@astrojs/starlight/components";

At the moment, the only way to install Kitsune is to compile it from source.
Don't worry, that sounds way more scary than it actually is. In this guide we will step you through it.

Expand Down Expand Up @@ -35,15 +37,18 @@ The name of the package(s) containing these tools might differ between distribut

First, grab yourself a copy of the source code. You can either download the [main branch ZIP archive](https://github.com/kitsune-soc/kitsune/archive/refs/heads/main.zip) or clone it via Git. Both ways will work just fine.

> The recommended way to download the source is via Git since it makes updating and doing a rollback way easier.
<Aside type="tip">
The recommended way to download the source is via Git since it makes updating
and doing a rollback way easier.
</Aside>

To download a Git repository, just run the following command (this assumes you have [Git](https://git-scm.com/) installed):

```bash
git clone https://github.com/kitsune-soc/kitsune.git
```

> If you downloaded the ZIP, just unzip the archive
<Aside>If you downloaded the ZIP, just unzip the archive</Aside>

Next, move into the newly created directory and then into the `kitsune-fe` directory and build the frontend.
To do this run:
Expand Down
10 changes: 8 additions & 2 deletions web/src/content/docs/spec/http-signatures.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: HTTP signatures
description: Basic description of HTTP signatures as used by Kitsune
---

import { Aside } from "@astrojs/starlight/components";

HTTP signatures are used by Kitsune to validate that the Activity/Object actually originates from the user it claims to.
We implement a subset of [`draft-cavage-http-signatures-12`](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12) to do this.

Expand All @@ -16,7 +18,11 @@ The signature scheme used is inferred by the OID embedded in the public key mate

At the moment, Kitsune uses RSA keys but has support for implementations that use Ed25519 for signatures.

> We use RSA because Mastodon doesn't support anything else. So if you want compatibility with Mastodon, you have to use RSA.
> As soon as a mainline Mastodon release gets support for Ed25519 signatures, we will release an update that allows to rekey all the users.
<Aside>
We use RSA because Mastodon doesn't support anything else. So if you want
compatibility with Mastodon, you have to use RSA. As soon as a mainline
Mastodon release gets support for Ed25519 signatures, we will release an
update that allows to rekey all the users.
</Aside>

But if you are happy to just federate with Kitsune users, you can use Ed25519!

0 comments on commit cd8caa8

Please sign in to comment.