Installer HUGO sous Linux (https://gohugo.io)
snap install hugo --channel=extended
Créer mon 1er site HUGO
cd Documents/1P/Sites-web/
hugo new site mon1ersite-hugo
Y installer un premier thème
cd mon1ersite-hugo/
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo theme = \ »ananke\ » >> config.toml
Peaufiner le paramétrage du site
nano config.toml
Créer et compléter 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 !