Skip to content
Snippets Groups Projects
Commit 4e24616b authored by chrissi^'s avatar chrissi^
Browse files

template: Add Links to our Gitlab


Signed-off-by: default avatarChris Fiege <chris@tinyhost.de>
parent a796cda8
No related branches found
No related tags found
No related merge requests found
import subprocess
import os
class Git:
def contents_parsed(self, context):
state = subprocess.getoutput(["git log -1 --pretty=format:'%H %aI'"])
for content in context.contents:
content["git_state"] = state
path = os.path.join("content", content["path"])
updated = subprocess.getoutput(["git log -1 --pretty=format:'%aI' {}".format(path)])
content["git_update"] = updated
branch = subprocess.getoutput(["git branch | grep \* | cut -d ' ' -f2"])
if "HEAD" in branch:
branch = "master"
content["git_branch"] = branch
......@@ -7,6 +7,7 @@ PLUGINS = [
'flamingo.plugins.rstFile',
'flamingo.plugins.rstPygments',
'plugins/title.py::Title',
'plugins/git.py::Git',
]
LAYERS = [
......
......@@ -107,7 +107,7 @@
</div>
<div class="col-md-3">
<ul class="nav nav-pills nav-stacked">
<li><a href="https://wiki.freifunk-bs.de/">Wiki</a></li>
<li><a href="https://firmware.freifunk-bs.de">Firmware</a></li>
<li><a href="http://lists.freifunk.net/mailman/listinfo/braunschweig-freifunk.net">Mailinglist</a></li>
</ul>
</div>
......@@ -126,6 +126,12 @@
</div>
</div>
<hr>
<p>
Diese Seite im Gitlab:
<a href="https://gitli.stratum0.org/ffbs/ffbs-website/blob/{{ content.git_branch }}/flamingo/content/{{ content.path }}">Quelltext ansehen</a> |
<a href="https://gitli.stratum0.org/ffbs/ffbs-website/commits/{{ content.git_branch }}/flamingo/content/{{content.path }}" >Versionsgeschichte</a> |
<a href="https://gitli.stratum0.org/ffbs/ffbs-website/edit/{{ content.git_branch }}/flamingo/content/{{ content.path}}" > Bearbeiten</a>
</p>
<p>
Unterstützt durch <a href="https://freifunk-rheinland.net/">Freifunk Rheinland</a>
<img src="/assets/images/ffrhein_logo_claim_line_4c_tiny.svg"></img>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment