diff --git a/_includes/scripts/search.liquid b/_includes/scripts/search.liquid index 919e621..b023cd2 100644 --- a/_includes/scripts/search.liquid +++ b/_includes/scripts/search.liquid @@ -84,18 +84,20 @@ }, }, {%- endfor -%} - {%- for project in site.projects -%} - { - {%- assign title = project.title | escape -%} - id: "project-{{ title | slugify }}", - title: "{{ title }}", - description: "{{ project.description | strip_html | strip_newlines | escape }}", - section: "Projects", - handler: () => { - window.location.href = "{{ project.url | relative_url }}"; + {% for collection in site.collections %} + {%- for item in collection.docs -%} + { + {%- assign title = item.title | escape -%} + id: "{{ collection.label }}-{{ title | slugify }}", + title: "{{ title }}", + description: "{{ item.description | strip_html | strip_newlines | escape }}", + section: "{{ collection.label | capitalize }}", + handler: () => { + window.location.href = "{{ item.url | relative_url }}"; + }, }, - }, - {%- endfor -%} + {%- endfor -%} + {% endfor %} {%- if site.socials_in_search -%} {%- if site.email -%} {