'mkdocs - dynamic list of child pages

Is there a way to dynamically generate a list of files under the current page's folder structure in mkdocs? I'm looking for something kind of like the Confluence "children display" macro, so that if my folder structure is

Page1/index.md
Page1/subfolder/sub1.md
Page1/subfolder/sub2.md
Page2/index.md

then I want some way to list subfolder and its contents within the body of Page1/index.md.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source