Usage#

sphinx-social is an extention that provides support to embed social media posts in your Sphinx based documentation.

For each social media service, use the appropriate directive (the name of the service) and the link of the post you want to share, instruction for finding the links will be given for each social media. The produce directive will be shaped as such:

.. <service_name>:: social_link

We currently support the following services:

More specific information for each provider can be found in the following sections.

facebook#

For Facebook posts, find the publication on a facebook wall. In the top-right corner of the post panel, click on and then on Embed. A popup window will open. Click on advance parameter and Facebook will redirect you to a new page. There copy the link in the “Url of Post” field. See the following screenshots for more details:

Once you have it use the facebook directive as in this example:

.. facebook:: https://www.facebook.com/GitHub/posts/pfbid0Qz2vi4kZsW9PwfB4uUEM9SbYP5KNr8ETcMKafabJUV4qXUgHrZ4hKsv1NunmNEGgl

linkedin#

For linkedin posts, got to the linkedin page and find your post. In the top-right corner of the post panel, click on and then on Embed this post. A popup window will appear on screen, copy the link inside the iframe code. See the following screenshots for more details:

Once you have it use the linkedin directive as in this example:

.. linkedin:: https://www.linkedin.com/video/embed/live/urn:li:ugcPost:7052479613825941504

mastodon#

For mastodon, go to your mastodon instance (in this example https://hachyderm.io) and find your post. in the bottom-right side of the post icon bar, click on and then on copy the link. See the following screenshot for more details:

Once you have it use the mastodon directive as in this example:

.. mastodon:: https://mstdn.social/@GitHub/103392841403991431

twitter#

For tweets, click on the in the top-right corner of the tweet and click on Integrate. This should open a second page where you’ll find in the top text field the full linkt to the tweet. See the follwoing screenshot for more details.

Once you have it use the twitter` directive as in this example:

.. twitter:: https://twitter.com/github/status/1638541174611779584