File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 1
1
@page " /BlogPost/{blogPostId}"
2
2
@using LinkDotNet .Domain
3
3
@using LinkDotNet .Infrastructure .Persistence
4
- @using Microsoft .AspNetCore .Components .Web .Extensions .Head
5
4
@inject IRepository _repository
6
5
@inherits MarkdownComponentBase
7
6
11
10
}
12
11
else
13
12
{
14
- <Meta property =" og:title" content =" @BlogPost.Title" />
15
- <Meta property =" og:image" content =" @BlogPost.PreviewImageUrl" />
13
+ <OgData Title =" @BlogPost.Title" PreviewImageUrl =" @BlogPost.PreviewImageUrl" ></OgData >
16
14
<div class =" blog-outer-box" >
17
15
<div class =" content blog-container" >
18
16
<div class =" blog-content" >
Original file line number Diff line number Diff line change 1
1
@page " /"
2
2
@using LinkDotNet .Domain
3
3
@using LinkDotNet .Infrastructure .Persistence
4
+ @using Markdig
4
5
@inject IRepository _repository
5
6
@inject AppConfiguration _appConfiguration
6
7
8
+ <OgData Title =" @(Markdown.ToPlainText(_appConfiguration.Introduction.Description))" PreviewImageUrl =" @_appConfiguration.Introduction.BackgroundUrl" ></OgData >
9
+
7
10
<IntroductionCard Introduction =" _appConfiguration.Introduction" ></IntroductionCard >
8
11
9
12
<div class =" content px-4" >
Original file line number Diff line number Diff line change
1
+ @using Microsoft .AspNetCore .Components .Web .Extensions .Head
2
+ @inject NavigationManager _navigationManager
3
+
4
+ <Meta property =" og:title" content =" @Title" />
5
+ <Meta name =" image" property =" og:image" content =" @PreviewImageUrl" />
6
+ <Meta property =" og:type" content =" article" />
7
+ <Meta property =" og:url" content =" @_navigationManager.Uri" />
8
+
9
+ @code {
10
+
11
+ [Parameter ]
12
+ public string Title { get ; set ; }
13
+
14
+ [Parameter ]
15
+ public string PreviewImageUrl { get ; set ; }
16
+
17
+ }
You can’t perform that action at this time.
0 commit comments