Search code examples
pluginsmarkdownmkdocs

How to implement a plugin in MKDocs project?


UPDATE!!!!

Watch the indent! My plugin section was indented in my code editor so it read as part of the package theme. Now that I have at least one of my plugins working, I feel somewhat sane. Now on to debug the other one...

Thanks and leaving this up in case anyone else makes the same mistake!

As for reference:

MKDocs 1.0.4 Pip 19.2.3 Python 3.8.1

Apologies for not posting original code because that probably would've helped since it took another coworker developer to notice that for me.


ORIGINAL POST:

I'm not quite sure where the disconnect occurred, but I feel like I've followed the MKDocs instruction on installing a plugin ten times and still have yet to actually see something work? I've made sure to install my desired plugins first before adding it in the configuration file.

These are the two that I'm trying to work towards at the moment before I try any others.

1: PDF Export Plugin

Pip installed that which seemed to work fine. I've added the pdf-export plugin under the plugins section of the mkdocs.yml file and I've rebuilt, rebuilt with the --clean, and reserved in a variety of combinations but when it tells me PDF documents should be automatically generating at the build command, I see nothing.

  1. Git Revision Date

Pip installed that which seemed to work fine. I've added the {{ git_revision_date }} portion to my index.md file to see what it would generate. Merely outputting the code through the browser.

Help?!

Do I need to add anything else anywhere else? I feel like I'm missing something since none of my plugins are showing me any response. I've been combing the MKDocs documentation, as well as the individual plugin documentation and have not found anything so far.


Solution

  • INDENT PROBLEM. Was pushed too far over so it was reading as the Theme section and not a plugin section.