Skip to content

Commit b704dae

Browse files
Add approach and article widget documentation (#481)
1 parent e988e9f commit b704dae

File tree

1 file changed

+36
-9
lines changed

1 file changed

+36
-9
lines changed

building/markdown/widgets.md

+36-9
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,34 @@ You may like to render these widgets yourself in Markdown documents, for example
1818

1919
Widgets can be used wherever you can use Markdown, such as documentation, approaches and student/mentor discussions.
2020

21-
They are rendered using the following format
21+
They are rendered using the following format:
2222

2323
```md
24-
[<type>:<track-slug>/<type-slug>]()
24+
[<type>:<id>]()
2525
```
2626

27+
The `<type>` and `<id>` parts are variable and depend on the actual widget being used.
28+
2729
The link reference, i.e. the contents of `()`, is ignored by the website. You can point them at whatever you want for maintenance purposes.
2830

31+
## Exercise widget
32+
33+
Link format: `[exercise:<track-slug>/<exercise-slug>]()`
34+
35+
### Example
36+
37+
```markdown
38+
Great job on solving this exercise! Some other exercises that you might also like to try:
39+
40+
- [exercise:fsharp/anagram]()
41+
- [exercise:fsharp/isogram]()
42+
```
43+
2944
## Concept widget
3045

3146
Link format: `[concept:<track-slug>/<concept-slug>]()`
3247

33-
### Example: list
48+
### Example
3449

3550
```markdown
3651
There are three primary conditional statements that are used in Julia:
@@ -40,15 +55,27 @@ There are three primary conditional statements that are used in Julia:
4055
- [concept:julia/short-circuiting]()
4156
```
4257

43-
## Exercise widget
58+
## Approach widget
4459

45-
Link format: `[exercise:<track-slug>/<exercise-slug>]()`
60+
Link format: `[approach:<track-slug>/<exercise-slug>/<approach-slug>]()`
4661

47-
### Example: list
62+
### Example
4863

4964
```markdown
50-
Great job on solving this exercise! Some other exercises that you might also like to try:
65+
Here are some approaches you might want to checkout!
5166

52-
- [exercise:fsharp/anagram]()
53-
- [exercise:fsharp/isogram]()
67+
- [approach:csharp/two-fer/method-overloading]()
68+
- [approach:csharp/two-fer/optional-parameter]()
69+
```
70+
71+
## Article widget
72+
73+
Link format: `[article:<track-slug>/<exercise-slug>/<article-slug>]()`
74+
75+
### Example
76+
77+
```markdown
78+
We have an article you might be interested in:
79+
80+
- [article:csharp/reverse-string/performance]()
5481
```

0 commit comments

Comments
 (0)