Cleanup
This commit is contained in:
@ -114,9 +114,9 @@ func Home(c echo.Context) error {
|
||||
Internal: true,
|
||||
},
|
||||
{
|
||||
Name: "Support 🩵",
|
||||
Href: "https://donate.stripe.com/8wMeVF25c78L0V2288",
|
||||
Internal: false,
|
||||
Name: "Posts",
|
||||
Href: "/posts",
|
||||
Internal: true,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -13,11 +13,11 @@ import (
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
type BlogProps struct {
|
||||
type PostsProps struct {
|
||||
Posts []lib.CardLink
|
||||
}
|
||||
|
||||
func Blog(c echo.Context) error {
|
||||
func Posts(c echo.Context) error {
|
||||
var posts []lib.CardLink
|
||||
|
||||
files, err := fs.ReadDir(contentfs.FS, ".")
|
||||
@ -36,7 +36,7 @@ func Blog(c echo.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
frontMatter.Href = "post/" + strings.TrimSuffix(file.Name(), ".md")
|
||||
frontMatter.Href = "posts/" + strings.TrimSuffix(file.Name(), ".md")
|
||||
frontMatter.Internal = true
|
||||
|
||||
posts = append(posts, frontMatter)
|
||||
@ -59,7 +59,7 @@ func Blog(c echo.Context) error {
|
||||
return iDate.Before(jDate)
|
||||
})
|
||||
|
||||
props := BlogProps{
|
||||
props := PostsProps{
|
||||
Posts: posts,
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>
|
||||
</button>
|
||||
|
||||
<a href="/blog" class="btn btn-primary btn-outline">
|
||||
<a href="/posts" class="btn btn-primary btn-outline">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-undo-2"><path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5v0a5.5 5.5 0 0 1-5.5 5.5H11"/></svg>
|
||||
Back
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user