Skip to content

Commit d71f671

Browse files
committed
Sidebar rework
1 parent dd6e98b commit d71f671

8 files changed

Lines changed: 38 additions & 29 deletions

File tree

‎web/astro.config.mjs‎

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default defineConfig({
7373
label: "Welcome",
7474
items: [
7575
{
76-
label: "Introduction",
76+
label: "Main page",
7777
link: "/",
7878
},
7979
{
@@ -83,27 +83,49 @@ export default defineConfig({
8383
],
8484
},
8585
{
86+
label: "Guides",
87+
items: [
88+
{label: "Scripting introduction", link: "/guides/Scripting-introduction"},
89+
{label: "Introduction to scripting GUI", link: "/guides/GUI-introduction"},
90+
{label: "Script security", link: "/guides/Script-security"},
91+
{label: "Introduction to CEF", link: "/guides/CEF-introduction"},
92+
]
93+
},
94+
{
95+
/* Autogenerate doesn't allow the items to be sorted alphabetically here
96+
For some reason, the following setting doesn't work at all (https://starlight.astro.build/guides/sidebar/#customizing-autogenerated-links-in-frontmatter):
97+
sidebar:
98+
order: X
99+
*/
100+
86101
label: "Articles",
87-
autogenerate: { directory: "articles" },
102+
items: [
103+
{label: "Cross-compiling MTASA on Linux using msvc-wine", slug: "articles/wine-build"},
104+
{label: "Serial", slug: "articles/serial"},
105+
]
88106
},
89107
{
90108
label: "Reference",
91109
items: [
92110
{
93-
label: "Resources",
111+
label: "Resources & Mechanics",
94112
items: [
95-
{ label: "Element data", link: "/reference/Element_data"},
96-
{ label: "Lua API", link: "/reference/Lua_API" },
97-
{ label: "ID Lists", link: "/reference/ID_Lists" },
98-
{ label: "Meta.xml", link: "/reference/Meta.xml" },
99-
{label: 'Predefined variables', link: '/reference/Predefined_variables'},
113+
{label: "Element data", link: "/reference/Element_data"},
114+
{label: "Game processing order", link: "/reference/Game_Processing_Order"},
115+
{label: "ID Lists", link: "/reference/ID_Lists" },
116+
{label: "Lua API", link: "/reference/Lua_API" },
117+
{label: "Meta.xml", link: "/reference/Meta.xml" },
118+
{label: "Predefined variables", link: '/reference/Predefined_variables'},
100119
{label: "Resource Web Access", link: "/reference/Resource_Web_Access"},
101-
{label: "CEF Tutorial", link: "/reference/CEF-tutorial"},
102-
{label: "Game processing order", link: '/reference/Game_Processing_Order'},
103-
{label: "Texture pixels", link: '/reference/Pixels'},
120+
{label: "Shaders", link: "/reference/shaders"},
121+
{label: "Texture pixels", link: "/reference/Pixels"},
122+
],
123+
},
124+
{
125+
label: "API Structure",
126+
items: [
104127
{
105128
label: "Functions",
106-
collapsed: true,
107129
badge: { text: "Help Wanted", variant: "tip" },
108130
items: [
109131
{
@@ -126,7 +148,6 @@ export default defineConfig({
126148
},
127149
{
128150
label: "Events",
129-
collapsed: true,
130151
items: [
131152
{ label: "Event System", link: "/reference/Event_System" },
132153
{
@@ -160,8 +181,8 @@ export default defineConfig({
160181
{ label: "About OOP", link: "/reference/OOP" },
161182
{ label: "OOP Classes", link: "/reference/OOP_Classes" },
162183
],
163-
},
164-
],
184+
}
185+
]
165186
},
166187
{
167188
label: "Configuration",

‎web/src/content/docs/articles/serial.mdx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
---
2-
title: Serial
3-
---
41
import NoteBox from '@src/components/NoteBox.astro';
52

63
<div id="_top"/>

‎web/src/content/docs/articles/wine-build.mdx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
---
2-
title: Cross-compiling MTASA on Linux using msvc-wine
3-
---
41
import NoteBox from '@src/components/NoteBox.astro';
52

63
<div id="_top"/>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import NoteBox from '@src/components/NoteBox.astro';
77

88
<AutoStarlightPage frontmatter={{
99
template: 'doc',
10-
title: 'CEF Tutorial',
10+
title: 'CEF Introduction',
1111
tableOfContents: true
1212
}}>
1313

File renamed without changes.
File renamed without changes.

web/src/content/docs/articles/scripting-introduction.mdx renamed to web/src/pages/guides/Scripting-introduction.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,4 @@ title: Scripting Introduction
33
description: A tutorial on how to use the MTA scripting capabilities
44
---
55

6-
## Test - this shows in TOC
7-
8-
### This also shows
9-
10-
#### This doesn't
11-
12-
Lmao
6+
TODO

0 commit comments

Comments
 (0)