Procházet zdrojové kódy

Add documentation on client

pull/2089/head
Julian-Samuel Gebühr před 3 roky
rodič
revize
217a68f309
2 změnil soubory, kde provedl 24 přidání a 1 odebrání
  1. +23
    -1
      docs/configuring-playbook-cactus-comments.md
  2. +1
    -0
      roles/matrix-cactus-comments/tasks/setup_install.yml

+ 23
- 1
docs/configuring-playbook-cactus-comments.md Zobrazit soubor

@@ -38,4 +38,26 @@ ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start


## Usage ## Usage


To learn how to use cactus comments message @bot.cactusbot:your-homeserver.com and type `help` or have a look in the [documentation](https://cactus.chat/docs/getting-started/quick-start/).
To get started wit cactus comments message @bot.cactusbot:your-homeserver.com and type `help` to make sure it works.
Then register a site by typing: `register <sitename>`. You will then be invited into a moderation room.
Now you are good to go and can include 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!

Use the following snippet and make sure to replace `example.com` with your base domain!


```html
<script type="text/javascript" src="https://matrix.example.com/cactus-comments/cactus.js"></script>
<link rel="stylesheet" href="https://matrix.example.com/cactus-comments/style.css" type="text/css">
<div id="comment-section"></div>
<script>
initComments({
node: document.getElementById("comment-section"),
defaultHomeserverUrl: "https://matrix.example.com:8448",
serverName: "example.com",
siteName: "YourSiteName",
commentSectionId: "1"
})
</script>
```

+ 1
- 0
roles/matrix-cactus-comments/tasks/setup_install.yml Zobrazit soubor

@@ -70,6 +70,7 @@
url: https://latest.cactus.chat/cactus.js url: https://latest.cactus.chat/cactus.js
dest: "{{ matrix_cactus_comments_client_path }}/cactus.js" dest: "{{ matrix_cactus_comments_client_path }}/cactus.js"
mode: "{{ matrix_cactus_comments_client_file_permissions }}" mode: "{{ matrix_cactus_comments_client_file_permissions }}"

- name: Ensure client css file is downloaded - name: Ensure client css file is downloaded
ansible.builtin.get_url: ansible.builtin.get_url:
url: https://latest.cactus.chat/style.css url: https://latest.cactus.chat/style.css


Načítá se…
Zrušit
Uložit