Getting all code stuff in a separate function to get clearer code
Adding the dynamic menu to the asciidoc backend