Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Timestamp in posts listing #28

Closed
reynir opened this issue Apr 21, 2016 · 1 comment
Closed

[Feature request] Timestamp in posts listing #28

reynir opened this issue Apr 21, 2016 · 1 comment

Comments

@reynir
Copy link
Contributor

reynir commented Apr 21, 2016

Hi,

I think it could be useful to have the post timestamp in the posts listing, especially for people who have not kept up with the Mirage progress.

http://canopy.mirage.io/Posts

Skimming through the source I can't see where the Posts listing is made.

@abbysmal
Copy link
Owner

abbysmal commented Apr 21, 2016

Should be possible to add a timestamp in each entry.

The Posts listing is generated here: https://github.com/Engil/Canopy/blob/master/canopy_dispatch.ml#L77
If the dispatcher find no article at a given URL, it tries to load a directory (here, the Posts directory) and render a listing page with all entries in this directory.

And the HTML chunks for each entries are generated using this function:
https://github.com/Engil/Canopy/blob/master/canopy_article.ml#L45

And this is pretty much everything. :)

I will do it probably tomorrow, however one good thing is that posts in listings are ordered by timestamp already, the first one being the most recent. :)

Thank you for your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants