0

I have tried with different plugins listed on here: https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins#pdf--site-conversion

But all of them always gives me the same error

AttributeError: module 'mkdocs.utils' has no attribute 'string_types'

My SO is windows 10, so I had some issues getting the Cairo library that is needed. But even in a container that we use to deploy the page gives the same error.

Inigo
  • 12,186
  • 5
  • 41
  • 70
R. Vargas
  • 31
  • 1
  • 3
  • maybe have a look at https://pandoc.org/MANUAL.html#creating-a-pdf – mb21 Apr 13 '20 at 18:52
  • It would appear that that plugin has not been updated for the most recent version of MkDocs. I would suggest raising an issue with the developers of the plugin. – Waylan May 04 '20 at 19:56

2 Answers2

0

Update plugins to most recent versions in requirements.txt.

For example:

mkdocs>=1.1.2
milosnkb
  • 1,523
  • 12
  • 15
0

After a lot of problems with mkdocs on different platforms and installations I switched completely to docker. Instead of a default image I made my own special docker image alinex/mkdocs. Find the sources at GitLab from which it is build. I checked that it can be used locally to build the documentation or within a build step.

So you only need to run the following command within your mkdocs directory:

docker run -v $(pwd):/data alinex/mkdocs

A description of what is included as modules can be find with examples at http://alinex.gitlab.io/env/mkdocs.

Maybe I can help someone with this, too.

Alinex
  • 914
  • 8
  • 18