This page sets various open-graph headers. 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 @{ // note: 'og:' is auto-prefixed if not given in the key Kit.Page.AddOpenGraph("title", "Demo of OpenGraph headers"); Kit.Page.AddOpenGraph("type", "website"); }
This sample modifies the HTML head, so it's not visible here.
To see the effect, look at the source in the browser