✨ add ghost api basics
This commit is contained in:
@ -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>
|
@ -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 -%}
|
||||
|
Reference in New Issue
Block a user