Strip personal data from templates so the theme ships clean for any deployer. Collection pages now use generatePageOnEmptyData so empty post types show encouraging placeholders instead of 404s. Navigation is conditional on enabled post types and installed plugins. Sidebar widgets split into individual components with plugin-aware visibility. Slashes page explains required plugins for root-level page creation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1.6 KiB
Plaintext
50 lines
1.6 KiB
Plaintext
---
|
|
permalink: /feed.json
|
|
eleventyExcludeFromCollections: true
|
|
---
|
|
{
|
|
"version": "https://jsonfeed.org/version/1.1",
|
|
"title": "{{ site.name }}",
|
|
"home_page_url": "{{ site.url }}/",
|
|
"feed_url": "{{ site.url }}/feed.json",
|
|
"hubs": [
|
|
{
|
|
"type": "WebSub",
|
|
"url": "https://websubhub.com/hub"
|
|
}
|
|
],
|
|
"description": "{{ site.description }}",
|
|
"language": "{{ site.locale | default('en') }}",
|
|
"authors": [
|
|
{
|
|
"name": "{{ site.author.name | default(site.name) }}",
|
|
"url": "{{ site.url }}/"
|
|
}
|
|
],
|
|
"items": [
|
|
{%- for post in collections.feed %}
|
|
{%- set absolutePostUrl = site.url + post.url %}
|
|
{%- set postImage = post.data.photo %}
|
|
{%- if postImage %}
|
|
{# If photo is an array, use first element (check if first element looks like a URL) #}
|
|
{%- if postImage[0] and (postImage[0] | length) > 10 %}
|
|
{%- set postImage = postImage[0] %}
|
|
{%- endif %}
|
|
{%- endif %}
|
|
{%- if not postImage or postImage == "" %}
|
|
{%- set postImage = post.data.image or (post.content | extractFirstImage) %}
|
|
{%- endif %}
|
|
{
|
|
"id": "{{ absolutePostUrl }}",
|
|
"url": "{{ absolutePostUrl }}",
|
|
"title": {{ post.data.title | default(post.content | striptags | truncate(80)) | jsonEncode | safe }},
|
|
"content_html": {{ post.content | htmlToAbsoluteUrls(absolutePostUrl) | jsonEncode | safe }},
|
|
"date_published": "{{ post.date | dateToRfc3339 }}"
|
|
{%- if postImage and postImage != "" and (postImage | length) > 10 %},
|
|
"image": "{{ postImage | url | absoluteUrl(site.url) }}"
|
|
{%- endif %}
|
|
}{% if not loop.last %},{% endif %}
|
|
{%- endfor %}
|
|
]
|
|
}
|