Skip to content

About

Multilingual (en/fr/hi) Hugo template using the DocDock theme, with example course content, reveal.js slide decks, and a gh-pages deployment workflow.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Hugo Courseware & Slide Deck Template

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.

Requirements

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.

Use this template

  1. Click Use this template on GitHub (if you don't see it, ask the repo owner to enable it under Settings → General → Template repository).
  2. 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
  1. 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 in config.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).

Adding a language

  1. Add a [languages.xx] block to config.toml with title, label, locale (e.g. de-DE), contentDir (e.g. content/de), and weight.
  2. Add content/xx/..., mirroring the same file/folder names used in content/en/ — Hugo matches translations by identical path, which is what makes the language switcher link to the right page.
  3. If the DocDock theme doesn't ship UI strings (Search, pagination, etc.) for your language — check themes/docdock/i18n/ — add your own i18n/xx.toml at the project root with the same keys, translated. This repo's i18n/hi.toml is an example, since the theme has no built-in Hindi translation.

Adding a module or slide deck

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).

Documentation

Deployment

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.

About

Multilingual (en/fr/hi) Hugo template using the DocDock theme, with example course content, reveal.js slide decks, and a gh-pages deployment workflow.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages