You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Python documentation features a helpful UI element that allows users to show or hide the interactive Python prompts (>>>) within code blocks. This feature is beneficial for readers who wish to copy and paste code samples without manually removing the prompts. I propose adding similar functionality to mkdocs-material to enhance the user experience for technical documentation, particularly for Python projects.
Proposed Functionality
Add a toggle switch/button in the UI to show/hide interactive Python prompts.
The feature could utilize custom CSS classes and JavaScript to selectively hide elements marked as prompts.
Provide a global setting in mkdocs.yml for the site or a per-page option to enable this feature for specific code blocks.
Use Cases
Readers can easily copy code samples without the Python shell prompts, streamlining the experience of using code examples from the documentation.
Improves the readability of code blocks by allowing users to focus on the code itself, free from REPL-specific syntax.
Enhances the functionality of mkdocs-material, aligning it with features provided by official Python documentation and other technical documentation tools.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
The Python documentation features a helpful UI element that allows users to show or hide the interactive Python prompts (
>>>
) within code blocks. This feature is beneficial for readers who wish to copy and paste code samples without manually removing the prompts. I propose adding similar functionality tomkdocs-material
to enhance the user experience for technical documentation, particularly for Python projects.Proposed Functionality
mkdocs.yml
for the site or a per-page option to enable this feature for specific code blocks.Use Cases
mkdocs-material
, aligning it with features provided by official Python documentation and other technical documentation tools.Additional Context
This feature is demonstrated in the Python official documentation. Here is an example where the feature is utilized:
Decimal — Decimal fixed point and floating-point arithmetic
Thank you for considering this feature request. I believe it would be a valuable addition to
mkdocs-material
.Beta Was this translation helpful? Give feedback.
All reactions