From 95f541b86ccced3b21d8ac42ed3816785f89dd0c Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sat, 19 Oct 2024 19:19:22 +0900 Subject: [PATCH] Update docs/configuring-playbook-cactus-comments.md: add a section for embedding Cactus Comments Signed-off-by: Suguru Hirahara --- docs/configuring-playbook-cactus-comments.md | 35 ++++++++++++++------ 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/docs/configuring-playbook-cactus-comments.md b/docs/configuring-playbook-cactus-comments.md index 30be3b54b..b39df5758 100644 --- a/docs/configuring-playbook-cactus-comments.md +++ b/docs/configuring-playbook-cactus-comments.md @@ -4,8 +4,7 @@ The playbook can install and configure the [Cactus Comments](https://cactus.chat Cactus Comments is a **federated comment system** built on Matrix. It respects your privacy, and puts you in control. -See the project's [documentation](https://cactus.chat/docs/getting-started/introduction/) to learn what it -does and why it might be useful to you. +See the project's [documentation](https://cactus.chat/docs/getting-started/introduction/) to learn what it does and why it might be useful to you. The playbook contains 2 roles for configuring different pieces of the Cactus Comments system: @@ -54,25 +53,41 @@ Upon starting Cactus Comments, a `bot.cactusbot` user account is created automat To get started, send a `help` message to the `@bot.cactusbot:example.com` bot to confirm it's working. -Then, register a site by typing: `register `. You will then be invited into a moderation room. +Then, register a site by sending `register ` (where `` is a unique identifier you choose. It does not have to match your domain). You will then be invited into a moderation room. -Now you are good to go and can include the comment section on your website! +Now you are good to go and can embed the comment section on your website! -**Careful**: To really make use of self-hosting you need change a few things in comparison to the official docs! +## Embed Cactus Comments -Insert the following snippet into you page and make sure to replace `example.com` with your base domain! +The official [documentation](https://cactus.chat/docs/getting-started/quick-start/) provides a useful guide to embed Cactus Comments on your website. + +After including the JavaScript and CSS asset files, insert a `
` where you'd like to display the comment section: + +````html +
+```` + +Then, you need to initialize the comment section. Make sure to replace `example.com` with your base domain and `` with the one that has been registered above: ```html - - -
``` + +### Adjust the domain name for self-hosting + +To have the assets served from your homeserver (not from `cactus.chat`), you need to adjust the domain name on the official documentation. + +Make sure to replace `example.com` with your base domain before you include the following lines, instead of the one provided by the official documentation: + +```html + + +```