scrapix icon indicating copy to clipboard operation
scrapix copied to clipboard

Retrieve page titles from meta tags

Open Strift opened this issue 2 years ago • 3 comments

in the results, the page hosted at website.com/docs/examples/foo will be formatted (written in pink) as docs / examples / foo (or docs > examples > foo, depending on which formatting we decided to keep).

Could we pull the page title from the meta tag instead of using the URL ? Some websites might not have proper page titles, but that's on them to fix that. Page titles may be a more reasonable default than the URL itself?

We probably want to avoid having to think about all the weird ways to handle transform URLs into readable text.

Strift avatar Jun 29 '23 16:06 Strift

Hey! Thanks for the suggestion :) I was thinking that it could be a configurable option. A boolean that by default is false but if the user wants to use the meta tags (or the title tag) he could specify it.

bidoubiwa avatar Jun 29 '23 16:06 bidoubiwa

Hello @Strift, are you using docsearch version or default version?

On the default version, the title is already taken from the metadata. You also have a field urls_tags that is an array of strings containing all the elem in the pathname.

qdequele avatar Jul 22 '23 10:07 qdequele

My comment was based on a preview @bidoubiwa shared with me 3 weeks ago. She asked me to create an issue about it. I don't know which version it is, and can't say if the issue is still relevant as of today.

Strift avatar Jul 22 '23 11:07 Strift