Skip to content

Commit 267effb

Browse files
NSPC911gitbook-bot
authored andcommitted
GITBOOK-1: No subject
1 parent 3fa7019 commit 267effb

17 files changed

+395
-211
lines changed

gitbook/.gitbook/assets/image (1).png

97 KB
Loading

gitbook/.gitbook/assets/image (2).png

200 KB
Loading

gitbook/.gitbook/assets/image.png

61 KB
Loading

gitbook/README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
---
22
icon: hand-wave
3-
cover: https://gitbookio.github.io/onboarding-template-images/header.png
4-
coverY: 0
53
layout:
6-
cover:
7-
visible: true
8-
size: full
94
title:
105
visible: true
116
description:
@@ -18,12 +13,12 @@ layout:
1813
visible: true
1914
---
2015

21-
# Welcome
16+
# Home
2217

23-
Welcome to the GitBook Starter Template! Here you'll get an overview of all the amazing features GitBook offers to help you build beautiful, interactive documentation.
18+
## Welcome to BEComTweaks' Docs!
2419

25-
You'll see some of the best parts of GitBook in action — and find help on how you can turn this template into your own.
20+
Thank you for checking out the documentation! This should contain everything from why BEComTweaks exists, to the fine details on how it works, and how to contribute!
2621

27-
### Jump right in
22+
#### Jump right in
2823

29-
<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Getting Started</strong></td><td>Create your first site</td><td></td><td></td><td><a href="getting-started/quickstart.md">quickstart.md</a></td></tr><tr><td><strong>Basics</strong></td><td>Learn the basics of GitBook</td><td></td><td></td><td><a href="broken-reference">Broken link</a></td></tr><tr><td><strong>Publish your docs</strong></td><td>Share your docs online</td><td></td><td></td><td><a href="getting-started/publish-your-docs.md">publish-your-docs.md</a></td></tr></tbody></table>
24+
<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Getting Started</strong></td><td>Learn on the basics required in any repo!</td><td><a href="getting-started.md">getting-started.md</a></td></tr><tr><td><strong>Creating new things</strong></td><td>Learn to create new items like Packs, Sections and Compatibilities</td><td><a href="broken-reference">Broken link</a></td></tr><tr><td><strong>Who are we?</strong></td><td>Want to know who we are?</td><td></td></tr></tbody></table>

gitbook/SUMMARY.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
# Table of contents
22

3-
* [Welcome](README.md)
3+
* [Home](README.md)
4+
* [Getting Started](getting-started.md)
45

5-
## Getting Started
6+
## Creating a
67

7-
* [Quickstart](getting-started/quickstart.md)
8-
* [Publish your docs](getting-started/publish-your-docs.md)
8+
* [New Pack](creating-a/new-pack.md)
99

10-
## Basics
10+
***
1111

12-
* [Editor](basics/editor.md)
13-
* [Markdown](basics/markdown.md)
14-
* [Images & media](basics/images-and-media.md)
15-
* [Interactive blocks](basics/interactive-blocks.md)
16-
* [OpenAPI](basics/openapi.md)
17-
* [Integrations](basics/integrations.md)
12+
* [New Category](new-category.md)
13+
* [New Compatibility](new-compatibility.md)

gitbook/basics/editor.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

gitbook/basics/images-and-media.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

gitbook/basics/integrations.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

gitbook/basics/interactive-blocks.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

gitbook/basics/markdown.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

gitbook/basics/openapi.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

