-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): Provide versioned links to documentation
Instead of always linking to latest, link to the versioned documentation where the version of the built software is known Signed-off-by: Alan Clucas <alan@clucas.org>
- Loading branch information
Showing
5 changed files
with
52 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,35 @@ | ||
package help | ||
|
||
const ( | ||
root = "https://argo-workflows.readthedocs.io/en/latest" | ||
ArgoServer = root + "/argo-server/" | ||
CLI = root + "/cli/argo" | ||
import ( | ||
"fmt" | ||
|
||
WorkflowTemplates = root + "/workflow-templates/" | ||
WorkflowTemplatesReferencingOtherTemplates = WorkflowTemplates + "#referencing-other-workflowtemplates" | ||
|
||
Scaling = root + "/scaling/" | ||
ConfigureMaximumRecursionDepth = Scaling + "#maximum-recursion-depth" | ||
"github.com/argoproj/argo-workflows/v3" | ||
) | ||
|
||
func root() string { | ||
version := `latest` | ||
if major, minor, _, err := argo.GetVersion().Components(); err == nil { | ||
version = fmt.Sprintf("release-%s.%s", major, minor) | ||
} | ||
return fmt.Sprintf("https://argo-workflows.readthedocs.io/en/%s", version) | ||
} | ||
|
||
// ArgoServer returns a URL to the argo-server documentation | ||
func ArgoServer() string { | ||
return root() + "/argo-server/" | ||
} | ||
|
||
// CLI returns a URL to the cli documentation | ||
func CLI() string { | ||
return root() + "/cli/argo" | ||
} | ||
|
||
// scaling returns a URL to the scaling documentation | ||
func scaling() string { | ||
return root() + "/scaling/" | ||
} | ||
|
||
// ConfigureMaximumRecursionDepth returns a URL to the maximum recursion depth documentation | ||
func ConfigureMaximumRecursionDepth() string { | ||
return scaling() + "#maximum-recursion-depth" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters