add master branch toggle
This commit is contained in:
parent
f596a050ab
commit
27d84c8a82
2 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
nodejs,
|
nodejs,
|
||||||
cacert,
|
cacert,
|
||||||
quickshell-types ? null,
|
quickshell-types ? null,
|
||||||
|
masterBranch ? false,
|
||||||
}: stdenv.mkDerivation (final: let
|
}: stdenv.mkDerivation (final: let
|
||||||
nodeModules = stdenv.mkDerivation {
|
nodeModules = stdenv.mkDerivation {
|
||||||
pname = "${final.pname}-node_modules";
|
pname = "${final.pname}-node_modules";
|
||||||
|
@ -69,6 +70,7 @@ in {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
PRODUCTION = true;
|
PRODUCTION = true;
|
||||||
|
MASTER_BRANCH = masterBranch;
|
||||||
SECRET_MODULES_PATH = if quickshell-types == null then "" else quickshell-types;
|
SECRET_MODULES_PATH = if quickshell-types == null then "" else quickshell-types;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
|
|
@ -57,8 +57,18 @@ const types = {
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const masterBranch = import.meta.env.MASTER_BRANCH;
|
||||||
---
|
---
|
||||||
<nav class="navtree">
|
<nav class="navtree">
|
||||||
|
{masterBranch && <Link
|
||||||
|
title="Docs Version: Master Branch (Switch)"
|
||||||
|
link=`https://quickshell.outfoxxed.me${Astro.url.pathname}`
|
||||||
|
/>}
|
||||||
|
{!masterBranch && <Link
|
||||||
|
title="Docs Version: Release 0.1.0 (Switch)"
|
||||||
|
link=`https://quickshell-master.outfoxxed.me${Astro.url.pathname}`
|
||||||
|
/>}
|
||||||
<Link
|
<Link
|
||||||
title="About Quickshell"
|
title="About Quickshell"
|
||||||
link="/docs/about"
|
link="/docs/about"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue