Automatically adding document to the menu

In the documentation, it mention the “Menu” and mentioned adding content to the menu.
To add a document to the menu we have to add in the “Front matter” the entry
parent: xxx

can we auto populate the menu from the directory structure?
so the folder will be collapsable menu item that has children, and the file will be added to its parent folder?

No, I don’t think that is currently possible. The best you can do as in “automatic menus” is what in the documentation is branded as “Section menu for the lazy blogger”.