From 2668974affbf0e8e83950a71b4e72eff9a384693 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 5 Nov 2026 22:40:47 -1000 Subject: Say that an about page needs a readme line Without one a repository has no about tab and its about url redirects to the summary, so a site that sets only about-filter never sees the renderer run. --- custom/cgitrc | 5 +++-- custom/extensions/about-render.lua | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'custom') diff --git a/custom/cgitrc b/custom/cgitrc index d3f9f88..884c737 100644 --- a/custom/cgitrc +++ b/custom/cgitrc @@ -284,8 +284,9 @@ enable-http-clone=1 trust-scan-config=0 # Filter command used to format about-page content. The bundled about-render.lua -# renders markdown, man pages and plain text. Value is a command. Default is -# none. +# renders markdown, man pages and plain text. A repository has an about page +# only when a readme or repo.readme line names a file that exists. Value is a +# command. Default is none. #about-filter=lua:/usr/local/lib/cgit/filters/about-render.lua # Filter command used to format commit messages, for example to turn object diff --git a/custom/extensions/about-render.lua b/custom/extensions/about-render.lua index b0afa4a..03c17d8 100644 --- a/custom/extensions/about-render.lua +++ b/custom/extensions/about-render.lua @@ -5,7 +5,8 @@ -- extension, and anything that fails to parse falls back to escaped plain -- text. Markdown and man pages come out in div.markdown and plain text in -- pre.plaintext, the two wrappers assets/cgit.css styles. It runs on Lua 5.1 --- through 5.5 and LuaJIT. +-- through 5.5 and LuaJIT. A repository has an about page only when a readme +-- or repo.readme line, such as readme=:README.md, names a file that exists. -- -- about-filter=lua:/usr/local/lib/cgit/filters/about-render.lua -- cgit 2.12.1