diff --git a/src/docs/mail/passwd.en.md b/src/docs/mail/passwd.en.md index 9acdc23a5f59bbc0576bdf7b2ab61d1a546fa044..5b81d6a41e8804c0eb4241c17d843cc1c972535d 100644 --- a/src/docs/mail/passwd.en.md +++ b/src/docs/mail/passwd.en.md @@ -11,12 +11,10 @@ It is **very important** you set your answer before losing the password! (we sug How to recover your password ---------------------------- -### Step 1 - Click on "Have you forgotten your password?" in the login form +### Step 1 - Click on "Forgot your password?" in the login form -Go to the [login](https://accounts.autistici.org) page, insert your username and a -password (that will be wrong, because you don't remember it), and try to log in. -A message with "Have you forgotten your password?" will appear in the login -page, just under the form. Click on it to go to the recovery question. +Go to the [login](https://accounts.autistici.org) page and click on +"Forgot your password?" under the login form. ### Step 2 - Answer your recover question diff --git a/src/docs/mail/passwd.it.md b/src/docs/mail/passwd.it.md index eb5b1936bfc4a6a0731d8f3128988c7fdffc3e3a..a95580089139a017873dd8e13f82e80e24fbe817 100644 --- a/src/docs/mail/passwd.it.md +++ b/src/docs/mail/passwd.it.md @@ -10,7 +10,7 @@ Dato che la domanda di default riguarda gli animali domestici il servizio si chi Ovviamente è <u>importantissimo</u> impostare la propria risposta prima di perdere la password! -Si imposta attraverso il [pannello utente](https://accounts.autistici.org) +Si imposta attraverso il [pannello utente](/pannello/) - - - diff --git a/src/docs/web/webdav.en.md b/src/docs/web/webdav.en.md index 540cb15d49a5dc17d7a94bba60814347ba011fa8..109e7073d7237bf33bc174b3dc4db8c3af835de5 100644 --- a/src/docs/web/webdav.en.md +++ b/src/docs/web/webdav.en.md @@ -205,19 +205,41 @@ If you're using a Gitlab instance to manage the sources of your static website, you might find it convenient to automatically upload new versions of the site on every change. You can use the [webdav-upload](https://git.autistici.org/ai3/tools/webdav-upload) -tool to upload your website, or the result of your site rendering -process, with a `.gitlab-ci.yml` file such as the following: +tool to upload your website through Gitlab's continuous integration. -```yaml +To do so, you will need to add the following lines to your `.gitlab-ci.yml` file: + +1. You will need pip3 to be installed in your runner, so if python3-pip doesn't come installed by default in the Docker image you're using in your `.gitlab-ci.yml` script, you will need to install it first thing. Assuming you're using a Debian image, this would be the first command in your script: + + - apt-get update -y && apt-get install -yq python3-pip + +1. Install webdav_upload in your runner with the following command: + + pip3 install git+https://git.autistici.org/ai3/tools/webdav-upload#egg=webdav_upload + +2. Upload your website with the following command: + + webdav-upload --user="$WEBDAV_USER" --password="$WEBDAV_PASSWORD" --url "https://www.autistici.org/dav/$WEBDAV_USER/" output-folder html-yourwebsite + + In the above command, replace the following: + + - `output-folder` should be the name of the folder where your website is generated within the Gitlab runner. + - `html-yourwebsite` should be replaced by the name of the folder in your webspace, so if your website is inventati.org/foo, your folder name will be `html-foo`. + - You can store your user name and password as variables in your Gitlab CI / CD settings. In the above command, the variables are called WEBDAV_USER and WEBDAV_PASSWORD. + + **We strongly recommend you use this method, rather than adding the user name and password to your script, especially if your repository is publicly accessible!** + +What follows is an example of a full script: + +``` production: stage: deploy script: - - ./build-website.sh + - apt-get update -y && apt-get install -yq python3-pip - pip3 install git+https://git.autistici.org/ai3/tools/webdav-upload#egg=webdav_upload - - webdav-upload --user="$WEBDAV_USER" --password="$WEBDAV_PASSWORD" --url "https://www.autistici.org/dav/$WEBDAV_USER/" output html-mywebsite -``` - -In the above example the site is built with the hypothetical -*build-website.sh* script, then the contents of the *output* directory -are uploaded to the *html-mywebsite* directory on the server, in the -WebDAV space belonging to WEBDAV_USER. + - jekyll build -d output-folder + # we assume you are building your website with jekyll and the + # output is stored in a folder called `output-folder` - but you can use + # whatever system you prefer to build your website + - webdav-upload --user="$WEBDAV_USER" --password="$WEBDAV_PASSWORD" --url "https://www.autistici.org/dav/$WEBDAV_USER/" output-folder html-yourwebsite +``` \ No newline at end of file diff --git a/src/docs/web/webdav.it.md b/src/docs/web/webdav.it.md index 6dfab77f1e03865477a6376a7422893f942a8fda..add14c7a287d6bf50760addaae655cf84070af9a 100644 --- a/src/docs/web/webdav.it.md +++ b/src/docs/web/webdav.it.md @@ -200,3 +200,49 @@ Potete collegarvi usando la App **"WebDAV Nav"** (gratuita ed a pagamento) che t 4. Cliccate sul pulsante "Salva". 5. Nella finestra adesso vi compare il nome che avete scelto, cliccateci sopra e se vi compare una schermata con delle cartelle azzurre significa che vi siete collegati. + + +Gitlab CI +--- + +Se usate un'istanza Gitlab per generare un sito statico, probabilmente +vi conviene aggiornare automaticamente il sito ogni volta che modificate +la vostra repository. Per farlo, potete usare [webdav-upload](https://git.autistici.org/ai3/tools/webdav-upload), che vi permette di caricare +i file nel vostro spazio web attraverso la continuous integration di Gitlab. + +Per farlo, dovrete aggiungere i seguenti comandi al vostro file `.gitlab-ci.yml`: + +1. Per installare webdav-upload avrete bisogno di pip3, quindi se python3-pip non è installato di default nell'immagine Docker che usate nel vostro script `.gitlab-ci.yml`, per prima cosa dovrete installare questo pacchetto. Se per esempio state usando un'immagine Debian, il primo comando del vostro script dovrà essere: + + - apt-get update -y && apt-get install -yq python3-pip + +1. A questo punto potete installare webdav_upload con il comando: + + pip3 install git+https://git.autistici.org/ai3/tools/webdav-upload#egg=webdav_upload + +2. Infine, caricate i file del vostro sito statico nel vostro spazio web con il seguente comando: + + webdav-upload --user="$WEBDAV_USER" --password="$WEBDAV_PASSWORD" --url "https://www.autistici.org/dav/$WEBDAV_USER/" output-folder html-yourwebsite + + In questo comando, dovrete sostituire alcuni elementi: + + - `output-folder` va sostituito con il nome del folder in cui viene generato il sito nel Gitlab runner. + - `html-yourwebsite` va sostituito con il nome della cartella nel vostro spazio web. Per esempio, se il vostro sito si trova all'indirizzo inventati.org/foo, il nome della cartella sarà `html-foo`. + - Potete salvare il vostro nome utente e la vostra password come variabili nei setting della vostra CI (Settings -> CI/CD -> Variables). Nel comando riportato sopra, il nome delle due variabili è WEBDAV_USER per il nome utente e WEBDAV_PASSWORD per la password. + + **È importante usare questo metodo per il nome utente e la password, che non dovrebbero essere incluse nello script, soprattutto se la vostra repository è pubblica!** + +Di seguito, uno script di esempio: + +``` +production: + stage: deploy + script: + - apt-get update -y && apt-get install -yq python3-pip + - pip3 install git+https://git.autistici.org/ai3/tools/webdav-upload#egg=webdav_upload + - jekyll build -d output-folder + # qui stiamo immaginando che usiate jekyll per generare il vostro sito e + # che salviate i file generati in una cartella chiamata `output-folder`, + # ma potete generare il sito con qualunque sistema per generare siti statici + - webdav-upload --user="$WEBDAV_USER" --password="$WEBDAV_PASSWORD" --url "https://www.autistici.org/dav/$WEBDAV_USER/" output-folder html-yourwebsite +```