Skip to content

Commit bbcde6d

Browse files
committed
Add TOC for Scripting Functions list
1 parent 1865cbe commit bbcde6d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

web/src/components/CategoryList.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ function displayCategory(category: string) {
127127
.sort(([a], [b]) => a.localeCompare(b))
128128
.map(([category, items]) => (
129129
<section id={slugify(category)}>
130-
<h4>{displayTitle(category)}
130+
<h3 style="font-size: var(--sl-text-h4);">{displayTitle(category)}
131131
<a href={`#${slugify(category)}`}><Icon size="1.5rem" name="external" class="mtainfoicon"/></a>
132-
</h4>
132+
</h3>
133133
<ul>
134134
{items
135135
.slice()

web/src/pages/reference/Scripting_Functions.astro

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
---
22
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
3+
import AutoStarlightPage from '@src/components/AutoStarlightPage.astro';
4+
35
import { getSeeAlsoLinksFromList } from '@src/utils/general';
46
import SeeAlsoSection from '@src/components/SeeAlsoSection.astro';
57
import { getFunctionsByCategory } from '@src/utils/functions';
68
import CategoryList from '@src/components/CategoryList.astro';
79
810
const functionsByCategory = getFunctionsByCategory();
911
---
10-
<StarlightPage frontmatter={{
12+
<AutoStarlightPage frontmatter={{
1113
template: 'doc',
1214
title: 'All Functions',
13-
tableOfContents: false,
1415
}}>
1516
<p>This page lists all <span class="side-client"><strong>client-side</strong></span>, <span class="side-server"><strong>server-side</strong></span> and <span class="side-shared"><strong>shared</strong></span> functions available in the <a href="/reference/Lua_API">Lua API</a> organized by category.</p>
1617

@@ -24,4 +25,4 @@ const functionsByCategory = getFunctionsByCategory();
2425
'reference:Client_Scripting_Events',
2526
'reference:Server_Scripting_Events',
2627
])} currentId='' />
27-
</StarlightPage>
28+
</AutoStarlightPage>

0 commit comments

Comments
 (0)