How To: Relearn Theme Configuration
How To: Configure the Relearn Theme
DocBuilder is hardcoded to use the Relearn theme exclusively. The theme is automatically configured via Hugo Modules with sensible defaults.
Theme Configuration
No theme selection is needed. DocBuilder automatically:
- Applies Relearn-specific default parameters
- Imports the theme module:
github.com/McShelby/hugo-theme-relearn - Generates a
go.modin the output directory with the theme dependency
Default Relearn Parameters
DocBuilder applies these defaults (can be overridden via config):
Customizing Parameters
Override Relearn parameters via configuration:
User-provided parameters take precedence over defaults via deep merge.
Overriding Index Templates
Place template overrides before running the build:
DocBuilder searches these patterns (first match wins):
templates/index/<kind>.md.tmpltemplates/index/<kind>.tmpltemplates/<kind>_index.tmpl
If none match, an embedded default is used.
Controlling Front Matter
If a template body starts with a YAML front matter fence (---), DocBuilder will NOT inject its own. Otherwise it prepends computed front matter (title, repository, section, forge, dates, edit link, etc.).
Theme-Specific Features
Search
- FlexSearch enabled by default (
disableSearch: false) - Automatic search index generation
- Client-side full-text search
Navigation
- Collapsible sidebar menu (
collapsibleMenu: true) - Visited link tracking (
showVisitedLinks: true) - Automatic breadcrumbs
Customization
- Multiple theme variants available
- Custom CSS support
- Configurable landing page
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Theme assets missing | Hugo not run | Run hugo manually or rerun DocBuilder with --render-mode always. |
| Edit links absent | Repo metadata incomplete | Ensure repo URL + branch were configured. |
| Theme variant not applied | Typo in parameter | Check params.themeVariant spelling in config. |
See Also
- Use Relearn Theme Guide - Comprehensive Relearn feature guide
- Configuration Reference - All configuration options
- Relearn Theme Documentation - Official theme docs
| Wrong base URL |
hugo.base_urlmismatch | Update config and rebuild. |