Installer HUGO sous Linux (https://gohugo.io pour les autres systèmes : Windows, MacOS)
$ sudo apt install hugo
Créer mon 1er site HUGO + ajouter un thème
$ cd Documents/1P/Sites-web/ hugo new site site1-hugo cd site1-hugo git init git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke/ themes/ananke echo "theme = 'ananke'" >> config.toml hugo server
Peaufiner le paramétrage du site
nano config.toml
Créer et rédiger un 1er post
hugo new posts/mon-1er-post.md
nano content/posts/mon-1er-post.md
Créer un menu avec des pages
hugo new pages/contact.md
mkdir content/documentation content/contact content/pages
+
nano config.toml
baseURL = "http://example.org/" languageCode = "fr-fr" title = "Mon premier site Hugo" theme = "ananke" [menu] [[menu.main]] identifier = "pages" name = "Pages" pre = "<i class='fa fa-heart'></i>" url = "/pages/" weight = 10 [[menu.main]] identifier = "posts" name = "Posts" pre = "<i class='fa fa-heart'></i>" url = "/posts/" weight = 20 [[menu.main]] identifier = "documentation" name = "Documentation" pre = "<i class='fa fa-heart'></i>" url = "/documentation/" weight = 30 [[menu.main]] identifier = "contact" name = "Contact" pre = "<i class='fa fa-heart'></i>" url = "/contact/" weight = 40
Tester : lancer le serveur Hugo
hugo server
et se connecter à l’URL indiquée… (CTRL+clic dessus)
Déployer le site
Juste recopier le contenu du dossier /public !