From d6859cdaad5de3c0e34186afefe066f0fa4b8678 Mon Sep 17 00:00:00 2001 From: webfussel Date: Sat, 14 Jun 2025 10:23:46 +0200 Subject: [PATCH] add: SEO for articles SEO and SchemaORg for articles --- app/assets/css/blog/article.css | 28 ++++++++++++- app/assets/css/blog/card.css | 1 + app/assets/css/global.css | 9 ++++ app/components/Blog/Author.vue | 18 ++++++-- app/components/Blog/Card.vue | 12 +----- app/components/Section/Intro.vue | 10 +++-- app/error.vue | 20 +++++++++ app/pages/blog/[slug].vue | 43 ++++++++++++++++---- app/pages/blog/index.vue | 21 ++++++---- app/utils/error.ts | 15 +++++++ content.config.ts | 10 ++--- content/blog/0000.start.md | 25 ++++++------ content/blog/0001.entry1.md | 18 -------- content/blog/0002.entry2.md | 18 -------- content/blog/0003.entry3.md | 18 -------- content/blog/0004.entry4.md | 18 -------- public/img/blog/authors/webfussel@1x.webp | Bin 0 -> 458 bytes public/img/blog/authors/webfussel@2x.webp | Bin 0 -> 1038 bytes public/img/blog/authors/webfussel@3x.webp | Bin 0 -> 1712 bytes public/img/blog/posts/0000.start.webp | Bin 0 -> 8528 bytes public/img/blog/posts/0000.start_thumb.webp | Bin 0 -> 8516 bytes server/routes/blog/posts.json.ts | 39 ++++++++++++++++++ 22 files changed, 198 insertions(+), 125 deletions(-) create mode 100644 app/error.vue create mode 100644 app/utils/error.ts delete mode 100644 content/blog/0001.entry1.md delete mode 100644 content/blog/0002.entry2.md delete mode 100644 content/blog/0003.entry3.md delete mode 100644 content/blog/0004.entry4.md create mode 100644 public/img/blog/authors/webfussel@1x.webp create mode 100644 public/img/blog/authors/webfussel@2x.webp create mode 100644 public/img/blog/authors/webfussel@3x.webp create mode 100644 public/img/blog/posts/0000.start.webp create mode 100644 public/img/blog/posts/0000.start_thumb.webp create mode 100644 server/routes/blog/posts.json.ts diff --git a/app/assets/css/blog/article.css b/app/assets/css/blog/article.css index f1afd46..b01583c 100644 --- a/app/assets/css/blog/article.css +++ b/app/assets/css/blog/article.css @@ -3,14 +3,39 @@ flex-direction: column; gap: 2rem; + & .meta { + display: flex; + gap: 1rem; + align-items: center; + } + + & .article-content { + background: var(--color-black); + border-radius: 1rem; + } + + & .article-text { + padding: 2rem; + } + + & header { + padding: 2rem 2rem 0; + } + h1 { font-size: 2rem; } + h2 { + font-size: 1.5rem; + font-style: italic; + font-weight: lighter; + } + & .image { width: 100%; height: 450px; - border-radius: 1rem; + border-radius: 1rem 1rem 0 0; overflow: hidden; background: #000; @@ -19,6 +44,7 @@ height: 100%; opacity: .8; object-fit: cover; + object-position: center; } } } \ No newline at end of file diff --git a/app/assets/css/blog/card.css b/app/assets/css/blog/card.css index 7e868db..7b067c7 100644 --- a/app/assets/css/blog/card.css +++ b/app/assets/css/blog/card.css @@ -15,6 +15,7 @@ & > .image { flex: 0 0 200px; width: 100%; + overflow: hidden; & img { height: 100%; diff --git a/app/assets/css/global.css b/app/assets/css/global.css index 8396b49..2e23894 100755 --- a/app/assets/css/global.css +++ b/app/assets/css/global.css @@ -159,6 +159,15 @@ span.chip { width: max-content; transition: var(--transition-time); + &.interactive { + cursor: pointer; + + &:hover { + background: var(--color-orange-dark); + color: var(--color-white); + } + } + &:not(.dark) { --background: var(--color-orange); --color: var(--color-black); diff --git a/app/components/Blog/Author.vue b/app/components/Blog/Author.vue index 6045e67..45f4e40 100644 --- a/app/components/Blog/Author.vue +++ b/app/components/Blog/Author.vue @@ -1,7 +1,15 @@ \ No newline at end of file diff --git a/app/components/Blog/Card.vue b/app/components/Blog/Card.vue index 8f1546d..ba33f0e 100644 --- a/app/components/Blog/Card.vue +++ b/app/components/Blog/Card.vue @@ -10,15 +10,11 @@

- {{ generatePlainText(excerpt.value).at(0)?.text ?? '' }} + {{ description }}

- -
- tags - {{ tag }} -
+
@@ -26,20 +22,16 @@ \ No newline at end of file diff --git a/app/pages/blog/[slug].vue b/app/pages/blog/[slug].vue index 0195bc6..ef69662 100644 --- a/app/pages/blog/[slug].vue +++ b/app/pages/blog/[slug].vue @@ -5,29 +5,54 @@ Zurück zur Übersicht -

- Sorry bro, aber der Artikel existiert einfach nicht. -

- -
+
+
+ Artikelbild +
-
- Artikelbild +
+ + +

{{ article.title }}

{{ article.description }}

-
+
-
+