Generate screenshot first section of presentations by Playwright. Screenshots can use as OGP Image contents.
This extension generates screenshots only when your running builder is
Even if you run other builder with this in extensions, any screenshot are not generated.
This extension need Playwright and browser component.
pip install 'sphinx-revealjs[screenshot]' playwright install
When addning extention into your
conf.py, this generates screenshots per pages.
You can set image path into
:og:image: field of sphinxext-opengraph in advance.
extensions = [ "sphinx_revealjs", "sphinx_revealjs.ext.screenshot", "sphinxext.opengraph", ]
:og:image: ./_images/ogp/sample-slide.png Sample title ============
All Configuration names are prefixed
Output directory for generated screenshots. This must be releative path for outdir of Sphinx.
List of docnames to exclude for target of screenshots. Valuese must be docname format that does not need extension of files.
After build all documents, launch headless-browser by Playwright.
Browser captures screenshots any document pages for these rule.
Targets are generating files. If it runs incremental build and document is not changed, document is not target.
If docname contains are
revealjs_screenshot_excludes, document is not target.
When browser capture screenshots, this sets image size from
Reveal config (with and height).
This values are used viewport of presentation.