Skip to content

ksu-cs-textbooks/hugo-theme-relearn

 
 

Repository files navigation

K-State CS Hugo Theme V2

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.


Sample Site

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.


Quick Start Guide

This is a quick start guide for using this theme within a new Hugo website.

  1. Install Hugo using the method of your choice. You will need a version of Hugo at 0.121.0 or later.
  2. 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.
  3. On WSL, I usually download the .deb package from Hugo Releases and install it using sudo dpkg -i <.deb file>
  4. Use Hugo to create a new site. See the Hugo Quick Start Guide.
  5. hugo new site <website name>
  6. Install this repository as the theme. See the Hugo Theme Relearn Installation Instructions.
  7. I recommend using Hugo Modules as directed in the Installation Guide. This allows you to pull updated versions of this template onto your site.
  8. hugo mod init github.com/<username>/<repo> (use the path to your site on GitHub, or example.com if you aren't using GitHub)
  9. hugo mod get github.com/ksu-cs-textbooks/hugo-theme-relearn
  10. Copy the contents of hugo.toml.sample in this repository to your hugo.toml file in the root of your Hugo website, and edit accordingly.

Original README Below


Hugo Relearn Theme

A theme for Hugo designed for documentation.

★ What's new in the latest release ★

Image of the Relearn theme in light and dark mode on phone, tablet and desktop

Motivation

The Relearn theme is a fork of the great Learn theme with the aim of fixing long outstanding bugs and adapting to latest Hugo features. As far as possible this theme tries to be a drop-in replacement for the Learn theme.

Features

Installation & Usage

For a detailed description of the theme's capabilities visit the official documentation.

Changelog

See the What's New page for release highlights or the detailed change history for a complete list of changes.

Contributions

You are most welcome to contribute bugfixes or new features. Check the contribution guidelines first before starting.

License

The Relearn theme is licensed under the MIT License.

Credits

This theme would not be possible without the work of many others.

Packages

 
 
 

Languages

  • JavaScript 37.1%
  • CSS 34.4%
  • HTML 27.8%
  • Other 0.7%