From b6bd818cb94c954051b81b25b3a51ef25246cd5e Mon Sep 17 00:00:00 2001 From: Utsob Roy Date: Sun, 8 Jan 2023 20:12:02 +0600 Subject: [PATCH] search representation fix --- src/site/_includes/components/searchScript.njk | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/site/_includes/components/searchScript.njk b/src/site/_includes/components/searchScript.njk index fc1ce27..2ebe62e 100644 --- a/src/site/_includes/components/searchScript.njk +++ b/src/site/_includes/components/searchScript.njk @@ -156,9 +156,21 @@ resultsHTML += '
'; // we need to add title, url from ref results.forEach(r => { - resultsHTML += `
${r.title}
- {% if tags %}
{% for tag in tags %}#{{tag}}{% endfor %}{% endif %} -
${r.content}
`; + resultsHTML += `
+ ${r.title} +
+
+ {% if tags %} +
+ {% for tag in tags %} + #{{tag}} + {% endfor %} + {% endif %} +
+
+ ${r.content} +
+
`; }); resultsHTML += '
'; resultsDiv.innerHTML = resultsHTML;