We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
To develop this theme locally, you can link it to a Hugo site (like the academy starter template) using a replace directive in the site's go.mod file.
-
Directory Setup
Ensure you have cloned both this theme repository and your Hugo site repository into the same parent directory. Your folder structure should look like this:
my-academy-content/ ├── academy-example/ <-- Your content project └── academy-theme/ <-- This theme project -
Modify
go.modIn your site's (
academy-example/)go.modfile, add the followingreplacedirective to point to your local theme folder:replace github.com/layer5io/academy-theme => ../academy-theme
-
Run the Server Now, when you run
make sitefrom within your site's directory, Hugo will use your local theme files instead of fetching the remote module, allowing you to see your changes live.
To ensure you have the latest version of the theme or to upgrade to a newer release, follow these steps:
-
Update Go Module Navigate to your Hugo site's root directory (e.g.,
academy-example/) in your terminal. Run the following command to update the theme module:go get -u github.com/layer5io/academy-theme
This command will fetch the latest version of the theme and update your
go.modandgo.sumfiles accordingly. -
Rebuild Your Site After updating the theme, rebuild your Hugo site to incorporate the changes:
make site
Sometimes, Hugo's cache might prevent the latest changes from being fully reflected.Try to clear the cache then ensure a fresh build:
make clean
Your site should now be running with the updated theme.
For detailed guide, check: Creating your learning path – ongoing maintenance and updates