2

I comment the original data_format in _config.yml and have set the date format to another one(I tried several date format):

date_format: "%F %a"        #2012-01-01    
#date_format: "ordinal"

I rake generate and rake preview/or rake deploy, I still saw the date format is showing like "OCT 18TH, 2014 7:37 PM" , why is that?

Thank you!

JaskeyLam
  • 15,405
  • 21
  • 114
  • 149

1 Answers1

1

First solution:

As far as I found the date_format parameter from _config.yml file is obsolete (I reported it in https://github.com/imathis/octopress/issues/1697) because the previous Octopress date plugin was replaced with Jekyll Date Format. The parameter is no longer used.

To change date format on your blog you have to edit source/_includes/post/date.html file. You just need to replace two occurrences of

{{ page.date_time_html }}

with the

{{ post.date | date: "%F" }}

Of course you can change the %F as you want. More about Jekyll Date Format you can find at: http://alanwsmith.com/jekyll-liquid-date-formatting-examples


Second solution:

I have checked the issue once again and now it works as it should. You do not need replace {{ page.date_time_html }} any more. Just follow the configuration of the Octopress Date Format plugin: https://github.com/octopress/date-format#configuration.

You need to add second option - time_format - for time formatting and everything should works properly.

Example: date_format: "%Y-%m-%d" # e.g. 2014-07-03 time_format: "%H:%M" # 24 hour time


Summary:

Octopress is constantly developed project and the date format issue will probably be different on different commits at GitHub.

Piotr Pradzynski
  • 4,190
  • 5
  • 23
  • 43