Browse Source

Tweaks to search indexing and results.

Dan Helfman 3 weeks ago
parent
commit
3ee1203435
2 changed files with 5 additions and 0 deletions
  1. 3 0
      docs/_includes/header.njk
  2. 2 0
      docs/_includes/layouts/main.njk

+ 3 - 0
docs/_includes/header.njk

@@ -4,6 +4,9 @@
         {% set breadcrumb = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key, {allowMissing: true}) %}
         {% set breadcrumb = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key, {allowMissing: true}) %}
         {# The replace() is a work-around for https://github.com/11ty/eleventy-navigation/issues/56 #}
         {# The replace() is a work-around for https://github.com/11ty/eleventy-navigation/issues/56 #}
         {{ breadcrumb | eleventyNavigationToHtml | replace('href="/reference/', 'href="/borgmatic/reference/') | safe }}
         {{ breadcrumb | eleventyNavigationToHtml | replace('href="/reference/', 'href="/borgmatic/reference/') | safe }}
+        <div data-pagefind-meta="title" aria-hidden="true" style="display: none">
+           {% for entry in breadcrumb %}{{ entry.title }} > {% endfor %}{{ title | safe }}
+        </div>
     </div>
     </div>
     <h1 class="elv-hed">{{ title | safe }}</h1>
     <h1 class="elv-hed">{{ title | safe }}</h1>
     {% if page.url == '/' %}<h3>It's your data. Keep it that way.</h3>{% endif %}
     {% if page.url == '/' %}<h3>It's your data. Keep it that way.</h3>{% endif %}

+ 2 - 0
docs/_includes/layouts/main.njk

@@ -36,7 +36,9 @@ headerClass: elv-header-default
         </div>
         </div>
     </div>
     </div>
 
 
+    <div data-pagefind-body>
     {{ content | safe }}
     {{ content | safe }}
+    </div>
 
 
     {% include 'components/suggestion-link.html' %}
     {% include 'components/suggestion-link.html' %}
 </main>
 </main>