kaworu/octostrap3

Post date is not show correctly

willzcc opened this issue · 16 comments

You can see here: http://wyattzhang.github.io
The time element on post title all shows "ordinal"

In my _config.yml the data_format is default
date_format: "ordinal"

The post date shows correctly with default theme, so I guess this may be a bug

Thanks

Confirmed, clean installation makes data looks like "ordinal" instead of normal date.
Some time ago (a719bb0) it was fixed and broken now again somehow.
UPD: and in my blog with same setting it somehow works even after bundle install

Thank you for your reply
Then what should I do to solve this problem, could you plz make it a bit clearly? I am a little confused what to do now.
Try to clean re-install octopress with octostrap3?
or use default theme until octopress fix this problem again?

Thanks

@wyattzhang, please, wait a little, I'll investigate further today.

I'm out of ideas, can't find the reason for this problem. @kaworu, can you help there?
@wyattzhang, yes, better switch to default theme before we fix that.

OK, thank you for your cool theme,I‘ll keep watching and try it later

@wyattzhang @paskal

This is a bug in octopress, see a719bb0

@kaworu, it somehow works in my case after that commit: octopress/date-format@501defe.

@paskal ok let me check

Thank u @kaworu , I use "%F" to substitute "ordinal" temporarily and it works, looks better now.
Another question is after I install category_list plugin, the category list shows at right sidebar seems didn't adopt proper css, what should I do then or what should I check for reference, I'm not very familiar with web front-end.
You can see my demo here: http://wyattzhang.github.io
and the repo is here: https://github.com/WyattZhang/wyattzhang.github.io
Thank you

@wyattzhang about the date format, you can use whatever you want from the strftime() documentation. It's just that "ordinal" is not a valid format. We ought to document that though.

About the category_list it seems to render OK using both Google Chrome and Firefox. For reference you can check the demo blog at http://kaworu.github.io/octostrap3/ (source are at https://github.com/kAworu/octostrap3/tree/gh-pages-src).

Regards,
Alex.

Thank u @kaworu , I've done it.
@paskal helped me update my code hours ago so the category_list is all right now.
Thank you two guys.
Regards,
WZ.

@paskal I tested a new install of octopress master, bundle install bring octopress-date-format-2.0.2 which has the fix you did link. When installing octostrap3 I still get the "ordinal" timestamp.

Basically we use liquid's date function which use strftime(). Any version of octopress-date-format is unlikely to solve anything, because we do not use its date_html nor date_time_html.

The patch you linked may fix octopress-date-format in order to honor site.date_format (which was a bug), but the reason we cannot use it is because it generate its own <time> HTML element. Octostrap wants to generate the <time> HTML element because we want to add more semantic stuff (i.e. Schema.org) to it.

Basically I see this as a bug in octopress, because it assume every theme will use octopress-date-format's date_time_html (and/or date_html). As I see it the theme should be responsible for the markup and this is a perfect example of why. Sadly, this is not the only instance of this problem and we already have a pile of patch (http://kaworu.github.io/octostrap3/setup/octopatch/) to workaround them.

(assigning the bug to myself, will close once the "ordinal" stuff is documented on the demo blog)

@kaworu, could you please commit useful changes to our octopress fork? I think we can safely recommend fork to use it for setting up theme properly, I'll make sure it will be up-to-date with octopress upstream.

@paskal theses patches are merely hacks and workaround and not real "solutions" to the issue. Clearly what is missing is some kind of way for the theme to "inject" or "hook" rendering code (like it is the case in Wordpress or Drupal for example).

I think the fork should just be "official octopress minus the bugs" by following octopress master while merging all the bug fixes from PR that upstream seems to ignore. I would prefer to switch to Jekyll rather than try to fix Octopress with new incompatible changes.