diff --git a/cmd/server/flags.go b/cmd/server/flags.go index 08cff5842..45631a319 100644 --- a/cmd/server/flags.go +++ b/cmd/server/flags.go @@ -160,12 +160,6 @@ var flags = append([]cli.Flag{ Usage: "The maximum time in minutes you can set in the repo settings before a pipeline gets killed", Value: 120, }, - &cli.StringFlag{ - EnvVars: []string{"WOODPECKER_DOCS"}, - Name: "docs", - Usage: "link to user documentation", - Value: "https://woodpecker-ci.org/", - }, &cli.DurationFlag{ EnvVars: []string{"WOODPECKER_SESSION_EXPIRES"}, Name: "session-expires", diff --git a/cmd/server/server.go b/cmd/server/server.go index 621731986..f6402180b 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -332,7 +332,6 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) { } server.Config.Server.Port = c.String("server-addr") server.Config.Server.PortTLS = c.String("server-addr-tls") - server.Config.Server.Docs = c.String("docs") server.Config.Server.StatusContext = c.String("status-context") server.Config.Server.StatusContextFormat = c.String("status-context-format") server.Config.Server.SessionExpires = c.Duration("session-expires") diff --git a/docs/docs/30-administration/10-server-config.md b/docs/docs/30-administration/10-server-config.md index c6ae4b58d..e3740338e 100644 --- a/docs/docs/30-administration/10-server-config.md +++ b/docs/docs/30-administration/10-server-config.md @@ -346,12 +346,6 @@ Example: `user1,user2` Enable to allow user registration. -### `WOODPECKER_DOCS` - -> Default: `https://woodpecker-ci.org/` - -Link to documentation in the UI. - ### `WOODPECKER_AUTHENTICATE_PUBLIC_REPOS` > Default: `false` diff --git a/docs/docs/91-migrations.md b/docs/docs/91-migrations.md index 0ef75d760..63f00aef9 100644 --- a/docs/docs/91-migrations.md +++ b/docs/docs/91-migrations.md @@ -13,6 +13,7 @@ Some versions need some changes to the server configuration or the pipeline conf - Removed `build` alias for `pipeline` command in CLI - Removed `ssh` backend. Use an agent directly on the SSH machine using the `local` backend. - Removed `/hook` and `/stream` API paths in favor of `/api/(hook|stream)`. You may need to use the "Repair repository" button in the repo settings or "Repair all" in the admin settings to recreate the forge hook. +- Removed `WOODPECKER_DOCS` config variable ## 1.0.0 diff --git a/server/config.go b/server/config.go index d69b2d5ef..3caa8f3ee 100644 --- a/server/config.go +++ b/server/config.go @@ -63,7 +63,6 @@ var Config = struct { Port string PortTLS string AgentToken string - Docs string StatusContext string StatusContextFormat string SessionExpires time.Duration diff --git a/server/web/config.go b/server/web/config.go index 20d37677a..a68ac2349 100644 --- a/server/web/config.go +++ b/server/web/config.go @@ -42,7 +42,6 @@ func Config(c *gin.Context) { configData := map[string]interface{}{ "user": user, "csrf": csrf, - "docs": server.Config.Server.Docs, "version": version.String(), "forge": server.Config.Services.Forge.Name(), "root_path": server.Config.Server.RootPath, @@ -73,7 +72,6 @@ const configTemplate = ` window.WOODPECKER_USER = {{ json .user }}; window.WOODPECKER_CSRF = "{{ .csrf }}"; window.WOODPECKER_VERSION = "{{ .version }}"; -window.WOODPECKER_DOCS = "{{ .docs }}"; window.WOODPECKER_FORGE = "{{ .forge }}"; window.WOODPECKER_ROOT_PATH = "{{ .root_path }}"; window.WOODPECKER_ENABLE_SWAGGER = {{ .enable_swagger }}; diff --git a/web/src/components/atomic/DocsLink.vue b/web/src/components/atomic/DocsLink.vue index 340cd1742..f66eef8fa 100644 --- a/web/src/components/atomic/DocsLink.vue +++ b/web/src/components/atomic/DocsLink.vue @@ -12,15 +12,13 @@ import { computed, toRef } from 'vue'; import Icon from '~/components/atomic/Icon.vue'; -import useConfig from '~/compositions/useConfig'; const props = defineProps<{ url: string; topic: string; }>(); -const docsBaseUrl = useConfig().docs; const url = toRef(props, 'url'); const topic = toRef(props, 'topic'); -const docsUrl = computed(() => (url.value.startsWith('http') ? url.value : `${docsBaseUrl}${url.value}`)); +const docsUrl = computed(() => (url.value.startsWith('http') ? url.value : `https://woodpecker-ci.org/${url.value}`)); diff --git a/web/src/components/layout/header/Navbar.vue b/web/src/components/layout/header/Navbar.vue index 3187dc832..0f36f6f8b 100644 --- a/web/src/components/layout/header/Navbar.vue +++ b/web/src/components/layout/header/Navbar.vue @@ -16,7 +16,9 @@ - +