diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7688b5b..65e5693 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,6 +32,8 @@ jobs: run: pnpm generate - name: Deploy via FTP + # Full sync: deletes remote files not present in local build to ensure + # a clean deployment matching the generated output exactly. uses: SamKirkland/FTP-Deploy-Action@v4.3.6 with: server: ${{ secrets.HOST }} diff --git a/app/components/landing/LabsTeaser.vue b/app/components/landing/LabsTeaser.vue index b83efca..a2dcc4c 100644 --- a/app/components/landing/LabsTeaser.vue +++ b/app/components/landing/LabsTeaser.vue @@ -2,14 +2,7 @@ type LabsSection = { title: string description: string - link: { - label: string - icon?: string - to?: string - color?: 'primary' | 'neutral' | 'success' | 'warning' | 'error' | 'info' - variant?: 'solid' | 'outline' | 'subtle' | 'soft' | 'ghost' | 'link' - target?: '_blank' | '_self' - } + link: ContentButton } defineProps<{ diff --git a/app/components/landing/SpeakingTeaser.vue b/app/components/landing/SpeakingTeaser.vue index bdc458a..2c2791b 100644 --- a/app/components/landing/SpeakingTeaser.vue +++ b/app/components/landing/SpeakingTeaser.vue @@ -3,14 +3,7 @@ type SpeakingSection = { title: string description: string note?: string - link: { - label: string - icon?: string - to?: string - color?: 'primary' | 'neutral' | 'success' | 'warning' | 'error' | 'info' - variant?: 'solid' | 'outline' | 'subtle' | 'soft' | 'ghost' | 'link' - target?: '_blank' | '_self' - } + link: ContentButton } defineProps<{ diff --git a/app/composables/usePageSeo.ts b/app/composables/usePageSeo.ts new file mode 100644 index 0000000..13a2351 --- /dev/null +++ b/app/composables/usePageSeo.ts @@ -0,0 +1,20 @@ +type SeoInput = { + title?: string + description?: string + seo?: { + title?: string + description?: string + } | null +} + +export function usePageSeo(page: SeoInput) { + const title = page.seo?.title ?? page.title + const description = page.seo?.description ?? page.description + + useSeoMeta({ + title, + ogTitle: title, + description, + ogDescription: description + }) +} diff --git a/app/pages/index.vue b/app/pages/index.vue index 093770d..266f61c 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -23,12 +23,9 @@ if (!page.value) { }) } -useSeoMeta({ - title: page.value?.seo.title || page.value?.title, - ogTitle: page.value?.seo.title || page.value?.title, - description: page.value?.seo.description || page.value?.description, - ogDescription: page.value?.seo.description || page.value?.description -}) +usePageSeo(page.value) + +defineOgImage()