A theme decides what the website looks like and which pages it has. Your documents stay the same: switch "theme" in repo.json, rebuild with --force, and the same files become a different site.
The bundled themes
Team knowledge bases: runbooks, incidents, changes and meeting notes.
A dashboard with open items, an event calendar, monitoring, statistics and backups.
A personal or team blog.
Posts with excerpts, an archive by date and a tag cloud.
Study notes organised as books, parts and chapters.
A shelf with reading progress, book overviews and chapter navigation.
The help of an application, like this site.
Sections, a search that works offline and help ids for the application.
More pages of each theme, and the terminal interface, are on Screenshots.
Each theme can also have the Add page, a Markdown editor in the browser. It is on by default in techdoc. In blog, bookshelf and apphelp it is off until you set "editor": true in repo.json. Any theme can turn it off with "editor": false.
Sample apps
A theme can ship sample knowledge bases, called apps. kb4it create copies one to start you off:
kb4it apps techdoc # lists default and sapbasis
kb4it create techdoc sapbasis ~/sapkb # starts from the sapbasis app
Without an app name you get default.
Where themes come from
When you build, KB4IT looks for the theme named in repo.json in this order and uses the first it finds:
source/resources/themes/<name>/inside the knowledge base, so a site can carry its own theme.~/.kb4it/opt/resources/themes/<name>/, for themes you install for yourself.- The themes that come with KB4IT.
"theme_path" in repo.json skips the search and names the theme folder directly.
kb4it install-theme puts a theme in the second place, ~/.kb4it/opt/resources/themes/. So a theme you install with the id of a bundled theme is the one your builds use. kb4it themes marks the copy builds use with active=yes, and the hidden bundled copy with active=no shadowed_by=user; kb4it uninstall-theme brings the bundled one back. See Install a theme.
To change only one template of a theme, put your version in the knowledge base's overrides/templates/ folder; see Change one template of a theme.
Themes and KB4IT versions
Each theme says which KB4IT it needs, in the kb4it field of its theme.json, for example ">=X.Y.Z". A theme that needs a newer KB4IT is refused with THEME_REQUIREMENT_UNMET, so you learn it before the build, not halfway through.
Each theme also has its own version, in the version field of its theme.json, and a fingerprint of its files. kb4it themes shows both, with the folder the theme comes from, so a copy in ~/.kb4it/opt/resources/themes/ that hides a bundled theme is easy to spot. A change to any theme file rebuilds every page on the next build; see Theme version and fingerprint.
Want something different? Write a theme.



