✨feature: Update footer copyright year and add live server settings
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -4,5 +4,6 @@
|
|||||||
"activityBar.background": "#0C188E",
|
"activityBar.background": "#0C188E",
|
||||||
"titleBar.activeBackground": "#1121C7",
|
"titleBar.activeBackground": "#1121C7",
|
||||||
"titleBar.activeForeground": "#F9F9FE"
|
"titleBar.activeForeground": "#F9F9FE"
|
||||||
}
|
},
|
||||||
|
"liveServer.settings.root": "/public"
|
||||||
}
|
}
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -7,6 +7,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/russross/blackfriday/v2"
|
"github.com/russross/blackfriday/v2"
|
||||||
)
|
)
|
||||||
@@ -84,6 +85,7 @@ func generatePages(files []os.FileInfo, contentDir, outputDir string, tpl *templ
|
|||||||
"Content": template.HTML(htmlContent),
|
"Content": template.HTML(htmlContent),
|
||||||
"Title": strings.Title(strings.TrimSuffix(file.Name(), filepath.Ext(file.Name()))),
|
"Title": strings.Title(strings.TrimSuffix(file.Name(), filepath.Ext(file.Name()))),
|
||||||
"Nav": nav,
|
"Nav": nav,
|
||||||
|
"Year": time.Now().Year(),
|
||||||
}
|
}
|
||||||
|
|
||||||
err = tpl.Execute(out, data)
|
err = tpl.Execute(out, data)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Experimenting with Go. Seems pretty cool so far!
</p>
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>© 2025 Keith Solomon</p>
|
<p>© 2025 Keith Solomon</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ This is your first static site built with Go!
</p>
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>© 2025 Keith Solomon</p>
|
<p>© 2025 Keith Solomon</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
Reference in New Issue
Block a user