Clean up default values for page content
This commit is contained in:
parent
e86b67cf08
commit
efa24df299
@ -38,9 +38,8 @@ type Defaults struct {
|
|||||||
// GetDefaults will return default configuration values.
|
// GetDefaults will return default configuration values.
|
||||||
func GetDefaults() Defaults {
|
func GetDefaults() Defaults {
|
||||||
return Defaults{
|
return Defaults{
|
||||||
Name: "Owncast",
|
Name: "New Owncast Server",
|
||||||
Title: "My Owncast Server",
|
Summary: "This is a new live video streaming server powered by Owncast.",
|
||||||
Summary: "This is brief summary of whom you are or what your stream is. You can edit this description in the admin.",
|
|
||||||
ServerWelcomeMessage: "",
|
ServerWelcomeMessage: "",
|
||||||
Logo: "logo.svg",
|
Logo: "logo.svg",
|
||||||
Tags: []string{
|
Tags: []string{
|
||||||
@ -48,7 +47,21 @@ func GetDefaults() Defaults {
|
|||||||
"streaming",
|
"streaming",
|
||||||
},
|
},
|
||||||
|
|
||||||
PageBodyContent: "# This is your page content that can be edited from the admin.",
|
PageBodyContent: `
|
||||||
|
# Welcome to Owncast!
|
||||||
|
|
||||||
|
- This is a live stream powered by [Owncast](https://owncast.online), a free and open source live streaming server.
|
||||||
|
|
||||||
|
- To discover more examples of streams, visit [Owncast's directory](https://directory.owncast.online).
|
||||||
|
|
||||||
|
- If you're the owner of this server you should visit the admin and customize the content on this page.
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<video id="video" controls preload="metadata" width="40%" poster="https://videos.owncast.online/t/xaJ3xNn9Y6pWTdB25m9ai3">
|
||||||
|
<source src="https://videos.owncast.online/v/xaJ3xNn9Y6pWTdB25m9ai3.mp4?quality=" type="video/mp4" />
|
||||||
|
</video>
|
||||||
|
`,
|
||||||
|
|
||||||
DatabaseFilePath: "data/owncast.db",
|
DatabaseFilePath: "data/owncast.db",
|
||||||
|
|
||||||
|
@ -32,26 +32,16 @@ func PopulateDefaults() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultPageContent = `
|
|
||||||
# Welcome to Owncast
|
|
||||||
|
|
||||||
This is a live stream powered by [Owncast](https://owncast.online), a free and open source livestreaming server.
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
To discover more examples of streams, visit [Owncast's directory](https://directory.owncast.online), and to edit this
|
|
||||||
page content visit the admin for this instance.
|
|
||||||
`
|
|
||||||
|
|
||||||
_ = SetStreamKey(defaults.StreamKey)
|
_ = SetStreamKey(defaults.StreamKey)
|
||||||
_ = SetHTTPPortNumber(float64(defaults.WebServerPort))
|
_ = SetHTTPPortNumber(float64(defaults.WebServerPort))
|
||||||
_ = SetRTMPPortNumber(float64(defaults.RTMPServerPort))
|
_ = SetRTMPPortNumber(float64(defaults.RTMPServerPort))
|
||||||
_ = SetLogoPath(defaults.Logo)
|
_ = SetLogoPath(defaults.Logo)
|
||||||
_ = SetServerMetadataTags([]string{"owncast", "streaming"})
|
_ = SetServerMetadataTags([]string{"owncast", "streaming"})
|
||||||
_ = SetServerSummary("Welcome to your new Owncast server! This description can be changed in the admin. Visit https://owncast.online/docs/configuration/ to learn more.")
|
_ = SetServerSummary(defaults.Summary)
|
||||||
_ = SetServerWelcomeMessage("")
|
_ = SetServerWelcomeMessage("")
|
||||||
_ = SetServerName("Owncast")
|
_ = SetServerName(defaults.Name)
|
||||||
_ = SetStreamKey(defaults.StreamKey)
|
_ = SetStreamKey(defaults.StreamKey)
|
||||||
_ = SetExtraPageBodyContent(defaultPageContent)
|
_ = SetExtraPageBodyContent(defaults.PageBodyContent)
|
||||||
_ = SetFederationGoLiveMessage(defaults.FederationGoLiveMessage)
|
_ = SetFederationGoLiveMessage(defaults.FederationGoLiveMessage)
|
||||||
_ = SetSocialHandles([]models.SocialHandle{
|
_ = SetSocialHandles([]models.SocialHandle{
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user