From 43f5982d5d0824d5e85cd58da8e7676c51320024 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Sun, 4 Jun 2023 09:10:21 +0200 Subject: [PATCH] add documentation --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++ dist/index.html | 7 +------ templates/index.html | 7 +------ 3 files changed, 47 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 31f82dc..2d9eb82 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,51 @@ [![Netlify Status](https://api.netlify.com/api/v1/badges/aa5c29ee-eced-46dd-ad53-1e0822001364/deploy-status)](https://app.netlify.com/sites/villafleurie-site/deploys) +## Static Site Generator + +The entry point is located in the [main file](./lib/main.py). It should not be modified. + +The templates files must be located in the [templates](./templates) directory. +You can use template inheritance but not yet data injection. +### Configuration + +The configuration file ([config.json](./config.json)) is mandatory and should resemble: + +```json +{ + "name": "VillaFleurie", + "templates": [ + "index.html", + "t2-corail.html", + "t3-azur.html", + "contact.html", + "reservation.html" + ], + "outDir": "dist" +} +``` + +### Site Generation + +You can generate the site by running: + +```shell +python -m lib.main +``` + +### How to run the website + +It will generate the final files in the [dist](./dist) folder. +You can run the output files using a simple python server: + +```shell +cd dist && python -m http.server +``` + +### Deployment + +You can then deploy the site on any platform supporting static sites (Netlify,…) or your own VPS. + ## TODO - [X] Create a base template for the header and footer diff --git a/dist/index.html b/dist/index.html index 3e5b5c0..98ab14c 100644 --- a/dist/index.html +++ b/dist/index.html @@ -476,11 +476,6 @@ - - - - - @@ -704,7 +699,7 @@
  • VillaFleurie, 4 rue Gerty Archimède, 97190 Le Gosier, Guadeloupe
  • -
  • +590 690 44 15 30
  • +
  • +33 6 58 96 12 79
  • location.villafleurie@gmail.com
  • diff --git a/templates/index.html b/templates/index.html index cb4f5aa..86ba0a7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -401,11 +401,6 @@ - - - - - @@ -629,7 +624,7 @@
  • VillaFleurie, 4 rue Gerty Archimède, 97190 Le Gosier, Guadeloupe
  • -
  • +590 690 44 15 30
  • +
  • +33 6 58 96 12 79
  • location.villafleurie@gmail.com