diff --git a/docs/.vitepress/getStructuredData.ts b/docs/.vitepress/getStructuredData.ts index 2ac47df1e..f66dcee29 100644 --- a/docs/.vitepress/getStructuredData.ts +++ b/docs/.vitepress/getStructuredData.ts @@ -1,7 +1,7 @@ import { PageData } from 'vitepress'; export default async function getStructuredData(iconName: string, pageData: PageData) { - const url = `https://lucide.dev/icons/${iconName}`; + const url = `https://lucide.dev/icons/${iconName}/details`; return { '@context': 'https://schema.org', diff --git a/docs/.vitepress/theme/components/icons/IconDetailOverlay.vue b/docs/.vitepress/theme/components/icons/IconDetailOverlay.vue index 2b1bca928..6529de488 100644 --- a/docs/.vitepress/theme/components/icons/IconDetailOverlay.vue +++ b/docs/.vitepress/theme/components/icons/IconDetailOverlay.vue @@ -87,8 +87,8 @@ const Expand = createLucideIcon('Expand', expand); @click=" go( icon.externalLibrary - ? `/icons/${icon.externalLibrary}/${icon.name}` - : `/icons/${icon.name}`, + ? `/icons/${icon.externalLibrary}/${icon.name}/details` + : `/icons/${icon.name}/details`, ) " > diff --git a/docs/.vitepress/theme/components/icons/IconInfo.vue b/docs/.vitepress/theme/components/icons/IconInfo.vue index 1aa8cb76d..f79c6fcb5 100644 --- a/docs/.vitepress/theme/components/icons/IconInfo.vue +++ b/docs/.vitepress/theme/components/icons/IconInfo.vue @@ -33,12 +33,21 @@ const deprecatedTitle = computed(() => { }); }); +const isDetailsPage = computed(() => { + const relativePath = page.value?.relativePath ?? ''; + const name = props.icon.name; + if (props.icon.externalLibrary) { + return relativePath === `icons/${props.icon.externalLibrary}/${name}/details.md`; + } + return relativePath === `icons/${name}/details.md`; +}); + const iconPath = computed(() => { if (props.icon.externalLibrary) { - return `icons/${props.icon.externalLibrary}/${props.icon.name}`; + return `/icons/${props.icon.externalLibrary}/${props.icon.name}/details`; } - return `icons/${props.icon.name}`; + return `/icons/${props.icon.name}/details`; }); @@ -79,7 +88,7 @@ const iconPath = computed(() => {