Present FOLX as a music news publisher and unify site SEO
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
export const SITE_URL = "https://folx.tv";
|
||||
export const HOME_TITLE = "Schlager & Volksmusik News";
|
||||
export const HOME_DESCRIPTION = "Aktuelle Schlager- und Volksmusik-News, Künstler-Interviews und Nachrichten aus der Musikszene. Jetzt Artikel und Videos auf FOLX TV entdecken.";
|
||||
|
||||
export function publisherSchema(base = SITE_URL) {
|
||||
return {
|
||||
"@type": "NewsMediaOrganization",
|
||||
"@id": `${base}/#organization`,
|
||||
name: "Folx Music Television",
|
||||
alternateName: "FOLX TV",
|
||||
url: base,
|
||||
description: HOME_DESCRIPTION,
|
||||
logo: { "@type": "ImageObject", url: `${base}/og-image.jpg` },
|
||||
sameAs: ["https://www.facebook.com/folxtv", "https://www.instagram.com/folxtv", "https://www.youtube.com/@folxmtv"],
|
||||
};
|
||||
}
|
||||
|
||||
export function homeSchema(base = SITE_URL) {
|
||||
return { "@context": "https://schema.org", "@graph": [
|
||||
publisherSchema(base),
|
||||
{ "@type": "WebSite", "@id": `${base}/#website`, url: `${base}/`,
|
||||
name: "FOLX TV", alternateName: "Folx Music Television", description: HOME_DESCRIPTION,
|
||||
inLanguage: "de-DE", publisher: { "@id": `${base}/#organization` },
|
||||
potentialAction: { "@type": "SearchAction", target: { "@type": "EntryPoint", urlTemplate: `${base}/search?q={search_term_string}` }, "query-input": "required name=search_term_string" } },
|
||||
{ "@type": "CollectionPage", "@id": `${base}/#webpage`, url: `${base}/`,
|
||||
name: `${HOME_TITLE} | FOLX TV`, description: HOME_DESCRIPTION, inLanguage: "de-DE",
|
||||
isPartOf: { "@id": `${base}/#website` }, publisher: { "@id": `${base}/#organization` },
|
||||
hasPart: { "@type": "CollectionPage", "@id": `${base}/category/News#webpage`, url: `${base}/category/News`, name: "News" } }
|
||||
] };
|
||||
}
|
||||
|
||||
export function articleModifiedTime(content: string, published: string): string {
|
||||
const marker = /<!--folx-updated:([^>]+?)-->/.exec(content || "");
|
||||
const time = marker ? new Date(marker[1]).getTime() : NaN;
|
||||
return Number.isFinite(time) && time >= new Date(published).getTime() && time <= Date.now()
|
||||
? new Date(time).toISOString() : published;
|
||||
}
|
||||
|
||||
export function articleGenre(content: string) {
|
||||
const marker = /<!--\s*folx-badge:\s*([^>]*?)\s*-->/i.exec(content || "");
|
||||
const badge = (marker ? marker[1] : "MUSIC NEWS").toUpperCase();
|
||||
return badge === "MUSIC NEWS"
|
||||
? { words: ["Volksmusik", "Schlager", "Musik News"], section: "Musik News" }
|
||||
: { words: ["Star News", "Promi News", "Promi"], section: "Star News" };
|
||||
}
|
||||
|
||||
export const INFO_SEO: Record<string, { title: string; description: string; type: string }> = {
|
||||
"/ueber-uns": { title: "Über FOLX TV – Musik-News, Interviews und Fernsehen", description: "FOLX TV verbindet aktuelle Schlager- und Volksmusik-News mit Künstler-Interviews, Videos und eigenen TV-Produktionen. Mehr über unser Angebot.", type: "AboutPage" },
|
||||
"/kontakt": { title: "Kontakt", description: "Kontakt zu FOLX TV: Fragen zu Artikeln, Musik-News, Interviews und unserem Programm. Schreiben Sie uns über das Kontaktformular.", type: "ContactPage" },
|
||||
"/impressum": { title: "Impressum", description: "Anbieterangaben und rechtliche Informationen zu FOLX TV und dem Nachrichtenangebot auf folx.tv.", type: "WebPage" },
|
||||
"/datenschutz": { title: "Datenschutz", description: "Informationen zum Datenschutz und zur Verarbeitung personenbezogener Daten auf folx.tv.", type: "WebPage" },
|
||||
"/empfang-folx-tv": { title: "FOLX TV empfangen – Livestream, App, Kabel und IPTV", description: "Informationen zum Empfang des FOLX TV Fernsehprogramms: Livestream, Apps sowie Kabel und IPTV in Deutschland, Österreich und der Schweiz.", type: "WebPage" }
|
||||
};
|
||||
Reference in New Issue
Block a user