Skip to content

Commit c44533e

Browse files
committed
feat: update GitHub sync guide to include frontmatter
Signed-off-by: ItsNeil17 <neil@hytalemodding.dev>
1 parent 4c192e3 commit c44533e

File tree

1 file changed

+47
-5
lines changed

1 file changed

+47
-5
lines changed

content/docs/en/wiki/6-github.mdx

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,58 @@ If the entire repository is documentation, leave this field empty.
2626

2727
## Repository structure
2828

29-
Your repository should contain `.mdx` files at the root of your documentation folder:
29+
Your repository should contain `.md` files at the root of your documentation folder:
3030
```
3131
my-repo/
3232
└── docs/
33-
├── intro.mdx
34-
├── installation.mdx
35-
└── usage.mdx
33+
├── intro.md
34+
├── installation.md
35+
└── usage.md
36+
```
37+
38+
Each file becomes a page on your wiki. The filename (without `.md`) is used as the page slug.
39+
40+
## Frontmatter
41+
42+
You can let our software know how you would like to configure and show your pages via the Frontmatter on all Markdown (.md) files. The Frontmatter must be at the very beginning of your files.
43+
44+
Here is a table of available fields:
45+
46+
| Field | Type | Required | Default | Description |
47+
|-------|------|----------|---------|-------------|
48+
| title | string | No | Derived from filename | Override the page title. |
49+
| order | integer | No | Position in the file list | Sort among siblings (lower = appears first) |
50+
| published | boolean | No | false | Whether the page is published. |
51+
| draft | boolean | No | false | Whether the page is a draft. |
52+
53+
### Example
54+
55+
```md
56+
---
57+
title: "Introduction"
58+
order: 1
59+
published: true
60+
draft: false
61+
---
62+
63+
# Introduction
64+
```
65+
66+
## Categorys and Hierarchy
67+
68+
If you want to make children pages under a page, you need to create a folder. If you want the parent page to have contents, you can make a file named `index.md` and put the content inside it. The rest of the pages in that folder will be children of the folder.
69+
70+
If you want to create a category and do not want content on the parent page, you can make a `meta.json` file which will let you modify the title of the category, etc.
71+
72+
### Example
73+
74+
```json
75+
{
76+
"title": "My Category",
77+
"published": true
78+
}
3679
```
3780

38-
Each file becomes a page on your wiki. The filename (without `.mdx`) is used as the page slug.
3981

4082
## Updating documentation
4183

0 commit comments

Comments
 (0)