Skip to content

Commit

Permalink
quick error fixes to json content
Browse files Browse the repository at this point in the history
the json content needs to use jsonify and have newlines removed, etc.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Feb 26, 2022
1 parent cfc07c3 commit 4a1692a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pages/api/dei.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permalink: /api/dei.json
"title": "{{ event.title | xml_escape }}{% if event.subtitle %} - {{ event.subtitle }}{% endif %}",
"date": "{{ event.event_date }}",{% if event.location %}
"location": "{{ event.location }}",{% endif %}
"description": "{{ event.content | strip_html | xml_escape | truncatewords: 50 }}",
"description": "{{ post.content | strip_html | jsonify | replace: '"', "" | replace: "\n", " " | truncatewords: 50 }}",
"category": "{% if event.category %}{{ event.category }}{% else %}general{% endif %}",
"published": "{{ event.date | date: "%a, %d %b %Y %H:%M:%S %z" }}",
"repeated": "{{ event.repeated }}",
Expand Down
2 changes: 1 addition & 1 deletion pages/api/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permalink: /api/events.json
"title": "{{ event.title | xml_escape }}{% if event.subtitle %} - {{ event.subtitle }}{% endif %}",
"date": "{{ event.event_date }}",{% if event.location %}
"location": "{{ event.location }}",{% endif %}
"description": "{{ event.content | strip_html | xml_escape | truncatewords: 50 }}",
"description": "{{ post.content | strip_html | jsonify | replace: '"', "" | replace: "\n", " " | truncatewords: 50 }}",
"category": "{% if event.category %}{{ event.category }}{% else %}general{% endif %}",
"published": "{{ event.date | date: "%a, %d %b %Y %H:%M:%S %z" }}",
"repeated": "{{ event.repeated }}",
Expand Down
2 changes: 1 addition & 1 deletion pages/api/newsletters.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permalink: /api/newsletters.json
{
"title": "{{ post.title | xml_escape }}{% if post.subtitle %} - {{ post.subtitle }}{% endif %}",
"published": "{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}",
"description": "{{ post.content | strip_html | xml_escape | truncatewords: 50 }}",
"description": "{{ post.content | strip_html | jsonify | replace: '"', "" | replace: "\n", " " | truncatewords: 50 }}",
"category": "{% if post.category %}{{ post.category }}{% else %}general{% endif %}",
"url": "{{ site.domain }}{{ post.url }}"
}{% if forloop.last %}{% else %},{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion pages/api/posts.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permalink: /api/posts.json
{
"title": "{{ post.title | xml_escape }}{% if post.subtitle %} - {{ post.subtitle }}{% endif %}",
"published": "{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}",
"description": "{{ post.content | strip_html | xml_escape | truncatewords: 50 }}",
"description": "{{ post.content | strip_html | jsonify | replace: '"', "" | replace: "\n", " " | truncatewords: 50 }}",
"category": "{% if post.category %}{{ post.category }}{% else %}general{% endif %}",
"url": "{{ site.domain }}{{ post.url }}"
}{% if forloop.last %}{% else %},{% endif %}
Expand Down

0 comments on commit 4a1692a

Please sign in to comment.