depp

No frills static page generator for Git repositories

git clone https://git.8pit.net/depp.git

 1<section id="blob">
 2	{{ template "breadcrumb.tmpl" .CurrentFile }}
 3
 4	<pre class="blob">
 5	{{- $blob := "" -}}
 6	{{- if .CurrentFile.IsSubmodule -}}
 7		{{ $blob = (.Submodule .CurrentFile) }}
 8	{{- else -}}
 9		{{ $blob = .Blob (.CurrentFile) }}
10	{{- end -}}
11
12	{{- if (isBinary $blob) -}}
13		This is a binary file, clone the repository to access it.
14	{{- else -}}
15		{{- $lines := (getLines $blob) -}}
16		{{- range $i, $line := $lines }}
17{{- $i = increment $i }}
18<code id="L{{ $i }}"><a href="#L{{ $i }}">{{ padNumber (len $lines) $i }}{{ $i }}</a>{{ . }}</code>
19		{{- end }}
20	{{- end -}}
21	</pre>
22</section>