#Blog post by Thibault Martin, via Planet Gnome

"Pagefind does great client-side search

I post more and more content on my website. What was visible at glance then is now more difficult to look for. I wanted to implement search, but it is a static website. It means that everything is built once, and then published somewhere as final, immutable pages. I can’t send a request for search and get results in return.
Or that’s what I thought! Pagefind is a neat javascript library that does two things:

It produces an index of the content right after building the static site.
It provides 2 web components to insert in my pages: <pagefind-modal> that is the search modal itself, hidden by default, and <pagefind-modal-trigger> that looks like a search field and opens the modal.

The pagefind-modal component looks up the index when the user types a request. The index is a static file, so there is not need for a backend that processes queries. Of course this only works for basic queries, but it’s a great rool already!

Pagefind is also easy to customize via a list of CSS variables. Adding it to this website was very straightforward."

https://ergaster.org/til/pagefind-static-search/

#Pagefind #opensource #CSS #websites #JavaScript

TIL that Pagefind does great client-side search

Providing search on a static website seemed impossible, but Pagefind builds a static index and queries it on the client side.

Ergaster

My site’s search functionality now supports searching not only content natively on my site but also my writing on other publications.

All possible thanks to a mini-site made with WebOrigami that indexes external content and the ever-wonderful Pagefind library.

This is useful, because sometimes I get messages asking if I was the one who wrote about a topic.

It has long been easy for people to search for content present directly on my site, but it has been tricky to search in one place for my writing across the rest of the web. Happy to have this solution!

#Pagefind #WebOrigami #WebDev

Search

Full site search of Vale.Rocks.

Vale.Rocks

#Pagefind is pretty great! I've just added it to a site, took all of ten minutes. (I mean, probably I've done something wrong, but it seems to work well so far!)

I had been relying on DuckDuckGo for single-site search results, but there's just so much that seems not to be indexed that way. (DDG is still the no-JS fallback.)

https://pagefind.app

Pagefind

Pagefind is a fully static search library that aims to perform well on large sites, while using as little of your users’ bandwidth as possible, and without hosting any infrastructure.

Pagefind

Been butting my head against Pagefind on my textbook site, the Default UI works, the Playground works, but using the Pagefind API in my Lit component does not return any results. I know it worked once upon a time when I original wrote the component, but have no idea what have changed since then or when it stopped working. 🥺

#pagefind #lit

I added search to my #eleventy blog via #pagefind. It took maybe 30 minutes, including a bit of fumbling to index only the posts and not lists of tags and the like. The delta between my old Wordpress version of the blog and the current statically rendered version continues to shrink.

I used these directions and they worked great and were easy to follow:

https://slecache.com/posts/adding-pagefind-search-to-a-static-eleventy-site/

The whole process was simple and straightforward. It made me feel dumb that it took me this long to do it.

#11ty

Adding Pagefind Search to a Static Eleventy Site

Search is an essential feature on a website. But how to implement it on a static site?

slecache

Comment j'ai viré Algolia et recréé le Google de 1998 sur mon site

https://fed.brid.gy/r/https://korben.info/pagefind-recherche-statique-hugo-algolia-alternative.html

On this note, though, does anybody know of there’s a way to improve the search query syntax in #Pagefind ? It doesn’t support excluding words, for example, unless it does and I don’t know it.

Le #smallWeb c'est bien, mais il me manquait un moteur de recherche adapté sur mon site statique construit avec #hugo .

Je ne pensais pas que c'était possible.
Et j'ai trouvé #pagefind : mon site reste statique, l'indexation est faite en amont, et le site reste super léger et rapide. 😋
Seule la page de recherche charge le javascript si elle est utilisée.

https://alterzorg.fr/recettes/articles/recherche/

#smolweb

Pagefind

Pagefind is a fully static search library that aims to perform well on large sites, while using as little of your users’ bandwidth as possible, and without hosting any infrastructure.

Pagefind

I finally got around to enabling search [1] via #pagefind for #11ty. However, as #pagefind is a client side solution, this required #Cloudflare #RocketLoader to be turned off and a cache purge to ensure Chrome users with #uBlock were not impacted. Seems like a good tradeoff as I don't use that much javascript.

[1] https://fudge.org/search/

Search

Fudge Factor is a newsletter and blog by Jay Cuthrell

Fudge Factor 🤔💡🤯🤓