diff --git a/src/html/components/_head.astro b/src/html/components/_head.astro
index 5a71c4fe6..82d24075e 100644
--- a/src/html/components/_head.astro
+++ b/src/html/components/_head.astro
@@ -1,6 +1,5 @@
---
const { title, path, isRtl } = Astro.props
-const distPath = (path != undefined) ? path : '../../../dist'
const cssPath = isRtl ? '.rtl' : ''
---
@@ -29,4 +28,4 @@ const cssPath = isRtl ? '.rtl' : ''
-
+
diff --git a/src/html/components/_scripts.astro b/src/html/components/_scripts.astro
index 775345d82..53ff4da43 100644
--- a/src/html/components/_scripts.astro
+++ b/src/html/components/_scripts.astro
@@ -1,7 +1,6 @@
---
const { path } = Astro.props
-const distPath = (path != undefined) ? path : '../../../dist'
-const adminlteJsUrl = distPath + '/js/adminlte.js'
+const adminlteJsUrl = path + '/js/adminlte.js'
---
diff --git a/src/html/components/dashboard/_sidenav.astro b/src/html/components/dashboard/_sidenav.astro
index e897415fd..21ff2d382 100644
--- a/src/html/components/dashboard/_sidenav.astro
+++ b/src/html/components/dashboard/_sidenav.astro
@@ -1,13 +1,14 @@
---
+import { convertPathToHtml } from '../../../utils/index.js';
const { path, mainPage, page } = Astro.props
-const distPath = (path != undefined) ? path : '../../../dist'
-const htmlPath = (path != undefined) ? '.' : '..'
+const htmlPath = convertPathToHtml(path)
---
+
-
-
+
+
@@ -152,6 +153,6 @@ const page = 'timeline'
-
+
diff --git a/src/html/pages/docs/color-mode.astro b/src/html/pages/docs/color-mode.astro
index 41ce69ae2..89479431e 100644
--- a/src/html/pages/docs/color-mode.astro
+++ b/src/html/pages/docs/color-mode.astro
@@ -7,6 +7,7 @@ import Scripts from "@components/_scripts.astro";
import NavbarHtml from "@components/docs/color-mode/navbar-html.md";
import ToggleScript from "@components/docs/color-mode/toggle-script.md";
const title = "AdminLTE 4 | General Form Elements";
+const path = '../../../dist'
const mainPage = "forms";
const page = "general";
---
@@ -14,12 +15,12 @@ const page = "general";
-
-
-
+
+
-
+