How to use Makedocs?
Monkey Archive Forums/Monkey Discussion/How to use Makedocs?
| ||
I've been under the impression that monkey has a documentation generator as it has a section in the help doc about how to format comments. However, I can't seem to figure out how to actually generate the documentation. |
| ||
The docs explain it pretty well and also have a look at how the monkey modules have their documentation. You cna either have separate files or put the docs inside the coresponding module. |
| ||
The monkeydocs don't actually explain *how* to generate the docs for my own modules. They only describe how to put the comments in source code or create separate files. I've tried running the makedocs_winnt.ex in the bin folder of monkey, but it only runs for a few moments and closes. If it is generating the documentation, where is it going? Or maybe I'm misunderstanding this? I've been making the assumption that there was a program that creates html files (similar to the monkey documentation) based on the comments in the source code. |
| ||
In Teds help menu, there is an entry, "Rebuild Help". You need to click on that. And yes, it creates html files. They appear in the docs folder structure. |
| ||
Hmm...I still can't get the documentation to be generated via comments in the module source code. I looked at the other monkey modules and noticed they use the external monkeydoc method. Is the inline version broken? I'm using 70g for what its worth. |
| ||
I don't know. I am using my own doc generator to create external monkeydoc files. Plus I am using v76 right now. |
| ||
I'm on the same boat man, haven't figured out how to do it yet. It's been two months since you asked this. Did you figured out? |
| ||
makedocs creates documentation from a markup style and parses it into html that uses a template. it searches in the modules folder for a monkeydocs folder and pulls from that. so the quick tutorial is to take your module folder, create a new folder called "monkeydocs" and create a text file (using minib3d as example) "tentity.monkeydocs" and inside: # Module minib3d.tentity TEntity is the class for all objects that can be rendered, animated, or collided with. The object could also be not rendered, such as pivots. See [[tpivot]]. # Method PositionEntity:TEntity(x#,y#,z#,glob=False) ...etc... the double brackets are links to another part (tpivot.monkeydocs). spaces after the hashtag are important. then run "bin/makedocs_winnt" and it'll create the docs for this and it'll show up under "modules". that's all i know so far. |
| ||
I think the confusion here is that people are expecting Monkey to build the docs, to actually parse the source and create the help, but you actually need to create it all yourself, monkey just takes what you create with the steps above and spits out html. It would be really cool I think if monkey stole the jungle documentation system and expanded it a little, because it would then read this from the source and would be way more dynamic. |