# Catppuccin theme for cgit This theme brings the Catppuccin color palette to cgit. It also makes some very slight UI changes to cgit itself. The theme can be seen in action on this website itself, and can be easily ported to other colorschemes too. Syntax highlighting (with pygments) and markdown styling (with syntax highlighting inside the code blocks) is also supported. # Usage ## Website styling Move `cgit.css` to `/usr/share/cgit/cgit.css` on your server. Also make sure your `/etc/cgitrc` has this: ``` fish css=/cgit.css ``` Uncomment one of the theme variants at the top of the `cgit.css` file, and set `--accent-color` to your preferred accent color. ## Syntax highlighting Install the `pygments` package (`python3-pygments` on debian) and place `syntax-highlighting.py` at `/usr/lib/cgit/filters/syntax-highlighting.py` Find these lines in `syntax-highlighting.py`: ``` py from catppuccin.extras.pygments import MochaStyle # ... formatter = HtmlFormatter(style=MochaStyle, nobackground=True) ``` And optionally replace `MochaStyle` with `LatteStyle`, `FrappeStyle` or `MacchiatoStyle` ## Markdown styling Move `md2html` to `/usr/lib/cgit/filters/html-converters/md2html` and optionally edit these lines: ``` py from catppuccin.extras.pygments import MochaStyle # ... sys.stdout.write(HtmlFormatter(style=MochaStyle).get_style_defs('.highlight')) ``` And replace `MochaStyle` with `LatteStyle`, `FrappeStyle` or `MacchiatoStyle`