List for cgit developers and users
 help / color / mirror / Atom feed
* How to format the content of all markdown files, not just the about pages?
@ 2018-12-23 14:25 actionmystique
  2018-12-23 15:43 ` john
  2018-12-27  1:24 ` list
  0 siblings, 2 replies; 4+ messages in thread
From: actionmystique @ 2018-12-23 14:25 UTC (permalink / raw)


Hi there,
with the following setup, no markdown file is correctly formatted besides
the about pages:
*cgit 1.2.1-14-g55ebd5e*
*git 1:2.20.1-1*
in */etc/cgitrc*:
-------------------------------------------------------------------------------------------------
# Format markdown, restructuredtext, manpages, text files, and html files
# through the right converters
about-filter=/usr/local/lib/cgit/filters/about-formatting.sh

## Search for these files in the root of the default branch of repositories
## for coming up with the about page:
readme=:README.md
-------------------------------------------------------------------------------------------------

The about pages are perfectly formatted, for instance here
<https://git.sdxlive.com/DR/about/>.
But any other markdown page is not formatted, for instance here
<https://git.sdxlive.com/DR/tree/KVM-and-Manager/README.md>.
Am I missing something or is this a missing feature?
-- 
Jean-Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20181223/00ee5fac/attachment.html>


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

* How to format the content of all markdown files, not just the about pages?
  2018-12-23 14:25 How to format the content of all markdown files, not just the about pages? actionmystique
@ 2018-12-23 15:43 ` john
  2018-12-27  1:24 ` list
  1 sibling, 0 replies; 4+ messages in thread
From: john @ 2018-12-23 15:43 UTC (permalink / raw)


On Sun, Dec 23, 2018 at 03:25:00PM +0100, jean-christophe manciot wrote:
> with the following setup, no markdown file is correctly formatted besides
> the about pages:
> *cgit 1.2.1-14-g55ebd5e*
> *git 1:2.20.1-1*
> in */etc/cgitrc*:
> -------------------------------------------------------------------------------------------------
> # Format markdown, restructuredtext, manpages, text files, and html files
> # through the right converters
> about-filter=/usr/local/lib/cgit/filters/about-formatting.sh
> 
> ## Search for these files in the root of the default branch of repositories
> ## for coming up with the about page:
> readme=:README.md
> -------------------------------------------------------------------------------------------------
> 
> The about pages are perfectly formatted, for instance here
> <https://git.sdxlive.com/DR/about/>.
> But any other markdown page is not formatted, for instance here
> <https://git.sdxlive.com/DR/tree/KVM-and-Manager/README.md>.
> Am I missing something or is this a missing feature?

It's not supported at the moment, although there have been various
patches posted to add support for rendered content in the tree view.

The most recent thread ends about here with a summary of the changes
needed to move forward:

https://lists.zx2c4.com/pipermail/cgit/2018-July/004127.html

I'd forgotten that this is still unresolved, so I may see if I have time
to pick it up again between now and the new year.


Regards,
John


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

* How to format the content of all markdown files, not just the about pages?
  2018-12-23 14:25 How to format the content of all markdown files, not just the about pages? actionmystique
  2018-12-23 15:43 ` john
@ 2018-12-27  1:24 ` list
       [not found]   ` <CAKcFC3a5jFWveNEuC541we-_HAHKaBWqH3U_VVTu=qYR0yTriA@mail.gmail.com>
  1 sibling, 1 reply; 4+ messages in thread
From: list @ 2018-12-27  1:24 UTC (permalink / raw)


jean-christophe manciot <actionmystique at gmail.com> on Sun, 2018/12/23 15:25:
> Hi there,
> with the following setup, no markdown file is correctly formatted besides
> the about pages:
> *cgit 1.2.1-14-g55ebd5e*
> *git 1:2.20.1-1*
> in */etc/cgitrc*:
> -------------------------------------------------------------------------------------------------
> # Format markdown, restructuredtext, manpages, text files, and html files
> # through the right converters
> about-filter=/usr/local/lib/cgit/filters/about-formatting.sh
> 
> ## Search for these files in the root of the default branch of repositories
> ## for coming up with the about page:
> readme=:README.md
> -------------------------------------------------------------------------------------------------
> 
> The about pages are perfectly formatted, for instance here
> <https://git.sdxlive.com/DR/about/>.
> But any other markdown page is not formatted, for instance here
> <https://git.sdxlive.com/DR/tree/KVM-and-Manager/README.md>.
> Am I missing something or is this a missing feature?

Use the correct url and everything is formatted just fine:

https://git.sdxlive.com/DR/about/KVM-and-Manager/README.md
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20181227/d1fd8de4/attachment.asc>


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

* How to format the content of all markdown files, not just the about pages?
       [not found]   ` <CAKcFC3a5jFWveNEuC541we-_HAHKaBWqH3U_VVTu=qYR0yTriA@mail.gmail.com>
@ 2018-12-28  9:15     ` actionmystique
  0 siblings, 0 replies; 4+ messages in thread
From: actionmystique @ 2018-12-28  9:15 UTC (permalink / raw)


OK, but redirecting all URLs containing files which can be formatted by the
about filter & located below /tree to /about is not effective:
        location ~ \.(md|MD|rst|RST|[1-9]|html|HTML|txt|TXT)$
        {
                rewrite ^(/.*)/tree/(.*)$ $1/about/$2 permanent;
        }
leads to a "404 Not Found".

For instance, https://git.sdxlive.com/PPA/tree/Wireshark/README.md, I get
the error log:
2018/12/27 12:52:49 [error] 20915#20915: *1 open()
"/usr/share/nginx/html/PPA/about/Wireshark/README.md" failed (2: No such
file or directory), client: 2a01:cb00:745:c100:26d7:494a:7c78:c99a, server:
git.sdxlive.com, request: "GET /PPA/about/Wireshark/README.md HTTP/2.0",
host: "git.sdxlive.com", referrer: "
https://git.sdxlive.com/PPA/tree/Wireshark"

If I remove the location/rewrite directives and restart nginx, the same URL
https://git.sdxlive.com/PPA/tree/Wireshark/README.md is correctly displayed
& formatted with the about filter.

What am I missing?
-- 
Jean-Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20181228/27916204/attachment.html>


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

end of thread, other threads:[~2018-12-28  9:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-23 14:25 How to format the content of all markdown files, not just the about pages? actionmystique
2018-12-23 15:43 ` john
2018-12-27  1:24 ` list
     [not found]   ` <CAKcFC3a5jFWveNEuC541we-_HAHKaBWqH3U_VVTu=qYR0yTriA@mail.gmail.com>
2018-12-28  9:15     ` actionmystique

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