--- /dev/null
+<script src="https://assets.immae.eu/jquery/3.5.1/jquery.min.js"></script>
+<script type="application/javascript">
+ $(document).ready(function() {
+ const linksObject = {
+ "/github/fretlink": "Fretlink Open-source Github forks",
+ "/github": "Github forks",
+ "/perso/Denise": "Denise",
+ "/perso/Immae": "Immae",
+ }
+ function toRow(href, name) {
+ return `<a href='/cgit${href}'>${name}</a>`;
+ }
+ const links = Object.keys(linksObject).map(function(k) { return toRow(k, linksObject[k]); }).join("");
+ $("table.tabs a.active[href='/cgit/']").after(links);
+ });
+</script>
css=/cgit-css/cgit.css
logo=/cgit-css/cgit.png
favicon=/cgit-css/favicon.ico
+ head-include=${./cgit_js.html}
root-title=Immae’s git
root-desc=To go back to the old interface: https://git.immae.eu/?old
RewriteEngine On
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^/?$ /cgit [L,R=302]
+
+ RewriteCond %{REQUEST_URI} ^(.*)(\.git)?/?$
+ RewriteCond ${varDir}/repositories/%1.git/HEAD -f
+ RewriteRule ^(.+)$ /cgit$1 [L,R=302]
'';
};
}