timvink / mkdocs-charts-plugin

Mkdocs plugin to add plots from data using vegalite
https://timvink.github.io/mkdocs-charts-plugin/
MIT License
84 stars 6 forks source link

Fix build error caused by mkdocs (v1.5.0) #17

Closed mgao6767 closed 1 year ago

mgao6767 commented 1 year ago

Fix https://github.com/timvink/mkdocs-charts-plugin/issues/16#issue-1823961327 as suggested by mkdocs' release note:

Breaking change: config.extra_javascript is no longer a plain list of strings, but instead a list of ExtraScriptValue items. So you can no longer treat the list values as strings. If you want to keep compatibility with old versions, just always reference the items as str(item) instead. And you can still append plain strings to the list if you wish.

SH2282000 commented 1 year ago

I would rather write list(map(str, config["extra_javascript"])) instead of [str(item) for item in config["extra_javascript"]] as the same function (str()) is applied to all elements.

This is a breaking change, would it be possible to review this M.R. A.S.A.P. ?

cc @timvink @mgao6767 @squidfunk

squidfunk commented 1 year ago

I'm not sure why I was CC'd.

timvink commented 1 year ago

Thanks for the efforts @mgao6767 and @oprypin !