[PATCH v4 00/16] Render READMEs inline in tree view

John Keeping john at keeping.me.uk
Sat Jun 23 13:04:42 CEST 2018


On Wed, Jun 20, 2018 at 06:11:57PM +0800, Andy Green wrote:
> 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,
> eg,
> 
> ![overview](./doc-assets/overview.png)
> 
> 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
> 
> inline-readme=README.md
> render.md=/usr/libexec/cgit/filters/html-converters/md2html
> 
> You can see examples of it in operation at
> 
> https://libwebsockets.org/git/libwebsockets/tree
> https://libwebsockets.org/git/libwebsockets/tree/?h=v3.0-stable
> https://warmcat.com/git/cgit/tree/
> 
> 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
> 
> https://warmcat.com/git/cgit/log/
> 
> v4 collects all the reviewed by and implements yesterday's comments

Other than the left-over debugging line you've already pointed out
yourself, this looks good to me.

I suggest you post a final version after the Git 2.18.0 update hits
master and we can get this merged.

> ---
> 
> Andy Green (10):
>       manpage: fix sorting order
>       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
>       md2html: add asset postfix arg
>       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
>       md2html: change css name to not conflict with highlight
> 
> 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                        |    5 +
>  cgit.h                          |    6 +
>  cgitrc.5.txt                    |  221 +++++++++++++++++++++++----------------
>  cmd.c                           |    8 +
>  filter.c                        |    4 +
>  filters/html-converters/md2html |   61 ++++++++++-
>  shared.c                        |   21 ++++
>  ui-shared.c                     |   72 ++++++++++---
>  ui-shared.h                     |    6 +
>  ui-tree.c                       |  193 +++++++++++++++++++++++++++++++---
>  ui-tree.h                       |    2 
>  12 files changed, 498 insertions(+), 136 deletions(-)
> 
> --
> Signature
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/cgit


More information about the CGit mailing list