atsphinx-og-article#
Overview#
This is Sphinx extension to handle properties of article typeof Open Graph.
You can add og-article directive with some options.
This appends extra properties into meta tags from og-article directive.
NOTE: Use with sphinxext-opengraph#
This renders only article:** meta tags.
For full functional as OpenGraph, install sphinxext-opengraph too.
Installation#
This is registered on PyPI.
You can install pip command.
pip install atsphinx-og-article
Edit your conf.py to add extension.
extensions = [
"atsphinx.og_article",
]
Usage#
Standard usage is adding og-article directive into your document.
You may add directive into document that you want to consider as “article”.
.. og-article::
:published_time: 2023-05-07
When you run html-like builders,
generated files include <meta property="article:PROP" > elements
from documents added directive.
- .. og-article::#
- :published_time: (string)#
- :modified_time: (string)#
published_timeandmodified_timeaccept any format that dateutil can parse. When it is parsing attribute, datetime object has timezone always.These are complement by mutually. If one is not set, use another value automately. If neither not set, these are set build datetime.
- :tags: (string)#
Comma separated list for tags of article. When this is set, extension generates
article:tagproperties per values separated comma.
Configuration#
- og_article_timezone#
- Type:
str | None- Default:
None- Example:
Asia/Tokyo
If this is not
None, replace timezone ofpublished_timeandmodified_timethat do not have timezone text.