Changeset cf4cf27 in Klonkt for src/routes/circle.js
- Timestamp:
- 06/26/2026 05:10:47 PM (2 months ago)
- Branches:
- main
- Children:
- eacd3d6
- Parents:
- eefd302
- File:
-
- 1 edited
-
src/routes/circle.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/circle.js
reefd302 rcf4cf27 33 33 const posts = ActivityPubService.getCirkelPosts(site.slug, 80).map((r) => { 34 34 const text = htmlToText(r.content); 35 // Show ONLY the title (the bold first line a Klonkt note carries), not the whole 36 // body. Title-less notes (e.g. plain Mastodon) fall back to a short text snippet. 37 const titleM = (r.content || '').match(/^\s*<p>\s*<strong>([\s\S]*?)<\/strong>/i); 38 const realTitle = titleM ? htmlToText(titleM[1]).trim() : ''; 35 39 const image = mediaImage(r.media_json); 36 40 const name = r.author_name || r.author_handle || 'Onbekend'; … … 38 42 id: 'ap-' + r.id, 39 43 slug: '', 40 title: text ? (text.length > 90 ? text.slice(0, 90) + '…' : text) : name, 44 title: realTitle 45 ? (realTitle.length > 90 ? realTitle.slice(0, 90) + '…' : realTitle) 46 : (text ? (text.length > 90 ? text.slice(0, 90) + '…' : text) : name), 41 47 excerpt: '', 42 48 cover_image_url: image ? image.url : null,
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)