Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs URL configuration #206

Merged
merged 5 commits into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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