Mayx's Home Page https://mabbs.github.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.8 KiB

  1. ---
  2. ---
  3. {
  4. "version": "https://jsonfeed.org/version/1",
  5. "title": "{{ site.title | xml_escape }}",
  6. "home_page_url": "{{ "/" | absolute_url }}",
  7. "feed_url": "{{ "/feed.json" | absolute_url }}",
  8. "description": {{ site.description | jsonify }},
  9. "favicon": "{{ "/favicon.ico" | absolute_url }}",
  10. "expired": false,
  11. {% if site.author %}
  12. "author": {% if site.author.name %} {
  13. "name": "{{ site.author.name }}",
  14. "url": {% if site.author.url %}"{{ site.author.url }}"{% else %}null{% endif %},
  15. "avatar": {% if site.author.avatar %}"{{ site.author.avatar }}"{% else %}null{% endif %}
  16. },{% else %}"{{ site.author }}",{% endif %}
  17. {% endif %}
  18. "items": [
  19. {% for post in site.posts limit:10 %}
  20. {
  21. "id": "{{ post.url | absolute_url }}",
  22. "title": {{ post.title | jsonify }},
  23. "summary": {{ post.excerpt | strip_html | jsonify }},
  24. "content_text": {{ post.content | strip_html | strip_newlines | jsonify }},
  25. "content_html": {{ post.content | strip_newlines | jsonify }},
  26. "url": "{{ post.url | absolute_url }}",
  27. {% if post.image.size > 1 %}"image": {{ post.image | jsonify }},{% endif %}
  28. {% if post.link.size > 1 %}"external_url": "{{ post.link }}",{% endif %}
  29. {% if post.banner.size > 1 %}"banner_image": "{{ post.banner }}",{% endif %}
  30. {% if post.tags.size > 1 %}"tags": {{ post.tags | jsonify }},{% endif %}
  31. {% if post.enclosure.size > 1 %}"attachments": [
  32. {
  33. "url": "{{ post.enclosure }}",
  34. "mime_type": "{{ post.enclosure_type }}",
  35. "size_in_bytes": "{{ post.enclosure_length }}"
  36. },{% endif %}
  37. "date_published": "{{ post.date | date_to_xmlschema }}",
  38. "date_modified": "{{ post.date | date_to_xmlschema }}",
  39. {% if post.author %}
  40. "author": {% if post.author.name %} {
  41. "name": "{{ post.author.name }}",
  42. "url": {% if post.author.url %}"{{ post.author.url }}"{% else %}null{% endif %},
  43. "avatar": {% if post.author.avatar %}"{{ post.author.avatar }}"{% else %}null{% endif %}
  44. }
  45. {% else %}"{{ post.author }}"{% endif %}
  46. {% else %}
  47. "author": {% if site.author.name %} {
  48. "name": "{{ site.author.name }}",
  49. "url": {% if site.author.url %}"{{ site.author.url }}"{% else %}null{% endif %},
  50. "avatar": {% if site.author.avatar %}"{{ site.author.avatar }}"{% else %}null{% endif %}
  51. }
  52. {% else %}
  53. "{{ site.author }}"
  54. {% endif %}
  55. {% endif %}
  56. }{% if forloop.last == false %},{% endif %}
  57. {% endfor %}
  58. ]
  59. }

Powered by TurnKey Linux.