Sphinx integration¶
OGPy provide Sphinx-extension for integration.
Set up¶
It requires Sphinx.
extension = [
..., # Other extensions
"ogpy.adapters.sphinx",
]
Usage¶
- .. ogp:image::¶
Fetch content from URL, and render image with link.
- .. ogp:figure::¶
Fetch content from URL, and render image with link. This directive inherit
figureinstead ofimage.
Configurations¶
- ogp_use_browser¶
- Type:
- bool
- Default:
False
If this value is
True, extension runs as Browser mode when fetching metadata from websites.
- ogp_browser_name¶
- Type:
- str
- Default:
"chromium"
Settings for what browser does it use when
ogp_use_browserisTrue.
Demo¶
.. ogp:image:: https://dev.to/attakei/hosting-presentation-on-read-the-docs-3lkc
:width: 80%
:align: center