AgeCommit message (Collapse)AuthorLines
Escape non-markdown readmes without a filterBryce Kwon-2/+16
A readme that is not markdown was written to the about page as raw HTML when no about-filter was configured, so an untrusted repository could inject script.
Render README markdown in the browserBryce Kwon-12/+49
cgit had no markdown support of its own, so a readme was rendered through an external python filter or not at all. Escaping the source and formatting it in cgit.js keeps the work in the browser like the blob highlighter, and the page stays readable as plain text without scripting.
Add built-in syntax highlightingBryce Kwon-1/+8
Highlighting previously required a source filter shelling out to something like Pygments. A configured source filter still takes precedence, every character is preserved so the line gutter stays aligned, and large files are skipped.
Adapt the layout to small screensBryce Kwon-8/+10
On a phone the description, owner and shortcut columns crowded the index and pushed the age off screen, and tapping the name already opens the repository, so the index collapses to name and age.
Add a light and dark theme toggleBryce Kwon-0/+3
The button is emitted hidden and only revealed by the script, so a browser without JavaScript never shows a control that cannot work and the page keeps tracking the system theme.
Overhaul the stylesheet with tokens and dark modeBryce Kwon-1/+1
The old sheet had no overflow rules, so wide code, diff, blame and stats blocks scrolled the whole page sideways on a phone. The classic layout, badge colours and age shading are kept.
Add viewport and color-scheme meta tagsBryce Kwon-0/+5
Without a viewport meta, mobile browsers assume a desktop-width page and scale it down, which is the root cause of content overflowing on small screens.
Rebuild the page chrome as semantic HTMLBryce Kwon-59/+91
The masthead, tab bar, breadcrumb, content region and footer were HTML tables, which cannot reflow and forced the page to scroll sideways on small screens. Class and id names are kept so custom themes keep matching, the tabs gain title hints and the form controls accessible names.
Add `enable-tree-group-dirs` to list dirs firstBryce Kwon-5/+63
Gate the cache listing behind `enable-cache-list`Bryce Kwon-0/+9
The `ls_cache` page printed the cache directory path and the urls other visitors had requested, with no gate at all.
Let cgit build with or without LuaBryce Kwon-1/+1
Lua only powers the filter extensions, so it stays optional and autodetected. `NO_LUA` yields a self-contained binary and the release script links Lua only when asked to.
Replace the glibc-only `memrchr` for portabilityBryce Kwon-1/+12
Reorganize into source, assets and librariesBryce Kwon-0/+10748
The C sources move to source/, the served files to assets/, the bundled Git submodule to libraries/git and the filter scripts to extensions/. Everything the build generates now lands in build/, so a clean is a single remove and the tree stays clean.