Gitea Theme for DokuWiki
A DokuWiki template that makes your wiki look exactly like Gitea —
the same grey navbar, pointing tab bar, blue links, flat Gitea buttons,
bordered sidebar box and Gitea's exact colour palette in light and dark mode
(#4183c4 primary, #f6f7fa navbar, #d0d7de borders, system font stack at 14px/20px).
Highlights:
- Light/dark switch — sun/moon button in the navbar. The choice is stored in
localStorageand applied before first paint (no flash); with no stored choice the system preference (prefers-color-scheme) is followed. - No bundled header icon — the header shows the wiki title only, unless you
upload a
logo.svg/logo.pngto the media manager (:wiki:namespace). - Gitea-style buttons — page tools and edit toolbar buttons are separate rounded buttons with a small gap between them. The edit toolbar glyphs are inverted on the dark theme so they stay legible on the dark buttons.
- Mobile polish — on phones the search box and the theme toggle share one row, the toolbar buttons get bigger touch targets, and the skip link stays hidden until a keyboard user tabs to it (it then pops in as a blue bar).
Installation
-
Copy this folder into your DokuWiki installation as:
<dokuwiki-root>/lib/tpl/gitea/(Any folder name works —
giteais just a suggestion.) -
Activate it either by adding this to
conf/local.php:$conf['template'] = 'gitea';or via Admin → Configuration → Layout Settings → Template.
-
Optional: open
lib/tpl/gitea/style.ini— or better, copy it toconf/tpl/gitea/style.iniso your tweaks survive upgrades — to adjust the palette placeholders.
What's inside
| File | Purpose |
|---|---|
main.php |
Page shell (header, sidebar, content, footer) |
detail.php |
Image detail page |
mediamanager.php |
Media manager popup |
tpl_header.php |
Gitea navbar + tab bar + breadcrumbs |
tpl_footer.php |
Gitea-style footer bar |
style.ini |
Stylesheets + Gitea colour replacements |
css/basic.less |
Typography, links, tables, code, form controls |
css/structure.less |
Full-bleed header, 1280px container, right sidebar |
css/design.less |
Navbar, tabs, breadcrumbs, sidebar box, footer |
css/usertools.less |
Navbar user-tool items |
css/pagetools.less |
Page actions as a row of gapped buttons |
css/content.less |
Wiki content (TOC, code blocks, toolbars) |
css/mobile.less |
Tablet/phone layouts |
css/_gitea.less |
Gitea design tokens (light + dark) + component overrides |
Design reference
All colours and measurements are taken from Gitea's own frontend source:
web_src/css/themes/theme-gitea-light.css— light colour tokensweb_src/css/themes/theme-gitea-dark.css— dark colour tokensweb_src/css/base.css— typography, menus, layoutweb_src/css/modules/navbar.css,menu.css,button.css,container.css
License
GPL 2 (same as the DokuWiki starter template this is based on).