finish README.md and syn.sh to be ready for upload

main
Dorian 2 years ago
parent 2fe1794ab1
commit 0316b1e2e1

3
.gitignore vendored

@ -1,2 +1,3 @@
output/*
venv/
venv/
.env

@ -3,50 +3,79 @@
## Editing content
The content files are in the `content/` directory.
The content files are in the `content/` directory, in the form of `markdown` files, in different languages.
`markdown` file exists in different languages, they're in `content/projects` (the texts presentation of the different projects) or `content/pages` (mainly the index, which is the intro + bio before the calendar).
The `content/calendar` directory contains one `yaml` file with the currently planned _walks_, see next session on how to edit.
The `content/projects` directory contains the texts presentation of the different projects.
The `content/pages` directory contains the other website pages: the index/bio/intro, the gallery (empty because there is no text).
Images can be dropped in the `content/gallery` folder, name as no importance, a plugin is going to resize them and sort them by hours of the day they were taken (using their metadata).
## Adding walk entries
The moonwalk calendar is a `.yaml` file, in `content/calendar/`.
The moonwalk calendar is a `yaml` file, in `content/calendar/`.
To add a new entry:
1. open the website in a browser and go to the calendar to see what are the next New/Full moon dates
2. either copy the date by hand (with `-` between 2-digit numbers) or click on the date box on the calendar webpage (it will automatically copy it)
3. add a new entry in the `.yaml` by pasting the date (at one more indentation level than the `calendar:` key)
4. fill the other field like so:
2. either copy the date by hand (with `-` between 2-digit numbers) or click anything on the related date box on the calendar webpage (it will automatically copy the data)
3. add a new entry in the `yaml` file by pasting the date (at one more indentation level than the `calendar:` key)
4. fill with the other fields like so:
```yaml
calendar:
#Full moon walk on the 18.03.22
18-03-22:
start_time: "18:00"
calendar:
#New Moon walk on the 30.04.22
30-04-22:
event_type:
en: "Walk"
fr: "Ballade"
nl: "Wandelen"
es: "Paseos"
start_time: "20:00"
start_location: "Drève du comte"
start_location_link: "https://www.openstreetmap.org/way/14502214#map=17/50.79518/4.40096"
```
Everytime the webpage load it will first get the New/Full moon dates from the API, then see if any entries in the calendar matches one of those date and if it does, add the corresponding informations.
Everytime the webpage load it will first get the New/Full moon dates from the API, then see if any entries in the calendar matches one of those date and if it does, add the corresponding informations to it.
## Regenerate the website after editing content
Init steps
### Init steps
1. clone the repository
2. install pelican
2. install requirements `pip install -r requirements.txt`
3. create a file with name `.env` in the root folder containing the `ftp` logs, like this
```bash
$HOST = ""
$USERNAME = ""
$PASSWORD = ""
```
### For every updates of the website
On every updates
1. make your edits to the `content/` folder
2. `add`, `commit` and `push` your changes to the directory
3. open a terminal in the root folder of this project and launch the `pelican` command to regenerate
4. copy the new files generated in the `output/` folder to the server
4. launch `sync.sh`
If a change don't appear immediatly it's possible you have to hard refresh using `ctrl`+`shift`+`r`.
if a change don't appear immediatly it's possible you have to hard refresh (using `ctrl`+`shift`+`r`).
<!-- ## Notes
* if location changes to another country it is possible that the previous walk doesn't correspond to their yaml (because the hour shift, make it jump one day before or after)
* we could do an automatic newsletter or RSS flux ? -->
* we could do an automatic newsletter or RSS flux ?
* testing other region in calendar:
# -- test for california
# latitude: 36.7783
# longitude: -119.4179
# timezone: "America/Los_Angeles"
# https://www.timeanddate.com/moon/phases/usa/california-city
# it works !!
-->

@ -6,13 +6,6 @@
longitude: 4.40250
timezone: "Europe/Brussels"
# -- test for california
# latitude: 36.7783
# longitude: -119.4179
# timezone: "America/Los_Angeles"
# https://www.timeanddate.com/moon/phases/usa/california-city
# it works !!
calendar:
#New Moon walk on the 30.04.22

@ -0,0 +1,4 @@
pelican
markdown
pyyaml
pelican-image-process

@ -0,0 +1,6 @@
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
lftp -e "open $HOST; user $USERNAME $PASSWORD; mirror -Rnev --ignore-time --parallel=10 ./output /www/moonwalks.be/ ;"

@ -31,8 +31,7 @@ nav.lang-menu ul{
line-height: var(--lh);
/* theme 2 */
/* background: var(--clr-soft);
color: var(--clr-text); */
/* background: var(--clr-soft); */
}
nav.lang-menu a{
color: rgba(255,255,255,0.5);
@ -71,6 +70,8 @@ nav.nav-menu{
border-bottom: var(--border);
border-color: var(--clr-header);
box-sizing: border-box;
color: var(--clr-header);
}
ul.nav-menu__pages{
@ -133,10 +134,6 @@ ul.nav-menu__pages li.active a{
nav.nav-menu li.active{
background: white;
}
.night nav.nav-menu li.active{
background: white;
color: var(--clr-back);
}
/* order */

@ -27,17 +27,19 @@ body{
line-height: var(--lh);
/* slitghly brown forest light, low contrast */
--clr-text: hsl(62, 6%, 24%);
--clr-text: hsl(62, 6%, 18%);
--clr-soft-text: rgba(0,0,0,0.25);
--clr-header: black;
--clr-soft: hsl(54, 40%, 82%);
/* hsl(34, 44%, 69%) */
--clr-back: hsl(82, 24%, 84%);
/* --clr-back: hsl(82, 24%, 84%); */
--clr-back: hsl(92, 24%, 84%);
/* a bit more solarized */
--clr-soft: hsl(48, 46%, 82%);
--clr-back: hsl(72, 32%, 84%);
/* --clr-soft: hsl(48, 46%, 82%); */
/* --clr-back: hsl(72, 32%, 84%); */
--clr-soft: hsl(48, 46%, 84%);
background: var(--clr-back);
color: var(--clr-text);
@ -55,8 +57,8 @@ body.night{
--clr-header: black;
/* night -- grey purple */
--clr-soft: hsl(290, 10%, 38%);
--clr-back: hsl(252, 30%, 16%);
/* --clr-soft: hsl(290, 10%, 38%); */
--clr-back: hsl(252, 30%, 18%);
}
@ -220,9 +222,9 @@ section.data-section::after{
.bio-box{
margin-top: calc(var(--lh) * 1);
display: grid;
/* display: grid;
grid-template-columns: calc(var(--lh) * 4) 1fr;
gap: calc(var(--lh) * 0.5);
gap: calc(var(--lh) * 0.5); */
}
/* svg */
@ -266,7 +268,7 @@ dialog.footer{
border: var(--border);
border-color: var(--clr-header);
padding: var(--lh);
color: currentColor;
color: var(--clr-header);
}
dialog.footer .close-footer{
@ -296,15 +298,12 @@ dialog.footer::backdrop{
background: black;
opacity: 0.25;
}
.night dialog.footer::backdrop{
background: black;
opacity: 0.25;
}
@media only screen and (max-width: 920px) {
dialog.footer{
padding: var(--lh) calc(var(--lh) / 2);
margin: auto calc(var(--lh) / 2);
max-width: none;
}
}

@ -20,13 +20,13 @@
</div>
<div class="text-content bio-box">
<div class="bio-box__leaves">
{#<div class="bio-box__leaves">
{% include 'inline-svg/bouleau.svg' %}
</div>
</div>#}
<div class="bio-box__text moon-phased-typo">
{{ page.sections["bio"] }}
</div>
{#<div class="bio-box__text moon-phased-typo">
</div>#}
{{ page.sections["bio"] }}
</div>
</section>

Loading…
Cancel
Save