From 5b68d86fccca3e96238b5841e5518461236c14b3 Mon Sep 17 00:00:00 2001 From: Simon C Date: Thu, 7 May 2020 22:57:24 +0200 Subject: [PATCH] Ajout d'une commande pour construire le site --- .gitignore | 1 + README.md | 1 + run | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 8b4bda0..3eec6c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ resources +public diff --git a/README.md b/README.md index 68b2d0c..c9a041f 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,4 @@ Description les commandes : - `./run install` : Installe les dépendances - `./run dev` : Lance hugo pour le développement avec l'autoreload +- `./run build` : Lance la génération du site pour la prod diff --git a/run b/run index 75669ad..9a22dd7 100755 --- a/run +++ b/run @@ -16,6 +16,11 @@ echo if [ $# -ge 1 ]; then if [ $1 == "dev" ]; then hugo server -D + elif [ $1 == "build" ]; then + rm -rf public + hugo -D --minify + node themes/hugo-theme-lowtech/scripts/typo + # docker-compose up -d --build --force-recreate elif [ $1 == "install" ]; then echo "- Initialisation de git submodule" git submodule init @@ -27,6 +32,7 @@ else echo "Commands:" echo "- ./run install : Installe les dépendances" echo "- ./run dev : Lance hugo pour le développement avec l'autoreload" + echo "- ./run build : Lance la génération du site pour la prod" echo fi