mirror of
https://github.com/rjNemo/vf-site
synced 2026-06-12 12:06:39 +00:00
edit documentation
This commit is contained in:
parent
f457e79e17
commit
076f0cbe2c
1 changed files with 15 additions and 11 deletions
26
README.md
26
README.md
|
|
@ -5,20 +5,26 @@
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
You can build the site using the built-in static site generator included.
|
You can build the site using the built-in static site generator included.
|
||||||
|
The entry point is located in the [main file](./lib/main.py). It should not be modified.
|
||||||
|
|
||||||
To create a page, create a `html` file in the `pages` directory. It should contain at least the following fields:
|
### Add a page
|
||||||
|
|
||||||
|
To add a page, create a `HTML` file in the `pages` directory.
|
||||||
|
|
||||||
|
Optionally, you can inject data in the template. To do so you should create a `TOML` file with the same name as the
|
||||||
|
template.
|
||||||
|
|
||||||
|
Any fields will become available in the template.
|
||||||
|
For instance the `index.toml` for `index.html` could contain the following fields:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
name = "index"
|
name = "index"
|
||||||
template = "index.html"
|
template = "index.html"
|
||||||
```
|
```
|
||||||
|
|
||||||
You can add other fields they will become available in the template.
|
### Layouts
|
||||||
|
|
||||||
The entry point is located in the [main file](./lib/main.py). It should not be modified.
|
You can use template inheritance. The layouts must be in the `pages/layouts` subdirectory.
|
||||||
|
|
||||||
By default, the templates files are located in the [templates](./pages) directory.
|
|
||||||
You can use template inheritance.
|
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
|
|
@ -26,10 +32,9 @@ The configuration file ([config.toml](./config.toml)) is mandatory and should re
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
name = "VillaFleurie"
|
name = "VillaFleurie"
|
||||||
out_dir = "dist"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Site Generation
|
## Build site
|
||||||
|
|
||||||
You can generate the site by running:
|
You can generate the site by running:
|
||||||
|
|
||||||
|
|
@ -46,7 +51,7 @@ You can run the output files using a simple python server:
|
||||||
cd dist && python -m http.server
|
cd dist && python -m http.server
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deployment
|
## Deployment
|
||||||
|
|
||||||
You can then deploy the site on any platform supporting static sites (Netlify,…) or your own VPS.
|
You can then deploy the site on any platform supporting static sites (Netlify,…) or your own VPS.
|
||||||
|
|
||||||
|
|
@ -63,7 +68,7 @@ You can then deploy the site on any platform supporting static sites (Netlify,
|
||||||
- [ ] Find attractions for landing page
|
- [ ] Find attractions for landing page
|
||||||
- [x] Pick real reviews from AirBnB and Booking
|
- [x] Pick real reviews from AirBnB and Booking
|
||||||
- [x] Optimize images
|
- [x] Optimize images
|
||||||
- [ ] Automate the file search
|
- [x] Automate the file search
|
||||||
- [x] Extract data out of the template
|
- [x] Extract data out of the template
|
||||||
- [ ] Create a 'all' key for data available in all templates
|
- [ ] Create a 'all' key for data available in all templates
|
||||||
- [ ] Create a template for the rooms
|
- [ ] Create a template for the rooms
|
||||||
|
|
@ -72,7 +77,6 @@ You can then deploy the site on any platform supporting static sites (Netlify,
|
||||||
|
|
||||||
## Excluded
|
## Excluded
|
||||||
|
|
||||||
* The article page
|
|
||||||
* The language switcher
|
* The language switcher
|
||||||
|
|
||||||
## Built with
|
## Built with
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue