From mboxrd@z Thu Jan 1 00:00:00 1970 From: andy at warmcat.com (Andy Green) Date: Mon, 18 Jun 2018 10:56:53 +0800 Subject: [PATCH v2 00/15] Render READMEs inline in tree view In-Reply-To: <20180612093145.GL1922@john.keeping.me.uk> References: <20180612093145.GL1922@john.keeping.me.uk> Message-ID: <152928998685.10419.7869045561776063625.stgit@mail.warmcat.com> 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/git-2-18-0-rc2 You can find these patches on top of the expected basis here https://warmcat.com/git/cgit/log/ The series is adapted for many comments on the list, including one-shot inline rather than a list, repo config override, dropping one patch of gcc8.1 fixes, integrating John's md2html changes etc. There's a new patch about tidying the manpage... the couple of alphabetically-ordered lists in there had things that were out of order. --- Andy Green (9): manpage: fix sorting order gcc8.1: fix strncat warning 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 md2html-add-asset-postfix-arg 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 | 34 +++++- cgit.css | 5 + cgit.h | 6 + cgitrc.5.txt | 210 +++++++++++++++++++++++---------------- cmd.c | 8 + filter.c | 4 + filters/html-converters/md2html | 55 ++++++++++ shared.c | 21 ++++ ui-blame.c | 6 + ui-shared.c | 10 ++ ui-shared.h | 3 + ui-ssdiff.c | 12 ++ ui-tree.c | 199 ++++++++++++++++++++++++++++++++++--- ui-tree.h | 2 14 files changed, 458 insertions(+), 117 deletions(-) -- Signature