You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using the Hugo static website generator based on markdown documents. We use the Relearn Hugo theme which is shipped with the lunrjs search engine. Therefore each Hugo documentation has a index.search.js containing the prebuilt search index.
varrelearn_search_index=[{"content": " Documentation as Code You should write the documentation ..., "description": "Explains the principle of Documentation as Code.","tags": null,"title": "Documentation as Code","uri": "/training/advanced/docs-as-code/index.html"},
...
]
Minimal setup
Each project provides its own lunr search index (index.search.js in the document root directory)
When searching in the docat search, the latest version of each project should be considered
@randombenj Yes I did. I think this idea was dropped first of all because to serve the pre-built index it would need to be built in the backend which is not in JavaScript but Python. Also, Lunr doesn't allow you update an existing index, which would mean that it would have to be rebuilt completely every time something is updated.
An alternative could be elasticlunr that allows you to update documents, but that still has the issue of building it in the backend.
Also, in my testing, extracting all the text from the uploaded zip files can also be quite expensive.
It would be nice to have search across projects, to support this let's have a look at lunrjs as it
seems to be the default frontend search thingy.
The text was updated successfully, but these errors were encountered: