Skip to content

Commit

Permalink
layouts: add selfhosting shortcode and start using it
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Zeuch <l-zeuch@email.de>
  • Loading branch information
l-zeuch committed Jan 1, 2025
1 parent 6a59d5a commit a9d764c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions assets/scss/common/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ html[data-selfhost="no"] {
.icon-tabler-server-off {
display: block;
}

.selfhosting {
display: none;
}
}

@media (hover: hover) {
Expand Down
8 changes: 6 additions & 2 deletions content/docs/moderation/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contains an embed, it is serialized and saved in JSON format.

Message logs on the official YAGPDB instance will be automatically deleted after 30 days of their creation.

If you're self-hosting, see [Message Log Purge](#message-log-purge-self-hosting-only) for more information.
If you're self-hosting, see [Message Log Purge](#message-log-purge) for more information.

{{< /callout >}}

Expand Down Expand Up @@ -114,8 +114,12 @@ channels.
Users with write access to the control panel may delete individual logs or delete all logs on the server using the
control panel.

## Message Log Purge [Self-hosting only]
{{< selfhosting >}}

## Message Log Purge

If you are self-hosting your own instance of YAGPDB, you can set `enable_message_log_purge=true` to automatically purge
message logs older than 30 days. This option is enabled on the official instance of YAGPDB hosted by Botlabs but is
disabled by default on a fresh self-host.

{{< /selfhosting >}}
4 changes: 4 additions & 0 deletions content/docs/moderation/verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ If a new user who verifies is detected as an alt but none of their associated ac
send a log to the verification log channel if specified, identifying the new user as an alt and listing other users who
verified at the same IP address.

{{< selfhosting >}}

### Disable Alt Detection Globally

For self hosters, the environment variable to enable this feature is `verification.track_ips`. It is `true` by default.
Expand All @@ -112,3 +114,5 @@ Do not proceed unless you are hosting your own version of the YAGPDB codebase.
Verification requires the `google.recaptcha_secret` and `google.recaptcha_site_key` env variables to be configured and
valid. To get a reCAPTCHA secret and site key, [register a site on
reCAPTCHA](https://www.google.com/recaptcha/admin/create) and copy the generated secret and key.

{{< /selfhosting >}}
4 changes: 4 additions & 0 deletions content/docs/welcome/premium.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ You can assign your premium slots to any server with YAGPDB in it and no existin

![Redeemed Premium Slots](slots_premium.png)

{{< selfhosting >}}

## Self Hosting YAGPDB

Do not proceed unless you are hosting your own version of the YAGPDB codebase.
Expand All @@ -153,3 +155,5 @@ recommended you familiarize yourself with the codebase before making changes. Fi
defined and alter their values as you wish.

![Example of limit definitions in Advanced Automoderator](limits_example.png)

{{< /selfhosting >}}
4 changes: 4 additions & 0 deletions layouts/shortcodes/selfhosting.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{/* wraps the inner content in a div with a class of "selfhosting", such that it can be conditionally hidden by some JS code. */}}
<div class="selfhosting">
{{ .Inner | $.Page.RenderString }}
</div>

0 comments on commit a9d764c

Please sign in to comment.