|
| 1 | +@using TextHub.Services.Data |
| 2 | +@inject MetaTagsService MetaTagsService |
| 3 | + |
| 4 | +@if (MetaTags != null) |
| 5 | +{ |
| 6 | + <HeadContent> |
| 7 | + <!-- Primary Meta Tags --> |
| 8 | + <meta name="title" content="@MetaTags.Title" /> |
| 9 | + <meta name="description" content="@MetaTags.Description" /> |
| 10 | + <meta name="keywords" content="@MetaTags.Keywords" /> |
| 11 | + <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" /> |
| 12 | + <meta name="googlebot" content="index, follow" /> |
| 13 | + <meta name="bingbot" content="index, follow" /> |
| 14 | + <link rel="canonical" href="@MetaTags.CanonicalUrl" /> |
| 15 | + |
| 16 | + <!-- Open Graph / Facebook --> |
| 17 | + <meta property="og:type" content="website" /> |
| 18 | + <meta property="og:url" content="@MetaTags.CanonicalUrl" /> |
| 19 | + <meta property="og:title" content="@MetaTags.OgTitle" /> |
| 20 | + <meta property="og:description" content="@MetaTags.OgDescription" /> |
| 21 | + <meta property="og:image" content="@MetaTags.OgImage" /> |
| 22 | + <meta property="og:image:width" content="512" /> |
| 23 | + <meta property="og:image:height" content="512" /> |
| 24 | + <meta property="og:image:alt" content="@MetaTags.OgTitle" /> |
| 25 | + <meta property="og:site_name" content="Text Hub" /> |
| 26 | + <meta property="og:locale" content="en_US" /> |
| 27 | + |
| 28 | + <!-- Twitter --> |
| 29 | + <meta property="twitter:card" content="summary_large_image" /> |
| 30 | + <meta property="twitter:url" content="@MetaTags.CanonicalUrl" /> |
| 31 | + <meta property="twitter:title" content="@MetaTags.TwitterTitle" /> |
| 32 | + <meta property="twitter:description" content="@MetaTags.TwitterDescription" /> |
| 33 | + <meta property="twitter:image" content="@MetaTags.TwitterImage" /> |
| 34 | + <meta property="twitter:image:alt" content="@MetaTags.TwitterTitle" /> |
| 35 | + </HeadContent> |
| 36 | +} |
| 37 | + |
| 38 | +@code { |
| 39 | + [Parameter] public MetaTagsData? MetaTags { get; set; } |
| 40 | +} |
0 commit comments