List for cgit developers and users
 help / color / mirror / Atom feed
* [RFC/PATCH 0/5] Add render filter
@ 2016-09-03 18:29 john
  2016-09-03 18:29 ` [RFC/PATCH 1/5] Use string list strdup_strings for mimetypes john
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: john @ 2016-09-03 18:29 UTC (permalink / raw)


This is an initial attempt at implementing a mechanism for rendering
text documents as HTML in the tree view (Markdown, ReStructuredText,
etc.).  Filters are specified by file extension in the same way as MIME
type mappings, but I have not added support for overriding these in
per-repository configuration.  This makes it like MIME type mapping but
unlike the source filter, which can be specific per-repository.

A new "source" view is introduced to get back to the source, as it is
currently displayed, when a renderer is available and is being used by
default.

The tree view changes so that if a render filter is specified in the
configuration, the rendered content is used.  As an additional
enhancement, if a MIME type is specified, the content is included inline
served via the "plain" page.  This allows displaying images inline
without needing to fork a filter process just to write an HTML wrapper.

The stylesheet probably needs some work, any suggestions or follow up
patches will be gratefully received.

John Keeping (5):
  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

 cgit.c       |  19 ++++++++-
 cgit.css     |   5 +++
 cgit.h       |   4 +-
 cgitrc.5.txt |  18 +++++++++
 cmd.c        |   8 +++-
 filter.c     |   1 +
 shared.c     |  21 ++++++++++
 ui-shared.c  |  10 +++++
 ui-shared.h  |   3 ++
 ui-tree.c    | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 ui-tree.h    |   2 +-
 11 files changed, 196 insertions(+), 19 deletions(-)

-- 
2.10.0.rc0.142.g1e9f63b



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-03 18:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-03 18:29 [RFC/PATCH 0/5] Add render filter john
2016-09-03 18:29 ` [RFC/PATCH 1/5] Use string list strdup_strings for mimetypes john
2016-09-03 18:29 ` [RFC/PATCH 2/5] Add "source" page john
2016-09-03 18:29 ` [RFC/PATCH 3/5] Parse render filters from the config john
2016-09-03 18:29 ` [RFC/PATCH 4/5] ui-tree: split out buffer printing john
2016-09-03 18:29 ` [RFC/PATCH 5/5] ui-tree: use render filters to display content john

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).