diff --git a/astro-pages-dump.txt b/astro-pages-dump.txt new file mode 100644 index 0000000..90f9481 --- /dev/null +++ b/astro-pages-dump.txt @@ -0,0 +1,1425 @@ +ASTRO DUMP (root: D:\DARIUSZM\Desktop\fuz-site\src\pages) +Found files: 11 +================================================================================ + +FILE: src/pages/dokumenty/[slug].astro +-------------------------------------------------------------------------------- +--- +import DefaultLayout from "../../layouts/DefaultLayout.astro"; +import Markdown from "../../islands/Markdown.jsx"; +import { marked } from "marked"; +import { getDocumentBySlug } from "../../lib/documents"; +import "../../styles/document.css"; + +const { slug } = Astro.params; + +const doc = slug ? getDocumentBySlug(slug) : null; +if (!doc || doc.visible !== true) { + return Astro.redirect("/dokumenty", 302); +} + +const html = marked.parse(doc.content); +--- + + +
+
+ + ← Wróć do dokumentów + + +

+ {doc.title} +

+ +
+ +
+
+
+
+ +================================================================================ + +FILE: src/pages/dokumenty/index.astro +-------------------------------------------------------------------------------- +--- +import DefaultLayout from "../../layouts/DefaultLayout.astro"; +import yaml from "js-yaml"; +import fs from "node:fs"; +import Markdown from "../../islands/Markdown.jsx"; +import "../../styles/document.css"; + +type DocFile = { + nazwa?: string; + file?: string; + slug?: string; +}; + +type DocGroup = { + tytul?: string; + pliki?: DocFile[]; +}; + +type DocsYaml = { + tytul?: string; + opis?: string; + grupy?: Record; +}; + +const doc = yaml.load( + fs.readFileSync("./src/content/document/documents.yaml", "utf8"), +) as DocsYaml; + +const pageTitle = doc?.tytul; +const pageDesc = doc?.opis; + +const groups = doc?.grupy ?? {}; +const left = groups["otworz"] ?? {}; +const right = groups["pobierz"] ?? {}; + +function normalizePublicHref(input?: string) { + let s = String(input ?? "").trim(); + if (!s) return ""; + if (s.startsWith("/public/")) s = s.replace("/public", ""); + s = s.replace(/ /g, "%20"); + return s; +} +--- + + +
+
+ +
+

{left.tytul ?? "Przeczytaj"}

+ + {!left.pliki?.length ? ( +

Brak dokumentów.

+ ) : ( +
+ {left.pliki.map((p) => ( + p.slug ? ( + +
{p.nazwa}
+
+ ) : null + ))} +
+ )} +
+ +
+

{right.tytul ?? "Pobierz"}

