diff --git a/.vscode/settings.json b/.vscode/settings.json index 214e70e..9d62b0d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,6 @@ "activityBar.background": "#0C188E", "titleBar.activeBackground": "#1121C7", "titleBar.activeForeground": "#F9F9FE" - } + }, + "liveServer.settings.root": "/public" } diff --git a/main.go b/main.go index b1c07cc..ae0d978 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "os" "path/filepath" "strings" + "time" "github.com/russross/blackfriday/v2" ) @@ -84,6 +85,7 @@ func generatePages(files []os.FileInfo, contentDir, outputDir string, tpl *templ "Content": template.HTML(htmlContent), "Title": strings.Title(strings.TrimSuffix(file.Name(), filepath.Ext(file.Name()))), "Nav": nav, + "Year": time.Now().Year(), } err = tpl.Execute(out, data) diff --git a/public/about.html b/public/about.html index c0d0ee1..82e4747 100644 --- a/public/about.html +++ b/public/about.html @@ -28,7 +28,7 @@ Experimenting with Go. Seems pretty cool so far!

diff --git a/public/index.html b/public/index.html index 51441cc..dbedbff 100644 --- a/public/index.html +++ b/public/index.html @@ -28,7 +28,7 @@ This is your first static site built with Go!