add branch and source link to template

This commit is contained in:
Marie 2024-09-09 23:18:27 +02:00
parent ac0e1071ea
commit 9c6146d2c1
3 changed files with 11 additions and 3 deletions

View file

@ -24,11 +24,13 @@ sector c_rules
bin/fpc-sitegen -i $(%input%) -o $(%output%)
COMMIT_SHORT=\$(git rev-parse --short HEAD)
BRANCH=\$(git rev-parse --abbrev-ref HEAD)
DATE=\$(date +%d.%m.%Y)
TIME=\$(date +%H:%M:%S)
sed -i ''s/\\\$\\\$DATE\\\$\\\$/''"\$DATE/g" $(%output%)
sed -i ''s/\\\$\\\$TIME\\\$\\\$/''"\$TIME/g" $(%output%)
sed -i ''s@\\\$\\\$BRANCH\\\$\\\$@''"\$BRANCH@g" $(%output%)
sed -i ''s@\\\$\\\$SOURCE\\\$\\\$@$(%input%)@g'' $(%output%)
sed -i ''s/\\\$\\\$COMMIT\\\$\\\$/''"\$COMMIT_SHORT/g" $(%output%)
'

View file

@ -58,7 +58,7 @@ output-format:
<br>
<p> Last generated @ $$DATE$$, $$TIME$$ ; source $$SOURCE$$ @ commit $$COMMIT$$ </p>
<p id="gen-info"> Last generated @ $$DATE$$, $$TIME$$ ; source <a href="https://git.heroin.trade/marie/website/src/branch/$$BRANCH$$/$$SOURCE$$">$$SOURCE$$</a> @ commit <a href="https://git.heroin.trade/marie/website/commit/$$COMMIT$$">$$COMMIT$$</a> </p>
</div>
</div>
</body>

View file

@ -102,8 +102,14 @@ body {
font-size: 12pt;
}
#banner {
width:100%;
}
#gen-info {
font-size: 9.3pt;
}
#gen-info a {
font-size: 9.3pt;
}