diff --git a/models/blog_post.go b/models/blog_post.go index e0b0ef5..9315cbb 100644 --- a/models/blog_post.go +++ b/models/blog_post.go @@ -25,5 +25,6 @@ type BlogPost struct { Url string `json:"url" gorm:"primaryKey"` Title string `json:"title"` Date string `json:"date"` + Content string `json:"content"` Comments []Comment `gorm:"foreignKey:Id"` } diff --git a/templates/blog_post.tmpl b/templates/blog_post.tmpl index 865fbcc..1ee98f1 100644 --- a/templates/blog_post.tmpl +++ b/templates/blog_post.tmpl @@ -1,5 +1,7 @@ {{ template "header.tmpl" . }}
+

{{ .Title }}

+
{{ .Content }}
{{ range $comment := .Comments }}
@@ -15,7 +17,7 @@
- +
{{ template "footer.tmpl" . }}