2018-06-11 Highlighting Code and Rendering Markdown for cgit

If you publish your git repositories via `cgit`, you might want to link to Markdown files like you did on GitHub. By default this doesn’t work, though: the Markdown filter only applies to the About section. All the other Markdown files are simply *highlighted* but not *rendered*.

This is what we want:

Markdown is rendered

But this is the default:

Markdown is highlighted

This page hacks the two solutions together and will make your code eyes cry. I’m sorry.

Your `/etc/cgitrc` gets a line like the following:

And the content of this file:

​#cgit ​#Git ​#Markdown ​#Programming

Comments

(Please contact me if you want to remove your comment.)

⁂

I might yet get to replace all the links in Gridmapper!

Gridmapper

– Alex Schroeder 2018-06-11 21:02 UTC

---

I also added the TOC extension to `/usr/lib/cgit/filters/html-converters/md2html`:

– Alex Schroeder 2018-06-13 07:05 UTC

---

Thank you very much!

– satmd 2019-01-28 10:57 UTC

---

**2023-09-28**. I switched to legit. – Alex

legit