* 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:
parent
42c84f29a3
commit
7fc5857d4c
@ -51,6 +51,7 @@ func renderIndexHtml(w http.ResponseWriter, nonce string) {
|
|||||||
Image string
|
Image string
|
||||||
StatusJSON string
|
StatusJSON string
|
||||||
ServerConfigJSON string
|
ServerConfigJSON string
|
||||||
|
EmbedVideo string
|
||||||
Nonce string
|
Nonce string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,13 +72,14 @@ func renderIndexHtml(w http.ResponseWriter, nonce string) {
|
|||||||
content := serverSideContent{
|
content := serverSideContent{
|
||||||
Name: data.GetServerName(),
|
Name: data.GetServerName(),
|
||||||
Summary: data.GetServerSummary(),
|
Summary: data.GetServerSummary(),
|
||||||
RequestedURL: data.GetServerURL(),
|
RequestedURL: fmt.Sprintf("%s%s", data.GetServerURL(), "/"),
|
||||||
TagsString: strings.Join(data.GetServerMetadataTags(), ","),
|
TagsString: strings.Join(data.GetServerMetadataTags(), ","),
|
||||||
ThumbnailURL: "/thumbnail.jpg",
|
ThumbnailURL: "thumbnail.jpg",
|
||||||
Thumbnail: "/thumbnail.jpg",
|
Thumbnail: "thumbnail.jpg",
|
||||||
Image: "/logo/external",
|
Image: "logo/external",
|
||||||
StatusJSON: string(sb),
|
StatusJSON: string(sb),
|
||||||
ServerConfigJSON: string(cb),
|
ServerConfigJSON: string(cb),
|
||||||
|
EmbedVideo: "embed/video",
|
||||||
Nonce: nonce,
|
Nonce: nonce,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,8 +123,8 @@ export const Main: FC = () => {
|
|||||||
<meta property="og:image:url" content="{{.RequestedURL}}{{.Thumbnail}}" />
|
<meta property="og:image:url" content="{{.RequestedURL}}{{.Thumbnail}}" />
|
||||||
<meta property="og:image:alt" content="{{.RequestedURL}}{{.Image}}" />
|
<meta property="og:image:alt" content="{{.RequestedURL}}{{.Image}}" />
|
||||||
|
|
||||||
<meta property="og:video" content="{{.RequestedURL}}/embed/video" />
|
<meta property="og:video" content="{{.RequestedURL}}{{.EmbedVideo}}" />
|
||||||
<meta property="og:video:secure_url" content="{{.RequestedURL}}/embed/video" />
|
<meta property="og:video:secure_url" content="{{.RequestedURL}}{{.EmbedVideo}}" />
|
||||||
<meta property="og:video:height" content="315" />
|
<meta property="og:video:height" content="315" />
|
||||||
<meta property="og:video:width" content="560" />
|
<meta property="og:video:width" content="560" />
|
||||||
<meta property="og:video:type" content="text/html" />
|
<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:description" content="{{.Summary}}" />
|
||||||
<meta property="twitter:image" content="{{.Image}}" />
|
<meta property="twitter:image" content="{{.Image}}" />
|
||||||
<meta property="twitter:card" content="player" />
|
<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:width" content="560" />
|
||||||
<meta property="twitter:player:height" content="315" />
|
<meta property="twitter:player:height" content="315" />
|
||||||
</Head>
|
</Head>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user