917788e29f
CLONE-URL, TITLE, and H1 are no longer processed. instead, the user should modify the templates/default.html to their liking. the output used to be structured like this: target-html-directory/ +-- index.html +-- files.html +-- README.md.html +-- (all the other files) the output is now structured like this: target-html-directory/ +-- index.html +-- html/ +-- files.html +-- README.md.html +-- (all the other files...) this makes it so people who are hosting bare repos for cloning on static webservers will have only two new directory entries (index.html and html) in the bare repo directory, reducing the risk of clobbering something. finally, i tried something hacky with gitattributes to get an automatic version idenifier to show up. but it turns out this is not the git hash of the commit, but instead the hash of the blob for main.scm, which could remain the same across releases. doesn't hurt, so i'll look for a better approach in the future.
50 lines
1.8 KiB
HTML
50 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>git.example.com - {{ repository_name }}</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale-1.0, user-scalable=yes" />
|
|
<link rel="icon" href="data:," />
|
|
<meta name="description" content="{{ repository_description }}" />
|
|
<style>
|
|
body { margin: 0 auto; max-width: 700px }
|
|
pre, code { background-color: #ffd9df }
|
|
pre { overflow: scroll; padding: 15px 20px; white-space: pre }
|
|
a { color: blue }
|
|
nav a { margin-right: 10px }
|
|
hr { border: 0; border-bottom: 1px solid black; margin-top: 16px }
|
|
td { padding: 0em .5em; vertical-align: top }
|
|
footer { font-size: small; text-align: right }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>git.example.com</h1>
|
|
<h2>{{ repository_name }}</h2>
|
|
<p>clone url: git://git.example.com/{{ repository_name }}</p>
|
|
<nav>
|
|
{% if readme_file %}
|
|
<a href="{{ relative_root }}{{ readme_file }}.html">about</a>
|
|
<a href="{{ relative_root }}files.html">files</a>
|
|
{% else %}
|
|
<a href="{{ relative_root }}files.html">files</a>
|
|
{% endif %}
|
|
{% if license_file %}
|
|
<a href="{{ relative_root }}{{ license_file }}.html">license</a>
|
|
{% endif %}
|
|
{% if issues_file %}
|
|
<a href="{{ relative_root }}{{ issues_file }}.html">issues</a>
|
|
{% endif %}
|
|
<a href="{{ relative_root }}commits.html">commits</a>
|
|
<a href="{{ relative_root }}contributors.html">contributors</a>
|
|
</nav>
|
|
<hr />
|
|
{{ content|safe }}
|
|
<hr />
|
|
<footer>
|
|
<p>Generated by
|
|
<a href="https://git.m455.casa/repo2html/"
|
|
title="the repo2html git repo static renderer by m455 and pho4cexa">repo2html</a>
|
|
{{ repo2html_version }} using
|
|
<a href="http://wiki.call-cc.org/eggref/5/ersatz"
|
|
title="the ersatz Jinja2-like templating library by Ivan Raikov"
|
|
>ersatz</a> templates</p></footer></html>
|