comwes / mkpdfs-mkdocs-plugin

Converts your mkdocs documentation in PDF, to be shared with users
https://comwes.github.io/mkpdfs-mkdocs-plugin
GNU General Public License v3.0
103 stars 36 forks source link

fix string types mkdocs>=1.1 #15

Closed jwaschkau closed 4 years ago

jwaschkau commented 4 years ago

closes #14 closes #16

Fixes error when building documentation with mkdocs >= 1.1

AttributeError: module 'mkdocs.utils' has no attribute 'string_types'
benjello commented 4 years ago

Hi there. I would like to try this plugin but I ended up with error this PR is supposed to solve. When is it supposed to be reviewed / merged ?

Thanks !

mikehearn commented 4 years ago

Likewise, I'm also waiting for a fix to try making a nice PDF!

jwaschkau commented 4 years ago

As a quick fix you can try to install directly from the repository

pip install -e git+https://github.com/jwaschkau/mkpdfs-mkdocs-plugin.git#egg=mkpdfs-mkdocs-plugin
relrod commented 4 years ago

@comwes Ping? :)

trogper commented 4 years ago

Is compatibility with previous mkdocs versions preserved?

jwaschkau commented 4 years ago

Is compatibility with previous mkdocs versions preserved?

Hey trogper,

is backwards compatibility necessary? If not we could just update setup.py and require mkdocs >1.1 if this change should break compatibility.

trogper commented 4 years ago

I'm not sure how much important it is (for everyone) but we are stuck on mkdocs 1.0.4 due to reduced search language support

ghost commented 4 years ago

I try to use directly from repo, but I get a different error

AttributeError: 'Section' object has no attribute 'file'

So, a release would be helpful.

trogper commented 4 years ago

@moronic It is caused by nested sections. See #4 and #22.

trogper commented 4 years ago

closes #23

snow212-cn commented 3 years ago

As a quick fix you can try to install directly from the repository

pip install -e git+https://github.com/jwaschkau/mkpdfs-mkdocs-plugin.git#egg=mkpdfs-mkdocs-plugin

WARNING: Generating metadata for package mkpdfs-mkdocs-plugin produced metadata for project name mkpdfs-mkdocs. Fix your #egg=mkpdfs-mkdocs-plugin fragments. WARNING: Discarding git+https://github.com/jwaschkau/mkpdfs-mkdocs-plugin.git#egg=mkpdfs-mkdocs-plugin. Requested mkpdfs-mkdocs from git+https://github.com/jwaschkau/mkpdfs-mkdocs-plugin.git#egg=mkpdfs-mkdocs-plugin has inconsistent name: filename has 'mkpdfs-mkdocs-plugin', but metadata has 'mkpdfs-mkdocs' ERROR: Could not find a version that satisfies the requirement mkpdfs-mkdocs-plugin (unavailable) ERROR: No matching distribution found for mkpdfs-mkdocs-plugin (unavailable)

ckolumbus commented 3 years ago

ERROR: No matching distribution found for mkpdfs-mkdocs-plugin (unavailable)

You need to change the egg name! The call would then look like .. (mind the missing -plugin at the end)

pip install -e git+https://github.com/jwaschkau/mkpdfs-mkdocs-plugin.git#egg=mkpdfs-mkdocs
feasgal commented 2 years ago

Seems like the weasyprint.fonts error is back. I think it's supposed to be weasyprint.text.fonts now.

  File ".../src/mkpdfs-mkdocs/mkpdfs_mkdocs/mkpdfs.py", line 11, in <module>
    from weasyprint.fonts import FontConfiguration
ModuleNotFoundError: No module named 'weasyprint.fonts'