staticgenerators:hugo
This is an old revision of the document!
Table of Contents
Hugo
Essai de remplacement de mon site type-one.net en Drupal.
Installation
sudo apt install hugo
Premiers pas
Créer le site et importer le thème (xmin) :
hugo new site type1 cd type1 git init git submodule add https://github.com/yihui/hugo-xmin.git themes/xmin
adapter le fichier de configuration hugo.toml :
baseURL = 'https://type-one.net/'
languageCode = 'en-us'
title = 'type-one.net'
theme = "xmin"
paginate = 10
enableRobotsTXT = true
[params]
description = "Vintage Magic: the Gathering tournament reports of yore"
[taxonomies]
category = "categories"
tag = "tags"
[menu]
[[menu.main]]
name = "home"
url = "/"
weight = 1
[[menu.main]]
name = "reports"
url = "/reports"
weight = 2
[[menu.main]]
name = "Articles"
url = "/posts/"
weight = 3
Avertissement
Quand je veux ajouter une page, j'obtiens ceci :
WARN Module "xmin" is not compatible with this Hugo version: Min 0.146.0; run "hugo mod graph" for more information.
Solution, dans theme/xmin/theme.toml, changer la version minimale à 0.20.0 :
#min_version = "0.146.0" min_version = "0.146.0"
Créer une nouvelle page
hugo new content/reset2026.md
La page s'ouvre dans vi. Ensuite, on peut la rééditer avec vi par la suite.
Il faut utiliser le markdown qui génèrera le code HTML.
# titre H1 ## titre H2 ### titre H3 *italique* **gras** ***italique + gras*** [Texte du lien](https://example.com)  - élément 1 - élément 2 - élément 3 1. Premier 2. Deuxième 3. Troisième > Ceci est une citation. ```bash hugo server -D ``` HR : --- | Colonne 1 | Colonne 2 | |----------|-----------| | Valeur A | Valeur B | Voici une phrase avec une note.[^1] [^1]: Ceci est la note.
Liens
- convertir HTML en markdown : https://codebeautify.org/html-to-markdown
staticgenerators/hugo.1772300004.txt.gz · Last modified: by carl
