Skip to content

Commit b6c6616

Browse files
committed
fix: import pagefind
1 parent ea18158 commit b6c6616

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.eleventy.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ module.exports = function (eleventyConfig) {
9090
sourcemap: 'true',
9191
manifest: true,
9292
rollupOptions: {
93+
external: ["/pagefind/pagefind-ui.js"],
9394
output: {
9495
assetFileNames: (assetInfo) => {
9596
var info = assetInfo.name.split('.');
@@ -103,7 +104,7 @@ module.exports = function (eleventyConfig) {
103104
manualChunks: {
104105
PhotoSwipe: ['photoswipe'],
105106
PhotoSwipeLightbox: ['photoswipe/lightbox']
106-
}
107+
},
107108
},
108109
plugins: [
109110
rollupPluginCritical({

src/assets/js/pagefind.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// generated pagefind UI
22
import '/pagefind/pagefind-ui.js'; // xxx doesn't work on 1st build
3+
// to study: https://syntackle.com/blog/pagefind-search-in-astro-site/
34

45
const initSearch = () => {
56
/* global PagefindUI */

src/it/index.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ lastUpdate: 2024-09-26
3535
</section>
3636

3737
<hr />
38-
<!--xxx <section class="container">
38+
<section class="container">
3939
<div class="search feature">
4040
<label for="site-search" class="input-search-label visually-hidden">Campo di ricerca</label>
4141
<div id="searchBox" class="search-box"></div>
4242
</div>
4343
</section>
44-
-->
44+
4545

4646
<!-- xxx <section class="container">
4747
{% set projectslist = collections["design_" + page.lang] %}

0 commit comments

Comments
 (0)