Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarusA committed Nov 14, 2024
1 parent dcc8919 commit 1e5da9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import footnote from "markdown-it-footnote";
import { transformerMetaWordHighlight } from '@shikijs/transformers';

function getBaseRepository(base: string): string {
if (!base) return '/';
// I guess if deploy_url is available. From where do I check this ?
if (!base || base === '/') return '/';
const parts = base.split('/').filter(Boolean);
return parts.length > 0 ? `/${parts[0]}/` : '/';
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/.vitepress/theme/VersionPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const getBaseRepository = () => {
if (origin.includes('github.io')) {
// Extract the first part of the path as the repository name
const pathParts = pathname.split('/').filter(Boolean);
const baseRepo = pathParts.length > 0 ? `/${pathParts[0]}/` : '/';
const baseRepo = pathParts.length > 0 ? `/${pathParts[0]}` : '';
return `${origin}${baseRepo}`;
} else {
// For custom domains, use just the origin (e.g., https://docs.makie.org)
Expand Down

0 comments on commit 1e5da9d

Please sign in to comment.