diff --git a/layouts/docs.vue b/layouts/docs.vue index 87e2a2e..c7876ec 100644 --- a/layouts/docs.vue +++ b/layouts/docs.vue @@ -61,6 +61,13 @@ + +
+ +
+ +
+
@@ -71,10 +78,19 @@ import Logo from "../assets/logo-w-shadow.png" const { locale } = useI18n() const route = useRoute() +const breadcrumb = computed(() => { + const arr = route.path.replace(/^\/|\/$/g, "").split("/") + arr.shift() + return arr.map((x, idx) => ({ + title: x, + to: `/docs/${arr.slice(0, idx+1).join("/")}`, + })) +}) + const navNotRoot = computed(() => route.path.split("/").length > 2) const navQuery = computed(() => ({ where: { - _path: new RegExp("^\\" + route.path + "\\/[^\\/]+\\/?$"), + _path: new RegExp("^\\/" + route.path.replace(/^\/|\/$/g, '') + "\\/[^\\/]+\\/?$"), _locale: getLocale(locale), }, })) diff --git a/pages/docs/[...slug].vue b/pages/docs/[...slug].vue index f3b1f1b..ec05ef5 100644 --- a/pages/docs/[...slug].vue +++ b/pages/docs/[...slug].vue @@ -17,12 +17,14 @@ - - - - - - + +
+ + + + + +