aboutsummaryrefslogtreecommitdiff
path: root/website/src
diff options
context:
space:
mode:
Diffstat (limited to 'website/src')
-rw-r--r--website/src/components/Sidebar.astro29
-rw-r--r--website/src/content/docs/install.mdx2
2 files changed, 29 insertions, 2 deletions
diff --git a/website/src/components/Sidebar.astro b/website/src/components/Sidebar.astro
index c875a390..8ded83bb 100644
--- a/website/src/components/Sidebar.astro
+++ b/website/src/components/Sidebar.astro
@@ -6,7 +6,34 @@ import SidebarSublist from '@astrojs/starlight/components/SidebarSublist.astro';
const { sidebar } = Astro.locals.starlightRoute;
const pathname = Astro.url.pathname;
const isPreview = pathname === '/docs/preview/' || pathname.startsWith('/docs/preview/');
-const channelSidebar = isPreview ? rewriteSidebar(sidebar) : sidebar;
+const channelSidebar = isPreview ? addPreviewOnlyItems(rewriteSidebar(sidebar)) : sidebar;
+
+function addPreviewOnlyItems(entries) {
+ return entries.map((entry) => {
+ if (entry.type !== 'group' || entry.label !== 'Start here') return entry;
+
+ const windowsBeta = {
+ type: 'link',
+ label: 'Windows beta',
+ href: '/docs/preview/windows-beta/',
+ badge: undefined,
+ isCurrent: samePath('/docs/preview/windows-beta/', pathname),
+ attrs: {},
+ };
+ const nextEntries = [];
+ for (const child of entry.entries) {
+ nextEntries.push(child);
+ if (child.type === 'link' && child.label === 'Install') {
+ nextEntries.push(windowsBeta);
+ }
+ }
+
+ return {
+ ...entry,
+ entries: nextEntries,
+ };
+ });
+}
function rewriteSidebar(entries) {
return entries.map((entry) => {
diff --git a/website/src/content/docs/install.mdx b/website/src/content/docs/install.mdx
index 6322c8e0..66203310 100644
--- a/website/src/content/docs/install.mdx
+++ b/website/src/content/docs/install.mdx
@@ -130,4 +130,4 @@ mv herdr-linux-x86_64 ~/.local/bin/herdr
## Requirements
-Herdr supports Linux and macOS. Native Windows support is not available yet; use Herdr inside WSL for now.
+Stable Herdr releases support Linux and macOS. Native Windows builds are preview-only beta releases; stable users on Windows should use Herdr inside WSL for now.