[IMP] extensions/spoilers: add an extension for spoilers

It is often needed in developer tutorials to show excerpts of code for
examples and solutions. This takes quite some page space and, for the
latter, it is not always desired to show the final code result right
after the exercise objective.

This commit adds a spoiler feature to the documentation to allow hiding
content until the reader wants to display it.

The feature relies on the new `.. spoiler:: Button label` directive.

task-3036845

closes odoo/documentation#2877

X-original-commit: 4d7a88639a
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Morgan Meganck <morm@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
This commit is contained in:
Antoine Vandevenne (anv)
2022-10-21 13:39:46 +00:00
parent ece2d4c081
commit a154e01cee
6 changed files with 183 additions and 0 deletions

View File

@@ -145,6 +145,9 @@ extensions = [
# Content tabs
'sphinx_tabs.tabs',
# Spoilers
'spoilers',
# Strange html domain logic used in memento pages
'html_domain',
]