mkpdfs-mkdocs-plugin icon indicating copy to clipboard operation
mkpdfs-mkdocs-plugin copied to clipboard

Feature Request: disable generation on serve

Open tmeuze opened this issue 3 years ago • 4 comments

Hello,

I believe this request is functionally the same as #18 , but I am wondering if there exists, or can be added, an option to disable PDF generation via the mkpdfs section of mkdocs.yml - such as "disable_on_serve"?

Reason being is that, due to issues not caused by this plugin, mkdocs serve fails on Mac M1 (I believe it to be a cairo issue - same error as in #44). I would like to be able to use mkdocs serve without having to disable the plugin every time, but it may also be useful for other users who don't need a PDF generated on every issue of that command.

Thank you for the excellent plugin.

tmeuze avatar Jul 13 '21 21:07 tmeuze

@tmeuze, if you have time can you test if the latest version has this feature? Disabling pdf generation is as simple as SKIP_PDF=1 mkdocs serve. Thanks for your feedback

comwes avatar Jul 14 '21 17:07 comwes

Hi, thanks for your response. Sorry, I didn't realize #18 was implemented in that manner already.

I tried SKIP_PDF=1 mkdocs serve verbatim, but still received the cairo errors. I also tried some variations: mkdocs serve SKIP_PDF=1,mkdocs serve -e SKIP_PDF=1. Could you please guide me on how the environmental variable can be used on-demand?

Thank you,

(latest version installed via pip install git+https://github.com/comwes/mkpdfs-mkdocs-plugin)

tmeuze avatar Jul 15 '21 17:07 tmeuze

Being one of those impacted with the flood in Belgium, currently I'm dealing with issue related to insurance and will be able to provide an answer to your question as soon as everything is back to normal on my end. I'll give you an accurate answer as soon as I have few time to test the solution I have in my mind.

KR

comwes avatar Jul 29 '21 08:07 comwes

@comwes Take your time, appreciate your help. I hope everything works out well for you. Stay safe.

tmeuze avatar Aug 02 '21 16:08 tmeuze