Forgejo theme builder with live preview, web-derived presets, and CSS export.
  • TypeScript 55.5%
  • CSS 43.7%
  • HTML 0.8%
Find a file
2026-05-25 13:38:07 +02:00
src Clarify Dark Arc preset as concept preview 2026-05-25 13:29:11 +02:00
themes Add installed square Forgejo preview theme 2026-05-25 13:38:07 +02:00
.gitignore Build Forgejo theme builder website 2026-05-25 12:39:24 +02:00
index.html Build Forgejo theme builder website 2026-05-25 12:39:24 +02:00
package.json Clarify Dark Arc preset as concept preview 2026-05-25 13:29:11 +02:00
pnpm-lock.yaml Build Forgejo theme builder website 2026-05-25 12:39:24 +02:00
pnpm-workspace.yaml Build Forgejo theme builder website 2026-05-25 12:39:24 +02:00
README.md Add installed square Forgejo preview theme 2026-05-25 13:38:07 +02:00
tsconfig.json Build Forgejo theme builder website 2026-05-25 12:39:24 +02:00

Forgejo Theme Forge

A browser-based ThemeBuilder for Forgejo/Gitea themes: choose a researched preset, customize the color system, preview it on a Forgejo-like UI, then export a theme-*.css file.

Why this works for Forgejo

Research summary used by the app:

  • Forgejo custom files live under CustomPath / $FORGEJO_CUSTOM. The app config is usually $FORGEJO_CUSTOM/conf/app.ini; distro installs may use /etc/forgejo/app.ini.

  • Custom public assets are served from $FORGEJO_CUSTOM/public/assets/.

  • A theme CSS file should be placed at $FORGEJO_CUSTOM/public/assets/css/theme-your-slug.css.

  • Register the theme name without the theme- prefix or .css suffix in app.ini:

    [ui]
    THEMES = forgejo-auto,forgejo-light,forgejo-dark,your-slug
    DEFAULT_THEME = your-slug
    
  • Restart Forgejo after configuration changes. Existing users can also pick a theme in Settings → Appearance.

  • Forgejo's upstream themes are CSS-variable-heavy (--color-primary, --color-body, --color-box-body, diff colors, console colors, badge colors, fonts, etc.), so the least-invasive custom theme is usually an import of a base theme plus variable overrides.

Primary references:

Development

pnpm install
pnpm run dev
pnpm run build

Export format

The generated CSS imports a built-in base theme and overrides Forgejo variables:

@import url("theme-forgejo-dark.css");

:root {
  --color-primary: #fb923c !important;
  --color-body: #171e26 !important;
  /* ... */
}

If a Forgejo deployment cannot resolve the imported base theme from custom CSS, copy the upstream base theme into the same custom CSS directory first, or paste the generated variable block at the bottom of a copied upstream theme file.

Installed custom theme

themes/theme-clank-preview-square.css is the custom Forgejo theme currently installed on forge.dikka.dev as clank-preview-square. It keeps the green-on-graphite preview colors but avoids broad rounded corners because Forgejo's nested Semantic UI layouts clip and misalign when large radii are applied globally.