CloudCannon / pagefind

Static low-bandwidth search at scale
https://pagefind.app
MIT License
3.48k stars 113 forks source link

Support files other than *.html #26

Closed bcc closed 2 years ago

bcc commented 2 years ago

It would be helpful (for me at least) if pagefind were able to index files other than those named *.html.

For long and complicated (20+ year old) reasons the pages built by my static site generator have a '.shtml' extension and pagefind ignores them by default. I've hacked this up locally, but it would be great if you could optionally choose an extension or ideally glob pattern.

Otherwise what a brilliant piece of software!

bglw commented 2 years ago

Ah, interesting! Yes I can certainly add a configuration for that — we're already globbing for files, so I'll wire that up to our configuration and allow it to be changed.

As long as it's still valid-enough HTML to get through lol-html it should work fine. I'll get that out this week for you 🙂

bglw commented 2 years ago

Hi @bcc 👋

Support for configuring the glob pattern has been released in Pagefind v0.5.0 🎉