ThomasErhel / EcoIndex

Dépôt du site www.ecoindex.fr

Home Page:http://www.ecoindex.fr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image of CnumR

EcoIndex

(English version below)

EcoIndex est un outil du Collectif Conception Numérique Responsable

Contribuer

La contribution à l’ensemble de nos outils est ouvert à tout le monde, après s’être fait connaitre du collectif,

Nous recherchons des personnes ayant des connaissances dans la tech, et dans le domaine de la traduction.

Pour faciliter les échanges, un channel #ecoIndex est dédié au projet sur le Mattermost de l'association GreenIt

Le Projet

La nouvelle version d’EcoIndex (V3) est réalisée avec Hugo.

Le projet se base sur le module Hugo base-structure.

Installation

  1. Téléchargez et installez la dernière version extented disponible de Hugo (procédure d'installation de Hugo, en anglais).
  2. Téléchargez et installez la dernière version de NodeJS (page de téléchargement de NodeJS).
  3. Depuis un terminal :
    1. Clonez ce dépôt avec la commande git clone https://github.com/cnumr/EcoIndex.git ou avec git clone git@github.com:cnumr/EcoIndex.git si vous utilisez SSH.
    2. Installez les dernières dépendances avec la commmande npm install.
    3. Démarrez le serveur Hugo avec la commande hugo server.
  4. Rendez-vous à l'adresse http://localhost:1313 avec votre navigateur web.

Astuces pour les développeurs

Tester le build de prod en local

$ hugo serve --environment production

Tester le projet en local avec des clones locaux de modules utilisés dans le projet (ex. Good Impact Base Structure et Every Layout Pure CSS

$ env HUGO_MODULE_REPLACEMENTS="gitlab.com/goodimpact/goodimpact-hugo/modules/base-structure -> ~/workspace/modules/base-structure,gitlab.com/goodimpact/every-layout-css -> ~/workspace/every-layout-css" hugo serve

(Cet exemple suppose que le code des modules se trouve dans ~/workspace)

Pour plus de praticité, on peut écrire un script :

~/dev.sh

#!/bin/bash
cmd="";
for cmdPart in "$@"
do
    cmd+=$cmdPart;
		cmd+=" "
done

res="env HUGO_MODULE_REPLACEMENTS=\"gitlab.com/goodimpact/goodimpact-hugo/modules/base-structure -> ~/workspace/modules/base-structure,gitlab.com/goodimpact/every-layout-css -> ~/workspace/every-layout-css"\" "

res+=$cmd

echo $res

bash -c "$res"

et l'utiliser ainsi :

$ ~/dev.sh hugo serve

ou par exemple :

$ ~/dev.sh hugo serve --environment production

Déploiement

Déploiement automatique grace aux Github Actions (WIP)


Image of CnumR

EcoIndex

EcoIndex is a tool from the french Collectif Conception Numérique Responsable

Contribute

All of our tools are open to contributions from everybody, after having contacted the collective.

We seek people with technical skills, and people able to make translations and localizations.

There’s a dedicated Mattermost channel for the project.

The project

The new version of EcoIndex is built with Hugo.

The project is based on the Hugo module base-structure.

Setup

  1. Download and install the latest extented version available of Hugo (Hugo installation procedure).
  2. Download and install the latest version of NodeJS (NodeJS download page).
  3. From a terminal :
    1. Clone this repository with the command git clone https://github.com/cnumr/EcoIndex.git or with git clone git@github.com:cnumr/EcoIndex.git if you prefer to use SSH.
    2. Install the latest dependencies with the command npm install.
    3. Start the Hugo server with the command hugo server.
  4. Go to http://localhost:1313 with your web browser.

Tips for developers

Testing production build on dev environment

$ hugo serve --environment production

Testing on dev environment with local checkouts of the modules used in the project (ex. Good Impact Base Structure et Every Layout Pure CSS

$ env HUGO_MODULE_REPLACEMENTS="gitlab.com/goodimpact/goodimpact-hugo/modules/base-structure -> ~/workspace/modules/base-structure,gitlab.com/goodimpact/every-layout-css -> ~/workspace/every-layout-css" hugo serve

(this example assumes you have cloned the modules in ~/workspace)

For more convenience, you can write a script:

~/dev.sh

#!/bin/bash
cmd="";
for cmdPart in "$@"
do
    cmd+=$cmdPart;
		cmd+=" "
done

res="env HUGO_MODULE_REPLACEMENTS=\"gitlab.com/goodimpact/goodimpact-hugo/modules/base-structure -> ~/workspace/modules/base-structure,gitlab.com/goodimpact/every-layout-css -> ~/workspace/every-layout-css"\" "

res+=$cmd

echo $res

bash -c "$res"

and use it like this:

$ ~/dev.sh hugo serve

ou for example:

$ ~/dev.sh hugo serve --environment production

Deployment

Automatic deploys thanks to Github Actions (WIP)

About

Dépôt du site www.ecoindex.fr

http://www.ecoindex.fr


Languages

Language:JavaScript 37.3%Language:HTML 32.9%Language:CSS 29.8%