Replies: 1 comment
-
Currently correct that these metadata tags are not indexed, but I'm considering changing that. Follow #437 for relevant details 🙂 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have used
<title data-pagefind-meta="title">
tag in the page<head>
to set the title metadata.Additionally, we would like to have this title indexed because it is the most relevant text of the page. In our case the head title it's much more meaningful than the page H1 since it includes all the path or breadcrumb. For the example, the H1 is "Programme and tickets" and the page title is "Programme and tickets | Family Concerts | Families & schools | Music Hall"
As we understand, by now it's not possible to index the title because only the content of the body is indexed. Isn't it? I think that it could be very useful to have an attribute to index elements outside the body. In fact we have tried this
<title data-pagefind-meta="title" data-pagefind-weight="10">
without successWhile this is not possible, a solution could be to insert a hidden element on the body with the page title like this
<span style="display: none;" data-pagefind-weight="10">The title of the page</span>
What do you think?
Thank you very much
Beta Was this translation helpful? Give feedback.
All reactions