+ + {!right.pliki?.length ? ( +

Brak plików.

+ ) : ( +
+ {right.pliki.map((p) => { + const href = normalizePublicHref(p.file); + if (!href) return null; + + return ( + +
{p.nazwa}
+
+ ); + })} +
+ )} +
+ +
+
+
+ +================================================================================ + +FILE: src/pages/index.astro +-------------------------------------------------------------------------------- +--- +import DefaultLayout from "../layouts/DefaultLayout.astro"; +import Hero from "../components/hero/Hero.astro"; +import SectionRenderer from "../components/sections/SectionRenderer.astro" + +import yaml from "js-yaml"; +import fs from "fs"; + +const seo = yaml.load(fs.readFileSync("./src/content/home/seo.yaml", "utf8")); +const hero = yaml.load(fs.readFileSync("./src/content/home/hero.yaml", "utf8")); +--- + + + + + + +================================================================================ + +FILE: src/pages/internet-swiatlowodowy/index.astro +-------------------------------------------------------------------------------- +--- +import path from "node:path"; + +import DefaultLayout from "../../layouts/DefaultLayout.astro"; +import SectionRenderer from "../../components/sections/SectionRenderer.astro"; +import InternetCards from "../../islands/Internet/InternetCards.jsx"; + +import { loadYamlFile } from "../../lib/loadYaml"; + +type SeoYaml = any; + +type InternetParam = { klucz: string; label: string; value: string | number }; +type InternetCena = { + budynek: number | string; + umowa: number | string; + miesiecznie: number; + aktywacja?: number; +}; +type InternetCard = { + nazwa: string; + widoczny?: boolean; + popularny?: boolean; + parametry?: InternetParam[]; + ceny?: InternetCena[]; +}; +type InternetCardsYaml = { + tytul?: string; + opis?: string; + uwaga?: string; + waluta?: string; + cena_opis?: string; + cards?: InternetCard[]; +}; + +type PhoneParam = { klucz: string; label: string; value: string | number }; +type PhoneCard = { + nazwa: string; + widoczny?: boolean; + popularny?: boolean; + cena?: { wartosc: number; opis?: string }; + parametry?: PhoneParam[]; +}; +type PhoneCardsYaml = { cards?: PhoneCard[] }; + +type Addon = { + id: string; + nazwa: string; + typ?: string; + ilosc?: boolean; + min?: number; + max?: number; + krok?: number; + opis?: string; + cena: number; +}; +type AddonsYaml = { cena_opis?: string; dodatki?: Addon[] }; + +const seo = loadYamlFile( + path.join( + process.cwd(), + "src", + "content", + "internet-swiatlowodowy", + "seo.yaml", + ), +); + +const data = loadYamlFile( + path.join( + process.cwd(), + "src", + "content", + "internet-swiatlowodowy", + "cards.yaml", + ), +); + +const phoneData = loadYamlFile( + path.join(process.cwd(), "src", "content", "telefon", "cards.yaml"), +); + +const addonsData = loadYamlFile( + path.join( + process.cwd(), + "src", + "content", + "internet-swiatlowodowy", + "addons.yaml", + ), +); + +const tytul = data?.tytul ?? ""; +const opis = data?.opis ?? "Wybierz rodzaj budynku i czas trwania umowy"; +const uwaga = data?.uwaga ?? ""; + +const waluta = data?.waluta ?? "PLN"; +const cenaOpis = data?.cena_opis ?? "zł/mies."; + +const cards = ( + Array.isArray(data?.cards) + ? data.cards.filter((c) => c?.widoczny === true) + : [] +) as InternetCard[]; + +const phoneCards = ( + Array.isArray(phoneData?.cards) + ? phoneData.cards.filter((c) => c?.widoczny === true) + : [] +) as PhoneCard[]; + +const addons = ( + Array.isArray(addonsData?.dodatki) ? addonsData.dodatki : [] +) as Addon[]; + +const addonsCenaOpis = addonsData?.cena_opis ?? cenaOpis; + +type SwitchOption = { id: string | number; nazwa: string }; +type SwitchDef = { + id: string; + etykieta?: string; + title?: string; + domyslny?: string | number; + opcje: SwitchOption[]; +}; +type SwitchesYaml = { switches?: SwitchDef[] }; + +const switchesData = loadYamlFile( + path.join(process.cwd(), "src", "content", "site", "switches.yaml"), +); + +const switches = ( + Array.isArray(switchesData?.switches) ? switchesData.switches : [] +) as SwitchDef[]; +--- + + +
+
+ +

* {uwaga}

