diff --git a/_includes/search-loader.html b/_includes/search-loader.html index 4a18e6d..2f3ab4d 100644 --- a/_includes/search-loader.html +++ b/_includes/search-loader.html @@ -1,13 +1,14 @@ {% capture result_elem %}
{title}
-
{categories}
-
{tags}
+ {categories} + {tags}

{snippet}

@@ -23,6 +24,23 @@ SimpleJekyllSearch({ resultsContainer: document.getElementById('search-results'), json: '{{ '/assets/js/data/search.json' | relative_url }}', searchResultTemplate: '{{ result_elem | strip_newlines }}', - noResultsText: '{{ not_found }}' + noResultsText: '{{ not_found }}', + templateMiddleware: function(prop, value, template) { + if (prop === 'categories') { + if (value === '') { + return `${value}`; + } else { + return `
${value}
`; + } + } + + if (prop === 'tags') { + if (value === '') { + return `${value}`; + } else { + return `
${value}
`; + } + } + } });