adrienbrignon / mkdocs-exporter

⚡ The fastest and most configurable plugin for MkDocs, allowing seamless export of individual pages and/or entire documentation as PDF documents.
https://adrienbrignon.github.io/mkdocs-exporter/
MIT License
81 stars 8 forks source link

The way of taking icons will be deprecated, making it impossible to build in strict mode #13

Closed Zuppa-hub closed 11 months ago

Zuppa-hub commented 12 months ago

Hello everyone.

using the mkdocs build --strict --verbose MkDocs command's is impossible to build for the way MkDocs exporter uses emoji. in fact i get this warning

INFO    -  DeprecationWarning: 'materialx.emoji.to_svg' is deprecated.
 Material emoji logic has been officially moved into mkdocs-material
version 9.4. Please use Material's 'material.extensions.emoji.to_svg'
instead of 'materialx.emoji.to_svg' in your 'mkdocs.yml' file.

markdown_extensions:
- pymdownx.emoji:
       emoji_index: !!python/name:material.extensions.emoji.twemoji
       emoji_generator: !!python/name:material.extensions.emoji.to_svg

mkdocs_material_extensions' is deprecated and will no longer be
supported moving forward. This is the last release.

   File "/usr/local/lib/python3.10/dist-packages/mkdocs_exporter/themes/material/icons.py", line 35, in get_icon
     icon = to_svg('twemoji', name, None, None, None, None, None, {}, Markdown())
   File "/usr/local/lib/python3.10/dist-packages/materialx/emoji.py", line 68, in _deprecated_func
    warnings.warn(

 WARNING -  Material emoji logic has been officially moved into mkdocs-material
 version 9.4. Please use Material's 'material.extensions.emoji.to_svg'
 instead of 'materialx.emoji.to_svg' in your 'mkdocs.yml' file.

 markdown_extensions:
  - pymdownx.emoji:
       emoji_index: !!python/name:material.extensions.emoji.twemoji
       emoji_generator: !!python/name:material.extensions.emoji.to_svg

mkdocs_material_extensions' is deprecated and will no longer be supported moving forward. This is the last release.

And it end with Aborted with 1 warnings in strict mode! So the problem is in /themes/material/icons.py.

Thank you for reading me!

EDIT: the new library syntax should be from material.extensions.emoji import twemoji, to_svg

adrienbrignon commented 12 months ago

Hello @Zuppa-hub,

Thank you for opening an issue and for the helpful details you've provided.

I'll make sure to release an update in the coming days to use the new syntax if it's supported, otherwise it will fall back to the one currently used.

Zuppa-hub commented 12 months ago

Hello @Zuppa-hub,

Thank you for opening an issue and for the helpful details you've provided.

I'll make sure to release an update in the coming days to use the new syntax if it's supported, otherwise it will fall back to the one currently used.

Thank you for replying and using my feedback. I am not a python expert so I have not touched this fantastic project. But I will test the update and let you know if there are any problems. Regards

adrienbrignon commented 11 months ago

Hello @Zuppa-hub,

With the release of version 5.0.0, your issue should now be resolved.
Thank you for your help in resolving it.