The SQLite database can be compiled to webassembly and served using static website hosting. SQLite stores data using files so you can avoid downloading the whole thing by making clever use of HTTP range requests which accept a certain byte range as a 204
partial request. That means you can query large datasets and query it with kilobytes of overhead.
SQLite can also be used for full text search using the FTS5 plugin making it a portable static site search engine like stork-search for significantly larger datasets.
Read Hosting SQLite databases on GitHub Pages
See also:
- static.wiki is a searchable 43gb wikipedia that is statically hosted
- An alternative might be a static search engine like Tantivity
- SQLite is adding support for wasm
Links to this note
-
Jump to a Random Page Using a Static Site Generator
To implement a ‘jump to random page’ in a static site (like this website) can be done using a template that loads a JavaScript function to redirect the browser. Static site generators typically have a way of iterating over all pages. You can use this same functionality to generate the random page function.