halostatue
Pagefindex - index your static site with Pagefind
Over the last several months, I’ve been using Tableau to rebuild my long-neglected website. Tableau is part of the Elixir Tools project headed by @mhanberg, and is built on top of MDEx by @leandrocp. This library is one of ten libraries and Elixir extensions that I built. Most of these were built with the assistance of Kiro.
Pagefindex is a wrapper for Pagefind for use with static sites written in Elixir and specific extension support for Tableau.
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.
With configuration similar to bun and esbuild, Pagefindex makes it easy to index a static site with a standalone Mix task.
mix pagefind # defaults to --site=_site --run-with=auto
mix pagefind --site=dist
mix pagefind --run-with=bun
mix pagefind --use-version=1.4.0
The real magic is for Tableau sites, as you can configure the Pagefindex.Tableau extension and it will automatically index your site after every mix tableau.build so that you have the Pagefind UI, library, and your site index available for every publish*.
config :tableau, Pagefindex.Tableau,
enabled: true,
run_with: :auto,
debounce_ms: 2000
*Batteries Not Included
You still have to prepare your site for using Pagefind, but it’s pretty easy.
Most Liked
halostatue
I’m using the default UI with a couple of tweaks (it pops up in its own search box on halostatue.ca when you hit /).
I’d consider doing more, but really what’s there suits my limited needs at the moment.
netoum
I have been using Pagefind with the Vite plugin of many static sites and it works great
Self-hosted site search without a third party are rare these days. Pagefind fills the gap perfectly.
Thanks for bringing Pagefindex to the Elixir world, and for the clear documentation with and without Tableau.
Have you tried custom rendering, filtering or are you using the default UI that Pagefind provides ?
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









