I understand that the home page content is defined in block home-page-block, and I can edit that and see changes appear in the browser.
However, what I don't understand is:
What bit of
theme/template/code
invokes home-page-block in the first place. (I am searching everything I can think of, and nothing...)The relationship, if any, to Content > Pages > Home Page, which is blank. And furthermore, I can edit Home Page, it does not show up as the home page, but does show up at
[mysite.com]/home/
.
What am I missing?
Edit: Partial understanding
Based on reading docs and source code, the diagram shows some of the contributors to the construction of the Luma home page.
Among mysteries solved:
in the Content > Widget configuration page, the list of pages offered as targets comes from Magento consolidating all the page_types.xml files from all modules.
On that same admin page, the list of target Containers appears to come from module-theme/view/frontend/layout/default.xml. (Not sure if it changes when different target page is selected.)
Nagging Questions
How are some of the things in the above diagram specified, based on the requested route '/'?
A. Routing: '/' Route matching patterns are normally specified in routes.xml files for each module. But where is the routes.xml for '/'? And how does module-cms get invoked (whose page_types.xml shows it handles "CMS Home Page"/cms_index_index). How does routing result in a requested page type of cms_index_index?
B1. The seemingly corresponding layout, /vendor/magento/module-cms/view/frontend/layout/cms_index_index.xml shows an empty body. How does that relate?
B2. Instead, the delivered page appears to have the structure of /vendor/magento/module-theme/view/frontend/layout/default.xml. (Deduced from it being the only file with a container called "Main Content Area", as targeted by Widget "Home Page") What precipitates invocation of default.xml?
C. Why is the Luma home page implemented with a Widget and a Block and not simply a Page?
Edit 2
I pursued part of this question here: How does home page routing work?