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 sample site that is already pre-configured to use this template.
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.100.0 or later.
- I prefer to use Windows Subsystem for Linux on Windows 10 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 Quick Start Guide.
- I recommend using Git submodules as directed in the Quick Start Guide. This allows you to pull updated versions of this template onto your site.
git init
git submodule add https://github.com/K-State-Computational-Core/hugo-theme-relearn /themes/hugo-theme-relearn
- Copy the contents of
config.toml.sample
in this repository to yourconfig.toml
file in the root of your Hugo website, and edit accordingly.
A theme for Hugo designed for documentation.
★ What's new in the latest release ★
The Relearn theme is a fork of the great Learn theme with the aim of fixing long outstanding bugs and adepting to latest Hugo features. As far as possible this theme tries to be a drop-in replacement for the Learn theme.
- Wide set of usage scenarios
- Responsive design for mobile usage
- Looks nice on paper (if you have to)
- Usable offline, no external dependencies
- Usable from your local file system via
file://
protocol - Support for the VSCode Front Matter extension for on-premise CMS capabilities
- Support for Internet Explorer 11
- Configurable theming and visuals
- Configurable brand images
- Automatic switch for light/dark variant dependend on your OS settings
- Predefined light, dark and color variants
- User selectable variants
- Stylesheet generator
- Configurable syntax highlighting
- Unique theme features
- Print whole chapters or even the complete site
- In page search
- Site search
- Dedicated search page
- Taxonomy support
- Hidden pages
- Unlimited nested menu dependend on your site structure
- Navigation buttons dependend on your site structure
- Configurable shortcut links
- Multi language support
- Full support for languages written right to left
- Available languages: Arabic, Simplified Chinese, Traditional Chinese, Czech, Dutch, English, Finnish, French, German, Hindi, Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish, Turkish, Vietnamese
- Search support for mixed language content
- Additional Markdown features
- Shortcodes galore
- Display files attached to page bundles
- Marker badges
- Configurable buttons
- List child pages
- Expand areas to reveal content
- Font Awesome icons
- Inclusion of other files
- Math and chemical formulae using MathJax
- Mermaid diagrams for flowcharts, sequences, gantts, pie, etc.
- Colorful boxes
- OpenAPI specifications using Swagger UI
- Reveal you site's configuration parameter
- Single tabbed panels and multiple tabbed panels
For a detailed description of the theme's capabilities visit the official documentation.
See the What's New page for release highlights or the detailed change history for a complete list of changes.
You are most welcome to contribute bugfixes or new features. Check the contribution guidelines first before starting.
The Relearn theme is licensed under the MIT License.
This theme would not be possible without the work of many others.