You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
services.AddSeoTags(seoInfo =>{varsiteTitle="Anything you want";//Read from env variable or database or settings seoInfo.SetSiteInfo(siteTitle: siteTitle /* Other parameters is optional */);});
Or if you want IServiceProvider to locate a registered service (for example read from a repository), use
services.AddSeoTags((serviceProvider,seoInfo)=>{varsettingRepostory= serviceProvider.GetRequiredService<ISettingRepostory>();varsiteTitle= settingRepostory.GetSiteTitle(); seoInfo.SetSiteInfo(siteTitle: siteTitle /* Other parameters is optional */);});
Hi,
I would like to set set dynamically the siteInfo.siteTitle startup.cs file.
Is there a any way to do it?
The text was updated successfully, but these errors were encountered: