Files
Orchestrator/privat/CV/andreknie.de/src/components/seo.js
T

17 lines
787 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
}