List for cgit developers and users
 help / color / mirror / Atom feed
* Render markdown files in tree view
@ 2016-12-08 15:06 lukasz
  2016-12-08 20:18 ` john
  0 siblings, 1 reply; 4+ messages in thread
From: lukasz @ 2016-12-08 15:06 UTC (permalink / raw)


Hey there,

First of all, thanks for all the great work on cgit. Awesome stuff!

In my setup, I like to have the markdown files in the repos rendered as
HTML instead of having them highlighted as code. Turns out it's fairly
easy to achieve using filters. I attach the necessary patches. Feel free
to commit if you think they are generally useful.

Cheers,
   Lukasz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ui-tree-don-t-assume-that-a-source-filter-must-rende.patch
Type: text/x-patch
Size: 1109 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20161208/195f668b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ui-tree-pass-full-file-path-to-source-filters.patch
Type: text/x-patch
Size: 2405 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20161208/195f668b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-filters-add-source-filter-highlighting-code-and-rend.patch
Type: text/x-patch
Size: 5365 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20161208/195f668b/attachment-0002.bin>


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Render markdown files in tree view
@ 2016-12-14 13:39 andy
  0 siblings, 0 replies; 4+ messages in thread
From: andy @ 2016-12-14 13:39 UTC (permalink / raw)


Hi -

Thanks to John and Lukasz on the tree view rendering patches.  I joined
the list just now to ask about it and saw the recent posts.

After screenscraping and updating a little John's patches against HEAD:
they seem to work OK for me.  That's no ding on Lukasz's patches, I
don't know enough about cgit internals to make an informed choice, I
just picked John's on the basis they had been around longer.

I basically had to append:

render.md=/usr/lib/cgit/filters/about-formatting.sh

to the config and I could see rendered .md in tree view.

So I wanted to relate my experience and gently encourage the maintainer
to include some implementation of this valuable feature.  It basically
allows nice generic documentation and "git based wiki" without any
special support over just having cgit anyway.  "Culturally" in-tree
markdown docs have become a thing thanks to github, this is a small
additional feature but it goes quite a long way with enabling that for
sites using cgit.

-Andy


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

end of thread, other threads:[~2016-12-14 13:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08 15:06 Render markdown files in tree view lukasz
2016-12-08 20:18 ` john
2016-12-08 22:53   ` lukasz
2016-12-14 13:39 andy

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).