Skip to content

Commit

Permalink
chore: Clean up contributing docs structure
Browse files Browse the repository at this point in the history
docs: Start server config documentation
  • Loading branch information
0ffz committed Nov 2, 2024
1 parent de4a3cb commit e606573
Show file tree
Hide file tree
Showing 29 changed files with 60 additions and 46 deletions.
4 changes: 2 additions & 2 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- [Home](index.md)
- [Contributing](contributing/)
- [Dev resources](dev/)
- [Server configs](server-configs/)
- [Coding](coding/)
- [Geary](geary/)
- [Geary for Minecraft](geary-minecraft/)
- [Idofront](idofront/)
Expand Down
7 changes: 7 additions & 0 deletions docs/coding/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- [Quickstart](quickstart.md)
- [Learn to Code](learn/)
- [Conventions](conventions/)
- [Private assets](private-assets.md)
- [Dependencies](deps/)
- [Server management](server-management/)
- [Resources](resources/)
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Coding conventions

## Code style guide

We follow the [Android Kotlin Style Guide](https://developer.android.com/kotlin/style-guide).

IntelliJ has an autoformatter that follows this style guide, use `Ctrl+Alt+L` to run it. If the formatter makes no changes, your code style is good to go.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 9 additions & 15 deletions docs/contributing/quickstart.md → docs/coding/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@

Let's set up a local server and dev environment. If you're new to programming, continue with the guide on the sidebar and come back here afterward!

!!! note
If you wish to contribute with other aspects of the project, such as art, design, or building, check out [mineinabyss.com/contributing](https://mineinabyss.com/contributing).

## IDE

- Install [:simple-intellijidea: IntelliJ IDEA](https://www.jetbrains.com/idea/download/)
- Install a Java 17 JDK, most easily via IntelliJ using `Ctrl+Alt+Shift+S`, then clicking the dropdown in project settings.
- Install a Java 21 JDK, most easily via IntelliJ using `Ctrl+Alt+Shift+S`, then clicking the dropdown in project settings.
- Set your server plugin path in `~/.gradle/gradle.properties` (see [Configuring gradle](#configuring-gradle) below), we also recommend some other settings for better performance.
- Build the project with gradle (see [Building a project](#building-a-project) below).
- Our [composite-projects](https://github.com/MineInAbyss/composite-projects) repo can be useful for working on multiple projects at once, or just clone the repos you need.

## Server

- Install Docker, follow [:simple-docker: Docker's install guide](https://docs.docker.com/get-docker/).
- Create a server directory, we use `/opt/docker/data/minecraft` internally.
- Make a file named `docker-compose.yml` and paste a config from below.
- Server config and plugins will be downloaded automatically using Keepup, if you build any plugins locally, they'll override the downloaded ones!
- Create a server directory and enter it.
- Make a file named `docker-compose.yml` and paste the config from below.
- Server config and plugins will be downloaded automatically using Keepup, if you build any plugins locally, Keepup will use yours instead.
- You can create a `.env` file in the same directory to pass secrets (ex. to download our mob models)

=== "Simple server"
Expand All @@ -35,7 +38,7 @@ Let's set up a local server and dev environment. If you're new to programming, c
- Install [lazydocker](https://github.com/jesseduffield/lazydocker) or [Docker Desktop](https://www.docker.com/products/docker-desktop/) for a GUI to manage your containers.
- Run `docker-compose up -d` in the directory of your `docker-compose.yml` to start the server in the background.
- Some IDEs like VSCode or Intellij let you manage Docker containers too, it may be convenient to open your entire minecraft folder to be able to modify the compose file and see local configs.
- Join in Minecraft as `localhost`
- Connect to `localhost` in Minecraft to join the server.
- Op yourself by attaching to your container (`a` in lazydocker) or `docker attach mineinabyss`.

## Extras
Expand All @@ -57,7 +60,7 @@ paperweight.experimental.sharedCaches=true

You do not need to install anything to build. You can do it from command line or IntelliJ (running builds through IntelliJ will be more convenient)

=== ":simple-windows: Windows"
=== ":fontawesome-brands-windows: Windows"
```shell
cd <insert project directory here>
gradlew.bat build
Expand All @@ -79,12 +82,3 @@ You do not need to install anything to build. You can do it from command line or

- If you need BBModels or other private assets see [[Private Assets]], or test on the dev server. You might be ratelimited by GitHub when downloading plugins, the page also explains how to set up your own token for it.
- If you need access to internal services like browsing files or restarting containers/seeing dev logs, let us know in Discord, you will be added to a team on GitHub.

### Podman

Podman is a Docker alternative that's sometimes easier to set up and can run our docker-compose file! Here are some tips to get it running:

- `pipx install podman-compose` to install podman-compose.
- `sudo podman-compose up -d` to start the server in the background.
- Placing `PODMAN_USERNS=keep-id` in your `.env` lets you run the server as your own user, be sure to append `:z` to any volume mounts in your compose file to avoid issues with SELinux.
- [Pods](https://flathub.org/apps/com.github.marhkb.Pods) is a nice UI for managing your containers.
2 changes: 2 additions & 0 deletions docs/coding/resources/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Version List](version-list.md)
- [Build matrix](build-matrix.md)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions docs/contributing/SUMMARY.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/contributing/check-out-dev-docs.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/contributing/index.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/dev/SUMMARY.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/server-configs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Introduction](intro.md)
Binary file added docs/server-configs/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/server-configs/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/server-configs/img_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/server-configs/img_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/server-configs/img_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions docs/server-configs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Introduction

Our server configs are publicly visible on GitHub [here](https://github.com/MineInAbyss/server-config/tree/develop). This guide will explain the structure we use for our configs and how to edit them in your browser. Further pages will explain the syntax for different plugins we use.

## Editing configs on the web

GitHub has a web editor built in which makes editing configs much easier. Create a GitHub account and sign in.
Next, visit the [server config page](https://github.com/MineInAbyss/server-config/tree/develop) and press `.` to open the editor, it should look like this:

![img.png](img.png)

Download the YAML extension from the left sidebar to get validation for the config files.

![img_1.png](img_1.png)

## File structure

Most server configs are stored in the `feat` folder, these are split into separate features which different servers can choose to include, as defined in `keepup/configs.yml`. This means multiple features can dynamically put configs into the same folders, for example `feat/mobs` defines MythicMobs config files, but so does `feat/pets`, on startup both will have their configs combined the same folder.

## Uploading your changes

On the bottom left of your editor, you'll see the current branch you're working on, in this case `develop`. You may click on it to create your own branch to work on changes (GitHub will ask if you want to "fork" this repo because you don't have permission to push to it directly, click yes and a copy will be made on your account).

![img_2.png](img_2.png)

Whenever you start working on something, we recommend swapping back to the `develop` branch, clicking the sync icon next to it to get the latest changes, and then creating a new branch for your work, ex. `fix-mob-spawning`.

The changes you make in your browser aren't automatically uploaded. To do so you need to "commit" them. Click on the source control button to the left and type a meaningful message describing what you changed. Click `Commit & Push` to upload the changes to your branch.

![img_3.png](img_3.png)

## Getting your changes on the server

You can make as many commits as you like, just try to keep messages meaningful. Once you're done, you can click the :octicons-git-pull-request-16: icon near the top of the previous image to create a "Pull request". This will bring up a menu where you can enter a title and description and choose what "base" branch you're requesting to place your changes into, this should almost always be `MineInAbyss/develop`:

![img_4.png](img_4.png)

After making a pull request, you'll be able to see it back on the server config GitHub page, someone will review it and potentially leave comments, and you can continue to commit to the branch the request was made on to update the PR. Eventually it will get "merged" into the develop branch and your changes will be live on the development server, ready for the next major update.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ theme:
- navigation.footer
- content.action.edit
font:
text: Inter
text: Roboto
code: JetBrains Mono
name: material
palette:
Expand Down

0 comments on commit e606573

Please sign in to comment.