Source of the website of a short course.
It is powered by Hugo and the following themes:
Slides for each section are listed in the menu and opened in a new tab (thanks to a custom menu layout, compared to the original Hugo learn theme).
Some Markdown content is generated with R Markdown, using hugodown.
The website is deployed by Netlify.
Why use Hugo for both the website and slidedecks, and not, say Hugo+hugodown for pages and xaringan for slides? This way the source of slides is html produced by Hugo from Markdown content. It allows me to use:
- downlit syntax highlighting for slides created from R Markdown with hugodown output format;
- Chroma syntax highlighting for other languages;
- emojis!
:grin:
works in slides; - Shortcodes in slides, should I choose to.
Also, because slides are in the content, they are indexed by the Hugo learn theme so searchable!
You will need Go (> 1.12) and Hugo installed.
- Make copy of template
- Edit
config.toml
providing details like workshop title, description, authors and urls to the GitHub repository - Build static pages with
hugo -D
- if you encounter any errors for example, regarding missing shortcodes, you made need to clean your module cache with
hugo mod clean
- if you encounter any errors for example, regarding missing shortcodes, you made need to clean your module cache with
- Serve site locally
hugo server -D
- Navigate to http://localhost:1313/ to view
To create a new file use the hugo new
command
hugo new hugo new 01-getting-started/introduction.md
To use one of the archetypes, for example to create a new chapter, use the flag --kind
:
hugo new --kind chapter 02-r-rstudio/_index.md
To include reveal.js slides in a chapter, ensure the header YAML in the chapter index.md
file includes slides: true
The workshop materials website template is based on the hugo-theme-learn, reveal-hugo Hugo themes and further work and configuration by Maëlle Salmon for her course site on Scientific blogging with R Markdown.