From ca3868299c21e686f8adfeb68d45819e14a8971c Mon Sep 17 00:00:00 2001 From: webfussel Date: Wed, 11 Jun 2025 14:14:49 +0200 Subject: [PATCH] add: extract plain faq Add Schema Org for FAQ in Flatrate --- app/components/Section/Flatrate.vue | 18 +++++++++++++++++- app/utils/socials.ts | 12 ++++++------ content/snippets/faq/booking.md | 2 ++ 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/components/Section/Flatrate.vue b/app/components/Section/Flatrate.vue index 7b3e2ee..4c74a38 100755 --- a/app/components/Section/Flatrate.vue +++ b/app/components/Section/Flatrate.vue @@ -138,5 +138,21 @@ const flatrate : Service[] = } ] -const faq = await queryCollection('faq').path('/snippets/faq/flatrate').first() +const { data : faq } = await useAsyncData('faq', () => queryCollection('faq').path('/snippets/faq/flatrate').first()) +const texts = usePlainFaq(faq.value?.body.value) + +if (faq) { + useSchemaOrg({ + '@context': 'https://schema.org', + '@type': 'FAQPage', + 'mainEntity': texts.map(entity => ({ + '@type': 'Question', + 'name': entity.question, + 'acceptedAnswer': { + '@type': 'Answer', + 'text': entity.answer, + }, + })) + }) +} diff --git a/app/utils/socials.ts b/app/utils/socials.ts index 8c5eb5e..8178280 100644 --- a/app/utils/socials.ts +++ b/app/utils/socials.ts @@ -18,12 +18,12 @@ export const socials = [ name: '@webfussel.de', 'aria-label': 'Externer Link: Bluesky Profil' }, - { - href: 'https://twitch.tv/webfussel', - icon: 'ph:twitch-logo-duotone', - name: 'webfussel', - 'aria-label': 'Externer Link: Twitch Kanal' - }, + // { + // href: 'https://twitch.tv/webfussel', + // icon: 'ph:twitch-logo-duotone', + // name: 'webfussel', + // 'aria-label': 'Externer Link: Twitch Kanal' + // }, { href: 'https://ko-fi.com/webfussel', icon: 'wf:kofi', diff --git a/content/snippets/faq/booking.md b/content/snippets/faq/booking.md index a0d5180..72baf1c 100644 --- a/content/snippets/faq/booking.md +++ b/content/snippets/faq/booking.md @@ -62,4 +62,6 @@ title: "Ich hab ein cooles Projekt! Aber kein Geld …" Tja. Ne, awas. Meld dich einfach trotzdem über meine E-Mail-Adresse und vielleicht finden wir eine Lösung. + +Du findest weitere Kontaktmöglichkeiten auf meiner [Kontakt-Seite ](contact/){class="text inline-flex-row"}. :: \ No newline at end of file