Skip to content

Commit 27d84c8

Browse files
committed
add master branch toggle
1 parent f596a05 commit 27d84c8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
nodejs,
88
cacert,
99
quickshell-types ? null,
10+
masterBranch ? false,
1011
}: stdenv.mkDerivation (final: let
1112
nodeModules = stdenv.mkDerivation {
1213
pname = "${final.pname}-node_modules";
@@ -69,6 +70,7 @@ in {
6970
'';
7071

7172
PRODUCTION = true;
73+
MASTER_BRANCH = masterBranch;
7274
SECRET_MODULES_PATH = if quickshell-types == null then "" else quickshell-types;
7375

7476
buildPhase = ''

src/components/navigation/sidebars/nav/RootNav.astro

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,18 @@ const types = {
5757
})
5858
),
5959
};
60+
61+
const masterBranch = import.meta.env.MASTER_BRANCH;
6062
---
6163
<nav class="navtree">
64+
{masterBranch && <Link
65+
title="Docs Version: Master Branch (Switch)"
66+
link=`https://quickshell.outfoxxed.me${Astro.url.pathname}`
67+
/>}
68+
{!masterBranch && <Link
69+
title="Docs Version: Release 0.1.0 (Switch)"
70+
link=`https://quickshell-master.outfoxxed.me${Astro.url.pathname}`
71+
/>}
6272
<Link
6373
title="About Quickshell"
6474
link="/docs/about"

0 commit comments

Comments
 (0)