add ghost api basics

This commit is contained in:
2022-05-19 22:08:42 -04:00
parent 5fb0d147ed
commit 475def08ca
11 changed files with 231 additions and 22 deletions

View File

@ -18,11 +18,11 @@ eleventyExcludeFromCollections: true
{%- for post in collections.posts | reverse %}
{% set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata.url) }}{% endset %}
<entry>
<title>{{ post.data.title }}</title>
<title>{{ post.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ post.date | rssDate }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
<content type="html">{{ post.html | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
</entry>
{%- endfor %}
</feed>

View File

@ -18,8 +18,8 @@ eleventyExcludeFromCollections: true
{
"id": "{{ absolutePostUrl }}",
"url": "{{ absolutePostUrl }}",
"title": "{{ post.data.title }}",
"content_html": {% if post.templateContent %}{{ post.templateContent | dump | safe }}{% else %}""{% endif %},
"title": "{{ post.title }}",
"content_html": {% if post.html %}{{ post.html | dump | safe }}{% else %}""{% endif %},
"date_published": "{{ post.date | rssDate }}"
}
{%- if not loop.last -%}