Add Maya static generator and seed pages#48
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const replacements = new Map([ | ||
| ["{{PAGE_TITLE}}", escapeHtml(`${titleUa} — ${humanDate}`)], | ||
| ["{{META_DESCRIPTION}}", escapeHtml(metaUa)], | ||
| ["{{OG_TITLE}}", escapeHtml(`${titleUa} — ${humanDate}`)], | ||
| ["{{OG_DESCRIPTION}}", escapeHtml(metaUa)], | ||
| ["{{OG_IMAGE}}", escapeHtml(ogImage)], | ||
| ["{{CANONICAL_URL}}", escapeHtml(canonicalUrl)], | ||
| ["{{JSON_LD}}", indentJson(jsonLd, 6)], | ||
| ["{{H1_TEXT}}", escapeHtml(`Гороскоп Майя на ${humanDate} — ${titleUa}`)], | ||
| ["{{LEAD_PARAGRAPH}}", escapeHtml(metaUa)], | ||
| ["{{GLYPH_NAME}}", escapeHtml(glyphName)], | ||
| ["{{TONE_VALUE}}", escapeHtml(toneValue)], | ||
| ["{{QUALITIES_BLOCK}}", qualitiesBlock], | ||
| ["{{CTA_URL}}", escapeHtml(`/?date=${isoDate}`)], | ||
| ["{{SERVICE_COMMENT}}", buildServiceComment({ |
There was a problem hiding this comment.
Respect site_base_url when building CTA links
The call‑to‑action URL is hardcoded as /?date=${isoDate}. This works only when the site is hosted at the domain root, but the generator exposes site_base_url specifically to support deployments under a sub‑path (e.g. https://example.com/aura). In such cases the generated link points to https://example.com/?date=… instead of the interactive page at https://example.com/aura/?date=…, leaving every CTA broken. The URL should be derived from site_base_url (via something like buildCanonicalUrl) so the base path is preserved.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68f2081adc848320b5ed989a0b8c984d