"Or why have 30 admin panels when one would probably suffice," for people with way too many sites.
The base idea is to achieve a multi-site setup that is both more flexible and simpler than native Grav multi-site handling. One major advantage of such a setup is it makes it feasible to have completely different URLs for the different sites.
The strategy used to achieve this uses a combination of (hard) symbolic links, theme-layer taxonomy filtering and homepage configuration for each site.
- public_html - Web folder on your server.
- pages symlinked - Present outside of the Grav installations for convenient access without having to rely on admin interface.
- siteadmin.com - Grav installation of the first site, which is also the global admin site.
- user
- plugins
- admin - Only the admin installation should require the admin plugin - won't hurt to install it on the other sites if that's more comfortable though. All admin plugins will edit the exact same page files due to symlinking.)
- pages symlinked - Every page on the server. Same as public_html/pages (due to symlink).
- plugins
- themes
- siteadmin.theme - Unique to this site. Relies on taxonomy.site filtering to only display pages that belong to this site.
- user
- slavesite1.com
- user
- pages symlinked - Every page on the server. Same as public_html/pages (due to symlink).
- themes
- slavesite1.theme - Unique to this site. Relies on taxonomy.site filtering to only display pages that belong to this site.
- user
- slavesite2.com
- user
- pages symlinked - Every page on the server. Same as public_html/pages (due to symlink).
- themes
- slavesite2.theme - Unique to this site. Relies on taxonomy.site filtering to only display pages that belong to this site.
- user
Install Grav one first time in public_html/siteadmin.com, then in CLI navigate to public_html/siteadmin.com/user. Then:
sudo ln pages ../../pages
(Assuming I did my research correctly, ln creates hard symbolic links, which is what we need - multiple addresses for the same chunk of data in physical storage.)
From now on, public_html/pages and public_html/siteadmin.com/user/pages are continously identical. This is what we want.
Now, whenever you want to add a site (say, slavesite1.com), perform a new Grav installation in a new folder in public_html, delete this new installation's pages folder and symlink the global pages folder in its place. If your installation is in public_html/slavesite1.com, navigate to public_html in CLI and then:
sudo ln pages slavesite1.com/user/pages
(This is the same thing as above, only in reverse direction.)
What we're doing here is knitting all the Grav installations hosted on our server together so that they all read their pages from the same physical location. Said location, being editable by siteadmin.com's admin plugin, will allow publishing control over every site (from a single location).
I have yet to re-read the Grav documentation, so I can't provide detailed instructions here. Tl;dr: you want each site to have its own unique theme, and you want each site's theme to filter through the pages folder to only display pages that are configured to display for that site (through specific, user-defined site taxonomy).
The trick that makes this all viable (at least as far as I can foretell, I still need to actually test this setup) is homepage configuration. Each site's user/config/system.yaml should define its own homepage. For instance:
home:
alias: '/siteadmin/home'
hide_in_urls: true