Skip to content

Commit

Permalink
Merge pull request #139 from lsst-sqre/tickets/DM-36351
Browse files Browse the repository at this point in the history
DM-36351: Add support for sphinxext.opengraph
  • Loading branch information
jonathansick authored Sep 29, 2022
2 parents c5608f4 + f7f2135 commit 63bf1ee
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ guide = [
"myst-parser",
"markdown-it-py[linkify]",
"sphinxcontrib-mermaid",
"sphinxext-opengraph",
]
technote = [
# Theme and extensions for technotes
Expand Down
17 changes: 17 additions & 0 deletions src/documenteer/conf/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
# MyST markdown configurations
# #MERMIAID
# Mermaid diagram support
# #OPENGRAPH
# OpenGraph metadata support


# Ordered as they are declared in this module
Expand Down Expand Up @@ -95,6 +97,10 @@
"myst_enable_extensions",
# MERMAID
"mermaid_output_format",
# OPENGRAPH
"ogp_site_url",
"ogp_site_name",
"ogp_use_first_image",
]

_conf = DocumenteerConfig.find_and_load()
Expand All @@ -109,6 +115,7 @@
"sphinx_copybutton",
"sphinx_design",
"sphinxcontrib.mermaid",
"sphinxext.opengraph",
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
Expand Down Expand Up @@ -340,3 +347,13 @@
# The raw format renders the diagram client-side, and doesn't require a
# Mermaid CLI installation
mermaid_output_format = "raw"

# ============================================================================
# #OPENGRAPH OpenGraph diagram support
# https://github.com/wpilibsuite/sphinxext-opengraph
# https://ogp.me/
# ============================================================================

ogp_site_url = _conf.base_url
ogp_site_name = _conf.project
ogp_use_first_image = True

0 comments on commit 63bf1ee

Please sign in to comment.