Skip to content

Add an example of an exercise with a hidden solution #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025

Conversation

danielballan
Copy link
Contributor

This uses cell metadata to make a cell hidden by default but expandable, both in JupyterLab and in the rendered HTML.

---
tags: [hide-cell]
jupyter:
  source_hidden: true
---

The tags operate on MyST. The jupyter key operates on JupyterLab. See references below.

In JupyterLab

image

image

References:

Rendered in HTML by MyST

image

image

Reference: https://jupyterbook.org/en/stable/interactive/hiding.html#hide-entire-code-cells

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@bsipocz bsipocz merged commit 05d4045 into scientific-python:main May 14, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants