A GitHub template repository for building a multilingual Hugo static site with the DocDock theme, designed around courseware made of text pages and reveal.js slide decks (via DocDock's revealjs shortcode).
It ships with example content — 3 modules, each with a text page and a slide deck — translated into English, French, and Hindi, to demonstrate Hugo's multilingual content structure and DocDock's language switcher end to end.
Hugo v0.158.0 or later (either edition — standard or extended; this site has no Sass/Node build step that would require extended). The site's multilingual setup relies on config keys and template APIs (per-language contentDir, locale, label, the Page.Rotate method) that are current as of that version; it will not build on older Hugo releases. GitHub Actions is pinned to hugo-version: 'latest', so CI always builds with a current release.
- Click Use this template on GitHub (if you don't see it, ask the repo owner to enable it under Settings → General → Template repository).
- Clone your new repository and pull in the theme submodule:
$ git clone <your-new-repo-url>
$ cd <your-new-repo>
$ git submodule update --init --recursive
$ hugo server
$ firefox http://localhost:1313
- Replace the example content under
content/en/,content/fr/,content/hi/with your own, or delete the language directories you don't need (and their[languages.xx]block inconfig.toml).
See Contribute.md for a full setup walkthrough, including the Hugo compatibility fixes already applied in layouts/, adding a slide deck, and optional plugins (quizzes, a git-backed CMS).
- Add a
[languages.xx]block toconfig.tomlwithtitle,label,locale(e.g.de-DE),contentDir(e.g.content/de), andweight. - Add
content/xx/..., mirroring the same file/folder names used incontent/en/— Hugo matches translations by identical path, which is what makes the language switcher link to the right page. - If the DocDock theme doesn't ship UI strings (Search, pagination, etc.) for your language — check
themes/docdock/i18n/— add your owni18n/xx.tomlat the project root with the same keys, translated. This repo'si18n/hi.tomlis an example, since the theme has no built-in Hindi translation.
Copy an existing module folder (e.g. content/en/module-1-finding-data/) into each language directory, edit the front matter, and either write plain Markdown or wrap slide content in the revealjs shortcode:
{{<revealjs theme="moon" progress="true" controls="true">}}
## Slide One
---
## Slide Two
* Bullet point
{{</revealjs>}}Separate slides with --- (horizontal) or ___ (vertical).
A GitHub Actions workflow (.github/workflows/gh-pages.yml) builds the site with hugo --minify on every push to main and publishes public/ to the gh-pages branch using the automatic GITHUB_TOKEN — no secrets to configure.
After the first successful run creates the gh-pages branch, set Settings → Pages → Source to "Deploy from a branch", branch gh-pages, folder /(root). Until that's set, GitHub Pages will default to trying to build main directly with its own Jekyll pipeline, which is not what you want.
Note
On a free GitHub plan, GitHub Pages only serves sites from public repositories. Serving Pages from a private repository requires GitHub Pro, Team, or Enterprise.