This page sets the title, description, keywords and some manual tags to the header. Look at the resulting output-source to see the effect.
This tutorial inherits from the Custom.Hybrid.Razor14 or the Custom.Hybrid.RazorTyped base class.
Custom.Hybrid.Razor14
Custom.Hybrid.RazorTyped
This allows us to use Kit.Page to access an IPageService without having to use GetService<IPageService>.
Kit.Page
IPageService
GetService<IPageService>
@inherits Custom.Hybrid.RazorTyped @{ // prefix the current title, description and keywords with additional values Kit.Page.AddToHead("<meta xyz>"); Kit.Page.AddMeta("somename", "somevalue"); }
This sample modifies the HTML head, so it's not visible here.
To see the effect, look at the source in the browser