Skip to content

Please add support for Open Graph protocol tags #974

@siracusa

Description

@siracusa

Pagefind should read Open Graph protocol meta tags from pages to get the title, URL, and image information for use in search results. Example tags from the <head> of a document:

<meta property="og:title" content="Apple Turnaround">
<meta property="og:url" content="http://hypercritical.co/2025/05/20/apple-turnaround">
<meta property="og:image" content="https://hypercritical.co/2025/05/20/images/apple-turnaround.png">
<meta property="og:image:alt" content="A classic Apple logo rotating within a logo-shaped cutout on a platinum background">
<meta property="og:image:width" content="640">
<meta property="og:image:height" content="303">

Right now, Pagefind often requires data-pagefind-meta=… attributes to be added in various places in the pages that are being indexed, even if all the desired information is ready and waiting in these og:… meta tags.

(If there's a way to add data-pagefind-meta=… attributes these meta tags, that could be a temporary workaround, but I could not get it to work.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions