Imlement the first draft of doc page generator function