Refactor code structure for improved readability and maintainability

This commit is contained in:
Cheick Oumar 2026-05-20 14:20:02 +02:00
commit 0dd01ca947
11 changed files with 22 additions and 4 deletions

View file

@ -11,7 +11,8 @@ disableAliases = true
gitforgeUrl = "https://gitforge.africa" gitforgeUrl = "https://gitforge.africa"
repositoryUrl = "https://github.com/theafriforge" repositoryUrl = "https://github.com/theafriforge"
twitterHandle = "@theafriforge" twitterHandle = "@theafriforge"
ogImage = "/images/og-theafriforge.png" ogImage = "/images/og-theafriforge.jpg"
logoImage = "/images/logo-header.png"
# Membership form configuration (fallback values). # Membership form configuration (fallback values).
# Priority used in templates: # Priority used in templates:
# 1) HUGO_MEMBERSHIP_FORM_ACTION / HUGO_MEMBERSHIP_FORM_SUCCESS_PATH # 1) HUGO_MEMBERSHIP_FORM_ACTION / HUGO_MEMBERSHIP_FORM_SUCCESS_PATH

View file

@ -1,6 +1,9 @@
[siteDescription] [siteDescription]
other = "African foundation for open-source software and digital sovereignty." other = "African foundation for open-source software and digital sovereignty."
[seoImageAlt]
other = "TheAfriForge logo representing African digital sovereignty"
[gitforgeCta] [gitforgeCta]
other = "Access GitForge" other = "Access GitForge"

View file

@ -1,6 +1,9 @@
[siteDescription] [siteDescription]
other = "Fondation africaine du logiciel libre et de la souveraineté numerique." other = "Fondation africaine du logiciel libre et de la souveraineté numerique."
[seoImageAlt]
other = "Logo TheAfriForge representant la souverainete numerique africaine"
[gitforgeCta] [gitforgeCta]
other = "Acceder a GitForge" other = "Acceder a GitForge"

View file

@ -4,6 +4,9 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title> <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
<link rel="icon" href='{{ "favicon.ico" | relURL }}?v=3' sizes="any">
<link rel="icon" type="image/png" href='{{ "images/favicon-192.png" | relURL }}?v=3' sizes="192x192">
<link rel="apple-touch-icon" href='{{ "images/favicon-512.png" | relURL }}?v=3'>
{{ partial "seo.html" . }} {{ partial "seo.html" . }}
<script> <script>
tailwind = { tailwind = {

View file

@ -4,6 +4,9 @@
{{ $url := .Permalink }} {{ $url := .Permalink }}
{{ $lang := .Site.Language.Lang }} {{ $lang := .Site.Language.Lang }}
{{ $locale := replace .Site.LanguageCode "-" "_" }} {{ $locale := replace .Site.LanguageCode "-" "_" }}
{{ $ogImage := .Site.Params.ogImage }}
{{ $logoImage := or .Site.Params.logoImage .Site.Params.ogImage }}
{{ $imageAlt := i18n "seoImageAlt" }}
{{/* ---- Canonical ---- */}} {{/* ---- Canonical ---- */}}
<link rel="canonical" href="{{ $url }}"> <link rel="canonical" href="{{ $url }}">
@ -41,8 +44,11 @@
{{ else }} {{ else }}
<meta property="og:type" content="article"> <meta property="og:type" content="article">
{{ end }} {{ end }}
{{ with .Site.Params.ogImage }} {{ with $ogImage }}
<meta property="og:image" content="{{ . | absURL }}"> <meta property="og:image" content="{{ . | absURL }}">
<meta property="og:image:secure_url" content="{{ . | absURL }}">
<meta property="og:image:alt" content="{{ $imageAlt }}">
<link rel="image_src" href="{{ . | absURL }}">
{{ end }} {{ end }}
{{/* ---- Twitter Card ---- */}} {{/* ---- Twitter Card ---- */}}
@ -52,8 +58,9 @@
{{ with .Site.Params.twitterHandle }} {{ with .Site.Params.twitterHandle }}
<meta name="twitter:site" content="{{ . }}"> <meta name="twitter:site" content="{{ . }}">
{{ end }} {{ end }}
{{ with .Site.Params.ogImage }} {{ with $ogImage }}
<meta name="twitter:image" content="{{ . | absURL }}"> <meta name="twitter:image" content="{{ . | absURL }}">
<meta name="twitter:image:alt" content="{{ $imageAlt }}">
{{ end }} {{ end }}
{{/* ---- JSON-LD Organization (home only) ---- */}} {{/* ---- JSON-LD Organization (home only) ---- */}}
@ -65,6 +72,7 @@
"name": "{{ .Site.Title }}", "name": "{{ .Site.Title }}",
"url": "{{ .Site.BaseURL }}", "url": "{{ .Site.BaseURL }}",
"description": "{{ i18n "siteDescription" | plainify }}", "description": "{{ i18n "siteDescription" | plainify }}",
"logo": "{{ $logoImage | absURL }}",
"sameAs": [ "sameAs": [
{{ with .Site.Params.repositoryUrl }}"{{ . }}"{{ end }} {{ with .Site.Params.repositoryUrl }}"{{ . }}"{{ end }}
] ]

View file

@ -5,7 +5,7 @@
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<!-- Logo --> <!-- Logo -->
<a href="{{ "/" | relLangURL }}" class="flex items-center gap-2 font-bold text-lg text-slate-900"> <a href="{{ "/" | relLangURL }}" class="flex items-center gap-2 font-bold text-lg text-slate-900">
<span class="inline-flex h-8 w-8 items-center justify-center rounded-md bg-green-800 text-white text-sm font-black">AF</span> <img src='{{ "images/logo-header.png" | relURL }}' alt="TheAfriForge logo" class="h-9 w-auto object-contain" loading="eager" decoding="async">
<span>TheAfriForge</span> <span>TheAfriForge</span>
</a> </a>

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB