Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a thumbImage path for each article #589

Open
ghost opened this issue Jul 9, 2021 · 9 comments
Open

Provide a thumbImage path for each article #589

ghost opened this issue Jul 9, 2021 · 9 comments

Comments

@ghost
Copy link

ghost commented Jul 9, 2021

@automactic commented on Jan 17, 2018, 6:40 PM UTC:

It might be a good idea to provide an optional thumbImage link in search result.

This way, when loading the search results, the apps utilizing kiwix-lib could show thumbImage alongside title and snippet. The book favicon can be displayed when thumbImage is absent. This make it obvious if a search result comes from a zim file with or without pictures, leading to a better user experience.

This issue was moved by kelson42 from kiwix/libkiwix#109.

@ghost ghost added the enhancement label Jul 9, 2021
@ghost
Copy link
Author

ghost commented Jul 9, 2021

@kelson42 commented on Jan 17, 2018, 6:48 PM UTC:

Yes... that said I have no clue exactly how this should achieved.

@ghost
Copy link
Author

ghost commented Jul 9, 2021

@automactic commented on Jan 17, 2018, 7:07 PM UTC:

We can do this by adding the src of a <img> (the first, for instance) in the html during indexing to Xapian::Documents using void add_value.

@ghost
Copy link
Author

ghost commented Jul 9, 2021

@kelson42 commented on Jan 17, 2018, 7:15 PM UTC:

Yes, what you need to know is that the Mediawiki API already proposes such a feature, so ideally which should get the information from there (I suspect their algorithm is a bit more subtitle than just taking the first one). Maybe we could put this as metadata in the HTML <HEAD>?

@ghost
Copy link
Author

ghost commented Jul 9, 2021

@automactic commented on Jan 17, 2018, 7:22 PM UTC:

I agree with using the Mediawiki API if is already implemented. That said, it is still necessary to consider other offliners.

But I don't think it is a good idea to put it in <head>, since you have to get the content of the html and build the doc tree. Why not add this as a meta of xapian document?

@ghost
Copy link
Author

ghost commented Jul 9, 2021

@kelson42 commented on Jan 17, 2018, 7:25 PM UTC:

@automactic The problem is that the for now, and as long as we do not use node-libzim, in mwoffliner, the static HTML is more or less the only way to exchange information beetween the online web site and the final ZIM file (through zimwriterfs).

@ghost
Copy link
Author

ghost commented Jul 9, 2021

@automactic commented on Jan 17, 2018, 7:39 PM UTC:

If we utilize features in Mediawiki, why does it matter if we use node or not? Surely we can just make requests to Mediawiki API and ask for a thumbImage link for an article.

@kelson42 kelson42 changed the title Provide a thumbImage path of an article Provide a thumbImage path for each article Jul 9, 2021
@ghost
Copy link
Author

ghost commented Jul 9, 2021

stale[bot] commented on Nov 21, 2019, 12:09 AM UTC:

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

@ghost
Copy link
Author

ghost commented Jul 9, 2021

@kelson42 commented on Jul 9, 2021, 5:28 AM UTC:

This is more a request for the libzim than for libkiwix IMO. It is related to the global metadata problematic.

@kelson42 kelson42 added this to To do in Better Namespaces & Metadata via automation Jul 9, 2021
@kelson42
Copy link
Contributor

kelson42 commented Dec 4, 2021

This depends on #316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant