Build docs with sphinx_copybutton and sphinxext.opengraph #5498
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request:
Add a couple of useful Sphinx plugins, as recommended by https://pradyunsg.me/furo/recommendations/
sphinxext-opengraph: adds OpenGraph metadata (https://ogp.me), makes previews better on Facebook and Twitter (probably helps Google results too)
sphinx-copybutton: adds a copy button to code snippets, to make it easy to copy them and try them out
Plus use code formatting for some text on the installation page
Open graph
For example, These tags are inserted into the tutorial page:
https://pillow--5498.org.readthedocs.build/en/5498/handbook/tutorial.html
Can compare what Facebook extracts from the PR:
https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fpillow--5498.org.readthedocs.build%2Fen%2F5498%2Fhandbook%2Ftutorial.html
with stable:
https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fpillow.readthedocs.io%2Fen%2Fstable%2Fhandbook%2Ftutorial.html
Copy button
The button at the top right copies the code block to the clipboard
https://pillow--5498.org.readthedocs.build/en/5498/handbook/tutorial.html#convert-files-to-jpeg
TODO
.github/workflows/test.yml
og:image