1414<script setup>
1515import { computed , inject } from " vue" ;
1616import { usePageData , useSiteData } from " @vuepress/client" ;
17+ import documents from " ../../config-client/documents" ;
1718
1819const page = usePageData ();
1920const site = useSiteData ();
2021const { 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
4832const 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 # 19 94 f9
74+ color $accentColor
9175
9276 & :last-child
9377 cursor default
0 commit comments