blob: ee801414d116d93f385f5daafc41a17b083105f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
+++
title = "Help"
+++
# SillaB Website
This website is rendered as static html with [hugo](https://gohugo.io). The SillaB hugo project is at https://caeis.etech.fh-augsburg.de/beckmanf/sillab.git. The website itself is hosted at
* http://fredowski.duckdns.org
# Test the website
#### Install hugo via homebrew
You need the hugo software to render the website. The software is available via [homebrew](https://brew.sh).
```
brew install hugo
```
#### Download the git repository
```
cd
git clone https://caeis.etech.fh-augsburg.de/beckmanf/sillab.git
```
#### Run the hugo test server
```
hugo serve
```
and open the [http://localhost:1313](http://localhost:1313) at port 1313 to view the website in test mode. You can quit the server with "CTRL-c".
# How to add or edit posts
Change the files in the "content" directory. The basic syntax is [markdown](https://docs.github.com/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) with some special parts like the frontmatter described at [hugos syntax](https://gohugo.io/content-management/formats/).
#### Frontmatter
Start the markdown file with a "toml" section limited by "+++" to configure some parameters. After the "toml" section the regular markdown starts.
```
+++
title = 'Getting started'
publishdate = 2024-03-17
eventdate = 2029-08-19
summary = "Paolo, Petja, Stefan und Tom haben in Doccione Tag und Nacht an den neuen Stücken gearbeitet"
image = "/img/doccione1.jpg"
caption = "Doccione in Italien"
bands = ['ShadesOfBlue']
+++
Here the markdown starts.
```
The parameters have the following meaning:
| Parameter | Meaning |
| :-------- | :------ |
| `title` | The title of the page is shown in the link and as the first heading in the content |
| `publishdate` | The date when the article is published. The posts are sorted according to this date. When the date is in the future, the post will not be shown |
| `eventdate` | The date when this event will or did happen |
| `summary` | The summary is shown in the post preview list, e.g. on the homepage |
| `image` | The image is shown in the post preview as a thumbview and bigger if you look at the full post |
| `caption` | This caption is used for the image as a figure caption |
| `bands` | This should be "Hawaiians", "ShadesOfBlue" or "SnoopAndTheGang". The band is shown in the preview near the date |
#### Add an image
In the markdown file add the following code
```

```
The first word "schiffe" is a textual description of the image. It will normally not be visible. The part "Schiffe in Italien" will be the caption of the image.
Copy the file "schiffe.jpg" to the [assets/img](assets/img) directory. The image file will the be resized by hugo and copied to the final "public/img" directory.
#### Add an audio file
To add an mpeg4 audio file use the following code in the markdown file:
```
{{</* audio
src="/audio/LandUnter.m4a"
caption="ShadesOfBlue, Land Unter"
*/>}}
```
in the markdown file. Copy the audio file to "static/audio" directory. It will be copied by hugo to the final "public/audio" directory.
#### Add a video file
Use the following code to add a mpeg4 video file to the markdown file:
```
{{</* video
src="/video/flug.mov"
caption="Flugzeug"
*/>}}
```
Copy the video file to the "static/video" directory.
# How to upload website to the server
#### Build the website
The "hugo build" command will compile the static html files and copy them together with the media data to the "public" directory. That directory then has to be copied to the webserver.
```
hugo build
```
#### Fix file permissions
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
```
#### Upload the files
Copy the files in the folder "public" via [secure copy](https://manpages.debian.org/testing/openssh-client/scp.1.en.html) to the webserver.
```
scp -r public/* silke@fredowski.duckdns.org:/var/www
```
|