From 8be261647c9a99bc3870188bfa097103a7f11369 Mon Sep 17 00:00:00 2001
From: vilmibm {{.Title}}
- {{.Pubdate}}
- {{.Content}}
-`)
+ t, err := template.New("blog").Parse(blogTmpl)
if err != nil {
- return "", err
+ return fmt.Errorf("failed to parse the blog template: %w", err)
}
out := bytes.Buffer{}
- err = t.Execute(&out, entry)
- if err != nil {
- return "", err
+ if err = t.Execute(&out, data); err != nil {
+ return fmt.Errorf("failed to render blog template: %w", err)
}
- return out.String(), nil
-}
+ fmt.Println(out.String())
-func getHeader() string {
- return `
-
-
-
- a web log for tilde town or at least what passes for one
-`
-}
-
-func getFooter() string {
- return `
-
-
-`
+ return nil
}
func stats() (*tildeData, error) {
diff --git a/index.html b/index.html
index 43f3536..1ae169d 100644
--- a/index.html
+++ b/index.html
@@ -89,7 +89,7 @@
ssh join@tilde.town
-->
- if you think you might enjoy being a part of this community you can apply for a good time using this form.
+ if you think you might enjoy being a part of this community you can apply for a homestead using this form.
it can take up to 30 days to be approved and not all applications are approved.
@@ -111,7 +111,7 @@
- the town is a non-commercial thing. donations are appreciated
+ the town is a non-commercial thing. donations are appreciated