gitbook/creating-a/new-pack.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
icon: crate-empty
3+
---
4+
5+
# New Pack
6+
7+
You want to create a new pack! This is the easiest one!
8+
9+
Ensure you have cloned [BEComTweaks/behaviour-packs](https://github.com/BEComTweaks/behaviour-packs), [BEComTweaks/crafting-tweaks](https://github.com/BEComTweaks/crafting-tweaks) or [BEComTweaks/resource-packs](https://github.com/BEComTweaks/resource-packs).
10+
11+
Open the newly cloned folder using VSCode. In the directory list, open the `jsons` folder, followed by the `packs` folder. You should now see a list of `.json` files. Click the json for the category that you want to add your pack to.
12+
13+
### JSON Format
14+
15+
The format for a pack is as follows
16+
17+
```json
18+
{
19+
"pack_id": "<pack id>",
20+
"pack_name": "<pack name>",
21+
"pack_description": "<pack description>",
22+
"conflict": [
23+
"<pack ids>"
24+
],
25+
"message": [
26+
"<level>",
27+
"<notes>"
28+
],
29+
"icon": "<ext of icon>",
30+
"priority": "<int>",
31+
"regolith": "<bool>"
32+
}
33+
```
34+
35+
The only required definitions are `pack_id`, `pack_name` and `pack_description`. For the rest, they aren't required. Let's go through what each one defines.
36+
37+
#### Pack ID
38+
39+
* This defines a unique identifier for a given pack, used for loading selected packs from a URL, creation of a pack and defining conflicts.
40+
* Must be a non-empty string and is required.
41+
42+
#### Pack Name
43+
44+
* This defines the name of the given pack, used in the website's UI, but has no other purpose in the backend.
45+
* Must be a non-empty string and is required.
46+
47+
#### Pack Description
48+
49+
* This defines the description for the given pack, added as an explanation for the pack. No other purpose in the backend.
50+
* Must be a string, but can be empty and is required.
51+
52+
#### Conflict
53+
54+
* This defines the list of packs that conflict with the current pack. This is used to warn the user of enabling such a pack with another pack. This has no purpose in the backend.
55+
* Must be an array containing non-empty strings, but can be omitted.
56+
57+
#### Message
58+
59+
* An extra stylised description is used to provide additional information to the user. This has no purpose in the backend.
60+
* Must be in the format below, but can be omitted
61+
62+
```json
63+
"message": [
64+
"error/info/warn",
65+
"<information>"
66+
]
67+
```
68+
69+
* A message of level `error` has the information show up as <mark style="color:red;">red</mark>
70+
* A message level of `info` has the information show up as <mark style="color:blue;">cyan</mark>
71+
* A message level of `warn` has the information show up as <mark style="color:orange;">orange</mark>
72+
73+
#### Icon
74+
75+
* A setting to change the extension of the pack icon used. This means that pack icons added as a `WebP` or even `QOI` can be used. Added for `gif`, but preferred as `png`. This has no purpose in the backend.
76+
* Must be a string that doesn't contain the period `.`, but can be omitted
77+
78+
#### Priority
79+
80+
* This defines the priority level of a pack, which refers to whether conflicting packs can overwrite the other in the occasion that a compatibility isn't available for it. This has no purpose in the frontend.
81+
* Must be an integer lower than 999.
82+
83+
#### Regolith
84+
85+
* This defines whether the pack added is a pack that is required to be built using [Regolith](https://regolith-docs.readthedocs.io/). This has no purpose in the frontend.
86+
* Must be a boolean.
87+
88+
With your selected options, insert the dictionary between one of the items inside the array.
89+
90+
### Folder
91+
92+
Now, back at the root directory where your repository is at, open the `packs` folder, followed by the category. If the category's json contains a key `"location"`, open the appropriate directory. Else, just open the category's directory. Inside there, create a new folder and name it `<pack id>` from your dictionary.
93+
94+
Inside it, copy and paste a template icon from `/pack_icons/` into the pack's folder and name it as `pack_icon.png` . Using an image editing software like MS Paint, Aseprite, Pixelorama, etc, make your pack icon.
95+
96+
After you have created the pack icon,&#x20;
97+
98+
* If you are using regolith, continue with initialising a regolith project.
99+
* Else, create a new folder called `files` inside the pack and dump the pack (aside from `manifest.json` and `pack_icon.png`) inside the `files` folder.
100+
101+
### Checks
102+
103+
Now, using your terminal, head to the folder with the repository. Ensure that you have an active Python Virtual Environment (refer to [#setting-up-the-modules](../getting-started.md#setting-up-the-modules "mention") if you have not set it up). Run
104+
105+
```sh
106+
python pys/pre_commit.py --format
107+
```
108+
109+
You can choose to add in a `--no-stash` if you are sure you won't accidentally nuke your workspace.
110+
111+
After the script finishes running, you can run
112+
113+
```sh
114+
git status
115+
```
116+
117+
to see your changed files. If they are all right, you can run
118+
119+
```sh
120+
git add .
121+
```
122+
123+
to stage your added files, then
124+
125+
```sh
126+
git commit -m "<message>"
127+
```
128+
129+
where `<message>` is a summary of the changes you made. Finally, run
130+
131+
```sh
132+
git push
133+
```
134+
135+
to push the changes to the remote repository. Now check your repository in the web (the url from [#forking-the-repo](../getting-started.md#forking-the-repo "mention")). You should see your new commit message. You might also see a banner saying that you can create a new Pull Request. Click on it and you should see something like this
136+
137+
<figure><img src="../.gitbook/assets/image.png" alt=""><figcaption><p>Pull Request</p></figcaption></figure>
138+
139+
Add a title for your change, like `Added <pack> inside <category>` and a description (can be empty ~~like your heart~~)
140+
141+
Press `Create pull request` and you are done!

0 commit comments

Comments
 (0)