+
+
+ + +
+ +================================================================================ + +FILE: src/pages/internet-telewizja/index.astro +-------------------------------------------------------------------------------- +--- +import path from "node:path"; + +import DefaultLayout from "../../layouts/DefaultLayout.astro"; +import SectionRenderer from "../../components/sections/SectionRenderer.astro"; +import JamboxCards from "../../islands/jambox/JamboxCards.jsx"; +import SectionChannelsSearch from "../../components/sections/SectionChannelsSearch.astro"; + +import { loadYamlFile } from "../../lib/loadYaml"; + +type SeoYaml = any; + +type Param = { klucz: string; label: string; value: string | number }; +type Cena = { + budynek: number | string; + umowa: number | string; + miesiecznie: number; + aktywacja?: number; +}; +type Card = { + id?: string; + source?: string; + tid?: number; + nazwa: string; + slug?: string; + widoczny?: boolean; + popularny?: boolean; + parametry?: Param[]; + ceny?: Cena[]; +}; + +type CardsYaml = { + tytul?: string; + opis?: string; + uwaga?: string; + waluta?: string; + cena_opis?: string; + internet_parametry_wspolne?: Param[]; + cards?: Card[]; +}; + +type PhoneParam = { klucz: string; label: string; value: string | number }; +type PhoneCard = { + id?: string; + nazwa: string; + widoczny?: boolean; + popularny?: boolean; + cena?: { wartosc: number; opis?: string }; + parametry?: PhoneParam[]; +}; +type PhoneYaml = { cards?: PhoneCard[] }; + +type Decoder = { id: string; nazwa: string; opis: string; cena: number }; + +type Addon = { + id: string; + nazwa: string; + typ?: "checkbox" | "quantity"; + ilosc?: boolean; + min?: number; + max?: number; + krok?: number; + opis?: string; + cena: number; +}; +type AddonsYaml = { + tytul?: string; + opis?: string; + cena_opis?: string; + dekodery?: Decoder[]; + dodatki?: Addon[]; +}; + +const seo = loadYamlFile( + path.join(process.cwd(), "src", "content", "internet-telewizja", "seo.yaml"), +); + +const data = loadYamlFile( + path.join( + process.cwd(), + "src", + "content", + "internet-telewizja", + "cards.yaml", + ), +); + +const tytul = data?.tytul ?? ""; +const opis = data?.opis ?? "Wybierz rodzaj budynku i czas trwania umowy"; +const uwaga = data?.uwaga ?? ""; + +const waluta = data?.waluta ?? "PLN"; +const cenaOpis = data?.cena_opis ?? "zł/mies."; + +const internetWspolne: Param[] = Array.isArray(data?.internet_parametry_wspolne) + ? data.internet_parametry_wspolne + : []; + +const cards: Card[] = Array.isArray(data?.cards) + ? data.cards.filter((c) => c?.widoczny === true) + : []; + +const phoneYaml = loadYamlFile( + path.join(process.cwd(), "src", "content", "telefon", "cards.yaml"), +); + +const tvAddonsYaml = loadYamlFile( + path.join(process.cwd(), "src", "content", "internet-telewizja", "tv-addons.yaml"), +); + +const phoneCards = Array.isArray(phoneYaml?.cards) ? phoneYaml.cards : []; +const tvAddons = Array.isArray(tvAddonsYaml?.dodatki) ? tvAddonsYaml.dodatki : []; + +const addonsYaml = loadYamlFile( + path.join( + process.cwd(), + "src", + "content", + "internet-telewizja", + "addons.yaml", + ), +); +const addons: Addon[] = Array.isArray(addonsYaml?.dodatki) + ? addonsYaml.dodatki + : []; + +const decoders: Decoder[] = Array.isArray(addonsYaml?.dekodery) + ? addonsYaml.dekodery + : []; + +const addonsCenaOpis = addonsYaml?.cena_opis ?? cenaOpis; + +type SwitchOption = { id: string | number; nazwa: string }; +type SwitchDef = { + id: string; + etykieta?: string; + title?: string; + domyslny?: string | number; + opcje: SwitchOption[]; +}; +type SwitchesYaml = { switches?: SwitchDef[] }; + +const switchesYaml = loadYamlFile( + path.join(process.cwd(), "src", "content", "site", "switches.yaml"), +); + +const switches: SwitchDef[] = Array.isArray(switchesYaml?.switches) + ? switchesYaml.switches + : []; + +--- + + +
+
+ +

* {uwaga}

