[PATCH v3 00/17] Render READMEs inline in tree view

Andy Green andy at warmcat.com
Tue Jun 19 11:01:26 CEST 2018

The following series adds config to allow rendering of
selected READMEs inline after the tree view, where
present in the directory being viewed.

Particularly you can use completely relative markdown to
inline pictures served from the current repo rev context,


will "just work" showing the png from the current view
rev context; this format also works in github.

It builds on John Keeping's RENDER mode series from 2016.

Typical config to enable it, if you have a README.md
looks like


You can see examples of it in operation at


The expected basis these apply on top of is

 - jk/for-jason
 - ch/for-jason

You can find these patches on top of the expected basis here


v3 deals with more comment from after v2


Andy Green (11):
      manpage: fix sorting order
      blame: css: make blame highlight div absolute and at parent top
      ui-blame: free read_sha1_file() buffer after use
      ui-tree: ls_tail: add walk table param
      config: add global inline-readme list
      config: add repo inline-readme list
      ui-tree: render any matching README file in tree view
      ui-shared: deduplicate some code in repolink
      ui-shared: add helper for generating non-urlencoded links
      render: adapt for providing extra filter args for plain

John Keeping (6):
      Use string list strdup_strings for mimetypes
      Add source page
      Parse render filters from the config
      ui-tree: split out buffer printing
      ui-tree: use render filters to display content
      md2html: add asset mapping

 cgit.c                          |   35 +++++-
 cgit.css                        |    7 +
 cgit.h                          |    6 +
 cgitrc.5.txt                    |  215 +++++++++++++++++++++++----------------
 cmd.c                           |    8 +
 filter.c                        |    4 +
 filters/html-converters/md2html |   57 ++++++++++
 shared.c                        |   21 ++++
 ui-blame.c                      |    9 +-
 ui-shared.c                     |   70 ++++++++++---
 ui-shared.h                     |    6 +
 ui-tree.c                       |  193 +++++++++++++++++++++++++++++++----
 ui-tree.h                       |    2 
 13 files changed, 496 insertions(+), 137 deletions(-)


More information about the CGit mailing list