package views import ( "context" "strings" "github.com/a-h/templ" "go.fifitido.net/ytdl-web/pkg/serverctx" ) func pathTo(ctx context.Context, path ...string) templ.SafeURL { return templ.SafeURL(strings.TrimSuffix(serverctx.BasePath(ctx), "/") + "/" + strings.TrimPrefix(strings.Join(path, "/"), "/")) }