mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 00:46:30 +00:00
Allow configuring the URL to user documentation
This commit is contained in:
parent
f694d6f2e4
commit
943a308afe
3 changed files with 8 additions and 1 deletions
|
@ -118,6 +118,12 @@ var flags = []cli.Flag{
|
||||||
Usage: "file path for the drone config",
|
Usage: "file path for the drone config",
|
||||||
Value: ".drone.yml",
|
Value: ".drone.yml",
|
||||||
},
|
},
|
||||||
|
cli.StringFlag{
|
||||||
|
EnvVar: "DRONE_DOCS,WOODPECKER_DOCS",
|
||||||
|
Name: "docs",
|
||||||
|
Usage: "link to user documentation",
|
||||||
|
Value: "https://woodpecker.laszlo.cloud",
|
||||||
|
},
|
||||||
cli.DurationFlag{
|
cli.DurationFlag{
|
||||||
EnvVar: "DRONE_SESSION_EXPIRES,WOODPECKER_SESSION_EXPIRES",
|
EnvVar: "DRONE_SESSION_EXPIRES,WOODPECKER_SESSION_EXPIRES",
|
||||||
Name: "session-expires",
|
Name: "session-expires",
|
||||||
|
|
|
@ -203,6 +203,7 @@ func setupTree(c *cli.Context) *httptreemux.ContextMux {
|
||||||
web.New(
|
web.New(
|
||||||
web.WithDir(c.String("www")),
|
web.WithDir(c.String("www")),
|
||||||
web.WithSync(time.Hour*72),
|
web.WithSync(time.Hour*72),
|
||||||
|
web.WithDocs(c.String("docs"))
|
||||||
).Register(tree)
|
).Register(tree)
|
||||||
return tree
|
return tree
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,7 @@ const LOGO = (
|
||||||
<br />
|
<br />
|
||||||
<span>
|
<span>
|
||||||
<a
|
<a
|
||||||
href="https://woodpecker.laszlo.cloud"
|
href={window.DRONE_DOCS}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue