aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/site/api.go7
-rw-r--r--cmd/site/internal/blog/blog.go14
-rw-r--r--cmd/site/internal/date.go2
-rw-r--r--cmd/site/internal/date_test.go2
-rw-r--r--go.sum3
5 files changed, 19 insertions, 9 deletions
diff --git a/cmd/site/api.go b/cmd/site/api.go
new file mode 100644
index 0000000..9a5ad5d
--- /dev/null
+++ b/cmd/site/api.go
@@ -0,0 +1,7 @@
+package main
+
+import "net/http"
+
+func (s *Site) GetPost(w http.ResponseWriter, r *http.Request) {
+
+}
diff --git a/cmd/site/internal/blog/blog.go b/cmd/site/internal/blog/blog.go
index 0ea6fb2..2a63ce1 100644
--- a/cmd/site/internal/blog/blog.go
+++ b/cmd/site/internal/blog/blog.go
@@ -18,13 +18,13 @@ type Post struct {
Title string `json:"title"`
Link string `json:"link"`
Summary string `json:"summary,omitifempty"`
- Body string `json:"-"`
- BodyHTML template.HTML `json:"body"`
- Series string `json:"series"`
- Tags []string `json:"tags"`
- SlidesLink string `json:"slides_link"`
- ImageURL string `json:"image_url"`
- ThumbURL string `json:"thumb_url"`
+ Body string `json:"body_markdown"`
+ BodyHTML template.HTML `json:"body,omitempty"`
+ Series string `json:"series,omitempty"`
+ Tags []string `json:"tags,omitempty"`
+ SlidesLink string `json:"slides_link,omitempty"`
+ ImageURL string `json:"image_url,omitempty"`
+ ThumbURL string `json:"thumb_url,omitempty"`
Date time.Time
DateString string `json:"date"`
}
diff --git a/cmd/site/internal/date.go b/cmd/site/internal/date.go
index 960cdc2..cc81a1c 100644
--- a/cmd/site/internal/date.go
+++ b/cmd/site/internal/date.go
@@ -2,7 +2,7 @@ package internal
import "time"
-const iOS13DetriFormat = `2006 M1 2`
+const iOS13DetriFormat = `2006 M01 2`
// IOS13Detri formats a datestamp like iOS 13 does with the Lojban locale.
func IOS13Detri(t time.Time) string {
diff --git a/cmd/site/internal/date_test.go b/cmd/site/internal/date_test.go
index 60254f9..8706548 100644
--- a/cmd/site/internal/date_test.go
+++ b/cmd/site/internal/date_test.go
@@ -13,7 +13,7 @@ func TestIOS13Detri(t *testing.T) {
}{
{
in: time.Date(2019, time.March, 30, 0, 0, 0, 0, time.FixedZone("UTC", 0)),
- out: "2019 M3 30",
+ out: "2019 M03 30",
},
}
diff --git a/go.sum b/go.sum
index b3d2845..cf0019c 100644
--- a/go.sum
+++ b/go.sum
@@ -11,6 +11,7 @@ github.com/celrenheit/sandflake v0.0.0-20190410195419-50a943690bc2 h1:/BpnZPo/sk
github.com/celrenheit/sandflake v0.0.0-20190410195419-50a943690bc2/go.mod h1:7L8gY0+4GYeBc9TvqVuDUq7tXuM6Sj7llnt7HkVwWlQ=
github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA=
github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM=
+github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -69,6 +70,7 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.1.0 h1:ElTg5tNp4DqfV7UQjDqv2+RJlNzsDtvNAWccbItceIE=
github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
@@ -79,6 +81,7 @@ github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNG
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8=
github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
+github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8=
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/russross/blackfriday v2.0.0+incompatible h1:cBXrhZNUf9C+La9/YpS+UHpUT8YD6Td9ZMSU9APFcsk=
github.com/russross/blackfriday v2.0.0+incompatible/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=