Skip to content

Commit 652a017

Browse files
authored
Fix string to array splitting for aliases and related
1 parent 1357894 commit 652a017

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

feed.json.liquid

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ permalink: feed.json
3232
],
3333
"topics": [
3434
{% for topic in topics %}
35+
{% assign related = topic.related | split: ', ' %}
36+
{% assign aliases = topic.aliases | split: ', ' %}
3537
{
3638
"topic_name": {{ topic.topic | jsonify }},
3739
"created_by": {{ topic.created_by | jsonify }},
@@ -47,12 +49,12 @@ permalink: feed.json
4749
"url": "{{ site.url }}{{ topic.url | remove_first: "/index.html" }}",
4850
"wikipedia_url": {{ topic.wikipedia_url | jsonify }},
4951
"related": [
50-
{% for related_topic in topic.related %}
52+
{% for related_topic in related %}
5153
"{{ related_topic }}"{% unless forloop.last == true %},{% endunless %}
5254
{% endfor %}
5355
],
5456
"aliases": [
55-
{% for alias in topic.aliases %}
57+
{% for alias in aliases %}
5658
"{{ alias }}"{% unless forloop.last == true %},{% endunless %}
5759
{% endfor %}
5860
],

0 commit comments

Comments
 (0)