Skip to content

Commit

Permalink
first draft for gfm template
Browse files Browse the repository at this point in the history
usage: pandoc --template=templates/gfm.md -t gfm examples/gfm/problems.md
  • Loading branch information
cagix committed Oct 6, 2023
1 parent dc927e7 commit e6979c8
Showing 1 changed file with 115 additions and 16 deletions.
131 changes: 115 additions & 16 deletions templates/gfm.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,144 @@
$if(titleblock)$
$titleblock$
$-- custom template to structure the GFM exports

$if(title)$
# $title$
$endif$
$for(header-includes)$
$header-includes$


$if(tldr)$
## TL;DR

<details>

$tldr$

</details>
$endif$


$if(youtube)$
## Videos (YouTube)

<details>

$for(youtube)$
$if(youtube.name)$
- [$youtube.name$]($youtube.link$)
$else$
- $youtube.link$
$endif$
$endfor$
$for(include-before)$
$include-before$

</details>
$endif$


$if(fhmedia)$
## Videos (HSBI-Medienportal)

<details>

$for(fhmedia)$
$if(fhmedia.name)$
- [$fhmedia.name$]($fhmedia.link$)
$else$
- $fhmedia.link$
$endif$
$endfor$
$if(toc)$
$table-of-contents$

</details>
$endif$

$if(tldr)$
## TL;DR

$tldr$
$if(attachments)$
## Materialien

<details>

$for(attachments)$
$if(attachments.name)$
- [$attachments.name$]($attachments.link$)
$else$
- $attachments.link$
$endif$
$endfor$

</details>
$endif$


$if(outcomes)$
## Lernziele

<details>

$for(outcomes)$
$if(outcomes.k1)$
- K1: $outcomes.k1$
- K1: $outcomes.k1$
$endif$
$if(outcomes.k2)$
- K2: $outcomes.k2$
- K2: $outcomes.k2$
$endif$
$if(outcomes.k3)$
- K3: $outcomes.k3$
- K3: $outcomes.k3$
$endif$
$endfor$

</details>
$endif$


$body$

$for(include-after)$

$include-after$
$if(quizzes)$
## Quizzes

<details>

$for(quizzes)$
$if(quizzes.name)$
- [$quizzes.name$]($quizzes.link$)
$else$
- $quizzes.link$
$endif$
$endfor$

</details>
$endif$


$if(challenges)$
## Challenges

<details>

$challenges$

</details>
$endif$


$-- TODO: we use "readings" but would probably want something like our Hugo shortcode "bib.html" or some proper Pandoc citeproc handling here ...
$-- this won't work now - leaving this open for later
$if(bib)$
## Literatur
$bib$

#### Bibliographie
${ references.md() }

$elseif(references)$
## Literatur
${ references.md() }

$else$
$-- nothing, just to complete pandoc's template syntax
$endif$
$-- TODO


## LICENSE
![](https://licensebuttons.net/l/by-sa/4.0/88x31.png)

Unless otherwise noted, this work is licensed under CC BY-SA 4.0.

0 comments on commit e6979c8

Please sign in to comment.