| [ Web Proxy ] |
| Viewing: https://wiki.mcjava.dev/docs/about/contributing | [Back] [Original] |
Contributions to this wiki are welcomed and appreciated. If you are generally experienced with Markdown/MDX and GitHub, contributing is as simple as forking the wiki repository and creating a pull request.
This guide still may be helpful for experienced users, as it will give you an idea of the specific features of Gatsby this custom theme.
If unfamiliar with this process, fear not! This guide will walk you through the contribution process in a step-by-step manner. If you still have questions, feel free to join the Discord for assistance. If completely lost, you may also submit articles to Kastle#4801 via Discord.
Though it is possible to use GitHub's web editor, it is reccomended that you download GitHub Desktop if you plan to contribute on an ongoing basis. The linked landing page should provide a suitable download for your system. If you do not yet have a GitHub account, GitHub Desktop will prompt you to create one.
File menu, select Cline Repository...URL and enter https://github.com/mcjava-wiki/mcjava-wikiLocal PathCloneRepository menu, select PushFork This RepositoryTo contribute to the parent project and click ContinueThe files of the repository may now be editted from the location at which you cloned the repository in the previous instructions. Before editting, it is recommended that you create a new branch for each major contribution if you plan to contribute frequently. To create a new branch:
Branch menu, select New Branch...Create BranchTo switch between branches, you may use the Current Branch tab in the top right of the window. When switching branches, GitHub Desktop will pull the files for the given branch from GitHub and update your repository folder automatically.
It is reccomended, though also not required, that you utilize a text editing application with syntax checking and highlighting. Visual Studio Code and Atom are both excellent options availible on all major operating systems.
Changes are not tracked by the repository until they are committed. GitHub Desktop will show you any files you have changed in the Changes tab. Once you are satisfied with your changes, you may commit them through the GitHub Desktop GUI. It is good practice to give a reasonable summary of each commit, describing what is being changed and why. This will make the process of reviewing your pull request much smoother.
If you are not satisfied with any changes to files, you may discard those changes without committing by highlighting them, right clicking, and selecting Discard Changes. This will revert the changes to the last commit.
After making committing changes, pushing your changes to GitHub is as simple as selecting Push from the Repository menu. Generally, it is a good idea to push frequently, as this will ensure your changes are also stored on GitHub.
Once you are completely satisfied with your article and have pushed all needed changes, you may open a pull request for review. To create a pull request:
Branch menu, select Create Pull RequestCreate pull requestCreate Pull RequestAfter opening your PR, your proposed changes will be reviewed by a wiki administrator. They will either requst any needed changes, or if no changes are needed, merge your proposed changes into the project.
To build the site and preview locally, you'll need NodeJS.
BASH1git clone https://github.com/mcjava-wiki/mcjava-wiki2cd mcjava-wiki3npm install #--legacy-peer-deps4npm run develop
Changes can be live previewed with the above commands. Uncomment --legacy-peer-deps if running npm 7. If you are not able to preview your changes, do not stress. A preview will be automatically generated when you open your pull request.
This section details considerations specific to this project based on the tools that we utilize, as well as custom features that we have added.
The pages of this wiki are stored in the path /pages/docs of the repository. In here, you will find a folder for each section of the wiki. Please keep any contributions to the correct section. If you are unsure of the section under which a contribution fits, please ask in the Discord.
If you feel it needed to add a new section for your contribution, you may do so by adding to the sections array in gatsby-config.js. This will register the new section to the navigation bar. You may then create a new directory in /pages/docs.
All pages must have a page header for Gatsby to register them. The page header consists of the following information:
/pages/docs/about/contributing.mdxMDX1---2title: Contributing3section: About4slug: /docs/about/contributing5order: 36---
title defines the title of the page that appears in the navigation barsection defines the section under which the page will appearslug defines the URL path of the page (e.g. /docs/about/contributing will produce the URL https://wiki.mcjava.dev/docs/about/contributing)order defines the position of the page in its respective section of the navigation bar, with 1 being first, and higher numbers being afterAll pages are created with MDX files. MDX is a subset of Markdown. If needed, it is also acceptable to right in plain HTML, which Gatsby should parse correctly in most cases.
MDX uses markdown syntax. A complete style guide for markdown is availible here. Here is a brief visual summary:
HeadingsMD1# Heading Level 123This heading should only be used as the title of the page45## Heading Level 267This heading should be used for major sections89### Heading Level 31011This heading should be used for subsections.12Only heading levels 2 and 3 will be displayed on the right sidebar.13Headings go all the way to level 6 by adding more hashtags.
This heading should only be used as the title of the page
This heading should be used for major sections
This heading should be used for subsections. Only heading levels 2 and 3 will be displayed on the right sidebar. Headings go all the way to level 6 by adding more hashtags.
Bolding and ItalicsMD1**Bold Text**23*Italic Text*45***Bold and Italic Text***
Bold Text
Italic Text
Bold and Italic Text
Block QuotesMD1> This is a block quote2>3> and more
This is a block quote
and more
ListsMD11. First item22. Second item33. Third item4 1. Indented item5 2. Indented item64. Fourth item78- First item9- Second item10- Third item11 - Indented item12 - Indented item13- Fourth item
ImagesMD1
Note that we specify the path for this image relative to the mdx file of the page:
[Tux, the Linux mascot]
LinesMD1There will be an extra line under this2***
There will be an extra line under this
LinksMD1My favorite browser is:2[Firefox Developer Edition](https://www.mozilla.org/en-US/firefox/developer/ "The best browser! (and this hover tip is optional)").34<https://wiki.mcjava.dev/>5
Inline CodeMD1`Put barticks around inline code`
Put barticks around inline code
Code blocks are one of the most common components of the wiki. Consequently, an effort was made to add useful features to code blocks. The example below shows how to utilize syntax highlighting and codeblock titles.
TEXT1```json title={/path/somefile.json} highlights={2,4-6}2{3 "hello": "world",4 "some_nums": [5 1,6 2,7 38 ]9}10```
The tripple bartick should be followed by the language in which you are writing. Most commonly, this will be json. You may then optionally add a title using the syntax title={somefile.json}. Ensure this is seperated from the langauge by a space. You may also define lines to highlight with the syntax highlights={1,2-4}. Here, commas seperate lines and ranges, and a range can be specified with a hyphen.
The code block would then render as:
/path/somefile.jsonJSON1{2 "hello": "world",3 "some_nums": [4 1,5 2,6 37 ]8}
There are also prism custom language presets for molang and mcfunction:
/path/somefile.mcfunctionMCFUNCTION1say Bye...2playsound random.explode3teleport @s ~10 ~10 ~10 true4say OUCH!
/path/somefile.molangMOLANG1(v.moo > 0) ? {2 v.x = math.sin(q.life_time * 45);3 v.x = v.x * v.x + 17.3;4 t.sin_x = math.sin(v.x);5 v.x = t.sin_x * t.sin_x + v.x * v.x;6 v.x = math.sqrt(v.x) * v.x * math.pi;7}
These can be defined in highlights.js and should then have appropriate entries added in custom.css to define their tag color.
/pages/docs of the repositorytitle, section, slug, and orderjson)title={sometitle.json}, seperated from the language by a spacehighlights={1,3-4}, seperated from the language by a space| Web Proxy Viewer | New URL | Original Page |