+
+
+ + +
+ +================================================================================ + +FILE: src/pages/internet-telewizja/telewizja-mozliwosci.astro +-------------------------------------------------------------------------------- +--- +export const prerender = false; + +import path from "node:path"; +import DefaultLayout from "../../layouts/DefaultLayout.astro"; +import { loadYamlFile } from "../../lib/loadYaml"; +import MozliwosciSearch from "../../islands/jambox/JamboxMozliwosciSearch.jsx"; + +type YamlSection = { + title: string; + image?: string; + content?: string; +}; + +type YamlData = { + sections?: YamlSection[]; +}; + +function slugify(s: string) { + return String(s || "") + .toLowerCase() + .replace(/[\u0105]/g, "a") + .replace(/[\u0107]/g, "c") + .replace(/[\u0119]/g, "e") + .replace(/[\u0142]/g, "l") + .replace(/[\u0144]/g, "n") + .replace(/[\u00f3]/g, "o") + .replace(/[\u015b]/g, "s") + .replace(/[\u017a\u017c]/g, "z") + .replace(/[^a-z0-9]+/g, "-") + .replace(/(^-|-$)/g, ""); +} + +let items: Array<{ + id: string; + title: string; + image?: string; + content: string; +}> = []; + +let err = ""; + +try { + const data = loadYamlFile( + path.join( + process.cwd(), + "src", + "content", + "internet-telewizja", + "telewizja-mozliwosci.yaml" + ) + ); + + const sections = Array.isArray(data?.sections) ? data.sections : []; + + items = sections + .filter((s) => s?.title) + .map((s) => ({ + id: slugify(s.title), + title: s.title, + image: s.image, + content: (s.content || "").trim(), + })) + .filter((x) => x.content); +} catch (e) { + err = e instanceof Error ? e.message : String(e); +} +--- + + + +
+
+

Możliwości JAMBOX

+ +
+

Funkcje i udogodnienia dostępne w JAMBOX.

+
+ + {!err && } +
+ + { + err && ( +
+

Nie udało się wczytać danych

+

{err}

+
+ ) + } +
+ + {/* UWAGA: render sekcji przeniesiony do wyspy, żeby filtr działał */} +
+ +================================================================================ + +FILE: src/pages/kontakt/index.astro +-------------------------------------------------------------------------------- +--- +import path from "node:path"; +import DefaultLayout from "../../layouts/DefaultLayout.astro"; +import MapGoogle from "../../components/maps/MapGoogle.astro"; +import Markdown from "../../islands/Markdown.jsx"; +import { loadYamlFile } from "../../lib/loadYaml"; +import "../../styles/contact.css"; + +type SeoYaml = any; +const seo = loadYamlFile( + path.join(process.cwd(), "src", "content", "contact", "seo.yaml"), +); + +type ContactData = any; +const data = loadYamlFile( + path.join(process.cwd(), "src", "content", "contact", "contact.yaml"), +); + +const apiKey = import.meta.env.PUBLIC_GOOGLE_MAPS_KEY; +const form = data.form; +--- + + +
+
+
+

{data.title}

+ +
+ +
+

{data.contactFormTitle}

