fix(andreknie.de): normalize SEO metadata and document structure
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
export const SITE_URL = 'https://andreknie.de'
|
||||
export const BRAND_SUFFIX = ' | Dr. André Knie'
|
||||
export const DEFAULT_TITLE = 'Dr. André Knie – Digitale Souveränität und KI'
|
||||
export const DEFAULT_DESCRIPTION = 'Dr. André Knie unterstützt Organisationen dabei, digitale Souveränität zu erlangen und sicher von KI zu profitieren.'
|
||||
export const DEFAULT_IMAGE = '/images/andre-knie.webp'
|
||||
|
||||
export function absoluteUrl(value, fallback) {
|
||||
const candidate = value || fallback
|
||||
if (/^https?:\/\//i.test(candidate)) return candidate
|
||||
return new URL(candidate.startsWith('/') ? candidate : `/${candidate}`, SITE_URL).href
|
||||
}
|
||||
|
||||
export function normalizeTitle(title) {
|
||||
if (!title) return DEFAULT_TITLE
|
||||
return title.endsWith(BRAND_SUFFIX) ? title.slice(0, -BRAND_SUFFIX.length) : title
|
||||
}
|
||||
Reference in New Issue
Block a user