Skip to content
Snippets Groups Projects
Commit 4ef62860 authored by ForkBench's avatar ForkBench
Browse files

Adding checkboxes, and configuration via YAML + Update README

parent 4b3422a1
Branches
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@ Examples can be found in the [example](./example) folder.
- [x] Dates (*maybe to improve*)
- [x] Table of contents (*maybe to improve*)
- [x] Checkboxes at each section
- [x] Configurable (on/off)
- [ ] Summary at the end of the document
**TODO**: Increase printing visibility for reviewing.
......@@ -44,17 +45,47 @@ mv course.html ~/.pandoc/templates
# Usage
## Configuration
In every markdown file, you have to add the following metadata:
```yaml
---
title: "Title"
author: "Author"
date: "Date"
checked: true # Optional : if you want to add checkboxes at each section
lang: "en" # Optional : default is "en", french is "fr"
---
```
You have to add this at the beginning of the file :
```markdown
---
...
---
# Title 1
...
```
It will configure how the document will be rendered.
## Pandoc
```bash
pandoc [markdown file] -o [output file.html] --template=course.html
```
# Example
### Example
```bash
pandoc README.md -o README.html --template=course.html
```
## LaTeX
### LaTeX
To include LaTeX, the command is the following:
......
......@@ -433,6 +433,7 @@
<script>hljs.highlightAll();</script>
$if(checked)$
<script>
// Foreach h1, h2, h3, h4, h5, h6, just before the text, add a checkbox if it's parent is not a header
......@@ -454,5 +455,6 @@
});
</script>
$endif$
</html>
\ No newline at end of file
......@@ -2,6 +2,7 @@
title: Application en ingénierie et programmation numérique
author: Censored
date: Octobre 2022
checked: true
---
## Résolution de systèmes d'équations linéaires
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment