From 69c04f64012895a53131ac1eee31cb164e13cb4f Mon Sep 17 00:00:00 2001 From: Martin Taillefer Date: Fri, 6 Jul 2018 07:31:31 -0700 Subject: [PATCH] Create hidden links for the special @@ references. (#1686) This gives us link checking for the @@ code block references. --- content/docs/setup/kubernetes/helm-install/index.md | 8 ++++---- content/docs/tasks/traffic-management/egress/index.md | 4 ++-- layouts/shortcodes/text.html | 7 +++++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/content/docs/setup/kubernetes/helm-install/index.md b/content/docs/setup/kubernetes/helm-install/index.md index c9d9393c01..97dce79578 100644 --- a/content/docs/setup/kubernetes/helm-install/index.md +++ b/content/docs/setup/kubernetes/helm-install/index.md @@ -36,13 +36,13 @@ recommended. (requires Kubernetes >=1.9.0): {{< text bash >}} - $ helm template @install/kubernetes/helm/istio@ --name istio --namespace istio-system > $HOME/istio.yaml + $ helm template install/kubernetes/helm/istio --name istio --namespace istio-system > $HOME/istio.yaml {{< /text >}} * Without the sidecar injection webhook: {{< text bash >}} - $ helm template @install/kubernetes/helm/istio@ --name istio --namespace istio-system --set sidecarInjectorWebhook.enabled=false > $HOME/istio.yaml + $ helm template install/kubernetes/helm/istio --name istio --namespace istio-system --set sidecarInjectorWebhook.enabled=false > $HOME/istio.yaml {{< /text >}} 1. Install the components via the manifest: @@ -77,13 +77,13 @@ to manage the lifecycle of Istio. * With [automatic sidecar injection](/docs/setup/kubernetes/sidecar-injection/#automatic-sidecar-injection) (requires Kubernetes >=1.9.0): {{< text bash >}} - $ helm install @install/kubernetes/helm/istio@ --name istio --namespace istio-system + $ helm install install/kubernetes/helm/istio --name istio --namespace istio-system {{< /text >}} * Without the sidecar injection webhook: {{< text bash >}} - $ helm install @install/kubernetes/helm/istio@ --name istio --namespace istio-system --set sidecarInjectorWebhook.enabled=false + $ helm install install/kubernetes/helm/istio --name istio --namespace istio-system --set sidecarInjectorWebhook.enabled=false {{< /text >}} ## Customization with Helm diff --git a/content/docs/tasks/traffic-management/egress/index.md b/content/docs/tasks/traffic-management/egress/index.md index 6dbe5fcffb..014aaf90e5 100644 --- a/content/docs/tasks/traffic-management/egress/index.md +++ b/content/docs/tasks/traffic-management/egress/index.md @@ -178,7 +178,7 @@ The values used for internal IP range(s), however, depends on where your cluster For example, with Minikube the range is 10.0.0.1/24, so you would update your `ConfigMap` _istio-sidecar-injector_ like this: {{< text bash >}} -$ helm template @install/kubernetes/helm/istio@ --set global.proxy.includeIPRanges="10.0.0.1/24" -x templates/sidecar-injector-configmap.yaml | kubectl apply -f - +$ helm template install/kubernetes/helm/istio --set global.proxy.includeIPRanges="10.0.0.1/24" -x templates/sidecar-injector-configmap.yaml | kubectl apply -f - {{< /text >}} Note that you should use the same Helm command you used [to install Istio](/docs/setup/kubernetes/helm-install), @@ -276,5 +276,5 @@ cloud provider specific knowledge and configuration. 1. Update the `ConfigMap` _istio-sidecar-injector_ to redirect all outbound traffic to the sidecar proxies: {{< text bash >}} - $ helm template @install/kubernetes/helm/istio@ -x templates/sidecar-injector-configmap.yaml | kubectl apply -f - + $ helm template install/kubernetes/helm/istio -x templates/sidecar-injector-configmap.yaml | kubectl apply -f - {{< /text >}} diff --git a/layouts/shortcodes/text.html b/layouts/shortcodes/text.html index b2f25b7a0b..76ada41d71 100644 --- a/layouts/shortcodes/text.html +++ b/layouts/shortcodes/text.html @@ -46,3 +46,10 @@ be invalid HTML {{ end }} {{ end }}
{{ $scratch.Get "text" }}
+{{/* include a link to the special embedded @@ references so the links are statically checked as we build the site */}} +{{ $branch := .Site.Data.args.branch_name }} +{{ $links := findRE "@(.*?)@" ($scratch.Get "text") }} +{{ range $link := $links }} +{{ $href := printf "https://raw.githubusercontent.com/istio/istio/%s/%s" $branch (trim $link "@") }} + +{{ end }}