diff --git a/index.go.yml b/index.go.yml index 86ca85e..49ebe9c 100644 --- a/index.go.yml +++ b/index.go.yml @@ -56,7 +56,7 @@ about: Here is my GPG Key for my email address.

- My CV is available in the following formats: ( DOCX | PDF ) + My CV is available in the following formats: ( DOCX | PDF )

thumbnailLocation: "resources/assets/imageofyou_t.jpg" imageLocation: "resources/assets/imageofyou.jpg" diff --git a/pageHandler/pages/index/about.go b/pageHandler/pages/index/about.go index 0fe9070..638bd0d 100644 --- a/pageHandler/pages/index/about.go +++ b/pageHandler/pages/index/about.go @@ -18,7 +18,8 @@ type AboutYaml struct { } func (ay AboutYaml) GetContent() template.HTML { - return template.HTML(strings.ReplaceAll(strings.ReplaceAll(ay.Content, "#age#", strconv.Itoa(ay.GetAge())), "#birth#", strconv.Itoa(ay.BirthYear))) + r := strings.NewReplacer("#age#", strconv.Itoa(ay.GetAge()), "#birth#", strconv.Itoa(ay.BirthYear), "#year#", strconv.Itoa(time.Now().Year())) + return template.HTML(r.Replace(ay.Content)) } func (ay AboutYaml) GetAge() int {