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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinxext-opengraph-0.1.2.tar.gz.
File metadata
- Download URL: sphinxext-opengraph-0.1.2.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d819f9cdd730e4045df861988eb9bceef79af0245da0b8605bab93c8af4548f8
|
|
| MD5 |
b993f80926b9be29d90e3747bfd9f6f4
|
|
| BLAKE2b-256 |
d2ac3dc9032f6dec677ef4c2c23b21a2d9f25da0800a462664624008a977a4c4
|
File details
Details for the file sphinxext_opengraph-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sphinxext_opengraph-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf4eacf8b0dd39ce217ea3cf9e964cd411e5f729d590c64c0a6224ec6e89e6ee
|
|
| MD5 |
6c431776290fb12d508e55963016d549
|
|
| BLAKE2b-256 |
2a9c9b49c2c6ddffe58588152baead68deeb38943c3de06191e9ddcc4e151532
|