Skip to content

Commit

Permalink
Fully support 2-edge in doc shortcodes
Browse files Browse the repository at this point in the history
Signed-off-by: Flynn <[email protected]>
  • Loading branch information
kflynn committed Feb 1, 2024
1 parent 1b99738 commit aee8732
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion linkerd.io/layouts/shortcodes/cli/annotations.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{ $docsVersion := index (split .Page.RelPermalink "/") 1 }}
{{/* the index function doesn't accept variables */}}
{{ $data := (index site.Data "cli").AnnotationsReference }}
{{ if eq $docsVersion "2.10" }}
{{ if eq $docsVersion "2-edge" }}
{{ $data = (index site.Data "cli-2-edge").AnnotationsReference }}
{{ else if eq $docsVersion "2.10" }}
{{ $data = (index site.Data "cli-2-10").AnnotationsReference }}
{{ else if eq $docsVersion "2.11" }}
{{ $data = (index site.Data "cli-2-11").AnnotationsReference }}
Expand Down
4 changes: 3 additions & 1 deletion linkerd.io/layouts/shortcodes/cli/description.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{ $docsVersion := index (split .Page.RelPermalink "/") 1 }}
{{/* the index function doesn't accept variables */}}
{{ $data := (index site.Data "cli").CLIReference }}
{{ if eq $docsVersion "2.10" }}
{{ if eq $docsVersion "2-edge" }}
{{ $data = (index site.Data "cli-2-edge").CLIReference }}
{{ else if eq $docsVersion "2.10" }}
{{ $data = (index site.Data "cli-2-10").CLIReference }}
{{ else if eq $docsVersion "2.11" }}
{{ $data = (index site.Data "cli-2-11").CLIReference }}
Expand Down
4 changes: 3 additions & 1 deletion linkerd.io/layouts/shortcodes/cli/examples.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{ $docsVersion := index (split .Page.RelPermalink "/") 1 }}
{{/* the index function doesn't accept variables */}}
{{ $data := (index site.Data "cli").CLIReference }}
{{ if eq $docsVersion "2.10" }}
{{ if eq $docsVersion "2-edge" }}
{{ $data = (index site.Data "cli-2-edge").CLIReference }}
{{ else if eq $docsVersion "2.10" }}
{{ $data = (index site.Data "cli-2-10").CLIReference }}
{{ else if eq $docsVersion "2.11" }}
{{ $data = (index site.Data "cli-2-11").CLIReference }}
Expand Down
4 changes: 3 additions & 1 deletion linkerd.io/layouts/shortcodes/cli/flags.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{ $docsVersion := index (split .Page.RelPermalink "/") 1 }}
{{/* the index function doesn't accept variables */}}
{{ $data := (index site.Data "cli").CLIReference }}
{{ if eq $docsVersion "2.10" }}
{{ if eq $docsVersion "2-edge" }}
{{ $data = (index site.Data "cli-2-edge").CLIReference }}
{{ else if eq $docsVersion "2.10" }}
{{ $data = (index site.Data "cli-2-10").CLIReference }}
{{ else if eq $docsVersion "2.11" }}
{{ $data = (index site.Data "cli-2-11").CLIReference }}
Expand Down

0 comments on commit aee8732

Please sign in to comment.