Skip to content

Commit d326969

Browse files
committed
Add Dayong documentation, Update Ugnay documentation
1 parent 060f3be commit d326969

File tree

9 files changed

+261
-19
lines changed

9 files changed

+261
-19
lines changed

docs/Dayong/commands.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
slug: /dayong/commands
3+
title: Commands
4+
tags:
5+
- Dayong
6+
- Python
7+
- Discord Bot
8+
---
9+
10+
Here's the list of commands available in Dayong.
11+
12+
## Message Commands
13+
14+
| Name | Description | Usage | Permission | Cooldown |
15+
| ------------------- | -------------------------------- | :------------------: | :-----------------------: | :------: |
16+
| **ping** | Shows bot reachability. | `<prefix>ping` | View Audit Log (128) | null |
17+
| **whois** | Shows information about a user | `<prefix>whois <id>` | View Audit Log (128) | null |
18+
19+
## Slash Commands
20+
21+
| Name | Description | Usage | Cooldown |
22+
| ------------------- | -------------------------------- | :------------------------------: | :-------: |
23+
| **anon** | Sends an anonymized message. | `/anon message: <message>` | null |
24+
| **content** | Schedules a recurring task that retrieves content from a microservice, API, or email subscription. For `source`, see [vendors](./vendors.md#content-providers). | `/content source: <content provider> interval: <seconds> action: <start \| stop>` | null |

docs/Dayong/events.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
slug: /dayong/events
3+
title: Events
4+
tags:
5+
- Dayong
6+
- Python
7+
- Discord Bot
8+
---
9+
Here's the list of events available in Dayong.
10+
11+
## Events
12+
13+
| Name | Description |
14+
| ------------------- | -------------------------------- |
15+
| greet_new_member | Welcomes new guild members. |

docs/Dayong/index.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
slug: /dayong/
3+
title: Getting Started
4+
sidebar_position: 1
5+
tags:
6+
- Dayong
7+
- Python
8+
- Discord Bot
9+
---
10+
# Dayong
11+
![License mit](https://img.shields.io/badge/license-MIT-brightgreen)
12+
[![Python version](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-397/)
13+
![Codestyle](https://img.shields.io/badge/code%20style-black-black)
14+
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/SurPathHub/Dayong)
15+
16+
Dayong is dedicated to helping Discord servers build and manage their communities.
17+
18+
- Multipurpose —lots of features, lots of automation.
19+
- Self-hosted and easy to deploy —just a few more steps to take.
20+
- Free and open-source —tinker with it, and feel free to contribute to its improvement!
21+
- Modular —easily add and remove extensions and features.
22+
23+
### Documentation Index
24+
25+
* [Setup](setup.md)
26+
* [Commands](commands.md)
27+
* [Events](events.md)
28+
* [Vendors](vendors.md)
29+
30+
## Deployment
31+
32+
### Setup
33+
34+
Please make sure you've set up Dayong, do so by following the [setup instructions](setup.md).
35+
36+
Dayong comes with an `app.json` file for creating an app on Heroku from a GitHub repository.
37+
38+
If your fork is public, you can use the following button:
39+
40+
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
41+
42+
Otherwise, access the following link and replace `$YOUR_REPOSITORY_LINK$` with your repository link.
43+
44+
```
45+
https://heroku.com/deploy?template=$YOUR_REPOSITORY_LINK$
46+
```
47+
48+
## Contributing
49+
50+
Check the [contributing guide](./.github/CONTRIBUTING.md) to learn more about the development process and how you can test your changes.
51+
52+
## Code of Conduct
53+
54+
Read our [Code of Conduct](https://github.com/SurPathHub/support/blob/main/CODE_OF_CONDUCT.md).
55+
56+
## License
57+
58+
Distributed under the MIT License. See [LICENSE](/LICENSE) for more information.

docs/Dayong/setup.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
slug: /dayong/setup
3+
title: Setup
4+
tags:
5+
- Dayong
6+
- Python
7+
- Discord Bot
8+
---
9+
10+
## Bot Account Setup
11+
12+
Follow the instructions here: https://discordpy.readthedocs.io/en/stable/discord.html
13+
14+
## Bot Setup
15+
16+
| ❗❗ Before you start, fork your own copy of SurPathHub/Dayong. |
17+
|-----------------------------------------|
18+
19+
| ❗❗ You can also perform the steps below directly on your copy of Dayong on GitHub |
20+
|-----------------------------------------|
21+
22+
| ❗❗ Your copy of the GitHub repository can be used to deploy changes automatically.|
23+
|-----------------------------------------|
24+
25+
1. Clone your fork to your local machine.
26+
27+
HTTP
28+
```
29+
git clone https://github.com/<your username>/Dayong.git
30+
```
31+
32+
SSH
33+
```
34+
git clone [email protected]:<your username>/Dayong.git
35+
```
36+
37+
GitHub CLI
38+
```
39+
gh repo clone <your username>/Dayong.git
40+
```
41+
42+
2. Go to the project root directory.
43+
44+
```
45+
cd Dayong
46+
```
47+
48+
3. Edit the `config.json` file and its values as necessary.
49+
50+
The `config.json` file stores public options, settings, properties, configuration, and preferences.
51+
52+
4. After setting up Dayong, `commit` and `push` your changes.
53+
54+
5. [Deploy!](../README.md#deployment)
55+
56+
### For local development
57+
58+
1. `git clone` Dayong to your local machine.
59+
60+
2. Go to the project root directory.
61+
62+
```
63+
cd Dayong
64+
```
65+
66+
3. Create a copy of `.env.example`. Don't forget to omit the `.example` at the end.
67+
68+
On Linux and Unix
69+
```
70+
cp .env.example .env
71+
```
72+
73+
On Windows
74+
```
75+
copy .env.example .env
76+
```
77+
78+
4. Edit the `.env` file and add your credentials to the corresponding variables.
79+
80+
5. Install [poetry](https://github.com/python-poetry/poetry#installation). Check if poetry is installed by running `poetry --version`.
81+
82+
6. Run `poetry shell`. This will create or start the virtual environment.
83+
84+
7. Run `poetry install`. This will install the project and its dependencies.
85+
86+
8. Edit the `config.json` file and its values as necessary.
87+
88+
The `config.json` file stores public options, settings, properties, configuration, and preferences.
89+
90+
9. Quickly test if the configuration works by running:
91+
92+
```
93+
python dayong
94+
```
95+
96+
10. After setting up Dayong, `git commit` and `git push` your changes.

docs/Dayong/vendors.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
slug: /dayong/vendors
3+
title: Vendors
4+
tags:
5+
- Dayong
6+
- Python
7+
- Discord Bot
8+
---
9+
10+
Here is the list of 3rd party service providers.
11+
12+
## Content Providers
13+
14+
#### Email Subscription
15+
- [medium.com](https://medium.com/)
16+
17+
#### Web API
18+
- [dev.to](http://dev.to/)
Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
11
---
2-
slug: /ugnay/core/theme
2+
slug: /ugnay/core/theme
33
title: Theme
44
---
5+
# Theme
6+
- This is the documentation of the most important core module to be used in the library.
7+
## SCSS/CSS
8+
### SCSS `config()` API
9+
- This is where all the theming happens in the library. The system takes the colors you've provided and automatically generates variants, as well as its appropriate text color for the components to consume.
510

6-
# Theme
11+
| Property | Effect |
12+
|----------|--------|
13+
| `$primary` | **[REQUIRED]**. The primary color of the theme. This usually is your main brand color. |
14+
| `$secondary` | **[REQUIRED]**. The secondary color of the theme. This color **must** be in stark contrast from the primary color as this will be used in call-to-action components such as the button, as well as to components that will catch the audiences' attention. |
15+
16+
```scss
17+
@include Theme.config(
18+
#464646,
19+
#7ed957
20+
);
21+
```
22+
23+
### CSS custom properties API
24+
- You can use these properties to override certain theme aspects of a component, may it be a global theme property or a component-specific theme property.
25+
- This is also what the compiled CSS outputs from the `Theme.config()` mixin and uses to apply theme values to components.
26+
27+
| Property | Effect |
28+
|----------|--------|
29+
| `--sph-theme--primary` | The theme's primary default variant. |
30+
| `--sph-theme--primary-dark` | The theme's primary dark variant. |
31+
| `--sph-theme--primary-light` | The theme's primary light variant. |
32+
| `--sph-theme--secondary` | The theme's secondary default variant. |
33+
| `--sph-theme--secondary-dark` | The theme's secondary dark variant. |
34+
| `--sph-theme--secondary-light` | The theme's secondary light variant. |
35+
| `--sph-theme--on-primary` | The theme's primary text color value. |
36+
| `--sph-theme--on-secondary` | The theme's secondary text color value. |
37+
```css
38+
:root {
39+
--sph-theme--primary-light: #737373;
40+
--sph-theme--primary: #474747;
41+
--sph-theme--primary-dark: #1c1c1c;
42+
--sph-theme--secondary-light: #b5e99f;
43+
--sph-theme--secondary: #7ed957;
44+
--sph-theme--secondary-dark: #51b128;
45+
--sph-theme--on-primary: #fff;
46+
--sph-theme--on-secondary: #000;
47+
}
48+
```

docs/Ugnay Components Web/Core Components/Typography.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ slug: /ugnay/core/typography
33
title: Typography
44
---
55

6-
# Typography
6+
# Typography
7+
> This portion of the documentation is still under construction!

docs/Ugnay Components Web/UI Components/sph-navbar.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,15 @@ title: SPHNavbar
1010
## HTML
1111

1212
```html
13-
<header class="sph-header">
14-
<div class="sph-header__wrap">
15-
<a href="">
16-
<div class="sph-header__mast">
17-
<img class="sph-header__logo" src="img/logo.png" alt="SPH Logo">
18-
<h1 class="sph-header__text">SurPath Hub</h1>
19-
</div>
20-
</a>
21-
<div class="sph-header__actions">
22-
<!-- YOU CAN PUT ANYTHING HERE, THE NAVBAR COMPONENT, TRIGGERS, CUSTOM ELEMENTS, ETC -->
23-
</div>
24-
</div>
25-
</header>
13+
<!-- WIP :) -->
2614
```
2715
## SCSS/CSS
2816
- Provided below is the code snippet, and the API of the component style.
2917

3018
```scss
31-
@use '~@surpathhub/ugnay/SPHHeader';
19+
@use '~@surpathhub/ugnay/SPHNavbar';
3220

33-
@include SPHHeader.use();
21+
@include SPHNavbar.use();
3422
```
3523

3624
## Typescript

docs/Ugnay Components Web/UI Components/sph-text-field.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ title: SPHTextField
5050
@include SPHTextField.use();
5151
```
5252

53-
#### CSS custom properties API
53+
### CSS custom properties API
5454

5555
| Property | Effect |
5656
|----------|--------|

0 commit comments

Comments
 (0)