diff --git a/mvc/models/models_pages/posts.go b/mvc/models/models_pages/posts.go index 16416f3..4c93d7c 100644 --- a/mvc/models/models_pages/posts.go +++ b/mvc/models/models_pages/posts.go @@ -57,8 +57,7 @@ func LoadPosts(dir string) (PostsMap, error) { // Ошибка парсинга timestamp log.Fatal(`post name parse error`) } - - link := fmt.Sprintf("/%s", name[lowLineIndex+1:]) + link := fmt.Sprintf("/%s", strings.TrimSuffix(name[lowLineIndex+1:], ".md")) posts[PostLink(link)] = createPost(link, html, timestamp) } return nil diff --git a/mvc/views/pages/post.gohtml b/mvc/views/pages/post.gohtml index 7ebc337..961266e 100644 --- a/mvc/views/pages/post.gohtml +++ b/mvc/views/pages/post.gohtml @@ -7,7 +7,7 @@
{{ .data }}

- mod time: {{ .modTimestamp }} + create time: {{ .modTimestamp }}

diff --git a/mvc/views/pages/posts.gohtml b/mvc/views/pages/posts.gohtml index a28dc86..529b2c9 100644 --- a/mvc/views/pages/posts.gohtml +++ b/mvc/views/pages/posts.gohtml @@ -6,7 +6,7 @@

- posts sorted by last mod time + posts sorted by create time

{{ range $ind, $post := .posts }} @@ -18,7 +18,7 @@ read more

- mod time: {{ $post.Timestamp }} + create time: {{ $post.Timestamp }}

{{ end }}