Skip to content

Commit

Permalink
Migrated to VitePress
Browse files Browse the repository at this point in the history
  • Loading branch information
Skullians committed Oct 9, 2024
1 parent d3a51fc commit ff78b6e
Show file tree
Hide file tree
Showing 43 changed files with 2,839 additions and 211 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy documentation to pages.

on:
push:
branches: [main]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
- name: Build with VitePress
run: npm run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ _book
*.epub
*.mobi
*.pdf
docs/.vitepress/cache
docs/.vitepress/dist
71 changes: 71 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { defineConfig } from 'vitepress'

export default defineConfig({
title: "TerraByteDev Documentation",
description: "The official documentation of TerraByteDev.",
ignoreDeadLinks: true,
themeConfig: {
logo: "/assets/TBLogo.png",
nav: [
{ text: 'Home', link: '/' },
{ text: 'SkyFactionsReborn', link: '/skyfactions/README' },
{ text: 'About Us', link: '/about_us'}
],

sidebar: [
{
text: 'SkyFactions',
items: [
{ text: 'Overview', link: '/skyfactions/README' },
{
text: "Installation",
link: "/skyfactions/installation/README",
collapsed: true,
items: [
{
text: "Setup",
link: "/skyfactions/installation/setup/README",
collapsed: true,
items: [
{ text: "Database Setup", link: "/skyfactions/installation/setup/database-setup"},
{ text: "World Setup", link: "/skyfactions/installation/setup/world-setup"},
{ text: "Island Generation", link: "/skyfactions/installation/setup/islands"},
{ text: "Messages", link: "/skyfactions/installation/setup/messages"},
{ text: "Discord", link: "/skyfactions/installation/setup/discord"}
]
},
{ text: "Commands & Permissions", link: "/skyfactions/installation/commands-and-permissions"}
]

},
{
text: "Mechanics",
link: "/skyfactions/mechanics/README",
collapsed: true,
items: [
{ text: "Islands", link: "/skyfactions/mechanics/islands"},
{ text: "Obelisk", link: "/skyfactions/mechanics/obelisk"},
{ text: "Runes", link: "/skyfactions/mechanics/runes"},
{
text: "Factions",
link: "/skyfactions/mechanics/factions/README",
collapsed: true,
items: [
{ text: "Overview", link: "/skyfactions/mechanics/factions/overview"},
{ text: "Faction Ranks & Titles", link: "/skyfactions/mechanics/factions/faction-ranks-titles"}
]
}
]
},
{ text: "Errors & Debugging", link: "/skyfactions/errors-and-debugging"},
{ text: "Skyfactions Web", link: "/skyfactions/skyfactions-web"}
]
}
],

socialLinks: [
{ icon: 'github', link: 'https://github.com/TerraByteDev/TerraByteDocs' },
{ icon: 'discord', link: 'https://discord.gg/SwxXMrFdjp'}
]
}
})
7 changes: 7 additions & 0 deletions docs/about_us.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# About Us

Hey, we're TerraByteDev!
We're a small, passionate development studio dedicated towards crafting innovative plugins and tools for the public.
We stride towards innovation and aim to bring creative solutions to the community.

We are committed to building high-quality plugins and tools that empower users, enhance productivity and push the boundaries of what is possible.
35 changes: 35 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: home

hero:
name: "TerraByteDev"
text: ""
tagline: Innovation at its finest.
image:
src: /assets/SFLogo.png
alt: SkyFactionsLogo
actions:
- theme: brand
text: SkyFactions Docs
link: /skyfactions/README
- theme: alt
text: About Us
link: /about_us

features:
- icon: 🚀
title: "Performant"
details: "Our plugins guarantee high performance and are well optimised."

- icon: 🖥️
title: Ease of Use
details: "We focus on ease of use and simplicity for all of our tools."

- icon: 🆘
title: "Premium Support"
details: "We offer extensive support for all users of our plugins and tools."
---

> [!CAUTION]
> This documentation is still a Work In Progress!\
> Things are subject to change.
File renamed without changes
Binary file added docs/public/assets/TBLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
6 changes: 1 addition & 5 deletions skyfactions/README.md → docs/skyfactions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ description: Official documentation of SkyFactionsReborn.

# SkyFactionsReborn

<figure><img src=".gitbook/assets/SkyFactions2.png" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
This documentation is still a WIP. Things may change.
{% endhint %}
<figure><img src="/assets/SFLogo.png" alt=""><figcaption></figcaption></figure>

## Introduction

Expand Down
69 changes: 69 additions & 0 deletions docs/skyfactions/errors-and-debugging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
description: Walks you through diagnosing errors to do with the plugin.
---

# Errors & Debugging

Errors aren't a nice thing to fix.\
This is why we offer extensive documentation and quality support for any issues you encounter.



