Linus 2026-11-06: everything public lives on imagesbyolofsson.se (Cleura), the customer subdomain is only for ordering and the logged-in portal; photos are sold as posters instead of being downloadable. - Portfolio: download menu (S/M/L), the original password dialog and /download/original are gone; the lightbox has "Köp som poster" -> /posters instead. - about.astro and contact.astro removed: Caddy on Cleura sends /about, /contact and /posters to the portal, so the About text and collaborations are edited once in admin. They stay in sitemap-0.xml (PORTAL_PAGES); the sitemap index lists /posters/sitemap.xml. - Menu and 404 page link Posters; privacy, robots.txt and llms.txt no longer mention password downloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
988 B
TypeScript
19 lines
988 B
TypeScript
// src/lib/pages.ts
|
|
// Sajtens riktiga sidor, härledda från src/pages/*.astro (404 och _-filer exkluderas).
|
|
// Nya sidor hamnar automatiskt i sitemap.
|
|
const pageFiles = import.meta.glob('../pages/*.astro');
|
|
|
|
// Sidor på samma domän som kundportalen (samma Cleura-server) visar, så att Om mig-texten,
|
|
// samarbeten och posters redigeras på ett ställe i admin (Linus 2026-11-06). Caddy skickar dem
|
|
// till portalen; enskilda posters listas i portalens egen /posters/sitemap.xml.
|
|
export const PORTAL_PAGES = ['/about', '/contact', '/posters'] as const;
|
|
|
|
export function sitePaths(): string[] {
|
|
const own = Object.keys(pageFiles)
|
|
.map((file) => file.replace(/^\.\.\/pages\//, '').replace(/\.astro$/, ''))
|
|
.filter((name) => name !== '404' && !name.startsWith('_') && !name.startsWith('['))
|
|
.map((name) => (name === 'index' ? '/' : `/${name}`));
|
|
return [...new Set([...own, ...PORTAL_PAGES])]
|
|
.sort((a, b) => (a === '/' ? -1 : b === '/' ? 1 : a.localeCompare(b)));
|
|
}
|