Fix home link

This commit is contained in:
Ryan Gossiaux
2023-06-10 21:05:07 -07:00
parent b17ef3ae0f
commit 8c9732e716
2 changed files with 4 additions and 2 deletions

View File

@@ -3,9 +3,10 @@
$: isHome = $page.path.endsWith("docs/1.0"); $: isHome = $page.path.endsWith("docs/1.0");
$: base = isHome ? "1.0/" : ""; $: base = isHome ? "1.0/" : "";
$: homeUrl = isHome ? "" : "../1.0";
$: pages = [ $: pages = [
{ url: "../1.0", text: "Home" }, { url: homeUrl, text: "Home" },
{ url: `${base}general-concepts`, text: "General concepts" }, { url: `${base}general-concepts`, text: "General concepts" },
{ url: `${base}tailwind-ui`, text: "Use with Tailwind UI" }, { url: `${base}tailwind-ui`, text: "Use with Tailwind UI" },
{ url: `${base}version-history`, text: "Version history" }, { url: `${base}version-history`, text: "Version history" },

View File

@@ -3,9 +3,10 @@
$: isHome = $page.path.endsWith("docs/latest"); $: isHome = $page.path.endsWith("docs/latest");
$: base = isHome ? "latest/" : ""; $: base = isHome ? "latest/" : "";
$: homeUrl = isHome ? "" : "../latest";
$: pages = [ $: pages = [
{ url: "../latest", text: "Home" }, { url: homeUrl, text: "Home" },
{ url: `${base}general-concepts`, text: "General concepts" }, { url: `${base}general-concepts`, text: "General concepts" },
{ url: `${base}tailwind-ui`, text: "Use with Tailwind UI" }, { url: `${base}tailwind-ui`, text: "Use with Tailwind UI" },
{ url: `${base}version-history`, text: "Version history" }, { url: `${base}version-history`, text: "Version history" },