repo2html/templates/default.html
pho4cexa 35496ee17e enable customizable jinja-like templates via ersatz!
well this was a journey :)

behavior when running `repo2html <output directory>` remains the same;
we apply our internal sxml template as usual.

to use ersatz templates, run like this:

`repo2html <output directory> <template directory>`

the program will look for a "default.html" file in that directory.
2022-12-16 13:31:39 -05:00

44 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ forge_title }} - {{ 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>{{ h1 }}</h1>
<h2>{{ repository_name }}</h2>
<p>clone url:{{ clone_url_prefix }}/{{ repository_name }}</p>
<nav>
{% if readme_file %}
<a href="index.html">about</a>
<a href="files.html">files</a>
{% else %}
<a href="index.html">files</a>
{% endif %}
{% if license_file %}
<a href="{{ license_file }}.html">license</a>
{% endif %}
{% if issues_file %}
<a href="{{ issues_file }}.html">issues</a>
{% endif %}
<a href="commits.html">commits</a>
<a href="contributors.html">contributors</a>
</nav>
<hr />
{{ content|safe }}
<hr />
<footer>
<p>Generated by <a href="https://git.m455.casa/repo2html/">repo2html</a> using ersatz templates</p></footer></html>