()
| 71 | ...defaults, |
| 72 | ...options, |
| 73 | get config() { |
| 74 | const sharedConfig = { |
| 75 | ...defaults.config, |
| 76 | // Conditionally set options but allow explicit overrides |
| 77 | coverpage: Boolean(settings.markdown.coverpage), |
| 78 | loadNavbar: Boolean(settings.markdown.navbar), |
| 79 | loadSidebar: Boolean(settings.markdown.sidebar), |
| 80 | }; |
| 81 | |
| 82 | const updateBasePath = config => { |
| 83 | if (config.basePath) { |
| 84 | config.basePath = new URL( |
| 85 | config.basePath, |
| 86 | process.env.TEST_HOST |
| 87 | ).href; |
| 88 | } |
| 89 | }; |
| 90 | |
| 91 | // Config as function |
| 92 | if (typeof options.config === 'function') { |
| 93 | return function (vm) { |
| 94 | const config = { ...sharedConfig, ...options.config(vm) }; |
| 95 | |
| 96 | updateBasePath(config); |
| 97 | |
| 98 | return config; |
| 99 | }; |
| 100 | } |
| 101 | // Config as object |
| 102 | else { |
| 103 | const config = { ...sharedConfig, ...options.config }; |
| 104 | |
| 105 | updateBasePath(config); |
| 106 | |
| 107 | return config; |
| 108 | } |
| 109 | }, |
| 110 | get markdown() { |
| 111 | return Object.fromEntries( |
| 112 | Object.entries({ |
no test coverage detected
searching dependent graphs…