I have a script that generates documentation using pdoc for all of my classes in my project. I want to further customize my documentation by making changes to pdoc templates. I want to do this inside of my project so I can track changes in git, therefor I need to change --template-dir. This is easy enough as a cmd line argument but I have not been able to make this change when using pdoc inside a python script. My question is where can I pass in this argument and or if I make an object of pdoc is there a function or parameter to make this change. Thanks in advance!
Asked
Active
Viewed 340 times
1 Answers
0
The documentation says:
If working with pdoc programmatically, prepend the directory with modified templates into the
directories
list of thetpl_lookup
object.
This is the object in question so something like this should work:
import pdoc
pdoc.tpl_lookup.directories.insert(0, MY_TEMPLATE_DIR)

K3---rnc
- 6,717
- 3
- 31
- 46
-
I can't tell you how many times I have looked at this part of the documentation and just over looked that! Thank you so much, I can verify this works. – AronAtVW Aug 31 '20 at 18:12