Skip to content

Commit a9d764c

Browse files
committed
layouts: add selfhosting shortcode and start using it
Signed-off-by: Luca Zeuch <[email protected]>
1 parent 6a59d5a commit a9d764c

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
lines changed

assets/scss/common/_custom.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ html[data-selfhost="no"] {
167167
.icon-tabler-server-off {
168168
display: block;
169169
}
170+
171+
.selfhosting {
172+
display: none;
173+
}
170174
}
171175

172176
@media (hover: hover) {

content/docs/moderation/logging.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ contains an embed, it is serialized and saved in JSON format.
2828

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

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

3333
{{< /callout >}}
3434

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

117-
## Message Log Purge [Self-hosting only]
117+
{{< selfhosting >}}
118+
119+
## Message Log Purge
118120

119121
If you are self-hosting your own instance of YAGPDB, you can set `enable_message_log_purge=true` to automatically purge
120122
message logs older than 30 days. This option is enabled on the official instance of YAGPDB hosted by Botlabs but is
121123
disabled by default on a fresh self-host.
124+
125+
{{< /selfhosting >}}

content/docs/moderation/verification.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ If a new user who verifies is detected as an alt but none of their associated ac
9797
send a log to the verification log channel if specified, identifying the new user as an alt and listing other users who
9898
verified at the same IP address.
9999

100+
{{< selfhosting >}}
101+
100102
### Disable Alt Detection Globally
101103

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

content/docs/welcome/premium.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ You can assign your premium slots to any server with YAGPDB in it and no existin
127127

128128
![Redeemed Premium Slots](slots_premium.png)
129129

130+
{{< selfhosting >}}
131+
130132
## Self Hosting YAGPDB
131133

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

155157
![Example of limit definitions in Advanced Automoderator](limits_example.png)
158+
159+
{{< /selfhosting >}}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{/* wraps the inner content in a div with a class of "selfhosting", such that it can be conditionally hidden by some JS code. */}}
2+
<div class="selfhosting">
3+
{{ .Inner | $.Page.RenderString }}
4+
</div>

0 commit comments

Comments
 (0)