The Indiekit Eleventy preset uses camelcaseKeys to convert frontmatter properties (e.g., bookmark-of → bookmarkOf), but templates expected underscore-separated names (bookmark_of). Changes: - Support both camelCase and underscore property names in all templates - Update collections to filter on both property name formats - Include interaction URLs (bookmarks, likes, replies, reposts) in Bridgy syndication content for proper social media posting Fixes bookmark URLs not appearing on posts or in syndicated content. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
56 lines
2.3 KiB
Plaintext
56 lines
2.3 KiB
Plaintext
---
|
|
layout: layouts/base.njk
|
|
title: Reposts
|
|
permalink: /reposts/
|
|
---
|
|
<div class="page-header mb-6 sm:mb-8">
|
|
<h1 class="text-2xl sm:text-3xl font-bold text-surface-900 dark:text-surface-100 mb-2">Reposts</h1>
|
|
<p class="text-surface-600 dark:text-surface-400">Content I've shared from others.</p>
|
|
</div>
|
|
|
|
{% if collections.reposts.length > 0 %}
|
|
<ul class="space-y-6">
|
|
{% for post in collections.reposts %}
|
|
<li class="h-entry p-4 bg-surface-100 dark:bg-surface-800 rounded-lg">
|
|
<div class="flex items-start gap-4">
|
|
<div class="flex-shrink-0">
|
|
<svg class="w-8 h-8 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
|
|
</svg>
|
|
</div>
|
|
<div class="flex-1 min-w-0">
|
|
{% if post.data.title %}
|
|
<h2 class="p-name text-lg font-semibold text-surface-900 dark:text-surface-100 mb-2">
|
|
<a class="hover:underline" href="{{ post.url }}">{{ post.data.title }}</a>
|
|
</h2>
|
|
{% endif %}
|
|
<div class="post-meta text-sm text-surface-500 dark:text-surface-400 mb-2">
|
|
<time class="dt-published" datetime="{{ post.date.toISOString() }}">
|
|
{{ post.date | dateDisplay }}
|
|
</time>
|
|
</div>
|
|
{# Support both camelCase (Indiekit Eleventy preset) and underscore (legacy) property names #}
|
|
{% set repostedUrl = post.data.repostOf or post.data.repost_of %}
|
|
{% if repostedUrl %}
|
|
<p class="mb-3 text-sm">
|
|
<span class="text-surface-500">Reposted:</span>
|
|
<a class="u-repost-of text-primary-600 dark:text-primary-400 hover:underline break-all" href="{{ repostedUrl }}">
|
|
{{ repostedUrl }}
|
|
</a>
|
|
</p>
|
|
{% endif %}
|
|
{% if post.templateContent %}
|
|
<div class="e-content prose dark:prose-invert prose-sm max-w-none">
|
|
{{ post.templateContent | safe }}
|
|
</div>
|
|
{% endif %}
|
|
<a class="u-url text-xs text-surface-400 hover:underline mt-2 inline-block" href="{{ post.url }}">Permalink</a>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<p class="text-surface-600 dark:text-surface-400">No reposts yet.</p>
|
|
{% endif %}
|