+ +
+
+ + +
+ +
+ + +
+ + + + + + + + + + + +
+
+
+ +
+
+ +
+
+ +
+
+ + + + + +
+ +================================================================================ + +FILE: src/pages/mapa-zasiegu/index.astro +-------------------------------------------------------------------------------- +--- +import DefaultLayout from "../../layouts/DefaultLayout.astro"; +import MapGoogle from "../../components/maps/MapGoogle.astro"; +import RangeForm from "../../islands/RangeForm.jsx"; + +import "../../styles/map-google.css"; + +const apiKey = import.meta.env.PUBLIC_GOOGLE_MAPS_KEY; +const lat = 52.597388; +const lon = 21.456797; +const mapStyleId = "8e0a97af9476f2d3"; +--- + + + + +
+ + + + +
+ +
+
+ + + + +
+ +================================================================================ + +FILE: src/pages/premium/[tid].astro +-------------------------------------------------------------------------------- +--- +import DefaultLayout from "../../layouts/DefaultLayout.astro"; +import yaml from "js-yaml"; +import fs from "node:fs"; +import Markdown from "../../islands/Markdown.jsx"; +import AddonChannelsGrid from "../../islands/jambox/AddonChannelsModal.jsx"; +import "../../styles/jambox-tematyczne.css"; + +type AddonPriceRow = { + pakiety?: string[] | any; + "12m"?: number | string; + bezterminowo?: number | string; +}; + +type TvAddon = { + id?: string; + nazwa?: string; + tid?: number; + typ?: string; + opis?: string; + image?: string; + cena?: AddonPriceRow[]; + group?: string; + group_mode?: string; +}; + +type GroupCta = { + label?: string; + href?: string; + title?: string; + opis?: string; +}; + +type GroupMeta = { + tytul?: string; + rejestracja?: GroupCta; +}; + +type TvAddonsDoc = { + tytul?: string; + opis?: string; + dodatki?: TvAddon[]; + grupy?: Record; +}; + +const doc = yaml.load( + fs.readFileSync("./src/content/internet-telewizja/tv-addons.yaml", "utf8"), +) as TvAddonsDoc; + +const addons = Array.isArray(doc?.dodatki) ? doc.dodatki : []; +const groupMeta = doc?.grupy ?? {}; + +const tid = Number(Astro.params.tid); +const picked = addons.find((a) => Number(a?.tid) === tid); + +if (!picked) { + return new Response("Nie znaleziono pakietu.", { status: 404 }); +} + +const pickedGroup = String(picked?.group ?? "").trim(); + +const viewAddons = pickedGroup + ? addons.filter((a) => String(a?.group ?? "").trim() === pickedGroup) + : [picked]; + +const footerCta = + pickedGroup ? groupMeta[pickedGroup]?.rejestracja : undefined; +--- + + + { + viewAddons.map((addon, index) => { + const pkgName = String(addon?.nazwa ?? "").trim(); + const hasYamlImage = !!String(addon?.image ?? "").trim(); + const assumeHasMedia = pkgName || hasYamlImage; + const isAboveFold = index === 0; + + return ( +
+
+ {/* MEDIA — odpowiednik */} +
+ {pkgName ? ( + + ) : null} +
+ + {/* TEKST */} +
+ {pkgName &&

{pkgName}

} + {addon?.opis && } +
+
+
+ ); + }) + } + + {footerCta?.href && footerCta?.label ? ( +
+
+
+ {footerCta.opis &&

{footerCta.opis}

} + +
+
+
+ ) : null} +
+ +================================================================================ + +FILE: src/pages/premium/index.astro +-------------------------------------------------------------------------------- +--- +import DefaultLayout from "../../layouts/DefaultLayout.astro"; +import yaml from "js-yaml"; +import fs from "node:fs"; +import Markdown from "../../islands/Markdown.jsx"; +import AddonChannelsGrid from "../../islands/jambox/AddonChannelsModal.jsx"; +import "../../styles/jambox-tematyczne.css"; + +type AddonPriceRow = { + pakiety?: string[] | any; + "12m"?: number | string; + bezterminowo?: number | string; +}; + +type TvAddon = { + id?: string; + nazwa?: string; + tid?: number; + typ?: string; + opis?: string; + image?: string; + cena?: AddonPriceRow[]; + group?: string; + group_mode?: string; +}; + +// ✅ OPCJA A: metadane grupy + CTA +type GroupCta = { + label?: string; + href?: string; + title?: string; + opis?: string; +}; + +type GroupMeta = { + tytul?: string; + rejestracja?: GroupCta; +}; + +type TvAddonsDoc = { + tytul?: string; + opis?: string; + cena_opis?: string; + dodatki?: TvAddon[]; + grupy?: Record; // ✅ +}; + +const doc = yaml.load( + fs.readFileSync("./src/content/internet-telewizja/tv-addons.yaml", "utf8"), +) as TvAddonsDoc; + +const pageTitle = doc?.tytul ?? "Dodatkowe pakiety TV"; +const pageDesc = doc?.opis ?? ""; +const addons: TvAddon[] = Array.isArray(doc?.dodatki) ? doc.dodatki : []; + +const detailsBase = "/pakiety-premium"; + +// ✅ mapa meta grup (np. hbo_max -> { rejestracja: {...} }) +const groupMeta: Record = doc?.grupy ?? {}; + +type Group = { + key: string; + title?: string; + items: TvAddon[]; + groupId?: string; +}; +const groupsMap = new Map(); + +for (const a of addons) { + const g = String(a?.group ?? "").trim(); + const key = g ? `g:${g}` : `s:${a?.tid ?? a?.id ?? a?.nazwa ?? ""}`; + + if (!groupsMap.has(key)) { + groupsMap.set(key, { + key, + groupId: g || undefined, + title: g || undefined, + items: [], + }); + } + groupsMap.get(key)!.items.push(a); +} + +const groups: Group[] = Array.from(groupsMap.values()); +--- + + +
+
+

