[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I wrote my very basic mkdocs plugin, hoping that it will inspire you to write your owns

I wanted to write mkdocs plugins, so I read the docs (well, at least part of them) and I wrote a very simple, very basic plugin.
I called it "Hello dolly", because when I wrote it I was inspired by the (once built-in) WordPress plugin of the same name that teached me the basic of plugin writing for that blog platform.

It does a very simple, very basic tasks. In each document, the plugin looks for the specific tag {{dolly}} and replaces it with a random line from the "Hello dolly!" lyrics; I tried to keep the code as simple as possible, so you won't find any unit-testing code and even the search and replace part was done by using the str.replace method instead of using a regular expression.
I tried to comment the code whenever possible, but english is not my native language and you're likely to find a lot of grammar mistakes and typos in my comments, but I hope that my code will speak better than my own words.

If, like me, you're looking forward writing your own plugin then you might find useful to have a look at it.
You'll find it here:


If you have any questions, please contact me on GitHub and I'll try to help you.

Thank you for your time and best regards