cs50 / lab50.vsix

Inspired by https://github.com/lostintangent/workspace-layout/
GNU General Public License v3.0
21 stars 4 forks source link

Implement {% local %} tag in liquid, adding FontAwesome 5 CSS URL to HMTL for icons #26

Closed dmalan closed 2 years ago

rongxin-liu commented 2 years ago

What does this tag do?

dmalan commented 2 years ago

Ah this one!

https://cs50.readthedocs.io/themes/jekyll/#local

dmalan commented 2 years ago

Perhaps just using these defaults, no need for customization, using https://moment.github.io/luxon/?

https://github.com/cs50/jekyll-theme-cs50/blob/develop/lib/jekyll-theme-cs50/constants.rb#L13-L20

Current implementation is in https://github.com/cs50/jekyll-theme-cs50/blob/develop/assets/jekyll-theme-cs50.js#L170-L267, though parsing of the YYYY-MM-DD HH:MM datetimes is currently done in Ruby, but https://moment.github.io/luxon/#/parsing?id=fromformat should do the trick in JS?

rongxin-liu commented 2 years ago

It occurs to me that on Codespace local time would be UTC:

Screen Shot 2022-09-10 at 18 29 23

Should we enforce EST/EDT timezone on Codespace or what do think would be best to approach this?

dmalan commented 2 years ago

Good catch. I can add some code to autodetect and inject into .devcontainer.json, which will help with that. No rush on the local tag in the meantime!

rongxin-liu commented 2 years ago

https://github.com/cs50/lab50.vsix/commit/ce9b9eac5216b681845761c95051b2e0992f3830