This is an adaptation of the Hugo Relearn Theme that has been customized for use by K-State Computer Science to build online textbooks. It contains some features that are unique to our use case, but they may be useful to others.
Some unique features to this theme:
- Fonts and layouts customized to match K-State's websites and color scheme, as well as Instructure Canvas.
- Each page generates an embeddable version that strips menus, headers and footers (add /embed.html to almost any URL). This is meant to be embedded in an iFrame within another page, such as an HTML wiki page in Canvas.
- By doing so, we can embed course content in Canvas while editing it via Hugo, taking advantage of tools such as git for versioning. In addition, by updating the source website, all versions of the course in Canvas are updated immediately.
- Each page also generates a teleprompter version to allow creation of course videos (add /tele.html to almost any URL). Many pages are used as a video script for multi-modal learning.
- The teleprompter pages include auto-scroll capabilities. It is compatible with an IKAN Teleprompter Remote, but can be controlled using the number keys or easily customized. See /static/js/tele-scroll.js for details.
See below for the original README information from Hugo Relearn Theme.
You can clone a starter book that is already pre-configured to use this template. You can also clone the code for the demo site.
This is a quick start guide for using this theme within a new Hugo website.
- Install Hugo using the method of your choice. You will need a version of Hugo at 0.126.3 or later.
- I prefer to use Windows Subsystem for Linux on Windows 11 coupled with Visual Studio Code and the WSL Extension. This allows native editing coupled with a Linux terminal.
- On WSL, I usually download the .deb package from Hugo Releases and install it using
sudo dpkg -i <.deb file> - Use Hugo to create a new site. See the Hugo Quick Start Guide.
hugo new site <website name>- Install this repository as the theme. See the Hugo Theme Relearn Installation Instructions.
- I recommend using Hugo Modules as directed in the Installation Guide. This allows you to pull updated versions of this template onto your site.
hugo mod init github.com/<username>/<repo>(use the path to your site on GitHub, orexample.comif you aren't using GitHub)hugo mod get github.com/ksu-cs-textbooks/hugo-theme-relearn- Copy the contents of
hugo.toml.samplein this repository to yourhugo.tomlfile in the root of your Hugo website, and edit accordingly.
A theme for Hugo designed for documentation.
★ What's new in the latest version ★
The Relearn theme is an enhanced fork of the popular Learn theme. It aims to address long-standing issues and incorporate the latest Hugo features while trying to maintain compatibility with its predecessor.
-
Versatile Usage
- Responsive design for mobile devices
- Looks nice on paper - if it has to
- Usable offline with no external dependencies
- Usable from your local file system without a web server via
file://protocol - Integration with the VSCode Front Matter CMS extension for on-premise CMS capabilities
-
Customizable Appearance
-
Advanced Functionality
-
Multilingual Support
- Full right-to-left (RTL) language support
- Extensive list of supported languages: Arabic, Chinese (Simplified and Traditional), Czech, Dutch, English, Finnish, French, German, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Persian, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Turkish, Ukrainian, Vietnamese
- Multilingual content search capabilities
-
Enhanced Markdown Features
-
Rich Shortcode Library
- Marker badges
- Flexible buttons
- Child page listing
- Expandable content areas
- Font Awesome icon integration
- File inclusion capabilities
- Math support for mathematical and chemical formulae
- Mermaid diagram integration
- Styled notice boxes
- OpenAPI specification rendering
- Page bundle resource display
- Site configuration parameter display
- Tab-based content organization and multi-tab panels
- Nicely formatted tree lists
For a comprehensive guide on the theme's capabilities, please refer to the official documentation.
Visit the What's New page for feature highlights or the detailed changelog for a complete list of updates.
We welcome contributions for bug fixes and new features. Please see the contribution guidelines before getting started.
The Relearn theme is distributed under the MIT License.
This theme builds upon the work of many contributors.
