Skip to content

Commit a4e5fe8

Browse files
mfisher87rowanc1
andauthored
Module 5 exercises C, D, & E (#48)
* Tweaks to mini-exercise * Add environment management dropdown * Reinforce normality of GH warning * Fix missing line emphasis Sadly we need to have line numbers enabled * First couple steps of building PDF, including Matt's usual YAML rant * Fix header level * Qualify YAML dropdown as a rant Maybe this will warn people against jumping in this rabbit hole ;) * Add title header to document * Adjust language setting for consistency * Use Typst for PDF rendering * Document building a PDF * Remove dangling ref * Add exercise D content * Move TODOs to dropdown at the beginning * Add missing period * Better "you should notice..." callout * Make "notice" callouts more consistent * Module 5 exercise E (#50) * Remove redundant "notice..." callout * Add a "Joining late?" callout to clone the repo * Improve late-joiner instructions to setup GH auth * Fix typo * Add more context to "the normal way" to build with MyST * Use test tube emoji to denote tests * Fix typo, adjust whitespace * Add checkpoints to commit and push using custom plugin * Extract `{youShouldNotice}` directive * Fix line emphasis * Add documentation for new custom helpers * Populate "What do we know" section for DOIs * Remove unnecessary block wrappers Co-authored-by: Rowan Cockett <[email protected]> * Change body type of youShouldKnow directive to "myst", removing need to parse Co-authored-by: Rowan Cockett <[email protected]> * Create `{myst:static}` directive first draft * Remove unnecessary newlines --------- Co-authored-by: Rowan Cockett <[email protected]>
1 parent 0c03cfc commit a4e5fe8

File tree

12 files changed

+864
-65
lines changed

12 files changed

+864
-65
lines changed

assets/styles/style.css

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,42 @@ body {
99
[aria-label="Document Outline"] {
1010
max-height: calc(100vh - 100px) !important;
1111
}
12+
13+
.myst-static-input-wrapper {
14+
border: 1px solid #ccc;
15+
}
16+
17+
.myst-static-input-wrapper::before {
18+
content: "📥 MyST input";
19+
display: block;
20+
background-color: #f5f5f5;
21+
border-bottom: 1px solid #ccc;
22+
padding: 8px 12px;
23+
font-weight: bold;
24+
font-size: 14px;
25+
color: #333;
26+
margin: 0;
27+
}
28+
29+
.myst-static-output-wrapper {
30+
border: 1px solid #ccc;
31+
margin-bottom: 20px;
32+
}
33+
34+
.myst-static-output-wrapper::before {
35+
content: "📤 MyST output";
36+
display: block;
37+
background-color: #f5f5f5;
38+
border-bottom: 1px solid #ccc;
39+
padding: 8px 12px;
40+
font-weight: bold;
41+
font-size: 14px;
42+
color: #333;
43+
margin: 0;
44+
}
45+
46+
.myst-static-content {
47+
padding-left: 12px;
48+
padding-right: 12px;
49+
margin: 0;
50+
}

for-instructors/helpers.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# 🪄 Helpers
2+
3+
This repository includes a `plugin-custom-directives.mjs` file which defines custom
4+
directives that will save some time authoring certain repeated elements.
5+
6+
## Git commit checkpoint directive
7+
8+
```{myst:static}
9+
:::{gitCommitCheckpoint} my commit message
10+
:::
11+
```
12+
13+
14+
## "You should notice..." directive
15+
16+
``````{myst:static}
17+
:::{youShouldNotice}
18+
...the `{youShouldNotice}` directive fully supports markdown in the body.
19+
This means you can, for example include some code:
20+
21+
```python
22+
print("Some code!")
23+
```
24+
:::
25+
``````

for-instructors/style-guide.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,30 @@ E.g.:
209209
:::
210210
```
211211

212+
**As a shortcut, you can use the `{youShouldNotice}` directive.**
213+
See [](./helpers.md).
214+
215+
216+
#### Committing
217+
218+
Use 💾 in a callout to indicate that the user should stop and do a commit now.
219+
Provide the full set of commands the user should run.
220+
221+
``````{myst}
222+
:::{important} 💾 Commit & push to GitHub
223+
:icon: false
224+
225+
```bash
226+
git add .
227+
git commit -m "Commit message"
228+
git push -u origin main
229+
```
230+
:::
231+
``````
232+
233+
**As a shortcut, you can use the `{gitCommitCheckpoint}` directive.**
234+
See [](./helpers.md).
235+
212236

213237
### Voice / language
214238

8.07 KB
Loading
140 KB
Loading
71.8 KB
Loading

0 commit comments

Comments
 (0)