Skip to content

Instantly share code, notes, and snippets.

@defjaf
Forked from walt/json_feed.mtml
Last active February 5, 2019 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save defjaf/45dff9b6b217e9969c2368cd791580f8 to your computer and use it in GitHub Desktop.
Save defjaf/45dff9b6b217e9969c2368cd791580f8 to your computer and use it in GitHub Desktop.
JSON Feed template for Movable Type
{
"version": "https://jsonfeed.org/version/1",
"title": "<$mt:BlogName smarty_pants="1" remove_html="1" escape_for_json="1"$>",
"home_page_url": "<$mt:BlogURL$>",
"feed_url": "<$mt:BlogURL$>feed.json",
"description": "<$mt:BlogDescription smarty_pants="1" remove_html="1" escape_for_json="1"$>",
"favicon": "<$mt:BlogURL$>favicon.ico",
"items": [
<mt:Entries lastn="5">
{
"id": "<$mt:EntryPermalink$>",
"url": "<$mt:EntryPermalink$>",
"title": "<$mt:EntryTitle smarty_pants="1" remove_html="1" escape_for_json="1"$>",
<mt:if tag="EntryCategory">"tags": [<mt:EntryCategories glue=", ">"<$mt:CategoryLabel escape_for_json="1"$>"</mt:EntryCategories><mt:if tag="Tags">, <mt:EntryTags glue=", ">"<$mt:TagName escape_for_json="1"$>"</mt:EntryTags></mt:if>], <mt:ElseIf tag="Tags">"tags": [<mt:EntryTags glue=", ">"<$mt:TagName escape_for_json="1"$>"</mt:EntryTags>],</mt:if>
"content_html": "<$mt:EntryBody escape_for_json="1"$>",
"summary": "<$mt:EntryExcerpt escape_for_json="1"$>",
"date_published": "<$mt:EntryDate utc="1" format_name="iso8601"$>",
"date_modified": "<$mt:EntryModifiedDate utc="1" format_name="iso8601"$>",
"author": {
"name": "<$mt:EntryAuthorDisplayName escape_for_json="1"$>"
}
}<mt:Unless name="__last__">,</mt:Unless>
</mt:Entries>
]
}
@defjaf
Copy link
Author

defjaf commented Feb 5, 2019

(add categories/tags to the original gist)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment