From fa0435efdf9e7eb42bae254d1dc5fc193d9bc635 Mon Sep 17 00:00:00 2001 From: webfussel Date: Wed, 11 Jun 2025 18:49:19 +0200 Subject: [PATCH] add: more SEO meta More seometa, better markdown parser --- app/app.vue | 2 -- app/components/Section/Booking.vue | 6 +++--- app/components/Section/Flatrate.vue | 6 +++--- app/pages/booking.vue | 7 +++++++ app/pages/contact.vue | 7 +++++++ app/pages/flatrate.vue | 7 +++++++ app/pages/index.vue | 5 +++++ app/pages/references.vue | 9 ++++++++- app/{composables/faq.ts => utils/markdown.ts} | 15 +++++++++++---- content/snippets/faq/booking.md | 2 +- 10 files changed, 52 insertions(+), 14 deletions(-) rename app/{composables/faq.ts => utils/markdown.ts} (52%) diff --git a/app/app.vue b/app/app.vue index 52b2164..c876d24 100755 --- a/app/app.vue +++ b/app/app.vue @@ -8,8 +8,6 @@ diff --git a/app/pages/contact.vue b/app/pages/contact.vue index a19ef5d..867bfbf 100755 --- a/app/pages/contact.vue +++ b/app/pages/contact.vue @@ -3,3 +3,10 @@ + + \ No newline at end of file diff --git a/app/pages/flatrate.vue b/app/pages/flatrate.vue index c1c2191..1eb8f68 100755 --- a/app/pages/flatrate.vue +++ b/app/pages/flatrate.vue @@ -3,3 +3,10 @@ + + \ No newline at end of file diff --git a/app/pages/index.vue b/app/pages/index.vue index 206f51b..72ab00e 100755 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -14,4 +14,9 @@ useHead({ { rel: 'icon', href: '/favicon.ico', type: 'image/x-icon' }, ], }) + +useSeoMeta({ + title: 'Home', + description: 'Webprojekte und Retainer mit Fusselqualität. Du brauchst eine Website mit CMS? Bock auf Flatrate? webfussel by Fiona Urban', +}) \ No newline at end of file diff --git a/app/pages/references.vue b/app/pages/references.vue index e586151..3b724af 100755 --- a/app/pages/references.vue +++ b/app/pages/references.vue @@ -2,4 +2,11 @@
- \ No newline at end of file + + + \ No newline at end of file diff --git a/app/composables/faq.ts b/app/utils/markdown.ts similarity index 52% rename from app/composables/faq.ts rename to app/utils/markdown.ts index c8ce67c..adeaec8 100644 --- a/app/composables/faq.ts +++ b/app/utils/markdown.ts @@ -1,5 +1,12 @@ import type { MinimalElement, MinimalNode } from '@nuxt/content' +type TypedRecord = Record + +type PlainText = { + meta: TypedRecord + text: string +} + const extractText = (element ?: MinimalNode) : string => { if (!element) return '' if (typeof element === 'string') return element @@ -7,13 +14,13 @@ const extractText = (element ?: MinimalNode) : string => { return nodes?.map((el : MinimalNode) => typeof el === 'string' ? el : extractText(el)).join(' ') ?? '' } -export const usePlainFaq = (body ?: MinimalNode[]) => { +export const generatePlainText = (body ?: MinimalNode[]) : PlainText[] => { if (!body) return [] - return body.map(part => { + return body.map>(part => { const [, meta] = part as MinimalElement return { - question: meta.title, - answer: extractText(part).replace(/\n/g, ' ') + meta : meta as TypedRecord, + text: extractText(part).replace(/\n/g, ' ') } }) } diff --git a/content/snippets/faq/booking.md b/content/snippets/faq/booking.md index 72baf1c..2af58b4 100644 --- a/content/snippets/faq/booking.md +++ b/content/snippets/faq/booking.md @@ -63,5 +63,5 @@ 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"}. +Du findest weitere Kontaktmöglichkeiten auf meiner [Kontakt-Seite ](/contact/){class="text inline-flex-row"}. :: \ No newline at end of file