Changeset 3b4095f in Klonkt
- Timestamp:
- 07/01/2026 10:28:08 PM (2 months ago)
- Branches:
- main
- Children:
- 5e52448
- Parents:
- 7f265ce
- Files:
-
- 9 edited
-
CHANGELOG.de.md (modified) (1 diff)
-
CHANGELOG.md (modified) (1 diff)
-
CHANGELOG.nl.md (modified) (1 diff)
-
src/config/database.js (modified) (1 diff)
-
src/routes/admin-seo.js (modified) (2 diffs)
-
src/routes/og.js (modified) (1 diff)
-
src/services/OgImageService.js (modified) (1 diff)
-
src/services/i18n.js (modified) (3 diffs)
-
src/views/pages/admin-seo.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG.de.md
r7f265ce r3b4095f 7 7 8 8 ### Hinzugefügt 9 - **Wähle eine helle oder dunkle Teilen-Karte.** Das automatisch erzeugte Teilbild folgt deinem 10 Site-Thema; unter Verwaltung → SEO kannst du es jetzt fest auf hell oder dunkel stellen. 9 11 - **Eine Erwähnung ist jetzt eine Benachrichtigung.** Wenn dich jemand im Fediverse in einem 10 12 Beitrag erwähnt — auch in einem, der keine Antwort an dich ist — erscheint das in deinen -
CHANGELOG.md
r7f265ce r3b4095f 7 7 8 8 ### Added 9 - **Choose a light or dark share card.** The auto-generated share image follows your site theme; 10 under Admin → SEO you can now force it light or dark. 9 11 - **A mention is now a notification.** When someone on the fediverse mentions you in a post — 10 12 even one that isn't a reply to you — it shows up in your fediverse notifications with a link -
CHANGELOG.nl.md
r7f265ce r3b4095f 7 7 8 8 ### Toegevoegd 9 - **Kies een lichte of donkere deel-kaart.** De automatisch gemaakte deel-afbeelding volgt je 10 site-thema; onder Beheer → SEO kun je 'm nu geforceerd licht of donker zetten. 9 11 - **Een vermelding is nu een melding.** Als iemand op de fediverse je noemt in een post — ook 10 12 eentje die geen reactie op jou is — verschijnt dat in je fediverse-meldingen met een link naar -
src/config/database.js
r7f265ce r3b4095f 82 82 ensureColumn('sites', 'show_search', 'INTEGER DEFAULT 1'); 83 83 ensureColumn('sites', 'show_archive_link', 'INTEGER DEFAULT 1'); 84 ensureColumn('sites', 'og_theme', 'TEXT'); // OG share-card variant: NULL=auto (follow site theme) | 'light' | 'dark' 84 85 85 86 // Per-post noindex + type -
src/routes/admin-seo.js
r7f265ce r3b4095f 59 59 default_description = ?, 60 60 og_image_default = ?, 61 og_theme = ?, 61 62 og_locale = ?, 62 63 author = ?, … … 79 80 trimOrNull(f.default_description, 500), 80 81 trimOrNull(f.og_image_default, 500), 82 (f.og_theme === 'light' || f.og_theme === 'dark') ? f.og_theme : null, // null = auto (follow site theme) 81 83 trimOrNull(f.og_locale, 32), 82 84 trimOrNull(f.author, 120), -
src/routes/og.js
r7f265ce r3b4095f 14 14 try { 15 15 site = db.prepare( 16 'SELECT slug, title, tagline, description, palette, accent, theme_override FROM sites WHERE slug = ?'16 'SELECT slug, title, tagline, description, palette, accent, theme_override, og_theme FROM sites WHERE slug = ?' 17 17 ).get(req.params.slug); 18 18 } catch { /* db error → 404 below */ } -
src/services/OgImageService.js
r7f265ce r3b4095f 90 90 91 91 const palette = ThemeService.PALETTES[site.palette] ? site.palette : 'klonkt'; 92 // Follow the site's "default theme for new visitors" (theme_override): a light card when the site 93 // is set to Light, otherwise dark (an OG image is static, so Auto/Dark → dark). 94 const theme = site.theme_override === 'light' ? 'light' : 'dark'; 92 // Card variant: an explicit SEO override (og_theme) wins; else follow the site's "default 93 // theme for new visitors" (theme_override) — light when the site is set to Light, otherwise 94 // dark (an OG image is static, so Auto/Dark → dark). 95 const theme = (site.og_theme === 'light' || site.og_theme === 'dark') 96 ? site.og_theme 97 : (site.theme_override === 'light' ? 'light' : 'dark'); 95 98 const accent = site.accent || ((ThemeService.PALETTES[palette] || ThemeService.PALETTES.klonkt)[theme] || ThemeService.PALETTES.klonkt.dark).accent; 96 99 const key = crypto.createHash('sha1') -
src/services/i18n.js
r7f265ce r3b4095f 285 285 'aseo.og_image': 'Standaard deel-afbeelding (URL)', 286 286 'aseo.og_image_hint': 'og:image / Twitter-card; ~1200×630px', 287 'aseo.og_theme': 'Deel-kaart licht of donker', 288 'aseo.og_theme_hint': 'de automatisch gemaakte deel-afbeelding', 289 'aseo.og_theme_auto': 'Automatisch (volgt site-thema)', 290 'aseo.og_theme_light': 'Licht', 291 'aseo.og_theme_dark': 'Donker', 287 292 'aseo.og_locale': 'Taal-locale', 288 293 'aseo.og_locale_hint_pre': 'og:locale, bv.', … … 1208 1213 'aseo.og_image': 'Default share image (URL)', 1209 1214 'aseo.og_image_hint': 'og:image / Twitter card; ~1200×630px', 1215 'aseo.og_theme': 'Share card light or dark', 1216 'aseo.og_theme_hint': 'the auto-generated share image', 1217 'aseo.og_theme_auto': 'Auto (follows site theme)', 1218 'aseo.og_theme_light': 'Light', 1219 'aseo.og_theme_dark': 'Dark', 1210 1220 'aseo.og_locale': 'Language locale', 1211 1221 'aseo.og_locale_hint_pre': 'og:locale, e.g.', … … 2130 2140 'aseo.og_image': 'Standard-Teilbild (URL)', 2131 2141 'aseo.og_image_hint': 'og:image / Twitter-Card; ~1200×630px', 2142 'aseo.og_theme': 'Teilen-Karte hell oder dunkel', 2143 'aseo.og_theme_hint': 'das automatisch erzeugte Teilbild', 2144 'aseo.og_theme_auto': 'Automatisch (folgt dem Site-Thema)', 2145 'aseo.og_theme_light': 'Hell', 2146 'aseo.og_theme_dark': 'Dunkel', 2132 2147 'aseo.og_locale': 'Sprach-Locale', 2133 2148 'aseo.og_locale_hint_pre': 'og:locale, z. B.', -
src/views/pages/admin-seo.ejs
r7f265ce r3b4095f 42 42 <span><%= t('aseo.og_image') %> <small class="form-hint-inline">— <%= t('aseo.og_image_hint') %></small></span> 43 43 <input type="text" name="og_image_default" value="<%= site.og_image_default || '' %>" placeholder="https://yourdomain.com/share.jpg" maxlength="500"> 44 </label> 45 <label> 46 <span><%= t('aseo.og_theme') %> <small class="form-hint-inline">— <%= t('aseo.og_theme_hint') %></small></span> 47 <select name="og_theme"> 48 <option value="" <%= !site.og_theme ? 'selected' : '' %>><%= t('aseo.og_theme_auto') %></option> 49 <option value="light" <%= site.og_theme === 'light' ? 'selected' : '' %>><%= t('aseo.og_theme_light') %></option> 50 <option value="dark" <%= site.og_theme === 'dark' ? 'selected' : '' %>><%= t('aseo.og_theme_dark') %></option> 51 </select> 44 52 </label> 45 53 <label>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)