Skip to content

Commit 79781c9

Browse files
committed
fix ico
1 parent 8551fb2 commit 79781c9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

docs/src/.vitepress/config.mts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
33
import mathjax3 from "markdown-it-mathjax3";
44

55
function getBaseRepository(base: string): string {
6-
if (!base) return '/';
7-
// I guess if deploy_url is available. From where do I check this ?
6+
if (!base || base === '/') return '/';
87
const parts = base.split('/').filter(Boolean);
98
return parts.length > 0 ? `/${parts[0]}/` : '/';
109
}
@@ -87,7 +86,7 @@ export default defineConfig({
8786
// cleanUrls: true,
8887
outDir: 'REPLACE_ME_DOCUMENTER_VITEPRESS', // This is required for MarkdownVitepress to work correctly...
8988
head: [
90-
['link', { rel: 'icon', href: 'REPLACE_ME_DOCUMENTER_VITEPRESS_FAVICON' }],
89+
['link', { rel: 'icon', href: '/favicon.ico' }],
9190
['script', {src: `${getBaseRepository(baseTemp.base)}versions.js`}],
9291
['script', {src: `${baseTemp.base}siteinfo.js`}]
9392
],

docs/src/components/VersionPicker.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const getBaseRepository = () => {
3434
if (origin.includes('github.io')) {
3535
// Extract the first part of the path as the repository name
3636
const pathParts = pathname.split('/').filter(Boolean);
37-
const baseRepo = pathParts.length > 0 ? `/${pathParts[0]}/` : '/';
37+
const baseRepo = pathParts.length > 0 ? `/${pathParts[0]}` : '';
3838
return `${origin}${baseRepo}`;
3939
} else {
4040
// For custom domains, use just the origin (e.g., https://docs.makie.org)
@@ -139,4 +139,4 @@ onMounted(loadVersions);
139139
.VPVersionPicker:hover :deep(button .text) {
140140
color: var(--vp-c-text-2) !important;
141141
}
142-
</style>
142+
</style>

0 commit comments

Comments
 (0)