(Unofficial) Hugo (static site generator written in Go) theme using Bootstrap 5 and inspired by the NC State branding and resources.
Documentation:
- https://wspr-ncsu.github.io/hugo-theme-ncsu/
- Also included in theme itself in
exampleSite
as website using the theme
Examples:
Older versions using the bs3
template (see releases):
This theme includes its own documentation in /exampleSite
.
With hugo installed, run a test server with:
$ cd exampleSite
$ hugo --themesDir ../.. server
Documentation is accessible at http://127.0.0.1:1313
- Install Hugo, this theme requires the "extended version" (or installed Dart Sass) because it uses SCSS.
- Follow the Hugo quickstart:
- Test if Hugo is correctly installed.
$ hugo version
- Create new Hugo website structure
$ hugo new site [project name]
- Add this theme as submodule in the
themes
folder:
$ cd [project name]/themes
$ git submodule add [this repo url]
- (Optional) Freeze submodule to specific release (tag):
$ cd [project name]/themes/hugo-theme-ncsu
$ git checkout v2024.08rc
- Copy example config file to website (from the theme's folder):
$ cp [project name]/themes/hugo-theme-ncsu/hugo.toml [project name]
- Edit
hugo.toml
config file to set website titles etc. (see documentation for settings).
$ nvim [project name]/hugo.toml
Two ways:
- Using GitHub / Gitlab /... actions to deploy directly to web server.
- GitHub pages supports Hugo
- Alternative (free for static websites) services: Netlify, Vercel, Cloudflare
- Use hugo (just the CLI command
hugo
in the project folder) to generate apublic
folder with all the necessary HTML and resources to directly deploy to a web server- Might require to set
baseURL
variable inhugo.toml
to web servers base url for resources to be loaded correctly.
- Might require to set
- The main branch receives continous updates and features (although likely at a slow and non-breaking rate because static website theme).
- Frozen releases are tagged and released with the name of upcoming semesters, e.g.,
2024.08
for Fall semester 2024, you can set specific releases in the submodule to freeze the theme version.