mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 16:44:56 +02:00
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>
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
---
|
|
layout: layouts/base.njk
|
|
title: Bookmarks
|
|
permalink: /bookmarks/
|
|
---
|
|
<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">Bookmarks</h1>
|
|
<p class="text-surface-600 dark:text-surface-400">Links I've saved for later.</p>
|
|
</div>
|
|
|
|
{% if collections.bookmarks.length > 0 %}
|
|
<ul class="post-list">
|
|
{% for post in collections.bookmarks %}
|
|
<li class="h-entry">
|
|
{% if post.data.title %}
|
|
<h2><a class="p-name u-url" href="{{ post.url }}">{{ post.data.title }}</a></h2>
|
|
{% endif %}
|
|
<div class="post-meta">
|
|
<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 bookmarkedUrl = post.data.bookmarkOf or post.data.bookmark_of %}
|
|
{% if bookmarkedUrl %}
|
|
<p><a class="u-bookmark-of" href="{{ bookmarkedUrl }}">{{ bookmarkedUrl }}</a></p>
|
|
{% endif %}
|
|
<div class="e-content">{{ post.templateContent | safe }}</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<p>No bookmarks yet.</p>
|
|
{% endif %}
|