From 53cf71f21efac415dd56ad0ca7bb8b608f54bade Mon Sep 17 00:00:00 2001 From: Reinier Klarenberg Date: Thu, 13 Jun 2024 19:56:05 +0200 Subject: [PATCH] add better meta tags for guides and news --- src/app/pages/guide/[slug].page.ts | 10 ++++++++++ src/app/pages/guide/index.page.ts | 9 +++++++++ src/app/pages/news/[slug].page.ts | 9 +++++++++ src/app/pages/news/index.page.ts | 10 ++++++++++ 4 files changed, 38 insertions(+) diff --git a/src/app/pages/guide/[slug].page.ts b/src/app/pages/guide/[slug].page.ts index d2b36a253..1677b1fdc 100644 --- a/src/app/pages/guide/[slug].page.ts +++ b/src/app/pages/guide/[slug].page.ts @@ -3,6 +3,16 @@ import { injectContent, MarkdownComponent } from '@analogjs/content'; import { AsyncPipe, CommonModule } from '@angular/common'; import PostAttributes from '../../post-attributes'; +import { RouteMeta } from '@analogjs/router'; + +export const routeMeta: RouteMeta = { + meta: [ + { + property: 'og:title', + content: 'Race Element - Guides', + }, + ], +}; @Component({ selector: 'app-guides-post', diff --git a/src/app/pages/guide/index.page.ts b/src/app/pages/guide/index.page.ts index 78417133f..e60dea12c 100644 --- a/src/app/pages/guide/index.page.ts +++ b/src/app/pages/guide/index.page.ts @@ -3,7 +3,16 @@ import { injectContentFiles } from '@analogjs/content'; import PostAttributes from '../../post-attributes'; import { Route, RouterLink } from '@angular/router'; import { CommonModule } from '@angular/common'; +import { RouteMeta } from '@analogjs/router'; +export const routeMeta: RouteMeta = { + meta: [ + { + property: 'og:title', + content: 'Race Element - Guides', + }, + ], +}; @Component({ selector: 'app-guides', diff --git a/src/app/pages/news/[slug].page.ts b/src/app/pages/news/[slug].page.ts index bb341b1b0..15f8d4e8d 100644 --- a/src/app/pages/news/[slug].page.ts +++ b/src/app/pages/news/[slug].page.ts @@ -3,7 +3,16 @@ import { injectContent, MarkdownComponent } from '@analogjs/content'; import { AsyncPipe, CommonModule } from '@angular/common'; import PostAttributes from '../../post-attributes'; +import { RouteMeta } from '@analogjs/router'; +export const routeMeta: RouteMeta = { + meta: [ + { + property: 'og:title', + content: 'Race Element - News', + } + ], +}; @Component({ selector: 'app-news-post', standalone: true, diff --git a/src/app/pages/news/index.page.ts b/src/app/pages/news/index.page.ts index ee56c8d88..692e33a16 100644 --- a/src/app/pages/news/index.page.ts +++ b/src/app/pages/news/index.page.ts @@ -3,6 +3,16 @@ import { injectContentFiles } from '@analogjs/content'; import PostAttributes from '../../post-attributes'; import { RouterLink } from '@angular/router'; import { CommonModule } from '@angular/common'; +import { RouteMeta } from '@analogjs/router'; + +export const routeMeta: RouteMeta = { + meta: [ + { + property: 'og:title', + content: 'Race Element - News', + }, + ], +}; @Component({ selector: 'app-news',