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

Last update page #28

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

Last update page #28

wikimatze opened this issue Mar 23, 2016 · 2 comments

Comments

@wikimatze
Copy link
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
Copy link
Member

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
Copy link
Member Author

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 :).

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