Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp
547 B
Raw Blame
---
// SPDX-License-Identifier: AGPL-3.0-or-later

import TableOfContentsList from '@/components/TableOfContentsList.astro';

const {toc} = Astro.locals.starlightRoute;
---

{
	toc && (
		<starlight-toc data-min-h={toc.minHeadingLevel} data-max-h={toc.maxHeadingLevel}>
			<nav aria-labelledby="starlight__on-this-page">
				<h2 id="starlight__on-this-page">{Astro.locals.t('tableOfContents.onThisPage')}</h2>
				<TableOfContentsList toc={toc.items} markFirst />
			</nav>
		</starlight-toc>
	)
}

<script>
	import './StarlightToc.ts';
</script>