API Reference

Config reference

Generated from app.add_config_value() registrations in sphinx_gp_opengraph/__init__.py.

ogp_site_url
config html
config html
ogp_site_url

Site base URL joined with each page’s relative path to form og:url. Required for absolute URLs; auto-derived from docs_url under gp-sphinx.

Type:

str

Default:

''

Registered by:

sphinx_gp_opengraph.setup()

ogp_canonical_url
config html
config html
ogp_canonical_url

Separate canonical URL used to build og:url; falls back to ogp_site_url when empty.

Type:

str

Default:

''

Registered by:

sphinx_gp_opengraph.setup()

ogp_description_length
config html
config html
ogp_description_length

Truncation cap (characters) applied to og:description after extracting the first body paragraph.

Type:

int

Default:

200

Registered by:

sphinx_gp_opengraph.setup()

ogp_image
config html
config html
ogp_image

Site-default OpenGraph image path or absolute URL. Auto-derived from docs_url under gp-sphinx; per-page og:image front-matter overrides.

Type:

None | str

Default:

None

Registered by:

sphinx_gp_opengraph.setup()

ogp_image_alt
config html
config html
ogp_image_alt

Alt text for ogp_image. Falls back to og:site_name then og:title; False suppresses the alt tag entirely.

Type:

None | bool | str

Default:

None

Registered by:

sphinx_gp_opengraph.setup()

ogp_use_first_image
config html
config html
ogp_use_first_image

When True and no per-page override is set, use the first in-page image as og:image.

Type:

bool

Default:

False

Registered by:

sphinx_gp_opengraph.setup()

ogp_type
config html
config html
ogp_type

Value emitted as the og:type tag.

Type:

str

Default:

'website'

Registered by:

sphinx_gp_opengraph.setup()

ogp_site_name
config html
config html
ogp_site_name

Value emitted as og:site_name. Defaults to the Sphinx project name; False suppresses the tag.

Type:

None | bool | str

Default:

None

Registered by:

sphinx_gp_opengraph.setup()

ogp_social_cards
config html
config html
ogp_social_cards

Accepted-but-ignored compatibility shim for upstream sphinxext-opengraph. Setting any value emits a one-line WARNING at config-inited; provide a static PNG via ogp_image or per-page og:image instead.

Type:

None | dict

Default:

None

Registered by:

sphinx_gp_opengraph.setup()

ogp_custom_meta_tags
config html
config html
ogp_custom_meta_tags

Raw <meta> tag strings appended verbatim after the structured og:* block — the supported escape hatch for Twitter card declarations and image-dimension hints.

Type:

list | tuple

Default:

()

Registered by:

sphinx_gp_opengraph.setup()

ogp_enable_meta_description
config html
config html
ogp_enable_meta_description

When True, emit a <meta name="description"> mirroring og:description unless the page already defines one.

Type:

bool

Default:

True

Registered by:

sphinx_gp_opengraph.setup()