From 2cdcabcc06b02140b049ee874fa857a115e67e22 Mon Sep 17 00:00:00 2001 From: Johannes Krude Date: Mon, 14 Feb 2022 12:40:14 +0100 Subject: [PATCH] document custom home view --- docs/custom-home.md | 65 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 docs/custom-home.md diff --git a/docs/custom-home.md b/docs/custom-home.md new file mode 100644 index 00000000000..64891c0c268 --- /dev/null +++ b/docs/custom-home.md @@ -0,0 +1,65 @@ +# Custom Home View + +The home view is shown whenever the user is logged in, but no room is selected. +A custom `home.html` replacing the default home view can be configured either in `.well-known/matrix/client` or `config.json`. +Such a custom home view can be used to communicate helpful information and important rules to the users. + +## Configuration + +To provide a custom home view for all element-web/desktop users of a homeserver, include the following in `.well-known/matrix/client`: + +``` +{ + "io.element.embedded_pages": { + "home_url": "https://example.org/home.html" + } +} +``` + +In case the `.well-known/matrix/client` contains no `home_url`, element-web falls back to the value provided in its `config.json`: + +``` +{ + "embeddedPages": { + "homeUrl": "https://example.org/home.html" + } +} +``` + + +## `home.html` Example + +The following is a simple example for a custom `home.html`: + +``` + + +

The example.org Matrix Server

+ +
+

Behave appropriately.

+
+ +

Start Chatting

+ +``` + +When choosing colors, be aware that the home view may be displayed in either light or dark mode. + +It may be needed to set CORS headers for the `home.html` to enable element-desktop to fetch it, with e.g., the following nginx config: + +``` +add_header Access-Control-Allow-Origin *; +``` +