Giter Club home page Giter Club logo

grasscutter-docs's Introduction

Grasscutter Docs

This repository contains the documentation for Grasscutter. The documentation is written in Markdown. Used on the Grasscutter wiki.

Contributing

If you want to contribute to the documentation, you can do so by forking this repository and making a pull request. Any useful additions are welcome.

How to Contribute

  1. Fork this repository
  2. Add your changes or additions to the docs folder
  3. Edit the navigation.json file to include your new page or any changes you made.
  4. Commit your changes
  5. Make a pull request

How to Add a New Page

Create a new Markdown file in the docs folder.

You may also use existing sub-folders or create new ones to organize your pages.

How to Edit the navigation.json File

The navigation.json file contains the navigation structure of the wiki. It is used to generate the sidebar on the wiki.

The file is structured as a JSON array of objects. Each object represents a page or a subfolder.

If the object represents a page, it has the following structure:

{
    "name": "Server Errors", 
    "_type": "file", 
    "path": "Troubleshooting/Server-Errors.md"
}
  • name is the name of the page as it will appear in the sidebar
  • _type is always file for pages
  • path is the path to the page relative to the docs folder

If the object represents a folder, it has the following structure:

{
    "name": "Troubleshooting", 
    "_type": "dir", 
    "_main": true,
  
    "children": [
        {
            "name": "Server Errors", 
            "_type": "file", 
            "path": "Troubleshooting/Server-Errors.md"
        }
    ]
}
  • name is the name of the folder as it will appear in the sidebar
  • _type is always dir for folders
  • _main is true if the folder is the main folder of the wiki, false otherwise. Main folders are displayed in the sidebar as top-level items. This property should be false for subfolders inside main folders
  • children is an array of objects representing the pages and subfolders inside the folder. The structure of these objects is the same as the structure of the main object.

NOTE

children can contain both pages and subfolders. However, creating another subfolder inside a subfolder is NOT recommended if it can be avoided.

This is how one main object in the navigation.json containing both files and subfolders should look like:

{
    "name": "Resources", 
    "_type": "dir", 
    "_main": true,
  
    "children": [
        {
            "name": "MongoDB Tutorial", 
            "_type": "file", 
            "path": "Resources/MongoDB-Tutorial.md"
        },
        {
            "name": "Redirecting Text Blocks", 
            "_type": "file", 
            "path": "Resources/Redirecting-Text-Blocks.md"
        },
        {
            "name": "Fun Stuff", 
            "_type": "dir", 
            "_main": false,
          
            "children": [
                {
                    "name": "Colored nickname and signature", 
                    "_type": "file", 
                    "path": "Resources/Fun-Stuff/Colored-nickname-and-signature.md"
                },
                {
                    "name": "Avatar/Character", 
                    "_type": "file", 
                    "path": "Resources/Fun-Stuff/Avatar-Character.md"
                }
            ]
        }
    ]
}

If you want to add a new page to the wiki, and the main or subfolder containing it already exists, you only need to add the page object to the children array of the folder object.

grasscutter-docs's People

Contributors

arikatsu avatar kingrainbow44 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.