Skip to content

Commit afa21c0

Browse files
committed
docs: add leaderboard documentation
1 parent 687289b commit afa21c0

18 files changed

Lines changed: 578 additions & 465 deletions

.github/workflows/deploy.yml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
name: Deploy to GitHub Pages
2-
3-
on:
4-
# Trigger the workflow every time you push to the `main` branch
5-
# Using a different branch name? Replace `main` with your branch’s name
6-
push:
7-
branches: [ main ]
8-
# Allows you to run this workflow manually from the Actions tab on GitHub.
9-
workflow_dispatch:
10-
11-
# Allow this job to clone the repo and create a page deployment
12-
permissions:
13-
contents: read
14-
pages: write
15-
id-token: write
16-
17-
jobs:
18-
build:
19-
runs-on: ubuntu-latest
20-
steps:
21-
- name: Checkout your repository using git
22-
uses: actions/checkout@v4
23-
- name: Install, build, and upload your site
24-
uses: withastro/action@v3
25-
# with:
26-
# path: . # The root location of your Astro project inside the repository. (optional)
27-
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
28-
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
29-
30-
deploy:
31-
needs: build
32-
runs-on: ubuntu-latest
33-
environment:
34-
name: github-pages
35-
url: ${{ steps.deployment.outputs.page_url }}
36-
steps:
37-
- name: Deploy to GitHub Pages
38-
id: deployment
39-
uses: actions/deploy-pages@v4
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [ main ]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
11+
# Allow this job to clone the repo and create a page deployment
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout your repository using git
22+
uses: actions/checkout@v4
23+
- name: Install, build, and upload your site
24+
uses: withastro/action@v3
25+
# with:
26+
# path: . # The root location of your Astro project inside the repository. (optional)
27+
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
28+
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
29+
30+
deploy:
31+
needs: build
32+
runs-on: ubuntu-latest
33+
environment:
34+
name: github-pages
35+
url: ${{ steps.deployment.outputs.page_url }}
36+
steps:
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/logo_light.svg

Lines changed: 2 additions & 2 deletions
Loading

src/components/CommandInfo.jsx

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
import { MDXProvider } from "@mdx-js/react";
2-
import { MdiCrown } from "./CustomIcons";
3-
4-
export default function CommandInfo({
5-
commandSyntax,
6-
commandDescription,
7-
requiresLinking = false,
8-
requiresPremium = false,
9-
note = null,
10-
args = null,
11-
}) {
12-
return(
13-
<MDXProvider>
14-
<div>
15-
<h5 style={{display: "flex", gap: "6px", alignItems: "center"}}>
16-
{requiresPremium && <MdiCrown />}
17-
<code>{commandSyntax}</code>
18-
</h5>
19-
<p>{commandDescription} {requiresLinking && <i>(Requires Linking)</i>}</p>
20-
{note && <p><i><b>Note: </b>{note}</i></p>}
21-
22-
{args && (
23-
<>
24-
<p>
25-
<strong>Arguments:</strong>
26-
</p>
27-
<ul>
28-
{args.map((arg, i) => (
29-
<li key={i}>
30-
<strong>{arg.name}</strong>: {arg.description}
31-
</li>
32-
))}
33-
</ul>
34-
</>
35-
)}
36-
</div>
37-
</MDXProvider>
38-
);
39-
}
1+
import { MDXProvider } from "@mdx-js/react";
2+
import { MdiCrown } from "./CustomIcons";
3+
4+
export default function CommandInfo({
5+
commandSyntax,
6+
commandDescription,
7+
requiresLinking = false,
8+
requiresPremium = false,
9+
note = null,
10+
args = null,
11+
}) {
12+
return(
13+
<MDXProvider>
14+
<div>
15+
<h5 style={{display: "flex", gap: "6px", alignItems: "center"}}>
16+
{requiresPremium && <MdiCrown />}
17+
<code>{commandSyntax}</code>
18+
</h5>
19+
<p>{commandDescription} {requiresLinking && <i>(Requires Linking)</i>}</p>
20+
{note && <p><i><b>Note: </b>{note}</i></p>}
21+
22+
{args && (
23+
<>
24+
<p>
25+
<strong>Arguments:</strong>
26+
</p>
27+
<ul>
28+
{args.map((arg, i) => (
29+
<li key={i}>
30+
<strong>{arg.name}</strong>: {arg.description}
31+
</li>
32+
))}
33+
</ul>
34+
</>
35+
)}
36+
</div>
37+
</MDXProvider>
38+
);
39+
}

