Page Creation Date

How to get page creation date?

I can get the post creation date {{ page.date }}, but how do I get the page date.

I regularly use a plugin file-last-modified.rb to read a file’s modification date (mtime). This could be modified to the read creation date (ctime). However, I wouldn’t use it – creation date is unstable meta info that can get lost, e.g. when switching computers. I simply place the creation date in the front matter, e.g.
creationDate: 2015-05-25
of every file I crate and use that where I need it.
Best, Michael

Thanks for the answer, Michael.
This method is suitable for new pages. But what about existing ones.

You could write liquid code: if creationDate exists, use it, otherwise calculate it from ctime. Should be easy to write a new plugin based on file-last-modified.rb using ctime.
Best, Michael

you can get the post date because the filename contains the date - on pages that is not there, you could try adding the date to the front matter and then see if you can get it - but you would have to manually add it to each page.

Ahh, I see that is part of the other answer.

What about using the date each page was created in the version control? To avoid machine differences.

Here is how to do it in the command line with git

You could do it by hand once off then fill in the details for each page now and in future in metadata.

If you want to automate that, you could add a Jekyll plugin script. Maybe there is a plugin for running git commands. Here is how you can run shell commands such as that git one, using ruby:

Though you may hit rest restrictions on github pages with custom plugins especially if they run shell commands.