Skip to content
Snippets Groups Projects
Commit 856b93a1 authored by Kroum Tzanev's avatar Kroum Tzanev
Browse files

correction mise en retrait yaml dans git3.md

parent 0429ab2d
No related branches found
No related tags found
No related merge requests found
Pipeline #38503 passed
...@@ -44,12 +44,12 @@ On va créer un site web nommé `apropos` dans le groupe `math-info-lesnuls` qui ...@@ -44,12 +44,12 @@ On va créer un site web nommé `apropos` dans le groupe `math-info-lesnuls` qui
```yaml ```yaml
pages : pages :
stage : deploy stage : deploy
script : script :
- echo "Publication du site web" - echo "Publication du site web"
artifacts : artifacts :
paths : paths :
- public - public
``` ```
1. Faire `git add`, `git commit` et `git push`. Lepage web est accessible à l'adresse [math-info-lesnuls.gitlabpages.univ-lille.fr/apropos](https://math-info-lesnuls.gitlabpages.univ-lille.fr/apropos). 1. Faire `git add`, `git commit` et `git push`. Lepage web est accessible à l'adresse [math-info-lesnuls.gitlabpages.univ-lille.fr/apropos](https://math-info-lesnuls.gitlabpages.univ-lille.fr/apropos).
...@@ -66,24 +66,24 @@ Par exemple, on peut utiliser le script suivant pour copier tous les fichiers (s ...@@ -66,24 +66,24 @@ Par exemple, on peut utiliser le script suivant pour copier tous les fichiers (s
```yaml ```yaml
pages : pages :
image : alpine image : alpine
stage : deploy stage : deploy
script : script :
# installer pandoc # installer pandoc
- apk add pandoc - apk add pandoc
# déplacer les fichiers (visibles) dans le dossier 'public' # déplacer les fichiers (visibles) dans le dossier 'public'
- mkdir .public - mkdir .public
- mv * .public - mv * .public
- mv .public public - mv .public public
# convertir les fichiers markdown en html # convertir les fichiers markdown en html
- find public -name "*.md" -exec sh -c 'pandoc --from gfm --to html --standalone --metadata title="titre" "${0}" -o "${0%.md}.html"' {} \; - find public -name "*.md" -exec sh -c 'pandoc --from gfm --to html --standalone --metadata title="titre" "${0}" -o "${0%.md}.html"' {} \;
# renommer les README.html en index.html # renommer les README.html en index.html
- find public -name "README.html" -exec sh -c 'mv "${0}" "${0%README.html}index.html"' {} \; - find public -name "README.html" -exec sh -c 'mv "${0}" "${0%README.html}index.html"' {} \;
artifacts : artifacts :
paths : paths :
- public - public
only : only :
- main - main
``` ```
## Création d'un site web en utilisant un générateur de site web statique ## Création d'un site web en utilisant un générateur de site web statique
...@@ -155,7 +155,7 @@ Nous allons utiliser le générateur de site web statique [Hugo](https://gohugo. ...@@ -155,7 +155,7 @@ Nous allons utiliser le générateur de site web statique [Hugo](https://gohugo.
- hugo - hugo
artifacts : artifacts :
paths : paths :
- public - public
``` ```
1. Créer un fichier `.gitignore` : 1. Créer un fichier `.gitignore` :
```gitignore ```gitignore
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment