-
Notifications
You must be signed in to change notification settings - Fork 0
Resources Archetypes
We use archtypes, which means base files. In these you can find a to-do list, resulting from our study among teachers. The idea for these archetypes is taken from Hugo, the framework used to create the website (read more on that in chapter Behind the Scenes). The archetype files are stored in the repository under archetypes/.
For more information on how to fill them out refer to the
The beginner-friendliest way is to just copy an archetype file to where you want to work on it and start doing that.
A more sophisticated approach would be to use a Bash command line. If you're running Linux or Apple as your Operating System, you already got that. If you use Windows, you can use the Windows-Subsystem for Linux WSL.
By forking this repository, you can test how your results look on the website and as Word, LaTeX, etc. files. In the GitHub Documentation you can find a detailes explanation on how to fork a repository.
You can then use the Bash command line to invoke Hugo to create a new file based on the archetypes.
~$ hugo new -k en/worksheet content/en/worksheets/my_test/my-test-worksheet.md
hugo new
is the base command to create a copy of an archetype with a few details filled out automatically, e. g. the date of creation.
-k
is short for--kind
and is set to determine which archetype you want. Here, we want the English archetype for worksheets.Lastly, we set the path where to find the worksheet.
content/
is always necessary, as is the language code (en/
, use the language code you're writing in) and the English plural of the type of resource (worksheets/
). Create a folder (my_test/
, you can name that however you want) and name your worksheet file (my-test-worksheet.md
). Hugo will use your filename to automatically set the title by replacing the dashes with spaces and capitalize all first letters:# My Test Worksheet
(you can change that manually).
When you're done, you can run the website locally by calling hugo server
in the command line and visiting localhost:1313
in your web browser.
If you want to see how your resources look like as Word, LaTeX, etc. files, you can either
-
push to your fork (triggering the GitHub Action
conditional_convert_via_pandoc
) or -
run the
pandoc.sh
script in the base repository directory locally, with the path+name of your files.~$ bash pandoc.sh "content/en/worksheets/my_test/my-test-worksheet.md content/fr/instructions/mon_test/mon-test-de-l'instruction.md"
A second file (
mon-test-de-l'instruction.md
) is added in this example to show how to list multiple files at once, and how to write the file path for non-english languages.