diff --git a/content/search.njk b/content/search.njk index d1112ef29..7f97a1c16 100644 --- a/content/search.njk +++ b/content/search.njk @@ -8,16 +8,3 @@ layout: layouts/base.njk
- - \ No newline at end of file diff --git a/pagefind/generate.js b/pagefind/generate.js index 67f1bf9f9..c8cbd780e 100644 --- a/pagefind/generate.js +++ b/pagefind/generate.js @@ -6,12 +6,8 @@ const { index } = await pagefind.createIndex() // Index milestones and tickets await index.addDirectory({ - path: '_site/milestone', - glob: '**/*.html' -}) -await index.addDirectory({ - path: '_site/ticket', - glob: '**/*.html' + path: '_site', + glob: '{milestone,ticket}/**/*.html' }) // Write pagefind files diff --git a/pagefind/init.js b/pagefind/init.js index 088c0c69f..c83863006 100644 --- a/pagefind/init.js +++ b/pagefind/init.js @@ -6,3 +6,14 @@ new PagefindUI({ zero_results: 'No matches found.' } }) + +if (document.getElementById('full-page-search')) { + new PagefindUI({ + element: '#full-page-search', + showImages: false, + translations: { + placeholder: 'Search all tickets and milestones', + zero_results: 'No matches found.' + } + }) +}