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]
|
||||
other = "Informations sur le billet"
|
||||
|
||||
|
@ -7,6 +10,5 @@ other = "Permalien"
|
|||
[contactsPriv]
|
||||
other = "Contacts personnels"
|
||||
|
||||
|
||||
[contactsPro]
|
||||
other = "Contacts professionnels"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{{ $currentPage := . -}}
|
||||
{{ $siteSources := .Site.Params.siteSources }}
|
||||
<footer class="main-footer no-print">
|
||||
<nav role="navigation" aria-label="Secondary">
|
||||
<ul>
|
||||
{{ $currentPage := . -}}
|
||||
{{ range sort .Site.Menus.footer -}}
|
||||
<li class="nav-item">
|
||||
<a class="nav-item-link{{if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasMenuCurrent "footer" .) }} active{{end}}"
|
||||
|
@ -13,8 +14,14 @@
|
|||
{{ $git := . }}
|
||||
<li>
|
||||
<code>
|
||||
<a href="https://framagit.org/iGormilhit/igor.milhit/-/commit/{{- $git.Hash -}}"
|
||||
title="Dernier commit modifiant cette page">
|
||||
<a href="
|
||||
{{- if eq $siteSources.type "gitlab" -}}
|
||||
{{ $siteSources.url }}/-/
|
||||
{{- else -}}
|
||||
{{ $siteSources.url }}/
|
||||
{{- end -}}
|
||||
commit/{{- $git.Hash -}}"
|
||||
title="{{ i18n "lastCommit" }}">
|
||||
{{ $git.AbbreviatedHash }}
|
||||
</a>
|
||||
</code>
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
<h2 id="online">Online</h2>
|
||||
<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 }}
|
||||
<dt>GitHub</dt>
|
||||
<dd><a href="https://github.com/{{ . }}">{{ . }}</a></dd>
|
||||
<dd><a href="https://github.com/{{ . }}" rel="me">{{ . }}</a></dd>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.online.framagit }}
|
||||
<dt>Framagit</dt>
|
||||
<dd><a href="https://framagit.org/{{ . }}">{{ . }}</a></dd>
|
||||
<dd><a href="https://framagit.org/{{ . }}" rel="me">{{ . }}</a></dd>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.online.mastodon }}
|
||||
<dt>mastodon</dt>
|
||||
<dd><a href="{{ . }}">{{ . }}</a></dd>
|
||||
<dd><a href="{{ . }}" rel="me">{{ . }}</a></dd>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.online.twitter }}
|
||||
<dt>Twitter</dt>
|
||||
|
@ -32,5 +36,4 @@
|
|||
<dt>Discogs</dt>
|
||||
<dd><a href="https://www.discogs.com/user/{{ . }}">{{ . }}</a></dd>
|
||||
{{ end }}
|
||||
|
||||
</dl>
|
||||
|
|
Loading…
Reference in New Issue