Layout template location for custom module

I have a running website on SilverStripe 4.6 with all my code in the app/src folder. I thought it would be cleaner to move my code into seperate newly created modules. I’ve been successful mostly except with the templating part.

Suppose I have vendor/myvendor/blogmodule/src/BlogPageController.php with namespace MyVendor\BlogModule\

Where should I put my BlogPage.ss template? I want it to be rendered with Page.ss from my theme folder and Layout/BlogPage.ss as the $Layout.

I’ve tried many locations like

vendor/myvendor/blogmodule/templates/layout/BlogPage.ss
themes/mytheme/templates/MyVendor/BlogModule/Layout/
… and more

Your template would be:

vendor/myvendor/blogmodule/templates/MyVendor/BlogModule/Layout/BlogPage.ss

Once you’re in the templates directory, your structure needs to match the namespace of the classes.
This allows for templates to be overridden / cascaded in other places such as site themes.

My template is now in themes/mytheme/templates/MyVendor/BlogModule/Layout/BlogPage.ss and works perfectly.

I simply move it to vendor/myvendor/blogmodule/templates/MyVendor/BlogModule/Layout/BlogPage.ss I do ?flush and … poof, it’s gone. Just Page.ss renders without BlogModule inside it.

Very confused. Maybe something to do with theme.yml in my app folder?
---
Name: mytheme
---
SilverStripe\View\SSViewer:
themes:
- '$public'
- '<mytheme>'
- '$default'