Refactor usePageContent.ts — hardcoded MP content → generic defaults + override path #4

Open
opened 2026-05-04 15:42:16 +02:00 by libretech · 0 comments
Owner

Part of #2

Problem

composables/usePageContent.ts (lines 30–287) contains hardcoded MP content:

  • CONTACT_INFO — Stuttgart address, phone +49 (0)711 / 262 49 64, fax, email
  • OPENING_HOURS — Mo–Do 9.00–16.00, Fr 9.00–14.00
  • ABOUT_CONTENT — MP-specific company narrative
  • IMPRESSUM_CONTENT, AGB_CONTENT, DATENSCHUTZ_CONTENT, VERSAND_CONTENT, ZAHLUNG_CONTENT — full legal copy with MP details

11 page files (about, kontakt, anfahrt, oeffnungszeiten, impressum, agb, datenschutz, versand, zahlung) import directly from this composable.

Acceptance

  • Replace hardcoded values in usePageContent.ts with generic defaults (real "Demo Print Shop" placeholder content, not Lorem) — example brand: "Demo Print", "Musterstraße 1, 12345 Musterstadt", phone placeholder, etc.
  • Pages call composable; composable returns either default OR layer-overridden content
  • Adapter override path: an adapter Nuxt layer can ship its own composables/usePageContent.ts to fully replace defaults (Nuxt component shadowing)
  • Document override pattern in libreshop/shop README
  • Default content covers all required legal sections so a bare libreshop/shop deploy is legally functional for a placeholder shop
Part of https://git.librete.ch/libreshop/shop/issues/2 ## Problem `composables/usePageContent.ts` (lines 30–287) contains hardcoded MP content: - `CONTACT_INFO` — Stuttgart address, phone +49 (0)711 / 262 49 64, fax, email - `OPENING_HOURS` — Mo–Do 9.00–16.00, Fr 9.00–14.00 - `ABOUT_CONTENT` — MP-specific company narrative - `IMPRESSUM_CONTENT`, `AGB_CONTENT`, `DATENSCHUTZ_CONTENT`, `VERSAND_CONTENT`, `ZAHLUNG_CONTENT` — full legal copy with MP details 11 page files (about, kontakt, anfahrt, oeffnungszeiten, impressum, agb, datenschutz, versand, zahlung) import directly from this composable. ## Acceptance - [ ] Replace hardcoded values in `usePageContent.ts` with **generic defaults** (real "Demo Print Shop" placeholder content, not Lorem) — example brand: "Demo Print", "Musterstraße 1, 12345 Musterstadt", phone placeholder, etc. - [ ] Pages call composable; composable returns either default OR layer-overridden content - [ ] Adapter override path: an adapter Nuxt layer can ship its own `composables/usePageContent.ts` to fully replace defaults (Nuxt component shadowing) - [ ] Document override pattern in libreshop/shop README - [ ] Default content covers all required legal sections so a bare libreshop/shop deploy is legally functional for a placeholder shop
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: libreshop/shop#4
No description provided.