Fix path for image open meta tag #3075. (#3087)

* Commit updated API documentation

* Fix content path used for meta tags.

TT:#3075

* Fix lint for go code.

TT:#3075

* Revert docs/api/index.html

TT:#3075

---------

Co-authored-by: Owncast <owncast@owncast.online>
This commit is contained in:
Yusuke 2023-06-13 19:28:35 -07:00 committed by GitHub
parent 42c84f29a3
commit 7fc5857d4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -51,6 +51,7 @@ func renderIndexHtml(w http.ResponseWriter, nonce string) {
Image string
StatusJSON string
ServerConfigJSON string
EmbedVideo string
Nonce string
}
@ -71,13 +72,14 @@ func renderIndexHtml(w http.ResponseWriter, nonce string) {
content := serverSideContent{
Name: data.GetServerName(),
Summary: data.GetServerSummary(),
RequestedURL: data.GetServerURL(),
RequestedURL: fmt.Sprintf("%s%s", data.GetServerURL(), "/"),
TagsString: strings.Join(data.GetServerMetadataTags(), ","),
ThumbnailURL: "/thumbnail.jpg",
Thumbnail: "/thumbnail.jpg",
Image: "/logo/external",
ThumbnailURL: "thumbnail.jpg",
Thumbnail: "thumbnail.jpg",
Image: "logo/external",
StatusJSON: string(sb),
ServerConfigJSON: string(cb),
EmbedVideo: "embed/video",
Nonce: nonce,
}

View File

@ -123,8 +123,8 @@ export const Main: FC = () => {
<meta property="og:image:url" content="{{.RequestedURL}}{{.Thumbnail}}" />
<meta property="og:image:alt" content="{{.RequestedURL}}{{.Image}}" />
<meta property="og:video" content="{{.RequestedURL}}/embed/video" />
<meta property="og:video:secure_url" content="{{.RequestedURL}}/embed/video" />
<meta property="og:video" content="{{.RequestedURL}}{{.EmbedVideo}}" />
<meta property="og:video:secure_url" content="{{.RequestedURL}}{{.EmbedVideo}}" />
<meta property="og:video:height" content="315" />
<meta property="og:video:width" content="560" />
<meta property="og:video:type" content="text/html" />
@ -135,7 +135,7 @@ export const Main: FC = () => {
<meta property="twitter:description" content="{{.Summary}}" />
<meta property="twitter:image" content="{{.Image}}" />
<meta property="twitter:card" content="player" />
<meta property="twitter:player" content="{{.RequestedURL}}/embed/video" />
<meta property="twitter:player" content="{{.RequestedURL}}{{.EmbedVideo}}" />
<meta property="twitter:player:width" content="560" />
<meta property="twitter:player:height" content="315" />
</Head>