Add contribution instructions
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
This commit is contained in:
7 files changed
+168
-73
No files matched your search
+109
-28
@@ -1,50 +1,131 @@
|
||||
# Contributing
|
||||
If you would like to contribute to the wiki, please [open a pull request](https://github.com/GeyserMC/GeyserWebsite/pulls).
|
||||
|
||||
If you would like to contribute to the wiki, please [open a pull request](https://github.com/GeyserMC/GeyserWiki/pulls).
|
||||
Small changes can be made directly in the GitHub interface, but larger changes should be made by cloning the repository and running the website locally, ideally using an IDE with TypeScript support (e.g. [Visual Studio Code](https://code.visualstudio.com/)).
|
||||
|
||||
### Creating a new page
|
||||
## Adding a Supported Hosting Provider
|
||||
|
||||
Most documentation is in the `docs` folder, where you can add new pages or edit the current ones.
|
||||
If a new page is being added make sure you add its page properties at the beginning of the file.
|
||||
Make sure that the file extension is .md - in this case `pagetitle.md`.
|
||||
Supported hosting providers are listed in `src/data/providers.ts`. Hosting providers are grouped into three subcategories:
|
||||
|
||||
### Example page layout
|
||||
- `built_in`: Providers that have fully automatic Geyser installation.
|
||||
- `supported`: Providers that work with Geyser but require manual installation.
|
||||
- `no_support`: Providers that do not work with Geyser.
|
||||
|
||||
To add a new provider, add an object to the appropriate subcategory in alphabetical order. For example, to add a provider named `Example Hosting Provider` to the `supported` subcategory, edit the `providers.ts` file as follows:
|
||||
|
||||
```diff
|
||||
{
|
||||
name: 'Cubes Hosting',
|
||||
url: 'https://www.cubes.host/',
|
||||
description: translate({
|
||||
id: 'providers.provider.cubes_hosting.description',
|
||||
message: "Install Geyser using the plugin manager. Then restart the server and Geyser will run on an additional port - you can check it in the server console. Geyser-Standalone can be set up through a support ticket."
|
||||
})
|
||||
},
|
||||
+ {
|
||||
+ name: 'Example Hosting Provider',
|
||||
+ url: 'https://example.com/',
|
||||
+ description: translate({
|
||||
+ id: 'providers.provider.example_hosting_provider.description',
|
||||
+ message: "Add a description of how to install Geyser on this hosting provider."
|
||||
+ })
|
||||
+ },
|
||||
{
|
||||
name: 'exaroton',
|
||||
url: 'https://exaroton.com/',
|
||||
description: translate({
|
||||
id: 'providers.provider.exaroton.description',
|
||||
message: descriptionTemplates.default
|
||||
})
|
||||
},
|
||||
```
|
||||
|
||||
If possible, use one of the templates listed at the top of the file, such as `descriptionTemplates.default`.
|
||||
|
||||
## Creating a New Page
|
||||
|
||||
All documentation is in the `docs` folder, where you can add new pages or edit the current ones. When a new page is added, it must also be added to [sidebar.ts](sidebar.ts). Pages that are written in plain markdown should use the extension `.md`, while pages that include React components should use the extension `.mdx`.
|
||||
|
||||
### Example Page Layout
|
||||
|
||||
```md
|
||||
---
|
||||
title: Page title
|
||||
page_sidebar: false (optional)
|
||||
description: A short description of the page.
|
||||
---
|
||||
|
||||
# Page title
|
||||
## Page Subheading One {#page-subheading-1}
|
||||
|
||||
This is an example page.
|
||||
|
||||
## Page Subheading Two {#page-subheading-2}
|
||||
|
||||
This is more of an example page.
|
||||
```
|
||||
|
||||
### Adding page to the sidebar
|
||||
### Adding a Page to the Sidebar
|
||||
|
||||
Once you have added the file you can add a sidebar link. All sidebar links + sub links are in the _data/toc.yml file.
|
||||
Once you have added the file you can add a sidebar link. All sidebar links and categories are defined in the [`sidebar.ts`](sidebar.ts) file.
|
||||
|
||||
### Example sidebar structure
|
||||
Simply add the page to the items section of the appropriate category. For example, to add a page about an advanced configuration created at the file `docs/geyser/advanced-configuration.md`, edit the `sidebar.ts` as follows:
|
||||
|
||||
```
|
||||
- title: Page Title Documentation
|
||||
url: "page/"
|
||||
links:
|
||||
- title: "Pagetitle sub link"
|
||||
url: "page/pagetitle/"
|
||||
children:
|
||||
- title: PageChild sub link
|
||||
url: "page/pagetitle/#headerLink"
|
||||
```diff
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Configuring Geyser',
|
||||
link: {
|
||||
type: 'doc',
|
||||
id: 'geyser/understanding-the-config',
|
||||
},
|
||||
items: [
|
||||
'geyser/commands',
|
||||
'geyser/translations',
|
||||
'geyser/geyser-command-line-arguments-and-system-properties',
|
||||
+ 'geyser/advanced-configuration',
|
||||
]
|
||||
},
|
||||
```
|
||||
|
||||
### GeyserWiki development - Local deployment on Windows.
|
||||
## Running the Website Locally
|
||||
|
||||
* Download and install Ruby using the Ruby+Devkit from https://rubyinstaller.org/downloads/.
|
||||
### Dependencies
|
||||
|
||||
* Once installed, run 'ridk install' in console to open the RubyInstaller.
|
||||
For this usecase, it is recommended to choose the third option, "MSYS and MINGW". After that, the Ruby installation is completed.
|
||||
#### Windows
|
||||
|
||||
* Open the GeyserWiki folder in VScode. There, open a terminal to install the bundle using the 'bundle install' command.
|
||||
Installing it for the first time can take a while.
|
||||
Open PowerShell and run:
|
||||
|
||||
* Once installed, you can start the webserver locally with the 'bundle exec jekyll serve' command in the VSC terminal.
|
||||
```ps1
|
||||
winget install -e --id OpenJS.NodeJS
|
||||
winget install -e --id Yarn.Yarn
|
||||
winget install -e --id Git.Git
|
||||
```
|
||||
|
||||
#### macOS
|
||||
|
||||
First, install [Homebrew](https://brew.sh/) if not already installed by opening Terminal and running:
|
||||
|
||||
```bash
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
```
|
||||
|
||||
Then, open a new Terminal window and run to install the dependencies:
|
||||
|
||||
```bash
|
||||
brew install node
|
||||
brew install yarn
|
||||
brew install git
|
||||
```
|
||||
|
||||
#### Linux
|
||||
|
||||
Install [Node.js](https://nodejs.org/en/download/package-manager/), [Yarn](https://classic.yarnpkg.com/en/docs/install), and [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) using the package manager for your distribution.
|
||||
|
||||
### Running
|
||||
|
||||
```sh
|
||||
git clone https://github.com/GeyserMC/GeyserWebsite
|
||||
cd GeyserWebsite
|
||||
yarn
|
||||
yarn start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
Reference in new issue
Block a user