{pageTitle}

+ {pageDesc && } +
+
+ + { + groups.map((group, groupIndex) => { + const isSingle = group.key.startsWith("s:"); + const gId = String(group.groupId ?? "").trim(); // np. "hbo_max" + const meta = gId ? groupMeta[gId] : undefined; + + const footerCta = meta?.rejestracja; + const footerTitle = + meta?.tytul || (gId ? gId.replace(/_/g, " ") : undefined); + + return ( +
+ + {group.items.map((addon: TvAddon, index: number) => { + const isAboveFold = groupIndex === 0 && index === 0; + + const pkgName = String(addon?.nazwa ?? "").trim(); + const hasYamlImage = !!String(addon?.image ?? "").trim(); + + // ✅ zachowanie jak wcześniej (1 kolumna + ukrycie media gdy brak) + const assumeHasMedia = pkgName ? true : hasYamlImage; + + const href = + addon?.tid != null ? `${detailsBase}/${addon.tid}` : null; + + return ( +
+
+
+ {pkgName &&

{pkgName}

} + + {addon?.opis && } +
+ +
+ {pkgName ? ( + + ) : null} +
+
+
+ ); + })} + + {/* ✅ STOPKA GRUPY: przycisk rejestracji dla całej grupy */} + {!isSingle && footerCta?.href && footerCta?.label ? ( + + ) : null} +
+ ); + }) + } +
+ +================================================================================ + +FILE: src/pages/telefon/index.astro +-------------------------------------------------------------------------------- +--- +import path from "node:path"; + +import DefaultLayout from "../../layouts/DefaultLayout.astro"; +import SectionRenderer from "../../components/sections/SectionRenderer.astro"; +import OffersPhoneCards from "../../islands/phone/PhoneCards.jsx"; + +import { loadYamlFile } from "../../lib/loadYaml"; + +type SeoYaml = any; + +type PhoneParam = { + klucz: string; + label: string; + value: string | number; +}; + +type PhoneCard = { + nazwa: string; + widoczny?: boolean; + popularny?: boolean; + cena?: { wartosc: number; opis?: string }; + parametry?: PhoneParam[]; +}; + +type PhoneCardsYaml = { + tytul?: string; + opis?: string; + cards?: PhoneCard[]; +}; + +const seo = loadYamlFile( + path.join(process.cwd(), "src", "content", "telefon", "seo.yaml"), +); + +const phoneCards = loadYamlFile( + path.join(process.cwd(), "src", "content", "telefon", "cards.yaml"), +); + +const tytul = phoneCards?.tytul ?? ""; +const opis = phoneCards?.opis ?? ""; + +const cards: PhoneCard[] = Array.isArray(phoneCards?.cards) + ? phoneCards.cards.filter((c) => c?.widoczny === true) + : []; +--- + + +
+
+

Usługa telefonu

