4 ms·
This is a clever idea but it really doesn't scale to larger sites since relies on having access to the full text of every page on the client. Using the rss fee
by AndrewStephens 9y ago
This is a clever idea but it really doesn't scale to larger sites since relies on having access to the full text of every page on the client.
Using the rss feed to find pages is neat, but you might be better off just modifying your static site generator to produce a nicely formatted single file that your Javascript can read directly.
I don't have local search (it is hard to beat google) but I did implement a client-side tag cloud [0] for my statically generated blog. The embedded javascript is generated from the site's content each time I build the site.
[0] https://sheep.horse/tagcloud.html https://sheep.horse/tagcloud.html (Statically generated client side tag cloud)
- z3t4 9y agoI was concerned about downloading several small text-files too, but if you visit for example nytimes.com there's 350 requests on first load. And Facebook has auto-plying videos ... Downloading a bunch of static web pages will feel instant. This search script can be reused between different static site generators, compared to generating index data for each site.