Code
You can use the regular markdown code block:
project:
title: MyST Markdown
github: https://github.com/jupyter-book/mystmd
license:
code: MIT
content: CC-BY-4.0
subject: MyST Markdown
But you can also use the code directive that supposedly give you more features.
project:
title: MyST Markdown
github: https://github.com/jupyter-book/mystmd
license:
code: MIT
content: CC-BY-4.0
subject: MyST Markdown
This page also documents the code directive. It mentions code-block and sourcecode as aliases of the code directive. But code-block seems to behave differently. For example the caption option works for code-block, but not for code.
How to configure `license` of a project
¶
project:
title: MyST Markdown
github: https://github.com/jupyter-book/mystmd
license:
code: MIT
content: CC-BY-4.0
subject: MyST Markdown
Code blocks can also have sidebars.
¶
print("one")
print("two")
print("three")
print("four")
print("five")
print("six")
print("seven")