Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
---
import type { Props } from '@astrojs/starlight/props';
import SiteTitle from "@astrojs/starlight/components/SiteTitle.astro";
import Search from "@astrojs/starlight/components/Search.astro";
import ThemeSelect from "@astrojs/starlight/components/ThemeSelect.astro";
import SocialIcons from "@astrojs/starlight/components/SocialIcons.astro";
---
<div class="header sl-flex">
<SiteTitle {...Astro.props} />
<SiteTitle />
<div class="secondary-wrap">
<Search {...Astro.props} />
<SocialIcons {...Astro.props} />
<Search />
<SocialIcons />
<div class="sl-hidden md:sl-flex">
<ThemeSelect {...Astro.props} />
<ThemeSelect />
</div>
</div>
</div>
Expand Down
18 changes: 9 additions & 9 deletions src/components/PageSidebar.astro
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
import type { Props } from '@astrojs/starlight/props';
import Default from '@astrojs/starlight/components/PageSidebar.astro';

const removeOverview = [
'iana',
]
const noOverview = removeOverview.includes(Astro.props.slug);
const toc = noOverview && Astro.props.toc !== undefined
? {
...Astro.props.toc,
items: Astro.props.toc?.items.slice(1),
}
: Astro.props.toc;
const { id, toc } = Astro.locals.starlightRoute;
const noOverview = removeOverview.includes(id);
if (noOverview && toc) {
Astro.locals.starlightRoute.toc = {
...toc,
items: toc.items.slice(1),
};
}
---

<Default {...Astro.props} {toc}><slot /></Default>
<Default />