Adding modules
builder.AddRelatudeCMS()
.AddApi() // the CMS API, which serves the modules' commands
.AddModule<VenuesModule>()
.AddModule(new EventsModule { ParentPageId = homeId });AddModulerunsConfigureat once, before the app is built. Services, settings and rendering options are added then; the rest waits for each database to start.- Adding a module twice adds it once, so a package and the host can both add it.
- The name is letters, digits and
-, starting with a letter, and unique on the site. - Dependencies must be added too, before or after. Modules run dependencies first, otherwise in
the order added. A missing dependency or a circle stops the site at
UseRelatudeCMS(), before any database opens.
Modules are never found by scanning assemblies, so Program.cs lists everything that runs.