From 21ce6944f80ca7f8e1d82c87ec7f604b742727f0 Mon Sep 17 00:00:00 2001
From: serr
Date: Fri, 6 Jun 2025 18:19:08 +0300
Subject: [PATCH] =?UTF-8?q?=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D0=BF?=
=?UTF-8?q?=D0=BE=D1=81=D1=82=D1=8B=20=D1=81=D0=BE=D1=80=D1=82=D0=B8=D1=80?=
=?UTF-8?q?=D1=83=D1=8E=D1=82=D1=81=D1=8F=20=D0=BF=D0=BE=20=D0=B2=D1=80?=
=?UTF-8?q?=D0=B5=D0=BC=D0=B5=D0=BD=D0=B8=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0?=
=?UTF-8?q?=D0=BD=D0=B8=D1=8F,=20=D1=83=D0=B1=D1=80=D0=B0=D0=BB=20=D1=81?=
=?UTF-8?q?=D1=83=D1=84=D1=84=D0=B8=D0=BA=D1=81=20.md=20=D0=B2=20url=20?=
=?UTF-8?q?=D0=BF=D0=BE=D1=81=D1=82=D0=BE=D0=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mvc/models/models_pages/posts.go | 3 +--
mvc/views/pages/post.gohtml | 2 +-
mvc/views/pages/posts.gohtml | 4 ++--
3 files changed, 4 insertions(+), 5 deletions(-)
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 }}