Changeset 1ff0043 in Klonkt


Ignore:
Timestamp:
06/28/2026 04:12:48 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
f79a471
Parents:
897c33b
Message:

fix(seo): canonical falls back to PUBLIC_BASE_URL + English placeholders

  • views/shell.ejs — <link rel=canonical> now uses the per-site override OR the .env base (ogOrigin/PUBLIC_BASE_URL), so the canonical works from .env without filling the SEO field
  • views/pages/admin-seo.ejs — placeholders jouw-domein.com -> yourdomain.com (was Dutch in an English app)
Location:
src/views
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/admin-seo.ejs

    r897c33b r1ff0043  
    2929      <label>
    3030        <span><%= t('aseo.canonical') %> <small class="form-hint-inline">— <%= t('aseo.canonical_hint') %></small></span>
    31         <input type="text" name="canonical" value="<%= site.canonical || '' %>" placeholder="https://jouw-domein.com" maxlength="200">
     31        <input type="text" name="canonical" value="<%= site.canonical || '' %>" placeholder="https://yourdomain.com" maxlength="200">
    3232      </label>
    3333      <label>
     
    4141      <label>
    4242        <span><%= t('aseo.og_image') %> <small class="form-hint-inline">— <%= t('aseo.og_image_hint') %></small></span>
    43         <input type="text" name="og_image_default" value="<%= site.og_image_default || '' %>" placeholder="https://jouw-domein.com/share.jpg" maxlength="500">
     43        <input type="text" name="og_image_default" value="<%= site.og_image_default || '' %>" placeholder="https://yourdomain.com/share.jpg" maxlength="500">
    4444      </label>
    4545      <label>
     
    7272      <label>
    7373        <span><%= t('aseo.publisher_url') %></span>
    74         <input type="text" name="publisher_url" value="<%= site.publisher_url || '' %>" placeholder="https://jouw-domein.com" maxlength="200">
     74        <input type="text" name="publisher_url" value="<%= site.publisher_url || '' %>" placeholder="https://yourdomain.com" maxlength="200">
    7575      </label>
    7676      <label>
    7777        <span><%= t('aseo.publisher_logo') %></span>
    78         <input type="text" name="publisher_logo" value="<%= site.publisher_logo || '' %>" placeholder="https://jouw-domein.com/logo.png" maxlength="500">
     78        <input type="text" name="publisher_logo" value="<%= site.publisher_logo || '' %>" placeholder="https://yourdomain.com/logo.png" maxlength="500">
    7979      </label>
    8080    </fieldset>
  • src/views/shell.ejs

    r897c33b r1ff0043  
    4242}
    4343
    44 // ── Canonical URL (only when we have one configured) ─────────────
     44// ── Canonical URL: per-site override (admin SEO), else the .env base
     45//    (PUBLIC_BASE_URL, via ogOrigin → falls back to the request host) ──
    4546let _canonical = null;
    46 if (safeSite.canonical) {
    47   const _base = safeSite.canonical.replace(/\/+$/, '');
     47const _canonBase = safeSite.canonical || (typeof ogOrigin !== 'undefined' ? ogOrigin : '');
     48if (_canonBase) {
     49  const _base = _canonBase.replace(/\/+$/, '');
    4850  let _path = '/';
    4951  if (typeof post !== 'undefined' && post && post.slug) _path = '/' + post.slug;
Note: See TracChangeset for help on using the changeset viewer.