Hugo : créateur de sites simple et léger

Hugo : créateur de sites simple et léger

Hugo est un framework web Open Source permettant de créer des sites statiques rapidement

Publié le

Création d’un nouveau site

Ouvrez un terminal et lancez la commande suivante en remplaçant [nom_site] par un nom de projet. Hugo crée un dossier avec ce nom et y installe la structure par défaut.

hugo new site [nom_site]
Réponse de la console > Congratulations! Your new Hugo site was created in {path} > Just a few more steps... > 1. Change the current directory to /Users/jeremy• pastouret/Sites/ENI/enovateurs_ hugo.
2. Create or install a theme:
- Create a new theme with the command "hugo new theme ‹THEMENAME>"
- Install a theme from https:// themes.gohugo.io/
3. Edit hugo.toml, setting the "theme" property to the theme name.
4. Create new content with the command "hugo new content ‹SECTIONNAME>
5. Start the embedded web server with the command "hugo server --buildDrafts".

En quelques micro-secondes, la structure est prête - contrairement à WordPress ou NextJS, qui demandent à la fois davantage de temps et plus de fichiers.

Accédez au dossier créé :

cd [nom_site]