Skip to content

Commit

Permalink
Search json escaping fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhigyaKrishna committed May 30, 2024
1 parent ac8466a commit 287cabf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions search.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ layout: none
"tags" : "{{ post.tags | array_to_sentence_string }}",
"url" : "{{ site.baseurl }}{{ post.url }}",
"date" : "{{ post.date | date: '%b %-d, %Y' }}",
"content" : "{{ post.content | strip_html | strip_newlines }}",
"article" : "<div class='article col col-4 col-d-6 col-t-12 grid__post animate'> <div class='article__inner'>{% if post.image %}<a class='article__image' href='{{post.url | prepend: site.baseurl}}'> <img src='{{site.baseurl}}{{post.image}}' alt='{{post.title}}'> </a>{% endif %}<div class='article__content'> <div class='article__meta'> <span class='article__minutes'>{% assign words=post.content | number_of_words %}{% if words < 360 %}1 min read{% else %}{{words | divided_by:180}} min read{% endif %} <time class='article__date' datetime='{{post.date | date_to_xmlschema}}'>{% assign date_format=site.minima.date_format | default: '%b %-d, %Y' %}{{post.date | date: date_format}}</time> </span> </div><h2 class='article__title'>{{post.title | escape}}</h2> <p class='article__excerpt'>{{post.description | escape}}</p><div class='article__bottom'>{% if site.author.avatar %}<div class='article__author'> <a href='{{site.baseurl}}/about/' aria-label='{{site.author.name}}'><img class='article__author-image' src='{{site.baseurl}}{{site.author.avatar}}' alt='{{site.author.name}}'s Picture'></a> </div>{% endif %}<div class='article__bottom-meta'>{% if site.author.name %}<a href='{{site.baseurl}}/about/' class='article__author-link'>{{site.author.name}}</a>{% endif %}{% if post.tags.size >=1 %}<span> in </span> <span class='article-tags'>{% for tag in post.tags %} <a href='{{site.baseurl}}/tag/{{tag}}' class='article__tag'>{{tag}}</a> {% endfor %}</span>{% endif %}</div></div></div></div></div>"
"content" : "{{ post.content | strip_html | strip_newlines | escape }}",
"article" : "<div class='article col col-4 col-d-6 col-t-12 grid__post animate'> <div class='article__inner'>{% if post.image %}<a class='article__image' href='{{ post.url | prepend: site.baseurl }}'> <img src='{{ site.baseurl }}{{ post.image }}' alt='{{ post.title | escape }}'> </a>{% endif %}<div class='article__content'> <div class='article__meta'> <span class='article__minutes'>{% assign words=post.content | number_of_words %}{% if words < 360 %}1 min read{% else %}{{words | divided_by:180}} min read{% endif %} <time class='article__date' datetime='{{ post.date | date_to_xmlschema }}'>{% assign date_format=site.minima.date_format | default: '%b %-d, %Y' %}{{ post.date | date: date_format }}</time> </span> </div><h2 class='article__title'>{{ post.title | escape }}</h2> <p class='article__excerpt'>{{ post.description | escape }}</p><div class='article__bottom'>{% if site.author.avatar %}<div class='article__author'> <a href='{{ site.baseurl }}/about/' aria-label='{{ site.author.name }}'><img class='article__author-image' src='{{ site.baseurl }}{{ site.author.avatar }}' alt='{{ site.author.name }}'s Picture'></a> </div>{% endif %}<div class='article__bottom-meta'>{% if site.author.name %}<a href='{{ site.baseurl }}/about/' class='article__author-link'>{{ site.author.name }}</a>{% endif %}{% if post.tags.size >=1 %}<span> in </span> <span class='article-tags'>{% for tag in post.tags %} <a href='{{ site.baseurl }}/tag/{{ tag }}' class='article__tag'>{{ tag }}</a> {% endfor %}</span>{% endif %}</div></div></div></div></div>"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
]

0 comments on commit 287cabf

Please sign in to comment.