switch from date to hex for gemlog listing

")
", post.Slug, post.Date.Format("2006-01-02")hexNum, post.Title))
This commit is contained in:
Travis Shears 2025-10-12 20:27:38 +02:00
parent 6c00846379
commit fda9d22b83
Signed by: travisshears
GPG key ID: CB9BF1910F3F7469
2 changed files with 9 additions and 6 deletions

View file

@ -72,8 +72,10 @@ func (g *Gemlog) serveIndex(w gemini.ResponseWriter, req *gemini.Request) {
} else {
content.WriteString("## Posts\n\n")
for _, post := range posts {
content.WriteString(fmt.Sprintf("=> /gemlog/post/%s %s - %s\n", post.Slug, post.Date.Format("2006-01-02"), post.Title))
for i, post := range posts {
i = len(posts) - i
hexNum := fmt.Sprintf("0x%04x", i)
content.WriteString(fmt.Sprintf("=> /gemlog/post/%s %s - %s\n", post.Slug, hexNum, post.Title))
}
}