In openzim/gutenberg#349, we realize that only the title in title search result is a bit "rough". The fact that what is put inside the title search index is exactly what is displayed on the screen is clearly a limitation.
In Vue-based ZIMs, we have to implement a kind of hack to have title search: we create "mostly fake" HTML pages which only serve to have a title in the index and to redirect the user to the "index.html" SPA with proper fragment value. For instance in `` ZIM, when open the search result for "Rubik", it opens the index/comment_ca_marche_07_rubik_s_cube_bluetooth_connecte-LQNG article, which is in fact only a redirect to `index.html#/watch/comment_ca_marche_07_rubik_s_cube_bluetooth_connecte-LQNG?list=videos-9HEg` thanks to `<meta http-equiv="refresh" ...>`.
It also means we have no solution to propose different results depending on "conditions". For instance, in Vue-based ZIMs, when the user opens the search result we want to show different result (article) depending whether the reader has JS enabled or not.
@Jaifroid has also implemented Wikipedia articles preview in Kiwix JS (see https://www.reddit.com/r/Kiwix/comments/1e5b1e5/release_kiwix_js_browser_extension_v410_unleash/), while from my PoV it should be the ZIM creator responsibility to provide adequate preview (and the ZIM reader responsibility to fetch and display these previews, which could even be reused at different places like search results, link hover, ...)
All this together makes me consider we probably need something better in terms of title (suggestion) results.
In openzim/gutenberg#349, we realize that only the title in title search result is a bit "rough". The fact that what is put inside the title search index is exactly what is displayed on the screen is clearly a limitation.
In Vue-based ZIMs, we have to implement a kind of hack to have title search: we create "mostly fake" HTML pages which only serve to have a title in the index and to redirect the user to the "index.html" SPA with proper fragment value. For instance in `` ZIM, when open the search result for "Rubik", it opens the
index/comment_ca_marche_07_rubik_s_cube_bluetooth_connecte-LQNGarticle, which is in fact only a redirect to `index.html#/watch/comment_ca_marche_07_rubik_s_cube_bluetooth_connecte-LQNG?list=videos-9HEg` thanks to `<meta http-equiv="refresh" ...>`.It also means we have no solution to propose different results depending on "conditions". For instance, in Vue-based ZIMs, when the user opens the search result we want to show different result (article) depending whether the reader has JS enabled or not.
@Jaifroid has also implemented Wikipedia articles preview in Kiwix JS (see https://www.reddit.com/r/Kiwix/comments/1e5b1e5/release_kiwix_js_browser_extension_v410_unleash/), while from my PoV it should be the ZIM creator responsibility to provide adequate preview (and the ZIM reader responsibility to fetch and display these previews, which could even be reused at different places like search results, link hover, ...)
All this together makes me consider we probably need something better in terms of title (suggestion) results.