+ + +
+
+ + +
+ +================================================================================ diff --git a/astro.py b/astro.py new file mode 100644 index 0000000..9d3f231 --- /dev/null +++ b/astro.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from __future__ import annotations + +from pathlib import Path +import argparse +import sys + + +def iter_astro_files(root: Path) -> list[Path]: + """Zwraca listę plików .astro w root (rekursywnie), posortowaną stabilnie.""" + files = [p for p in root.rglob("*.astro") if p.is_file()] + # sortowanie po ścieżce względnej dla powtarzalności + files.sort(key=lambda p: str(p.as_posix()).lower()) + return files + + +def read_text_fallback(p: Path) -> str: + """ + Czyta plik jako tekst: + - najpierw UTF-8 + - jeśli się nie da, to z BOM/latin-1 jako awaryjne (bez crasha) + """ + try: + return p.read_text(encoding="utf-8") + except UnicodeDecodeError: + # Spróbuj UTF-8 z BOM + try: + return p.read_text(encoding="utf-8-sig") + except UnicodeDecodeError: + # Ostatecznie: latin-1 (nie idealne, ale nie przerwie działania) + return p.read_text(encoding="latin-1") + + +def build_output(pages_dir: Path, files: list[Path]) -> str: + rel_root = pages_dir.parent.parent # zwykle ./src -> parent parent? NIEPEWNE, więc liczymy inaczej + # lepiej: relatywnie do katalogu projektu (cwd) + cwd = Path.cwd() + + lines: list[str] = [] + lines.append(f"ASTRO DUMP (root: {pages_dir.resolve()})") + lines.append(f"Found files: {len(files)}") + lines.append("=" * 80) + lines.append("") + + for f in files: + rel = f.relative_to(cwd) if f.is_relative_to(cwd) else f + content = read_text_fallback(f) + + lines.append(f"FILE: {rel.as_posix()}") + lines.append("-" * 80) + lines.append(content.rstrip("\n")) + lines.append("") + lines.append("=" * 80) + lines.append("") + + return "\n".join(lines) + + +def main() -> int: + parser = argparse.ArgumentParser( + description="Zrzuca wszystkie pliki .astro z ./src/pages do jednego pliku txt (ścieżka + zawartość)." + ) + parser.add_argument( + "--pages", + default="src/pages", + help="Ścieżka do katalogu pages (domyślnie: src/pages)", + ) + parser.add_argument( + "--out", + default="astro-pages-dump.txt", + help="Plik wyjściowy (domyślnie: astro-pages-dump.txt)", + ) + + args = parser.parse_args() + + pages_dir = Path(args.pages).resolve() + out_file = Path(args.out).resolve() + + if not pages_dir.exists() or not pages_dir.is_dir(): + print(f"[ERR] Nie znaleziono katalogu: {pages_dir}", file=sys.stderr) + return 2 + + files = iter_astro_files(pages_dir) + + dump = build_output(pages_dir, files) + + out_file.write_text(dump, encoding="utf-8") + print(f"[OK] Zapisano: {out_file} (files: {len(files)})") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/public/og/internet-og.png b/public/og/internet-og.png index 6e17015..d4ade30 100644 Binary files a/public/og/internet-og.png and b/public/og/internet-og.png differ diff --git a/public/og/telefon-og.png b/public/og/telefon-og.png index fef4fab..bea8958 100644 Binary files a/public/og/telefon-og.png and b/public/og/telefon-og.png differ diff --git a/public/og/telewizja-og.png b/public/og/telewizja-og.png index 7e56394..2c60ae1 100644 Binary files a/public/og/telewizja-og.png and b/public/og/telewizja-og.png differ diff --git a/src/content/contact/seo.yaml b/src/content/contact/seo.yaml index f4bf076..168601b 100644 --- a/src/content/contact/seo.yaml +++ b/src/content/contact/seo.yaml @@ -1,6 +1,6 @@ site: - name: "FUZ – Internet światłowodowy w Wyszkowie" - description: "Stabilny i szybki internet w Wyszkowie i okolicach" + name: "FUZ Kontakt" + description: "Skontaktuj się z nami. Stabilny i szybki internet w Wyszkowie i okolicach" url: "https://www.fuz.pl" lang: "pl" @@ -17,11 +17,12 @@ company: logo: "/logo.webp" page: - title: "FUZ – Internet światłowodowy w Wyszkowie" + title: "FUZ Kontakt" description: "Szybki, stabilny internet światłowodowy w Wyszkowie. Lokalny operator, realny serwis, błyskawiczne wsparcie." - image: "/og/internet-og.png" - url: "/internet-swiatlowodowy" + image: "/og/home-og.png" + url: "/kontakt" keywords: + - kontakt internet światłowodowy Wyszków - internet Wyszków - światłowód Wyszków - internet światłowodowy Wyszków diff --git a/src/content/home/seo.yaml b/src/content/home/seo.yaml index 7680a99..1f5cab7 100644 --- a/src/content/home/seo.yaml +++ b/src/content/home/seo.yaml @@ -1,5 +1,5 @@ site: - name: "FUZ – Internet światłowodowy w Wyszkowie" + name: "FUZ Internet światłowodowy w Wyszkowie" description: "Stabilny i szybki internet" url: "https://www.fuz.pl" lang: "pl" @@ -17,10 +17,10 @@ company: logo: "/logo.webp" page: - title: "FUZ – Internet światłowodowy w Wyszkowie" + title: "FUZ Internet światłowodowy w Wyszkowie" description: "Szybki, stabilny internet światłowodowy w Wyszkowie. Lokalny operator, realny serwis, błyskawiczne wsparcie." image: "/og/home-og.png" - url: "/internet-swiatlowodowy" + url: "/" keywords: - internet Wyszków - światłowód Wyszków diff --git a/src/content/internet-swiatlowodowy/seo.yaml b/src/content/internet-swiatlowodowy/seo.yaml index d8e8878..6e48a45 100644 --- a/src/content/internet-swiatlowodowy/seo.yaml +++ b/src/content/internet-swiatlowodowy/seo.yaml @@ -1,5 +1,5 @@ site: - name: "FUZ – Internet światłowodowy w Wyszkowie" + name: "FUZ Internet światłowodowy w Wyszkowie" description: "Stabilny i szybki internet w Wyszkowie i okolicach" url: "https://www.fuz.pl" lang: "pl" @@ -17,10 +17,10 @@ company: logo: "/logo.webp" page: - title: "FUZ – Internet światłowodowy w Wyszkowie" + title: "FUZ Internet światłowodowy w Wyszkowie" description: "Szybki, stabilny internet światłowodowy w Wyszkowie. Lokalny operator, realny serwis, błyskawiczne wsparcie." - image: "/images/og-home.webp" - url: "/" + image: "/images/internet-og.webp" + url: "/internet-swiatlowodowy" keywords: - internet Wyszków - światłowód Wyszków diff --git a/src/content/internet-telewizja/seo.yaml b/src/content/internet-telewizja/seo.yaml index d55739a..da77018 100644 --- a/src/content/internet-telewizja/seo.yaml +++ b/src/content/internet-telewizja/seo.yaml @@ -1,5 +1,5 @@ site: - name: "FUZ – Internet światłowodowy z Telewizją w Wyszkowie" + name: "FUZ Telewizja z Internetem światłowodowym w Wyszkowie" description: "Stabilny i szybki internet z telewizją" url: "https://www.fuz.pl" lang: "pl" @@ -17,12 +17,13 @@ company: logo: "/logo.webp" page: - title: "FUZ – Internet światłowodowy z Telewizją w Wyszkowie" + title: "FUZ Telewizja z Internetem światłowodowym w Wyszkowie" description: "Szybki, stabilny internet światłowodowy z telewizją w Wyszkowie. Lokalny operator, realny serwis, błyskawiczne wsparcie." image: "/og/telewizja-og.png" url: "/internet-telewizja" keywords: - internet z telewiazją Wyszków + - internet telewiazja Wyszków - światłowód telewizja Wyszków - internet światłowodowy telewizja Wyszków - lokalny operator internetu Wyszków diff --git a/src/content/telefon/seo.yaml b/src/content/telefon/seo.yaml index 2a87885..c8efb56 100644 --- a/src/content/telefon/seo.yaml +++ b/src/content/telefon/seo.yaml @@ -1,6 +1,6 @@ site: - name: "FUZ – Internet światłowodowy plus Telefon w Wyszkowie" - description: "Stabilny i szybki internet" + name: "FUZ Telefon i Internet światłowodowy w Wyszkowie" + description: "Usługa telefonu wraz z stabilnym i szybkim internet" url: "https://www.fuz.pl" lang: "pl" @@ -17,15 +17,17 @@ company: logo: "/logo.webp" page: - title: "FUZ – Internet światłowodowy w Wyszkowie" - description: "Szybki, stabilny internet światłowodowy w Wyszkowie. Lokalny operator, realny serwis, błyskawiczne wsparcie." + title: "FUZ Telefon i Internet światłowodowy w Wyszkowie" + description: "Szybki, stabilny internet światłowodowy w Wyszkowie z usługa telefonu. Lokalny operator, realny serwis, błyskawiczne wsparcie." image: "/og/telefon-og.png" url: "/telefon" keywords: + - telefon + - telefon Wyszków + - telefon internet Wyszków - internet Wyszków - światłowód Wyszków - internet światłowodowy Wyszków - lokalny operator internetu Wyszków - - telefon - - telefon Wyszków + schema: {}