Site officiel de TheAfriForge https://theafriforge.org/fr/
  • HTML 97.9%
  • Dockerfile 1.7%
  • Shell 0.4%
Find a file
2026-05-21 00:34:26 +02:00
content feat: enhance SEO and add multilingual support with new meta tags and sitemap 2026-05-20 13:31:45 +02:00
i18n Refactor code structure for improved readability and maintainability 2026-05-20 14:20:02 +02:00
layouts Refactor code structure for improved readability and maintainability 2026-05-20 14:20:02 +02:00
scripts feat: add new project and single page layouts 2026-05-17 17:11:54 +02:00
static Refactor code structure for improved readability and maintainability 2026-05-20 14:20:02 +02:00
.dockerignore feat: add new project and single page layouts 2026-05-17 17:11:54 +02:00
.env.example feat: add new project and single page layouts 2026-05-17 17:11:54 +02:00
.gitignore feat: add new project and single page layouts 2026-05-17 17:11:54 +02:00
Dockerfile fix: update Dockerfile to use correct Hugo base image and adjust build process 2026-05-17 17:33:20 +02:00
hugo.toml Refactor code structure for improved readability and maintainability 2026-05-20 14:20:02 +02:00
README.md refactor: update README for improved clarity and organization 2026-05-21 00:34:26 +02:00


TheAfriForge

TheAfriForge est un site statique multilingue (Français/Anglais) construit avec Hugo, dédié à la valorisation des initiatives africaines, à la transparence et à la collaboration.

🌍 Présentation

🚀 Prérequis

  • Hugo Extended (version récente recommandée)
  • Git
  • (Optionnel) Python 3 ou Node.js pour tester la build

🔧 Installation & Lancement local

git clone https://gitforge.africa/TheAfriForge/website.git
cd website
hugo server --config ./hugo.toml -D

⚙️ Configuration de l'environnement

Avant de lancer le projet, copie le fichier .env.example en .env et adapte les variables à ton contexte :

cp .env.example .env
# puis édite .env selon tes besoins

Exemple de variables (remplace par tes propres valeurs) :

# Endpoint du formulaire dadhésion
HUGO_MEMBERSHIP_FORM_ACTION=https://exemple-endpoint

# Formbricks SDK (recommandé)
HUGO_FORMBRICKS_API_HOST=https://exemple-formbricks
HUGO_FORMBRICKS_ENV_ID=xxxxxxx
HUGO_FORMBRICKS_EVENT=membership_form_submitted
HUGO_FORMBRICKS_SDK_URL=https://exemple-formbricks/js/formbricks.umd.cjs

# Redirection après succès (optionnel)
HUGO_MEMBERSHIP_FORM_SUCCESS_PATH=/chemin-de-redirection

🐳 Utilisation avec Docker

Pour lancer le site localement avec Docker :

docker build -t theafriforge .
docker run -p 1313:1313 theafriforge

Le site sera accessible sur http://localhost:1313/.

Pour la production, adapte la commande de build selon tes besoins (voir le Dockerfile).

🏗️ Structure du projet

  • content/fr/ et content/en/ : Contenus en français et anglais
  • layouts/ : Templates Hugo
  • static/ : Fichiers statiques (images, etc.)
  • public/ : Build de production générée
  • hugo.toml : Configuration principale

🛠️ Commandes utiles

  • Build de production :
    hugo --config ./hugo.toml --environment production --minify
    
  • Nettoyage du cache Hugo :
    rm -rf resources/_gen
    
  • Forcer un autre port local :
    hugo server --config ./hugo.toml -D --port 1314
    

🐞 Dépannage

  • Si hugo server retourne le code 255 :
    • Arrêter les processus Hugo : pkill -f "hugo server" || true
    • Supprimer .hugo_build.lock : rm -f .hugo_build.lock
    • Relancer le serveur.

🚢 Déploiement

Option 1 : VPS + Nginx

  1. Générer la build :
    hugo --config ./hugo.toml --environment production --minify
    
  2. Copier le dossier public/ sur le serveur :
    rsync -avz --delete public/ user@serveur:/var/www/theafriforge/
    
  3. Configurer Nginx (voir exemple ci-dessous) :
    server {
            listen 80;
            server_name theafriforge.org www.theafriforge.org;
    
            root /var/www/theafriforge;
            index index.html;
    
            location / {
                    try_files $uri $uri/ =404;
            }
    }
    
  4. Activer HTTPS (Certbot recommandé).

Option 2 : Netlify / Cloudflare Pages / Vercel

  • Build command : hugo --config ./hugo.toml --environment production --minify
  • Output/Publish directory : public
  • Sélectionner Hugo Extended si nécessaire.

📄 Licence

Ce projet est open source, voir le dépôt pour plus dinformations. server_name theafriforge.org www.theafriforge.org;