I understand that I am adding the answer to the old question, but I feel that the tool has improved recently and would like to give additional suggestions to help others who are considering this question.
I recently found TomDoc.sh that uses TomDoc style comments in shell scripts. Then the provided tool can extract information and create markdowns or text documents.
There are other tools. BashDoc is modeled after a JavaDoc syntax that supports multiple tags. With RoboDoc, you insert a C-style comment into your Bash code and extract the necessary information. Finally, Apple uses HeaderDoc for its shell scripts. All three of them have a recommended style for the comments you write.
If you want to comment on your code more than generate documentation, shocco.sh may be what you would prefer. It does not have a specific format and is designed to view human-readable text describing shell commands that you execute.
source share