jupyterlite-sphinx
jupyterlite-sphinx copied to clipboard
Hide buttons from `TryExamples` directive by default
Description
This PR hides the buttons from the TryExamples
directive by default. This is helpful because the current method of ignoring particular pages based on their URL first loads the buttons and then hides them, which means that they are briefly displayed on that page in the documentation and then hidden – keeping them hidden and then selectively enabling them will minimise this latency and improve user experience.
Changes made
- Made all
try_examples_button
buttonshidden
at the time of generation by adding this keyword to theclassList
- Updated the
loadTryExamplesConfig
function injupyterlite_sphinx.js
to check for thetry_examples_button hidden
class instead and then removehidden
from theclassList
Additional context
N/A