diff options
Diffstat (limited to 'content/help.md')
-rw-r--r-- | content/help.md | 60 |
1 files changed, 48 insertions, 12 deletions
diff --git a/content/help.md b/content/help.md index 7fcce25..0d1f3f1 100644 --- a/content/help.md +++ b/content/help.md @@ -10,21 +10,29 @@ This website is rendered as static html with [hugo](https://gohugo.io). The Sill # Test the website -#### Install hugo via homebrew +#### Install hugo and rsync via homebrew -You need the hugo software to render the website. The software is available via [homebrew](https://brew.sh). +You need the hugo software to render the website. The software is available via [homebrew](https://brew.sh). The rsync software is used to transfer the web data to the webserver. ``` -brew install hugo +brew install hugo rsync ``` -#### Download the git repository +#### Download or update the git repository + +If you run this the first time, you need to download the git repository with the following command: ``` cd git clone https://caeis.etech.fh-augsburg.de/beckmanf/sillab.git ``` +If you have the repository already on your computer, just update to see if some changes are on the server that you have not. + +``` +git pull +``` + #### Run the hugo test server ``` @@ -116,20 +124,48 @@ The "hugo build" command will compile the static html files and copy them togeth hugo build ``` -#### Fix file permissions +#### Upload the files to the webserver + +Copy the files in the folder "public" via "rsync" to the webserver. -You need to make sure that all files in "public" folder are accessible for group and others. ``` -cd -cd sillab -chmod -R go+r public +/opt/homebrew/bin/rsync -rphv --chmod=D775,F664 --groupmap=*:www --delete public/ silke@fredowski.duckdns.org:/var/www ``` -#### Upload the files +#### Upload your changes to the git repository -Copy the files in the folder "public" via "rsync" to the webserver. +Assume you have added a post by creating a new markdown file "posts/shadesofblue/220631-lecoq.md" with a new image file "assets/img/silkepiano.jpg". You can see which files you have changed and which you have added with: ``` -rsync -avhP --delete public/* fritz@fredowski.duckdns.org:/var/www +git status ``` +which will tell you that there are these two new "untracked" files. You add the two new files to the next "commit" with + +``` +git add assets/img/silkepiano.jpg +git add posts/shadesofblue/220631-leqoq.md +``` + +You do the same when you just change files. Then you make a commit with + +``` +git commit +``` + +which opens an editor. You write a comment what this commit is about like "added show in Le Coq". When you exit the editor, the commit is added to the git database. See: + +``` +git log +``` + +Now you upload the changes to the git server with + +``` +git push +``` + +You can then see your commit on the server + +https://caeis.etech.fh-augsburg.de/beckmanf/sillab.git/log/ + |