gitInfo: configuration of the git repository
- Enables to set the git repository URL and type in the site configuration. - Updates the footer to use that information. - Updates the contact partial to use the configuration information of a custom git website. Co-Authored-by: iGor milhit <igor@milhit.ch>pull/37/head
parent
989343ea59
commit
1aaa6b02b5
|
@ -1,3 +1,6 @@
|
||||||
|
[lastCommit]
|
||||||
|
other = "Dernier commit modifiant cette page"
|
||||||
|
|
||||||
[post-infos]
|
[post-infos]
|
||||||
other = "Informations sur le billet"
|
other = "Informations sur le billet"
|
||||||
|
|
||||||
|
@ -7,6 +10,5 @@ other = "Permalien"
|
||||||
[contactsPriv]
|
[contactsPriv]
|
||||||
other = "Contacts personnels"
|
other = "Contacts personnels"
|
||||||
|
|
||||||
|
|
||||||
[contactsPro]
|
[contactsPro]
|
||||||
other = "Contacts professionnels"
|
other = "Contacts professionnels"
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
{{ $currentPage := . -}}
|
||||||
|
{{ $siteSources := .Site.Params.siteSources }}
|
||||||
<footer class="main-footer no-print">
|
<footer class="main-footer no-print">
|
||||||
<nav role="navigation" aria-label="Secondary">
|
<nav role="navigation" aria-label="Secondary">
|
||||||
<ul>
|
<ul>
|
||||||
{{ $currentPage := . -}}
|
|
||||||
{{ range sort .Site.Menus.footer -}}
|
{{ range sort .Site.Menus.footer -}}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-item-link{{if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasMenuCurrent "footer" .) }} active{{end}}"
|
<a class="nav-item-link{{if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasMenuCurrent "footer" .) }} active{{end}}"
|
||||||
|
@ -13,8 +14,14 @@
|
||||||
{{ $git := . }}
|
{{ $git := . }}
|
||||||
<li>
|
<li>
|
||||||
<code>
|
<code>
|
||||||
<a href="https://framagit.org/iGormilhit/igor.milhit/-/commit/{{- $git.Hash -}}"
|
<a href="
|
||||||
title="Dernier commit modifiant cette page">
|
{{- if eq $siteSources.type "gitlab" -}}
|
||||||
|
{{ $siteSources.url }}/-/
|
||||||
|
{{- else -}}
|
||||||
|
{{ $siteSources.url }}/
|
||||||
|
{{- end -}}
|
||||||
|
commit/{{- $git.Hash -}}"
|
||||||
|
title="{{ i18n "lastCommit" }}">
|
||||||
{{ $git.AbbreviatedHash }}
|
{{ $git.AbbreviatedHash }}
|
||||||
</a>
|
</a>
|
||||||
</code>
|
</code>
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
<h2 id="online">Online</h2>
|
<h2 id="online">Online</h2>
|
||||||
<dl class="home-lists">
|
<dl class="home-lists">
|
||||||
|
{{ with .Site.Params.online.git }}
|
||||||
|
<dt>Git</dt>
|
||||||
|
<dd><a href="{{ . }}" rel="me">{{ . }}</a></dd>
|
||||||
|
{{ end }}
|
||||||
{{ with .Site.Params.online.github }}
|
{{ with .Site.Params.online.github }}
|
||||||
<dt>GitHub</dt>
|
<dt>GitHub</dt>
|
||||||
<dd><a href="https://github.com/{{ . }}">{{ . }}</a></dd>
|
<dd><a href="https://github.com/{{ . }}" rel="me">{{ . }}</a></dd>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .Site.Params.online.framagit }}
|
{{ with .Site.Params.online.framagit }}
|
||||||
<dt>Framagit</dt>
|
<dt>Framagit</dt>
|
||||||
<dd><a href="https://framagit.org/{{ . }}">{{ . }}</a></dd>
|
<dd><a href="https://framagit.org/{{ . }}" rel="me">{{ . }}</a></dd>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .Site.Params.online.mastodon }}
|
{{ with .Site.Params.online.mastodon }}
|
||||||
<dt>mastodon</dt>
|
<dt>mastodon</dt>
|
||||||
<dd><a href="{{ . }}">{{ . }}</a></dd>
|
<dd><a href="{{ . }}" rel="me">{{ . }}</a></dd>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .Site.Params.online.twitter }}
|
{{ with .Site.Params.online.twitter }}
|
||||||
<dt>Twitter</dt>
|
<dt>Twitter</dt>
|
||||||
|
@ -32,5 +36,4 @@
|
||||||
<dt>Discogs</dt>
|
<dt>Discogs</dt>
|
||||||
<dd><a href="https://www.discogs.com/user/{{ . }}">{{ . }}</a></dd>
|
<dd><a href="https://www.discogs.com/user/{{ . }}">{{ . }}</a></dd>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
Loading…
Reference in New Issue