Le framework HUGO utilisé pour créer son CV en 2 minutes https://cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hugo-cv/README.md

114 lines
2.1 KiB

7 months ago
# [![Typing SVG](https://readme-typing-svg.demolab.com?font=Anton&pause=1000&size=40&random=false&width=435&height=70&lines=HUGO-CV)](https://git.io/typing-svg)
7 months ago
7 months ago
## INSTALLATION :hammer:
7 months ago
7 months ago
- Via APT:
```bash
sudo apt install hugo
```
7 months ago
7 months ago
- Via la ligne de commande:
```bash
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 -
7 months ago
7 months ago
sudo dpkg -i hugo*_linux-amd64.deb
rm -rf hugo*_linux-amd64.deb
```
## UTILISATION
### CREATION DU SITE :page_with_curl:
- Vérifier l'installation:
```bash
hugo version
```
### AJOUT D'UN THEME :art:
```bash
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo theme = \"ananke\" >> config.toml
```
7 months ago
> Les thèmes HUGO CV: https://master--hugothemes.netlify.app/tags/resume/
7 months ago
### LANCER LE SERVEUR :rocket:
```bash
# L'option -D est pour servir les fichiers en Draft = true (non publiés)
hugo server -D
```
> Visiter http://localhost:1313
### BUILDER LE SITE :construction:
```bash
hugo
```
> Les fichiers générés sont dans le dossier public
## DEPLOIEMENT :checkered_flag:
### VIA GITLAB AUTO DEVOPS
Compléter le config.toml comme ceci:
```bash
baseURL = "https://gitlab_user.gitlab.io/"
```
Compléter le fichier .gitlab-ci.yml comme ceci:
```bash
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
pages:
script:
- hugo
artifacts:
paths:
- public
only:
- main
```
### VIA DOCKER :whale:
- Créer une Dockerfile contenant:
```Dockerfile
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;"]
```
```bash
docker build -t hugo-site:1.0 .
docker run -d -p 8989:80 hugo-site:1.0
```
7 months ago
> http://localhost:8989
7 months ago
## DOCUMENTATION :books:
[DOC DU GARAGE](https://docs.legaragenumerique.xyz/divers/devops/hugo/)
[DOC OFFICIELLE](https://gohugo.io/documentation/)
[DOC MARKDOWN](https://www.markdownguide.org/basic-syntax/)
7 months ago