0
_Rayout의 머리 부분에서 @RenderSection에 이상한 동작이 발생했습니다.머리 부분에 렌더링되었지만 본문에 렌더링되지 않은 부분
@section AddToHead{
<meta name="test" />
<open-graph og-title="@Model.Test.OG.Title" og-image="@Model.Test.OG.Image" og-url="@Model.Test.OG.Url" og-type="@Model.Test.OG.Type"></open-graph>
}
- 메타 =>
- 오픈 그래프
I 함께 이미 HTML을
복귀하고
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@await RenderSectionAsync("AddToHead", required: false)
</head>
_Layout
에 부가 된 taghelper 시도한> = 일반 HTML은 RenderSectionAsync 및 RenderSection입니다. 차이 없음. 내가 페이지에서 결과를 확인할 때
그것은 (총 다른 결과)
보기 소스 코드
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="test" />
<div><meta property='og:title' content='TestTitle' /><meta property='og:type' content='Article' /><meta property='og:url' content='TestURL' /><meta property='og:image' content='TestBild' /></div>
</head>
개발자 도구
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="test" />
</head>
<body>
<div><meta property='og:title' content='TestTitle' /><meta property='og:type' content='Article' /><meta property='og:url' content='TestURL' /><meta property='og:image' content='TestBild' /></div>
</body>
페이스 북은보고를 다음과 같이 내 개발자 도구와 같은 사이트는 않습니다.
내가 뭘 잘못하고있어? 이것은 가능한가?
테일러. 알아 둘만한. –