I manually built latest cgit commit (22583c4) to avoid any discrepancy with my local git release (2.18.0-1). I also moved the scan-path directive below all global settings in /etc/cgitrc. The translation takes place correctly now, despite a hiccup with the #links which are not followed. (I'll open a new thread for that issue).
On Mon, Jul 2, 2018 at 10:17 AM, jean-christophe manciot < [email protected]> wrote: > And that you're not seeing cached content immediately >> after changing the setting? >> > > I cleared the cache with: > # rm -fv /var/cache/cgit/* > > You can test CGit from the command line to rule out a misconfiguration >> in the web server: > > > There is no "cgit" binary in the ubuntu package: > # apt-file list cgit > cgit: /etc/apache2/conf-available/cgit.conf > cgit: /etc/cgitrc > cgit: /usr/lib/cgit/cgit.cgi > cgit: /usr/lib/cgit/filters/about-formatting.sh > cgit: /usr/lib/cgit/filters/commit-links.sh > cgit: /usr/lib/cgit/filters/email-gravatar.lua > cgit: /usr/lib/cgit/filters/email-gravatar.py > cgit: /usr/lib/cgit/filters/email-libravatar.lua > cgit: /usr/lib/cgit/filters/gentoo-ldap-authentication.lua > cgit: /usr/lib/cgit/filters/html-converters/man2html > cgit: /usr/lib/cgit/filters/html-converters/md2html > cgit: /usr/lib/cgit/filters/html-converters/rst2html > cgit: /usr/lib/cgit/filters/html-converters/txt2html > cgit: /usr/lib/cgit/filters/owner-example.lua > cgit: /usr/lib/cgit/filters/simple-authentication.lua > cgit: /usr/lib/cgit/filters/syntax-highlighting.py > cgit: /usr/lib/cgit/filters/syntax-highlighting.sh > cgit: /usr/share/cgit/cgit.css > cgit: /usr/share/cgit/cgit.png > cgit: /usr/share/cgit/favicon.ico > cgit: /usr/share/cgit/robots.txt > cgit: /usr/share/doc/cgit/changelog.Debian.gz > cgit: /usr/share/doc/cgit/copyright > cgit: /usr/share/man/man5/cgitrc.5.gz > > Is this a package building issue? > > Also, I've taken a look at the build process, and there seems to be a > discrepancy between the Ubuntu cgit package version (1.1+git2.10.2-3build1) > which appears to have been built with git 2.10.2 and my own self-built > version of git (2.18.0-1). I should probably try to build cgit myself. > > Note that for testing you should try something like: >> >> about-formatting.sh README.md <README.md >> > > On the *git client*: > # ./about-formatting.sh ${repo_path}/README.md <${repo_path}/README.md > > <style> > .markdown-body { > font-size: 14px; > line-height: 1.6; > overflow: hidden; > } > .markdown-body>*:first-child { > margin-top: 0 !important; > } > .markdown-body>*:last-child { > margin-bottom: 0 !important; > } > .markdown-body a.absent { > color: #c00; > } > .markdown-body a.anchor { > display: block; > padding-left: 30px; > margin-left: -30px; > cursor: pointer; > position: absolute; > top: 0; > left: 0; > bottom: 0; > } > .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body > h4, .markdown-body h5, .markdown-body h6 { > margin: 20px 0 10px; > padding: 0; > font-weight: bold; > -webkit-font-smoothing: antialiased; > cursor: text; > position: relative; > } > .markdown-body h1 .mini-icon-link, .markdown-body h2 .mini-icon-link, > .markdown-body h3 .mini-icon-link, .markdown-body h4 .mini-icon-link, > .markdown-body h5 .mini-icon-link, .markdown-body h6 .mini-icon-link { > display: none; > color: #000; > } > .markdown-body h1:hover a.anchor, .markdown-body h2:hover a.anchor, > .markdown-body h3:hover a.anchor, .markdown-body h4:hover a.anchor, > .markdown-body h5:hover a.anchor, .markdown-body h6:hover a.anchor { > text-decoration: none; > line-height: 1; > padding-left: 0; > margin-left: -22px; > top: 15%} > .markdown-body h1:hover a.anchor .mini-icon-link, .markdown-body h2:hover > a.anchor .mini-icon-link, .markdown-body h3:hover a.anchor .mini-icon-link, > .markdown-body h4:hover a.anchor .mini-icon-link, .markdown-body h5:hover > a.anchor .mini-icon-link, .markdown-body h6:hover a.anchor .mini-icon-link { > display: inline-block; > } > .markdown-body h1 tt, .markdown-body h1 code, .markdown-body h2 tt, > .markdown-body h2 code, .markdown-body h3 tt, .markdown-body h3 code, > .markdown-body h4 tt, .markdown-body h4 code, .markdown-body h5 tt, > .markdown-body h5 code, .markdown-body h6 tt, .markdown-body h6 code { > font-size: inherit; > } > .markdown-body h1 { > font-size: 28px; > color: #000; > } > .markdown-body h2 { > font-size: 24px; > border-bottom: 1px solid #ccc; > color: #000; > } > .markdown-body h3 { > font-size: 18px; > } > .markdown-body h4 { > font-size: 16px; > } > .markdown-body h5 { > font-size: 14px; > } > .markdown-body h6 { > color: #777; > font-size: 14px; > } > .markdown-body p, .markdown-body blockquote, .markdown-body ul, > .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body > pre { > margin: 15px 0; > } > .markdown-body hr { > background: transparent url("/dirty-shade.png") repeat-x 0 0; > border: 0 none; > color: #ccc; > height: 4px; > padding: 0; > } > .markdown-body>h2:first-child, .markdown-body>h1:first-child, > .markdown-body>h1:first-child+h2, .markdown-body>h3:first-child, > .markdown-body>h4:first-child, .markdown-body>h5:first-child, > .markdown-body>h6:first-child { > margin-top: 0; > padding-top: 0; > } > .markdown-body a:first-child h1, .markdown-body a:first-child h2, > .markdown-body a:first-child h3, .markdown-body a:first-child h4, > .markdown-body a:first-child h5, .markdown-body a:first-child h6 { > margin-top: 0; > padding-top: 0; > } > .markdown-body h1+p, .markdown-body h2+p, .markdown-body h3+p, > .markdown-body h4+p, .markdown-body h5+p, .markdown-body h6+p { > margin-top: 0; > } > .markdown-body li p.first { > display: inline-block; > } > .markdown-body ul, .markdown-body ol { > padding-left: 30px; > } > .markdown-body ul.no-list, .markdown-body ol.no-list { > list-style-type: none; > padding: 0; > } > .markdown-body ul li>:first-child, .markdown-body ul li ul:first-of-type, > .markdown-body ul li ol:first-of-type, .markdown-body ol li>:first-child, > .markdown-body ol li ul:first-of-type, .markdown-body ol li > ol:first-of-type { > margin-top: 0px; > } > .markdown-body ul li p:last-of-type, .markdown-body ol li p:last-of-type { > margin-bottom: 0; > } > .markdown-body ul ul, .markdown-body ul ol, .markdown-body ol ol, > .markdown-body ol ul { > margin-bottom: 0; > } > .markdown-body dl { > padding: 0; > } > .markdown-body dl dt { > font-size: 14px; > font-weight: bold; > font-style: italic; > padding: 0; > margin: 15px 0 5px; > } > .markdown-body dl dt:first-child { > padding: 0; > } > .markdown-body dl dt>:first-child { > margin-top: 0px; > } > .markdown-body dl dt>:last-child { > margin-bottom: 0px; > } > .markdown-body dl dd { > margin: 0 0 15px; > padding: 0 15px; > } > .markdown-body dl dd>:first-child { > margin-top: 0px; > } > .markdown-body dl dd>:last-child { > margin-bottom: 0px; > } > .markdown-body blockquote { > border-left: 4px solid #DDD; > padding: 0 15px; > color: #777; > } > .markdown-body blockquote>:first-child { > margin-top: 0px; > } > .markdown-body blockquote>:last-child { > margin-bottom: 0px; > } > .markdown-body table th { > font-weight: bold; > } > .markdown-body table th, .markdown-body table td { > border: 1px solid #ccc; > padding: 6px 13px; > } > .markdown-body table tr { > border-top: 1px solid #ccc; > background-color: #fff; > } > .markdown-body table tr:nth-child(2n) { > background-color: #f8f8f8; > } > .markdown-body img { > max-width: 100%; > -moz-box-sizing: border-box; > box-sizing: border-box; > } > .markdown-body span.frame { > display: block; > overflow: hidden; > } > .markdown-body span.frame>span { > border: 1px solid #ddd; > display: block; > float: left; > overflow: hidden; > margin: 13px 0 0; > padding: 7px; > width: auto; > } > .markdown-body span.frame span img { > display: block; > float: left; > } > .markdown-body span.frame span span { > clear: both; > color: #333; > display: block; > padding: 5px 0 0; > } > .markdown-body span.align-center { > display: block; > overflow: hidden; > clear: both; > } > .markdown-body span.align-center>span { > display: block; > overflow: hidden; > margin: 13px auto 0; > text-align: center; > } > .markdown-body span.align-center span img { > margin: 0 auto; > text-align: center; > } > .markdown-body span.align-right { > display: block; > overflow: hidden; > clear: both; > } > .markdown-body span.align-right>span { > display: block; > overflow: hidden; > margin: 13px 0 0; > text-align: right; > } > .markdown-body span.align-right span img { > margin: 0; > text-align: right; > } > .markdown-body span.float-left { > display: block; > margin-right: 13px; > overflow: hidden; > float: left; > } > .markdown-body span.float-left span { > margin: 13px 0 0; > } > .markdown-body span.float-right { > display: block; > margin-left: 13px; > overflow: hidden; > float: right; > } > .markdown-body span.float-right>span { > display: block; > overflow: hidden; > margin: 13px auto 0; > text-align: right; > } > .markdown-body code, .markdown-body tt { > margin: 0 2px; > padding: 0px 5px; > border: 1px solid #eaeaea; > background-color: #f8f8f8; > border-radius: 3px; > } > .markdown-body code { > white-space: nowrap; > } > .markdown-body pre>code { > margin: 0; > padding: 0; > white-space: pre; > border: none; > background: transparent; > } > .markdown-body .highlight pre, .markdown-body pre { > background-color: #f8f8f8; > border: 1px solid #ccc; > font-size: 13px; > line-height: 19px; > overflow: auto; > padding: 6px 10px; > border-radius: 3px; > } > .markdown-body pre code, .markdown-body pre tt { > margin: 0; > padding: 0; > background-color: transparent; > border: none; > } > .highlight .hll { background-color: #ffffcc } > .highlight { background: #ffffff; } > .highlight .c { color: #888888 } /* Comment */ > .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ > .highlight .k { color: #008800; font-weight: bold } /* Keyword */ > .highlight .ch { color: #888888 } /* Comment.Hashbang */ > .highlight .cm { color: #888888 } /* Comment.Multiline */ > .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ > .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ > .highlight .c1 { color: #888888 } /* Comment.Single */ > .highlight .cs { color: #cc0000; font-weight: bold; background-color: > #fff0f0 } /* Comment.Special */ > .highlight .gd { color: #000000; background-color: #ffdddd } /* > Generic.Deleted */ > .highlight .ge { font-style: italic } /* Generic.Emph */ > .highlight .gr { color: #aa0000 } /* Generic.Error */ > .highlight .gh { color: #333333 } /* Generic.Heading */ > .highlight .gi { color: #000000; background-color: #ddffdd } /* > Generic.Inserted */ > .highlight .go { color: #888888 } /* Generic.Output */ > .highlight .gp { color: #555555 } /* Generic.Prompt */ > .highlight .gs { font-weight: bold } /* Generic.Strong */ > .highlight .gu { color: #666666 } /* Generic.Subheading */ > .highlight .gt { color: #aa0000 } /* Generic.Traceback */ > .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ > .highlight .kd { color: #008800; font-weight: bold } /* > Keyword.Declaration */ > .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace > */ > .highlight .kp { color: #008800 } /* Keyword.Pseudo */ > .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ > .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ > .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ > .highlight .s { color: #dd2200; background-color: #fff0f0 } /* > Literal.String */ > .highlight .na { color: #336699 } /* Name.Attribute */ > .highlight .nb { color: #003388 } /* Name.Builtin */ > .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ > .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ > .highlight .nd { color: #555555 } /* Name.Decorator */ > .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ > .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ > .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ > .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ > .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ > .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ > .highlight .nv { color: #336699 } /* Name.Variable */ > .highlight .ow { color: #008800 } /* Operator.Word */ > .highlight .w { color: #bbbbbb } /* Text.Whitespace */ > .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin > */ > .highlight .mf { color: #0000DD; font-weight: bold } /* > Literal.Number.Float */ > .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex > */ > .highlight .mi { color: #0000DD; font-weight: bold } /* > Literal.Number.Integer */ > .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct > */ > .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* > Literal.String.Affix */ > .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* > Literal.String.Backtick */ > .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* > Literal.String.Char */ > .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* > Literal.String.Delimiter */ > .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* > Literal.String.Doc */ > .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* > Literal.String.Double */ > .highlight .se { color: #0044dd; background-color: #fff0f0 } /* > Literal.String.Escape */ > .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* > Literal.String.Heredoc */ > .highlight .si { color: #3333bb; background-color: #fff0f0 } /* > Literal.String.Interpol */ > .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* > Literal.String.Other */ > .highlight .sr { color: #008800; background-color: #fff0ff } /* > Literal.String.Regex */ > .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* > Literal.String.Single */ > .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* > Literal.String.Symbol */ > .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ > .highlight .fm { color: #0066bb; font-weight: bold } /* > Name.Function.Magic */ > .highlight .vc { color: #336699 } /* Name.Variable.Class */ > .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ > .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ > .highlight .vm { color: #336699 } /* Name.Variable.Magic */ > .highlight .il { color: #0000DD; font-weight: bold } /* > Literal.Number.Integer.Long */ > </style> > <div class='markdown-body'><p><a rel="license" href="https://www.gnu.org/ > licenses/gpl-3.0.md"><img alt="GPLv3" src="https://www.gnu.org/ > graphics/gplv3-127x51.png" /></a><br /><span xmlns:dct=" > http://purl.org/dc/terms/" property="dct:title"><strong>PPA</strong></span> > by <a > href="https://plus.google.com/u/0/+jeanchristopheManciot-IT/posts"><strong>Jean-Christophe > Manciot</strong></a> is licensed under a <a rel="license" href=" > https://www.gnu.org/licenses/gpl-3.0.md"><strong>GPLv3 > License</strong></a>.</p> > <h1>Public PPA (Personal Packages Archive)</h1> > <h2>Table of Contents</h2> > <ul> > <li><a href="#about-me">About Me</a></li> > <li><a href="#ppa-contents">PPA Contents</a></li> > <li><a href="#requirements">Requirements</a></li> > <li><a href="#installing">Installing</a></li> > <li><a href="#my-pgp-key">My PGP Key</a></li> > <li><a href="#ppa-stable-component">PPA Stable Component</a></li> > <li><a href="#ppa-unstable-component">PPA Unstable Component</a></li> > <li><a href="#notes">Notes</a></li> > <li><a href="#build-tools">Build Tools</a></li> > <li><a href="#unstable-packages-name-format">Unstable Packages Name > Format</a></li> > <li><a > href="#upgrading-safely-from-an-ubuntu-release-to-another-one">Upgrading > Safely From an Ubuntu Release to Another One</a></li> > <li><a href="#purging-old-packages">Purging Old Packages</a></li> > <li><a href="#known-error-messages-and-workaround">Known Error Messages > And Workaround</a></li> > <li><a href="#tracking-and-filing-issues">Tracking And Filing > Issues</a></li> > </ul> > <h2>About Me</h2> > <p>I have performed the following steps for this PPA:</p> > <ul> > <li>I have signed the <a href="https://launchpad.net/~ > manciot-jeanchristophe/+codesofconduct">Ubuntu Code of Conduct</a></li> > <li>I have published <a href="http://keyserver.ubuntu. > com:11371/pks/lookup?fingerprint=on&op=index&search= > 0xDF7396D82BBA3684FCCADD4DB063838ED13997FD">my OpenPGP PPA key</a></li> > <li>I use them to <a href="#my-pgp-key">sign all packages</a></li> > <li>I'm also an <a href="https://bugs.launchpad. > net/~manciot-jeanchristophe">active member of the Ubuntu > community</a></li> > </ul> > ... > > This is an *almost perfect *translation. > I say almost because the following lines are shown at the same level: > *README.md* > - on a **desktop system**: > + Press Alt+F2 and type ```update-manager -c``` into the command box. > > *Converted into:* > > > On the* git server*, the README.md file is not directly accessible, so > there is the following setting for the corresponding repo in cgitrc: > readme=:README.md > > > On Sat, Jun 30, 2018 at 5:39 PM, John Keeping <[email protected]> wrote: > >> On Thu, Jun 28, 2018 at 12:50:49PM +0200, jean-christophe manciot wrote: >> > On Ubuntu 18.10 cosmic >> > cgit 1.1+git2.10.2-3build1 >> > python3: 3.6.5-3 >> > python3-docutils: 0.14+dfsg-3 >> > python3-markdown: 2.6.9-1 >> > python3-pygments: 2.2.0+dfsg-1 >> > >> > In /etc/cgitrc: >> > about-filter=/usr/lib/cgit/filters/about-formatting.sh >> > >> > Despite that setting, the README.md file loaded from the <about> link is >> > not formatted correctly. It seems that no conversion takes place. >> >> Are you sure that there isn't a repo-specific override in place for the >> about-filter? And that you're not seeing cached content immediately >> after changing the setting? >> >> You can test CGit from the command line to rule out a misconfiguration >> in the web server: >> >> CGIT_CONFIG=/etc/cgitrc cgit --query=url=repo/about/ >> >> > # about-formatting.sh README.md >> >> Note that for testing you should try something like: >> >> about-formatting.sh README.md <README.md >> >> to check that python-markdown is invoked correctly. >> > > > > -- > Jean-Christophe > -- Jean-Christophe
_______________________________________________ CGit mailing list [email protected] https://lists.zx2c4.com/mailman/listinfo/cgit
