Skip to content

Commit

Permalink
fix: switch to lorenzo's sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhyll committed May 25, 2024
1 parent 66839cb commit e5390f0
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 122 deletions.
7 changes: 6 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import starlightLinksValidator from 'starlight-links-validator';
import starlightBlog from 'starlight-blog';
import serviceWorker from 'astrojs-service-worker';
import astroD2 from 'astro-d2';
import starlightUtils from "@lorenzo_lewis/starlight-utils";

const authors = {
nothingismagick: {
Expand Down Expand Up @@ -64,6 +65,11 @@ export default defineConfig({
integrations: [
starlight({
plugins: [
starlightUtils({
multiSidebar: {
switcherStyle: "horizontalList",
},
}),
starlightBlog({ authors }),
starlightLinksValidator({ errorOnRelativeLinks: false }),
],
Expand All @@ -82,7 +88,6 @@ export default defineConfig({
rss: `${site}/rss`,
},
components: {
Sidebar: './src/components/overrides/Sidebar.astro',
Header: './src/components/overrides/Header.astro',
Footer: 'src/components/overrides/Footer.astro',
ThemeSelect: 'src/components/overrides/ThemeSelect.astro',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@astrojs/markdown-remark": "^5.0.0",
"@astrojs/rss": "^4.0.5",
"@astrojs/starlight": "^0.23.0",
"@lorenzo_lewis/starlight-utils": "^0.1.0",
"@types/json-schema": "^7.0.15",
"astro": "^4.4.4",
"astro-d2": "^0.2.1",
Expand Down
65 changes: 63 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/overrides/PageFrame.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import MobileMenuToggle from 'virtual:starlight/components/MobileMenuToggle';
import type { Props } from '@astrojs/starlight/props';
import Sidebar from './Sidebar.astro';
import Sidebar from '@lorenzo_lewis/starlight-utils/components/Sidebar.astro';
const { labels } = Astro.props;
---

Expand Down
118 changes: 0 additions & 118 deletions src/components/overrides/Sidebar.astro

This file was deleted.

0 comments on commit e5390f0

Please sign in to comment.