Skip to content

Commit

Permalink
started docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hello391 committed Sep 8, 2024
1 parent 2bfb3d7 commit bf190f3
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 23 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Deploy to GitHub Pages

on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
build:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
test-deploy:
Expand Down
29 changes: 29 additions & 0 deletions docs/getting-started/command-syntax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
id: command-syntax
---

# Command Syntax

:::danger

Do not literally type the `<>` , `[]` etc characters. They are used to denote placeholders and optional arguments.

:::

:::note

If an option is marked dynamic, for example `<foo:dynamic>`. Then you can use dynamic values. (see [Dynamic Values](./dynamic-values))

:::

`<foo>` This is a required argument.

`<foo|bar>` This is a required agrgument that can be either `foo` or `bar`.

`<foos...>` This is a required agrgument that can be repeated multiple times.

`[foo]` This is an optional argument.

`[foo|bar]` This is an optional argument that can be either `foo` or `bar`.

`[foo=default]` This is an optional argument with a default value of `default`.
27 changes: 27 additions & 0 deletions docs/getting-started/dynamic-values.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dynamic Values
Throughout these docs you will see some values in a format that will look something like this `{user:username}`. These are dynamic values.

:::danger

Not all command support these values, so make sure it says you can use a dynamic value.

:::

## Where To Use
You can use these values in any option that has a `:dynamic` in it. For example `<foo:dynamic>`.

## How To Use
These values are based off of discord values, for example if you wanted to mention a user when they leveled up you could use `{user:mention}`

## Values

### User Values

+ `{user:username}` The user's username
+ `{user:mention}` Mentions the user
+ `{user:nickname}` The user's nickname

### Levels Values

+ `{user:level}` The user's level
+ `{user:xp}` The user's xp
5 changes: 0 additions & 5 deletions docs/intro.md

This file was deleted.

17 changes: 17 additions & 0 deletions docs/levels/disable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Disable Levels

:::note

This command will not work if levels are already disabled on you server

:::


## Usage
`/levels disable` Disables levels on your server.

:::warning

This command does not delete any leveling related data, it just makes it so that the leveling system for you server is disabled. To delete leveling data see [deleting you data](../delete-my-data/levels)

:::
25 changes: 25 additions & 0 deletions docs/levels/enable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# Enbale Levels

:::note

This command will not work if levels are already enbaled on you server

:::

## Usage
`/levels enable` Enableds levels on your server and sets up with the default config

## Default Config
### Level Up Message
Congratulations `{user:mention}` you have leveled up to level `{user:level}`!\
You can change this with [`/levels set-message`](./set-message)\
You can also disable level up messages with [`/levels disabled-message`](./disable-message)

### Level Up Channel
By default the level up messages will be sent in the channel that the user levels up in.\
You can change this with [`/levels set-message-channel`](./set-message-channle)

### Stack Rewards
By default it sets this to true, which means that as a user gets a new level reward they will keep the old ones they have earned.\
You can change this with [`/levels stack-rewards`](./stack-rewards)
2 changes: 1 addition & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const config: Config = {
items: [
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
sidebarId: "docs",
position: "left",
label: "Docs",
},
Expand Down
23 changes: 10 additions & 13 deletions sidebars.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";

/**
* Creating a sidebar enables you to:
Expand All @@ -11,21 +11,18 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
Create as many sidebars as you want.
*/
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],

// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
docs: [
{
type: "category",
label: "Getting Started",
items: ["getting-started/command-syntax", "getting-started/dynamic-values"],
},
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
type: "category",
label: "Levels",
items: ["levels/enable", "levels/disable"],
},
],
*/
};

export default sidebars;

0 comments on commit bf190f3

Please sign in to comment.