workbenchdev / Biblioteca

Documentation viewer for GNOME
GNU General Public License v3.0
51 stars 8 forks source link

Add script to create index during build time #98

Closed AkshayWarrier closed 4 months ago

AkshayWarrier commented 4 months ago

With this, the index is created during build time using build-index.js. The script is almost identical to the index creation code that was previously in BrowseView.js with the only difference being that the index is saved as a JSON file. On startup, the JSON file is read and is converted to DocumentationPage(s) and list models.

Also, both the search list model and browse list model are populated simultaneously on startup, since all the data needed is already available when the app starts up. (This is different from previously when the search model was only created after the browse list model was ready and then flattened.)