src/components/CustomIcons.jsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import React from "react";
2-
3-
export function MdiCrown(props) {
4-
return (
5-
<svg
6-
xmlns="http://www.w3.org/2000/svg"
7-
width={24}
8-
height={24}
9-
viewBox="0 0 24 24"
10-
{...props}
11-
>
12-
<path
13-
fill="currentColor"
14-
d="M5 16L3 5l5.5 5L12 4l3.5 6L21 5l-2 11zm14 3c0 .6-.4 1-1 1H6c-.6 0-1-.4-1-1v-1h14z"
15-
></path>
16-
</svg>
17-
);
18-
}
1+
import React from "react";
2+
3+
export function MdiCrown(props) {
4+
return (
5+
<svg
6+
xmlns="http://www.w3.org/2000/svg"
7+
width={24}
8+
height={24}
9+
viewBox="0 0 24 24"
10+
{...props}
11+
>
12+
<path
13+
fill="currentColor"
14+
d="M5 16L3 5l5.5 5L12 4l3.5 6L21 5l-2 11zm14 3c0 .6-.4 1-1 1H6c-.6 0-1-.4-1-1v-1h14z"
15+
></path>
16+
</svg>
17+
);
18+
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title: Leaderboards
3+
description: Leaderboard commands and live leaderboards.
4+
sidebar:
5+
order: 4
6+
---
7+
8+
## Description
9+
10+
Statalytics offers both leaderboard commands as well as live leaderboards.
11+
12+
13+
## Leaderboard Commands
14+
15+
import CommandInfo from '../../../components/CommandInfo.jsx';
16+
17+
<CommandInfo
18+
commandSyntax="/leaderboard level"
19+
commandDescription="View the Bedwars level leaderboard."
20+
/>
21+
22+
23+
<br />
24+
<hr />
25+
<br />
26+
27+
28+
<CommandInfo
29+
commandSyntax="/leaderboard wins"
30+
commandDescription="View the Bedwars wins leaderboard."
31+
/>
32+
33+
34+
35+
<br />
36+
<hr />
37+
<br />
38+
39+
<CommandInfo
40+
commandSyntax="/leaderboard finals"
41+
commandDescription="View the Bedwars final kills leaderboard."
42+
/>
43+
44+
45+
## Live Leaderboards
46+
47+
Live leaderboards consist of a message in a certain channel that automatically updates periodically to display the top 100 players in level, wins, or final kills.
48+
49+
![image](./liveleaderboard.png)
50+
51+
> Server admins are able to configure live leaderboards.
52+
53+
<br />
54+
<hr />
55+
<br />
56+
57+
<CommandInfo
58+
commandSyntax="/liveleaderboard set <channel> <leaderboard>"
59+
commandDescription="Set live leaderboard channels."
60+
note="By default, this command is restricted to the 'Manage Server' permission."
61+
args={[
62+
{
63+
"name": "channel",
64+
"description": "The channel that the live leaderboard will exist in."
65+
},
66+
{
67+
"name": "leaderboard",
68+
"description": "The live leaderboard type, either level, wins, or final kills."
69+
}
70+
]}
71+
/>
72+
73+
<br />
74+
<hr />
75+
<br />
76+
77+
<CommandInfo
78+
commandSyntax="/liveleaderboard unset <leaderboard>"
79+
commandDescription="Unset live leaderboard channels."
80+
note="By default, this command is restricted to the 'Manage Server' permission."
81+
args={[
82+
{
83+
"name": "leaderboard",
84+
"description": "The live leaderboard type, either level, wins, or final kills."
85+
}
86+
]}
87+
/>
88+
89+
<br />
90+
<hr />
91+
<br />
92+
93+
<CommandInfo
94+
commandSyntax="/liveleaderboard list"
95+
commandDescription="List the live leaderboard channels."
96+
note="By default, this command is restricted to the 'Manage Server' permission."
97+
/>
98+
118 KB
Loading

src/content/docs/features/other-bedwars-commands.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Other Bedwars Commands
33
description: Other individual bedwars commands.
44
sidebar:
5-
order: 4
5+
order: 5
66
---
77

88
## Description

src/content/docs/features/other-commands.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Other Commands
33
description: Other individual non-bedwars related commands.
44
sidebar:
5-
order: 5
5+
order: 6
66
---
77

88
## Description

0 commit comments

Comments
 (0)