Skip to content

Commit e659097

Browse files
committed
Merge branch 'master' of github.com:yel-hadd/imunify360-documentation
2 parents 4b5b210 + 3e28bc6 commit e659097

File tree

1 file changed

+11
-27
lines changed

1 file changed

+11
-27
lines changed

docs/.vuepress/theme/components/Breadcrumb.vue

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,20 @@
1414
<script setup>
1515
import { computed, inject } from "vue";
1616
import { usePageData, useSiteData } from "@vuepress/client";
17+
import documents from "../../config-client/documents";
1718
1819
const page = usePageData();
1920
const site = useSiteData();
2021
const { locales: { siteTitle } } = inject("themeConfig");
2122
22-
// Title mapping for specific paths
23-
const titleMap = {
24-
'/billing/': 'Billing',
25-
'/command_line_interface/': 'Command Line Interface',
26-
'/config_file_description/': 'Config File Description',
27-
'/control_panel_integration/': 'Control Panel Integration',
28-
'/dashboard/': 'Dashboard',
29-
'/email/': 'Email',
30-
'/faq_and_known_issues/': 'FAQ and Known Issues',
31-
'/features/': 'Features',
32-
'/ids_integration/': 'IDS Integration',
33-
'/imunify_patch/': 'Imunify Patch',
34-
'/imunifyav/': 'ImunifyAV',
35-
'/installation/': 'Installation',
36-
'/introduction/': 'Introduction',
37-
'/localization/': 'Localization',
38-
'/myimunify/': 'MyImunify',
39-
'/patchman/': 'Patchman',
40-
'/terminology/': 'Terminology',
41-
'/uninstall/': 'Uninstall',
42-
'/update/': 'Update',
43-
'/user_interface/': 'User Interface',
44-
'/whmcs_plugin/': 'WHMCS Plugin',
45-
'/wordpress_plugin/': 'WordPress Plugin',
46-
};
23+
// Generate title mapping from documents
24+
const titleMap = computed(() => {
25+
const map = {};
26+
documents.forEach(doc => {
27+
map[doc.link] = doc.title;
28+
});
29+
return map;
30+
});
4731
4832
const breadCrumbs = computed(() => {
4933
const segments = page.value.path.split("/").filter(Boolean);
@@ -60,7 +44,7 @@ const breadCrumbs = computed(() => {
6044
if (isLast) {
6145
title = page.value.title;
6246
} else {
63-
title = titleMap[fullPath] || fullPath;
47+
title = titleMap.value[fullPath] || fullPath;
6448
}
6549
6650
crumbs.push({ path: fullPath, title });
@@ -87,7 +71,7 @@ const breadCrumbs = computed(() => {
8771
cursor pointer
8872
8973
&:hover
90-
color #1994f9
74+
color $accentColor
9175
9276
&:last-child
9377
cursor default

0 commit comments

Comments
 (0)