Last update page #28

Closed
wikimatze opened this Issue Mar 23, 2016 · 2 comments

2 participants

@wikimatze
Padrino Framework member

last-guide-update.

The code can be found under https://github.com/padrino/padrino-web/tree/last-updated. All we have to do is to add the following in the frontmatter:

---
chapter: Getting Started
title: Basic Projects
updated: 2016-02-21
---

Don't know who to automate the thing to update the page. @angeloashmore what's your opinion?

@angeloashmore

I removed the updated frontmatter from the documents because that data is already stored in Git and the file metadata itself. It would be something to manually update each time, which cannot be guaranteed to happen.

That being said, it would be helpful to include the date on the pages. Although not 100% foolproof, I think we could just look at the file's last modified timestamp and use that to display the last updated date.

@wikimatze
Padrino Framework member

Thanks for the feedback, after looking around for a while I found the following solution:

File.mtime(current_page.source_file).strftime("%Y-%m-%d")

which is 100% foolproof :).

@wikimatze wikimatze closed this in 1c13612 Mar 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment