Porządkowanie kodu, dodanie sekcji wyszukiwania kanałów

This commit is contained in:
dm
2025-12-12 19:48:53 +01:00
parent bf67147cf5
commit 5822237745
47 changed files with 17203 additions and 15686 deletions

View File

@@ -2,27 +2,21 @@
import yaml from "js-yaml";
import fs from "fs";
// SEO z YAML (np. import seo from "../content/seo/home.yaml")
const seo = Astro.props.seo ?? {};
// Global SEO (site + company)
const globalSeo = yaml.load(
fs.readFileSync("./src/content/seo/home.yaml", "utf8")
fs.readFileSync("./src/content/home/seo.yaml", "utf8")
);
const { site, company } = globalSeo;
// Page SEO (sekcja "page" w YAML)
const page = seo.page ?? {};
// FINAL VALUES
const title = page.title ?? site.name;
const description = page.description ?? site.description;
const image = page.image ?? site.logo;
const canonical = site.url + (page.url ?? "/");
const keywords = page.keywords ?? [];
// Extra structured data (optional)
const extraSchema = page.schema ?? null;
// JSON-LD objects