gregandev 0023a11580
All checks were successful
continuous-integration/drone/push Build is passing
Actualiser layouts/partials/head.html
2025-04-05 18:46:12 +02:00
2024-04-01 14:44:21 +02:00
2022-12-26 18:59:29 +01:00
2023-11-17 16:11:21 +01:00
2025-04-05 18:31:45 +02:00
2022-12-26 19:09:27 +01:00
2024-07-22 20:43:53 +02:00
2023-06-15 18:15:06 +02:00

Typing SVG

Build Status

INSTALLATION 🔨

  • Via APT:
sudo apt install hugo
  • Via la ligne de commande:
cd /tmp
curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest \
 | grep  browser_download_url \
 | grep linux-amd64.deb \
 | grep extended \
 | cut -d '"' -f 4 \
 | wget -i -

sudo dpkg -i hugo*_linux-amd64.deb
rm -rf hugo*_linux-amd64.deb

⚠️ La version APT de Debian n'est souvent pas la dernière release parue

UTILISATION

CREATION DU SITE 📃

  • Vérifier l'installation:
hugo version

AJOUT D'UN THEME 🎨

git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo theme = \"ananke\" >> config.toml

Les thèmes HUGO CV: https://master--hugothemes.netlify.app/tags/resume/

LANCER LE SERVEUR 🚀

# L'option -D est pour servir les fichiers en Draft = true (non publiés)
hugo server -D

Visiter http://localhost:1313

BUILDER LE SITE 🚧

hugo

Les fichiers générés sont dans le dossier public

DEPLOIEMENT 🏁

VIA GITLAB AUTO DEVOPS

Compléter le config.toml comme ceci:

baseURL = "https://gitlab_user.gitlab.io/"

Compléter le fichier .gitlab-ci.yml comme ceci:

image: registry.gitlab.com/pages/hugo/hugo_extended:latest

variables:
  GIT_SUBMODULE_STRATEGY: recursive

pages:
  script:
    - hugo
  artifacts:
    paths:
      - public
  only:
  - main

VIA DOCKER 🐳

  • Créer une Dockerfile contenant:
FROM nginx:alpine

COPY ./public/* /usr/share/nginx/html
COPY ./docs/nginx-exemple.conf /etc/nginx/conf.d/default.conf

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
docker build -t hugo-site:1.0 .
docker run -d -p 8989:80  hugo-site:1.0

http://localhost:8989

DOCUMENTATION 📚

DOC DU GARAGE
DOC OFFICIELLE
DOC MARKDOWN

Description
Le framework HUGO utilisé pour créer son CV en 2 minutes
https://cv.gregandev.fr Readme
Languages
HTML 61.3%
SCSS 38.2%
Python 0.5%