openzim / libzim

Reference implementation of the ZIM specification
https://download.openzim.org/release/libzim/
GNU General Public License v2.0
163 stars 47 forks source link

We need to know if an article is front or not #885

Open kelson42 opened 2 months ago

kelson42 commented 2 months ago

This has proven to be mecessary at many occasions but at least in https://github.com/kiwix/libkiwix/issues/1026#issuecomment-1860683025

I think we could achieve this by stoping the inherited hack of not saving twices in the title and path indexes if the entries are the same. That would not imply a major format change, only a minor. We could still be able to use the hack (if no front article).

At libzim level, it would be great to have a dedicated method isFront() based on how the page title is saved

kelson42 commented 2 months ago

@mgautierfr Would that be easy to implement?