ngs / middleman-ogp

middleman-og is an extension for the Middleman static site generator that adds Open Graph helper.
MIT License
37 stars 7 forks source link

Deal with attributes in Time format, fallback to String format. #11

Closed SnijderC closed 4 years ago

SnijderC commented 5 years ago

I'm not sure why but I suspect middleman parses strings that look like time before passing it to plugins, perhaps only in recent versions. In any case, I added a type check, if the value is an instance of Time, parsing is skipped because Time doesn't have .to_s and parsing is not even necessary. If it does happen to be String, (perhaps with older versions of middleman?) the String is parsed to Time as it used to.

ngs commented 4 years ago

Sorry for slow reaction, merged and published as v1.4.0. Thank you for your contribution.

SnijderC commented 4 years ago

Thanks!