adamprocter / gomarkdownblog

A markdown blog build in go lang
6 stars 0 forks source link

range order for post links on index #1

Open adamprocter opened 9 years ago

adamprocter commented 9 years ago

index page needs an index to range over blog posts in date order over filename alphabetical order

adamprocter commented 8 years ago

Currently the posts are ordered by file name and not the date found in the post, however the date is just html so I need to work out how I can get go to use that information.

If I can then I really want to make the order sortable by the viewer too:

I'm frequently frustrated by how hard it is to read through an archive in forward order should i want to review the history of a given blog. - AustinPrior

dvrkps commented 8 years ago

@adamprocter try this: http://play.golang.org/p/sgPUrKneQD

adamprocter commented 8 years ago

Thanks could you explain your code a little and how I would intergrate this into my web_server.go file please.

adamprocter commented 8 years ago

I am considering using time.Unix to order posts. I wasn't able to interstate they approach you have take fully.

dvrkps commented 8 years ago

Hi @adamprocter, sorry for waiting, i'm in hurry right now, i will look at this week.

D.