14
14
<script setup>
15
15
import { computed , inject } from " vue" ;
16
16
import { usePageData , useSiteData } from " @vuepress/client" ;
17
+ import documents from " ../../config-client/documents" ;
17
18
18
19
const page = usePageData ();
19
20
const site = useSiteData ();
20
21
const { locales: { siteTitle } } = inject (" themeConfig" );
21
22
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
+ });
47
31
48
32
const breadCrumbs = computed (() => {
49
33
const segments = page .value .path .split (" /" ).filter (Boolean );
@@ -60,7 +44,7 @@ const breadCrumbs = computed(() => {
60
44
if (isLast) {
61
45
title = page .value .title ;
62
46
} else {
63
- title = titleMap[fullPath] || fullPath;
47
+ title = titleMap . value [fullPath] || fullPath;
64
48
}
65
49
66
50
crumbs .push ({ path: fullPath, title });
@@ -87,7 +71,7 @@ const breadCrumbs = computed(() => {
87
71
cursor pointer
88
72
89
73
& :hover
90
- color # 19 94 f9
74
+ color $accentColor
91
75
92
76
& :last-child
93
77
cursor default
0 commit comments