## Error Messages

When players run commands that results in an error, they will be given a debug message.

::: warning
This assumes you have not removed the `%debug%` placeholder from your `ERROR` message configuration in `messages.yml`!\
\
In every case, you should [make a GIthub issue](https://github.com/TerraByteDev/SkyFactionsReborn/issues) or [report it in our Discord!](https://discord.com/invite/SwxXMrFdjp)
:::

Compare the debug messages from any error messages you receive here.

| Error Message | Description |
|---------------|-------------|
| SQL_GET_DISCORD | This is a database error. The plugin failed to retrieve a player's discord link. |
| SQL_DISCORD_UNLINK | This is a database error. The plugin failed to remove a player's discord link. |
| SQL_GEMS_MODIFY | This is a database error. The plugin failed to modify a player's gem count. |
| SQL_GEMS_GET | This is a database error. The plugin failed to get a player's gem count. |
| SQL_RUNES_GET | This is a database error. The plugin failed to get a player's rune count. |
| SQL_RUNES_MODIFY | This is a database error. The plugin failed to modify a player's rune count. |
| SQL_ISLAND_CHECK | This is a database error. The plugin failed to check if a player has an island. |
| SQL_RAID_COOLDOWN_GET | This is a database error. The plugin failed to get a player's raid cooldown. |
| SQL_RAID_UPDATE | This is a database error. The plugin failed to update a player's last raid timestamp. |
| SQL_ISLAND_CREATE | This is a database error. The plugin failed to create a new island. |
| SQL_ISLAND_DELETE | This is a database error. The plugin failed to delete a player's island. |
| SQL_RAID_START | This is a database error. The plugin failed to initialise a raid. |
| SQL_ISLAND_COOLDOWN | This is a database error. The plugin failed to update an island's last raided timestamp. |
| SQL_RAIDABLE_GET | This is a database error. The plugin failed to get a raidable island. |
| SQL_TRUST_ADD | This is a database error. The plugin failed to add a player's trust for another island. |
| SQL_TRUST_REMOVE | This is a database error. The plugin failed to untrust a player for another island. |
| SQL_TRUST_GET | This is a database error. The plugin failed to check if a player was trusted for an island. |
| SQL_FACTION_GET | This is a database error. The plugin failed to get a Faction from a player. |
| SQL_FACTION_CREATE | This is a database error. The plugin failed to create a Faction. |
| SQL_FACTION_KICK | This is a database error. The plugin failed to kick a player from a Faction. |
| SQL_FACTION_BAN | This is a database error. The plugin failed to ban a player from a Faction. |
| SQL_JOIN_REQUEST_ACCEPT | This is a database error. The plugin failed to accept a Faction join request and add a player to the Faction. |
| SQL_JOIN_REQUEST_CREATE | This is a database error. The plugin failed to create a new Join Request. |
| SQL_JOIN_REQUEST_REVOKE | This is a database error. The plugin failed to reject a join request. |
| SQL_JOIN_REQUEST_GET | This is a database error. The plugin failed to get a join request (or more). |
| SQL_NOTIFICATION_REMOVE | This is a database error. The plugin failed to remove a notification. |
| SQL_NOTIFICATION_GET | This is a database error. The plugin failed to get notifications. |
| SQL_INVITE_ACCEPT | This is a database error. The plugin failed to accept an invite. |
| SQL_INVITE_GET | This is a database error. The plugin failed to fetch invites. |
| SQL_INVITE_DENY | This is a database error. The plugin failed to deny an invite. |
| WORLD_NOT_EXIST | This is (typically) a configuration error. The plugin failed to get a world from the configured world name. You will have to use the `%operation%` placeholder to see in what context and check the configuration related to that. |
| FAWE_ISLAND_PASTE | This is a FAWE error. FAWE failed to paste an island. |
| SCHEMATIC_NOT_EXIST | This is a File error. The plugin failed to retrieve the schematic. See log for details. |
| ISLAND_RETURNED_NULL | This is a general error, when the plugin tries to randomly select a raidable island. **This should typically never happen!** |
| MAIN_RAID_START | This is a general error. The plugin failed to start an entire raid. |
| MAIN_RAID_COUNTDOWN | This is a general error. The plugin failed to complete the countdown for the raid. **This should typically never happen!** |
| GUI_LOAD_EXCEPTION | This is a GUI error. The plugin failed to display a GUI for the player. |
| FACTION_MEMBER_UNKNOWN | This is more of a general error. This would be something like you try kick a player from the Faction just after they leave (for example). |
| FACTION_NOT_FOUND | This is a very obscure error. This would for instance, happen when you tried to do something Faction related in a UI just after you were kicked (for example). |

:::tip
In some cases, such as upon startup, you won't receieve any of these debug messages.\
In both cases (a error message, or just an error in the console), [make an issue](https://github.com/TerraByteDev/SkyFactionsReborn/issues) or [join our discord](https://discord.com/invite/SwxXMrFdjp).
:::
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ If you're updating your server, that should be fine. However, never downgrade yo
* Any Factions plugin - The use of other faction plugins on the server may result in unintended bugs and limited functionality.
* Any Skyblock plugin - You do NOT need to install any Skyblock plugin beside SkyFactionsReborn on your server and it will only cause problems if you do so.

{% hint style="info" %}
::: tip
Moral of the story:\
Don't be dumb. Think about what might affect the functionality of this plugin.
{% endhint %}
:::

## Reloading

{% hint style="danger" %}
<mark style="color:red;">**Caution!**</mark> Do not use `/reload` or Plugman(X) to reload this plugin. It will cause unintended functionality of multiple plugins on your server. Always restart your server.
{% endhint %}
::: danger
**Caution!** Do not use `/reload` or plugin reloaders such as Plugman(X) to reload this plugin. It will cause unintended functionality of multiple plugins on your server. Always restart your server.
:::

You can reload the configuration files of our plugin using `/sf reload`. Reloading configuration files can take up to 5 seconds to apply.\
Certain configurations require a restart, such as Database configurations.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ description: >-
---

# Commands & Permissions
This is a general overview of the commands and permissions present in this plugin.

## Admin Commands & Permissions

<table><thead><tr><th width="249">Command</th><th>Description</th><th>Permission</th><th data-hidden></th></tr></thead><tbody><tr><td>/sf reload</td><td>Reload the configuration files</td><td>skyfactions.reload</td><td></td></tr><tr><td>/sf create $2<br>Sub-arguments: player, faction</td><td>Force create an island. Specify whether you're creating a player island or faction island, then use another argument for the player name (it should tab-complete)</td><td>skyfactions.admin.create</td><td></td></tr><tr><td>/sf delete $2<br>Sub-arguments: player, faction</td><td>Force deletes an island. Specify whether you're deleting a player island or faction island, then use another argument for the player name (it should tab-complete)</td><td>skyfactions.admin.delete</td><td></td></tr></tbody></table>
| Command | Description | Permission |
|---------|-------------|------------|
| `/sf reload` | Reload the configuration files | `skyfactions.reload` |
| `/sf create $2<br>Sub-arguments: player, faction` | Force create an island. Specify whether you're creating a player island or faction island, then use another argument for the player name (it should tab-complete) | `skyfactions.admin.create` |
| `/sf delete $2<br>Sub-arguments: player, faction` | Force deletes an island. Specify whether you're deleting a player island or faction island, then use another argument for the player name (it should tab-complete) | `skyfactions.admin.delete` |

## Player Commands & Permissions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ Examples of these are Island Creation, Raiding, and the Obelisk.

These GUIs offer extensive customization.

{% hint style="warning" %}
:::warning
Different types of GUIs have different placeholders for certain items!\
Make sure to read the comments in every file when editing!
{% endhint %}
Make sure to read the comments in every file while editing!
:::

Example GUI config (Island Creation):

{% code title="Island Creation GUI Configuration" %}
```yaml
# Title of the GUI (Inventory)
TITLE: "&a&lCreate Island"
Expand Down Expand Up @@ -77,13 +76,11 @@ ITEMS:
lore: "" # Empty lore

```
{% endcode %}

## GUI "Layout"

You are offered extensive configuration, including the layout of the GUI.

{% code title="Island Creation GUI Configuration" %}
```yaml
# This allows you to customise the shape of the GUI.
# You can only have a maximum of 54 slots (9 x 6).
Expand All @@ -98,7 +95,6 @@ LAYOUT:
- "# . y . . . n . #"
- "# # # # # # # # #"
```
{% endcode %}
Each "entry" / line in the `LAYOUT` variable is a new row in the GUI.\
There can, of course, only be a maximum of 54 slots (9 wide, 6 rows).\
Expand All @@ -108,15 +104,14 @@ Each letter corresponds to a new item.\
`.` responds to an empty slot.\
Any other characters corresponds to the items (See [#items](./#items "mention"))

{% hint style="info" %}
:::info
The majority of this information is explained in the comments in the YAML files.
{% endhint %}
:::

## Items

You are offered extensive configuration, including the option to modify the items used in each GUI.

{% code title="Island Creation GUI Configuration" %}
```yaml
ITEMS:
CONFIRM:
Expand Down Expand Up @@ -158,7 +153,6 @@ ITEMS:
pitch: 1
lore: "" # Empty lore
```
{% endcode %}

Each item has the same customisability:

Expand Down
Loading

0 comments on commit ff78b6e

Please sign in to comment.