Skip to content

Commit

Permalink
Merge pull request #206 from alexef/docs-config
Browse files Browse the repository at this point in the history
Docs URL configuration
  • Loading branch information
laszlocph authored May 27, 2021
2 parents b48b801 + 59abb98 commit 62d3dd2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 6 additions & 0 deletions cmd/drone-server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ var flags = []cli.Flag{
Usage: "file path for the drone config",
Value: ".drone.yml",
},
cli.StringFlag{
EnvVar: "DRONE_DOCS,WOODPECKER_DOCS",
Name: "docs",
Usage: "link to user documentation",
Value: "https://woodpecker.laszlo.cloud",
},
cli.DurationFlag{
EnvVar: "DRONE_SESSION_EXPIRES,WOODPECKER_SESSION_EXPIRES",
Name: "session-expires",
Expand Down
1 change: 1 addition & 0 deletions cmd/drone-server/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ func setupTree(c *cli.Context) *httptreemux.ContextMux {
web.New(
web.WithDir(c.String("www")),
web.WithSync(time.Hour*72),
web.WithDocs(c.String("docs")),
).Register(tree)
return tree
}
Expand Down
6 changes: 1 addition & 5 deletions web/src/screens/feed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,7 @@ const LOGO = (
Woodpecker<span style="margin-left: 4px;">{window.DRONE_VERSION}</span>
<br />
<span>
<a
href="https://woodpecker.laszlo.cloud"
target="_blank"
rel="noopener noreferrer"
>
<a href={window.DRONE_DOCS} target="_blank" rel="noopener noreferrer">
Docs
</a>
</span>
Expand Down

0 comments on commit 62d3dd2

Please sign in to comment.