Merge branch 'docs/mdbook-full' into 'next'
docs: build docs using mdBook and copy all markdown files See merge request famedly/conduit!604
This commit is contained in:
commit
a8da61e5b7
23 changed files with 164 additions and 25 deletions
15
.editorconfig
Normal file
15
.editorconfig
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
tab_width = 4
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
max_line_length = 120
|
||||||
|
|
||||||
|
[*.nix]
|
||||||
|
indent_size = 2
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -71,3 +71,6 @@ cached_target
|
||||||
|
|
||||||
# Gitlab CI cache
|
# Gitlab CI cache
|
||||||
/.gitlab-ci.d
|
/.gitlab-ci.d
|
||||||
|
|
||||||
|
# mdbook output
|
||||||
|
public/
|
|
@ -98,6 +98,10 @@ artifacts:
|
||||||
|
|
||||||
- ./bin/nix-build-and-cache .#oci-image-aarch64-unknown-linux-musl
|
- ./bin/nix-build-and-cache .#oci-image-aarch64-unknown-linux-musl
|
||||||
- cp result oci-image-arm64v8.tar.gz
|
- cp result oci-image-arm64v8.tar.gz
|
||||||
|
|
||||||
|
- ./bin/nix-build-and-cache .#book
|
||||||
|
# We can't just copy the symlink, we need to dereference it https://gitlab.com/gitlab-org/gitlab/-/issues/19746
|
||||||
|
- cp -r --dereference result public
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- x86_64-unknown-linux-musl
|
- x86_64-unknown-linux-musl
|
||||||
|
@ -105,6 +109,7 @@ artifacts:
|
||||||
- x86_64-unknown-linux-musl.deb
|
- x86_64-unknown-linux-musl.deb
|
||||||
- oci-image-amd64.tar.gz
|
- oci-image-amd64.tar.gz
|
||||||
- oci-image-arm64v8.tar.gz
|
- oci-image-arm64v8.tar.gz
|
||||||
|
- public
|
||||||
rules:
|
rules:
|
||||||
# CI required for all MRs
|
# CI required for all MRs
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
@ -165,3 +170,15 @@ oci-image:push-dockerhub:
|
||||||
IMAGE_NAME: matrixconduit/matrix-conduit
|
IMAGE_NAME: matrixconduit/matrix-conduit
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
|
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
|
||||||
|
|
||||||
|
pages:
|
||||||
|
stage: publish
|
||||||
|
dependencies:
|
||||||
|
- artifacts
|
||||||
|
only:
|
||||||
|
- next
|
||||||
|
script:
|
||||||
|
- "true"
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
|
3
.gitlab/route-map.yml
Normal file
3
.gitlab/route-map.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Docs: Map markdown to html files
|
||||||
|
- source: /docs/(.+)\.md/
|
||||||
|
public: '\1.html'
|
31
README.md
31
README.md
|
@ -1,7 +1,15 @@
|
||||||
# Conduit
|
# Conduit
|
||||||
### A Matrix homeserver written in Rust
|
|
||||||
|
|
||||||
|
<!-- ANCHOR: catchphrase -->
|
||||||
|
### A Matrix homeserver written in Rust
|
||||||
|
<!-- ANCHOR_END: catchphrase -->
|
||||||
|
|
||||||
|
Please visit the [Conduit documentation](https://famedly.gitlab.io/conduit) for more information.
|
||||||
|
Alternatively you can open [docs/introduction.md](docs/introduction.md) in this repository.
|
||||||
|
|
||||||
|
<!-- ANCHOR: body -->
|
||||||
#### What is Matrix?
|
#### What is Matrix?
|
||||||
|
|
||||||
[Matrix](https://matrix.org) is an open network for secure and decentralized
|
[Matrix](https://matrix.org) is an open network for secure and decentralized
|
||||||
communication. Users from every Matrix homeserver can chat with users from all
|
communication. Users from every Matrix homeserver can chat with users from all
|
||||||
other Matrix servers. You can even use bridges (also called Matrix appservices)
|
other Matrix servers. You can even use bridges (also called Matrix appservices)
|
||||||
|
@ -30,16 +38,9 @@ There are still a few important features missing:
|
||||||
|
|
||||||
- E2EE emoji comparison over federation (E2EE chat works)
|
- E2EE emoji comparison over federation (E2EE chat works)
|
||||||
- Outgoing read receipts, typing, presence over federation (incoming works)
|
- Outgoing read receipts, typing, presence over federation (incoming works)
|
||||||
|
<!-- ANCHOR_END: body -->
|
||||||
|
|
||||||
#### How can I deploy my own?
|
<!-- ANCHOR: footer -->
|
||||||
|
|
||||||
- Simple install (this was tested the most): [DEPLOY.md](DEPLOY.md)
|
|
||||||
- Debian package: [debian/README.md](debian/README.md)
|
|
||||||
- Nix/NixOS: [nix/README.md](nix/README.md)
|
|
||||||
- Docker: [docker/README.md](docker/README.md)
|
|
||||||
|
|
||||||
If you want to connect an Appservice to Conduit, take a look at [APPSERVICES.md](APPSERVICES.md).
|
|
||||||
|
|
||||||
#### How can I contribute?
|
#### How can I contribute?
|
||||||
|
|
||||||
1. Look for an issue you would like to work on and make sure no one else is currently working on it.
|
1. Look for an issue you would like to work on and make sure no one else is currently working on it.
|
||||||
|
@ -56,7 +57,6 @@ If you have any questions, feel free to
|
||||||
- Send an direct message to `@timokoesters:fachschaften.org` on Matrix
|
- Send an direct message to `@timokoesters:fachschaften.org` on Matrix
|
||||||
- [Open an issue on GitLab](https://gitlab.com/famedly/conduit/-/issues/new)
|
- [Open an issue on GitLab](https://gitlab.com/famedly/conduit/-/issues/new)
|
||||||
|
|
||||||
|
|
||||||
#### Thanks to
|
#### Thanks to
|
||||||
|
|
||||||
Thanks to FUTO, Famedly, Prototype Fund (DLR and German BMBF) and all individuals for financially supporting this project.
|
Thanks to FUTO, Famedly, Prototype Fund (DLR and German BMBF) and all individuals for financially supporting this project.
|
||||||
|
@ -68,10 +68,11 @@ Thanks to the contributors to Conduit and all libraries we use, for example:
|
||||||
|
|
||||||
#### Donate
|
#### Donate
|
||||||
|
|
||||||
Liberapay: <https://liberapay.com/timokoesters/>\
|
- Liberapay: <https://liberapay.com/timokoesters/>
|
||||||
Bitcoin: `bc1qnnykf986tw49ur7wx9rpw2tevpsztvar5x8w4n`
|
- Bitcoin: `bc1qnnykf986tw49ur7wx9rpw2tevpsztvar5x8w4n`
|
||||||
|
|
||||||
#### Logo
|
#### Logo
|
||||||
|
|
||||||
Lightning Bolt Logo: https://github.com/mozilla/fxemoji/blob/gh-pages/svgs/nature/u26A1-bolt.svg \
|
- Lightning Bolt Logo: <https://github.com/mozilla/fxemoji/blob/gh-pages/svgs/nature/u26A1-bolt.svg>
|
||||||
Logo License: https://github.com/mozilla/fxemoji/blob/gh-pages/LICENSE.md
|
- Logo License: <https://github.com/mozilla/fxemoji/blob/gh-pages/LICENSE.md>
|
||||||
|
<!-- ANCHOR_END: footer -->
|
||||||
|
|
18
book.toml
Normal file
18
book.toml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
[book]
|
||||||
|
title = "Conduit"
|
||||||
|
description = "Conduit is a simple, fast and reliable chat server for the Matrix protocol"
|
||||||
|
language = "en"
|
||||||
|
multilingual = false
|
||||||
|
src = "docs"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
build-dir = "public"
|
||||||
|
create-missing = true
|
||||||
|
|
||||||
|
[output.html]
|
||||||
|
git-repository-url = "https://gitlab.com/famedly/conduit"
|
||||||
|
edit-url-template = "https://gitlab.com/famedly/conduit/-/edit/next/{path}"
|
||||||
|
git-repository-icon = "fa-git-square"
|
||||||
|
|
||||||
|
[output.html.search]
|
||||||
|
limit-results = 15
|
2
debian/README.md
vendored
2
debian/README.md
vendored
|
@ -5,7 +5,7 @@ Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Information about downloading, building and deploying the Debian package, see
|
Information about downloading, building and deploying the Debian package, see
|
||||||
the "Installing Conduit" section in [DEPLOY.md](../DEPLOY.md).
|
the "Installing Conduit" section in the Deploying docs.
|
||||||
All following sections until "Setting up the Reverse Proxy" be ignored because
|
All following sections until "Setting up the Reverse Proxy" be ignored because
|
||||||
this is handled automatically by the packaging.
|
this is handled automatically by the packaging.
|
||||||
|
|
||||||
|
|
12
docs/SUMMARY.md
Normal file
12
docs/SUMMARY.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Summary
|
||||||
|
|
||||||
|
- [Introduction](introduction.md)
|
||||||
|
|
||||||
|
- [Example configuration](configuration.md)
|
||||||
|
- [Deployment options](deploying.md)
|
||||||
|
- [Simple (Recommended)](deploying/simple.md)
|
||||||
|
- [Debian](deploying/debian.md)
|
||||||
|
- [Docker](deploying/docker.md)
|
||||||
|
- [Nix](deploying/nix.md)
|
||||||
|
- [TURN](turn.md)
|
||||||
|
- [Appservices](appservices.md)
|
5
docs/configuration.md
Normal file
5
docs/configuration.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Example configuration
|
||||||
|
|
||||||
|
``` toml
|
||||||
|
{{#include ../conduit-example.toml}}
|
||||||
|
```
|
8
docs/deploying.md
Normal file
8
docs/deploying.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Deployment options
|
||||||
|
|
||||||
|
There are several ways to deploy a Conduit server.
|
||||||
|
|
||||||
|
- [Simple (Recommended)](deploying/simple.md) - This is the recommended way to set up Conduit.
|
||||||
|
- [Debian](deploying/debian.md) - If you're using a debian-based system, you may find the `deb` package useful.
|
||||||
|
- [Docker](deploying/docker.md) - We provide multi-arch OCI images for Conduit.
|
||||||
|
- [Nix](deploying/nix.md) - Nix flake based setup.
|
1
docs/deploying/debian.md
Normal file
1
docs/deploying/debian.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{#include ../../debian/README.md}}
|
|
@ -69,7 +69,7 @@ docker run -d -p 8448:6167 \
|
||||||
|
|
||||||
or you can use [docker-compose](#docker-compose).
|
or you can use [docker-compose](#docker-compose).
|
||||||
|
|
||||||
The `-d` flag lets the container run in detached mode. You now need to supply a `conduit.toml` config file, an example can be found [here](../conduit-example.toml).
|
The `-d` flag lets the container run in detached mode. You now need to supply a `conduit.toml` config file, an example can be found [here](../configuration.md).
|
||||||
You can pass in different env vars to change config values on the fly. You can even configure Conduit completely by using env vars, but for that you need
|
You can pass in different env vars to change config values on the fly. You can even configure Conduit completely by using env vars, but for that you need
|
||||||
to pass `-e CONDUIT_CONFIG=""` into your container. For an overview of possible values, please take a look at the `docker-compose.yml` file.
|
to pass `-e CONDUIT_CONFIG=""` into your container. For an overview of possible values, please take a look at the `docker-compose.yml` file.
|
||||||
|
|
||||||
|
@ -87,8 +87,7 @@ Depending on your proxy setup, you can use one of the following files;
|
||||||
When picking the traefik-related compose file, rename it so it matches `docker-compose.yml`, and
|
When picking the traefik-related compose file, rename it so it matches `docker-compose.yml`, and
|
||||||
rename the override file to `docker-compose.override.yml`. Edit the latter with the values you want
|
rename the override file to `docker-compose.override.yml`. Edit the latter with the values you want
|
||||||
for your server.
|
for your server.
|
||||||
|
Additional info about deploying Conduit can be found [here](simple.md).
|
||||||
Additional info about deploying Conduit can be found [here](../DEPLOY.md).
|
|
||||||
|
|
||||||
### Build
|
### Build
|
||||||
|
|
||||||
|
@ -130,7 +129,7 @@ So...step by step:
|
||||||
1. Copy [`docker-compose.for-traefik.yml`](docker-compose.for-traefik.yml) (or
|
1. Copy [`docker-compose.for-traefik.yml`](docker-compose.for-traefik.yml) (or
|
||||||
[`docker-compose.with-traefik.yml`](docker-compose.with-traefik.yml)) and [`docker-compose.override.yml`](docker-compose.override.yml) from the repository and remove `.for-traefik` (or `.with-traefik`) from the filename.
|
[`docker-compose.with-traefik.yml`](docker-compose.with-traefik.yml)) and [`docker-compose.override.yml`](docker-compose.override.yml) from the repository and remove `.for-traefik` (or `.with-traefik`) from the filename.
|
||||||
2. Open both files and modify/adjust them to your needs. Meaning, change the `CONDUIT_SERVER_NAME` and the volume host mappings according to your needs.
|
2. Open both files and modify/adjust them to your needs. Meaning, change the `CONDUIT_SERVER_NAME` and the volume host mappings according to your needs.
|
||||||
3. Create the `conduit.toml` config file, an example can be found [here](../conduit-example.toml), or set `CONDUIT_CONFIG=""` and configure Conduit per env vars.
|
3. Create the `conduit.toml` config file, an example can be found [here](../configuration.md), or set `CONDUIT_CONFIG=""` and configure Conduit per env vars.
|
||||||
4. Uncomment the `element-web` service if you want to host your own Element Web Client and create a `element_config.json`.
|
4. Uncomment the `element-web` service if you want to host your own Element Web Client and create a `element_config.json`.
|
||||||
5. Create the files needed by the `well-known` service.
|
5. Create the files needed by the `well-known` service.
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
# Deploying Conduit
|
# Simple setup
|
||||||
|
|
||||||
|
This is the recommended way to set up Conduit. It is the easiest way to get started and is suitable for most use cases.
|
||||||
|
|
||||||
> ## Getting help
|
> ## Getting help
|
||||||
>
|
>
|
||||||
|
@ -141,7 +143,7 @@ $ sudo systemctl daemon-reload
|
||||||
|
|
||||||
Now we need to create the Conduit's config file in
|
Now we need to create the Conduit's config file in
|
||||||
`/etc/matrix-conduit/conduit.toml`. Paste in the contents of
|
`/etc/matrix-conduit/conduit.toml`. Paste in the contents of
|
||||||
[`conduit-example.toml`](./conduit-example.toml) **and take a moment to read it.
|
[`conduit-example.toml`](../configuration.md) **and take a moment to read it.
|
||||||
You need to change at least the server name.**
|
You need to change at least the server name.**
|
||||||
You can also choose to use a different database backend, but right now only `rocksdb` and `sqlite` are recommended.
|
You can also choose to use a different database backend, but right now only `rocksdb` and `sqlite` are recommended.
|
||||||
|
|
||||||
|
@ -305,8 +307,8 @@ $ curl https://your.server.name:8448/_matrix/client/versions
|
||||||
|
|
||||||
## Audio/Video calls
|
## Audio/Video calls
|
||||||
|
|
||||||
For Audio/Video call functionality see the [TURN Guide](TURN.md).
|
For Audio/Video call functionality see the [TURN Guide](../turn.md).
|
||||||
|
|
||||||
## Appservices
|
## Appservices
|
||||||
|
|
||||||
If you want to set up an appservice, take a look at the [Appservice Guide](APPSERVICES.md).
|
If you want to set up an appservice, take a look at the [Appservice Guide](../appservices.md).
|
13
docs/introduction.md
Normal file
13
docs/introduction.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Conduit
|
||||||
|
|
||||||
|
{{#include ../README.md:catchphrase}}
|
||||||
|
|
||||||
|
{{#include ../README.md:body}}
|
||||||
|
|
||||||
|
#### How can I deploy my own?
|
||||||
|
|
||||||
|
- [Deployment options](deploying.md)
|
||||||
|
|
||||||
|
If you want to connect an Appservice to Conduit, take a look at the [appservices documentation](appservices.md).
|
||||||
|
|
||||||
|
{{#include ../README.md:footer}}
|
10
engage.toml
10
engage.toml
|
@ -30,6 +30,11 @@ name = "cargo-clippy"
|
||||||
group = "versions"
|
group = "versions"
|
||||||
script = "cargo clippy -- --version"
|
script = "cargo clippy -- --version"
|
||||||
|
|
||||||
|
[[task]]
|
||||||
|
name = "lychee"
|
||||||
|
group = "versions"
|
||||||
|
script = "lychee --version"
|
||||||
|
|
||||||
[[task]]
|
[[task]]
|
||||||
name = "cargo-fmt"
|
name = "cargo-fmt"
|
||||||
group = "lints"
|
group = "lints"
|
||||||
|
@ -51,6 +56,11 @@ name = "cargo-clippy"
|
||||||
group = "lints"
|
group = "lints"
|
||||||
script = "cargo clippy --workspace --all-targets --color=always -- -D warnings"
|
script = "cargo clippy --workspace --all-targets --color=always -- -D warnings"
|
||||||
|
|
||||||
|
[[task]]
|
||||||
|
name = "lychee"
|
||||||
|
group = "lints"
|
||||||
|
script = "lychee --offline docs"
|
||||||
|
|
||||||
[[task]]
|
[[task]]
|
||||||
name = "cargo"
|
name = "cargo"
|
||||||
group = "tests"
|
group = "tests"
|
||||||
|
|
32
flake.nix
32
flake.nix
|
@ -207,6 +207,35 @@
|
||||||
packages = {
|
packages = {
|
||||||
default = package pkgsHost;
|
default = package pkgsHost;
|
||||||
oci-image = mkOciImage pkgsHost self.packages.${system}.default;
|
oci-image = mkOciImage pkgsHost self.packages.${system}.default;
|
||||||
|
|
||||||
|
book =
|
||||||
|
let
|
||||||
|
package = self.packages.${system}.default;
|
||||||
|
in
|
||||||
|
pkgsHost.stdenv.mkDerivation {
|
||||||
|
pname = "${package.pname}-book";
|
||||||
|
version = package.version;
|
||||||
|
|
||||||
|
src = nix-filter {
|
||||||
|
root = ./.;
|
||||||
|
include = [
|
||||||
|
"book.toml"
|
||||||
|
"conduit-example.toml"
|
||||||
|
"README.md"
|
||||||
|
"debian/README.md"
|
||||||
|
"docs"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = (with pkgsHost; [
|
||||||
|
mdbook
|
||||||
|
]);
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
mdbook build
|
||||||
|
mv public $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
builtins.listToAttrs
|
builtins.listToAttrs
|
||||||
|
@ -275,6 +304,9 @@
|
||||||
|
|
||||||
# Needed for our script for Complement
|
# Needed for our script for Complement
|
||||||
jq
|
jq
|
||||||
|
|
||||||
|
# Needed for finding broken markdown links
|
||||||
|
lychee
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue