From b336148b0747e719a7839dc0e75bcd6b3f367b71 Mon Sep 17 00:00:00 2001
From: Keith Solomon
Date: Sat, 19 Apr 2025 14:46:08 -0500
Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feature:=20Update=20footer=20copyright?=
=?UTF-8?q?=20year=20and=20add=20live=20server=20settings?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.vscode/settings.json | 3 ++-
main.go | 2 ++
public/about.html | 2 +-
public/index.html | 2 +-
4 files changed, 6 insertions(+), 3 deletions(-)
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!