Sphinx Extension to enable OGP support
Project description
sphinxext-opengraph
Sphinx extension to generate OpenGraph metadata (https://ogp.me/)
Installation
python -m pip install sphinxext-opengraph
Options
These values are placed in the conf.py of your sphinx project.
ogp_site_url
- This config option is very important, set it to the URL the site is being hosted on.
ogp_description_length
- Configure the amount of characters taken from a page. The default of 200 is probably good for most people. If something other than a number is used, it defaults back to 200.
ogp_image
- This is not required. Link to image to show.
ogp_type
- This sets the ogp type attribute, for more information on the types available please take a look at https://ogp.me/#types. By default it is set to
website
, which should be fine for most use cases.
- This sets the ogp type attribute, for more information on the types available please take a look at https://ogp.me/#types. By default it is set to
Example Config
Simple Config
ogp_site_url = "http://example.org/"
ogp_image = "http://example.org/image.png"
Advanced Config
ogp_site_url = "http://example.org/"
ogp_image = "http://example.org/image.png"
ogp_description_length = 300
ogp_type = "article"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for sphinxext-opengraph-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d819f9cdd730e4045df861988eb9bceef79af0245da0b8605bab93c8af4548f8 |
|
MD5 | b993f80926b9be29d90e3747bfd9f6f4 |
|
BLAKE2b-256 | d2ac3dc9032f6dec677ef4c2c23b21a2d9f25da0800a462664624008a977a4c4 |
Close
Hashes for sphinxext_opengraph-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf4eacf8b0dd39ce217ea3cf9e964cd411e5f729d590c64c0a6224ec6e89e6ee |
|
MD5 | 6c431776290fb12d508e55963016d549 |
|
BLAKE2b-256 | 2a9c9b49c2c6ddffe58588152baead68deeb38943c3de06191e9ddcc4e151532 |