From e610bc8ef2a2b2b3ffbee18b4d7a3db74c7a8ad4 Mon Sep 17 00:00:00 2001 From: Bastian Hofmann Date: Fri, 3 Jul 2020 13:11:36 +0200 Subject: [PATCH] Move cluster-capabilities-table to a headless bundle and include it as a page instead of reading the file This prevents the table to automatically be included on pages of other bundles. By including the page instead of reading the file also the shortcodes in the table are expanded correctly. This fixes broken links in the table. Fixes https://github.com/rancher/docs/issues/2577 Signed-off-by: Bastian Hofmann --- content/rancher/v2.x/en/cluster-admin/_index.md | 2 +- .../rancher/v2.x/en/cluster-admin/editing-clusters/_index.md | 2 +- content/rancher/v2.x/en/cluster-provisioning/_index.md | 2 +- .../cluster-capabilities-table/index.md} | 3 +++ content/rancher/v2.x/en/overview/_index.md | 2 +- layouts/shortcodes/include.html | 5 +++++ 6 files changed, 12 insertions(+), 4 deletions(-) rename content/rancher/v2.x/en/{cluster-admin/cluster-capabilities-table.md => cluster-provisioning/cluster-capabilities-table/index.md} (99%) create mode 100644 layouts/shortcodes/include.html diff --git a/content/rancher/v2.x/en/cluster-admin/_index.md b/content/rancher/v2.x/en/cluster-admin/_index.md index fe49bdb7e9c..59615cb48a2 100644 --- a/content/rancher/v2.x/en/cluster-admin/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/_index.md @@ -23,7 +23,7 @@ Alternatively, you can switch between projects and clusters directly in the navi After clusters have been [provisioned into Rancher]({{}}/rancher/v2.x/en/cluster-provisioning/), [cluster owners]({{}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#cluster-roles) will need to manage these clusters. There are many different options of how to manage your cluster. -{{% readfile file="/rancher/v2.x/en/cluster-admin/cluster-capabilities-table.md" markdown="true" %}} +{{% include file="/rancher/v2.x/en/cluster-provisioning/cluster-capabilities-table" %}} ## Configuring Tools diff --git a/content/rancher/v2.x/en/cluster-admin/editing-clusters/_index.md b/content/rancher/v2.x/en/cluster-admin/editing-clusters/_index.md index 1fe6ce09d18..3a1303e4db2 100644 --- a/content/rancher/v2.x/en/cluster-admin/editing-clusters/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/editing-clusters/_index.md @@ -12,7 +12,7 @@ The options and settings available for an existing cluster change based on the m The following table summarizes the options and settings available for each cluster type: -{{% readfile file="/rancher/v2.x/en/cluster-admin/cluster-capabilities-table.md" markdown="true" %}} +{{% include file="/rancher/v2.x/en/cluster-provisioning/cluster-capabilities-table" %}} ## Editing Cluster Membership diff --git a/content/rancher/v2.x/en/cluster-provisioning/_index.md b/content/rancher/v2.x/en/cluster-provisioning/_index.md index 652194b518b..eb65528492b 100644 --- a/content/rancher/v2.x/en/cluster-provisioning/_index.md +++ b/content/rancher/v2.x/en/cluster-provisioning/_index.md @@ -28,7 +28,7 @@ This section covers the following topics: The following table summarizes the options and settings available for each cluster type: -{{% readfile file="/rancher/v2.x/en/cluster-admin/cluster-capabilities-table.md" markdown="true" %}} +{{% include file="/rancher/v2.x/en/cluster-provisioning/cluster-capabilities-table" %}} # Setting up Clusters in a Hosted Kubernetes Provider diff --git a/content/rancher/v2.x/en/cluster-admin/cluster-capabilities-table.md b/content/rancher/v2.x/en/cluster-provisioning/cluster-capabilities-table/index.md similarity index 99% rename from content/rancher/v2.x/en/cluster-admin/cluster-capabilities-table.md rename to content/rancher/v2.x/en/cluster-provisioning/cluster-capabilities-table/index.md index 64e59cfa75e..b3560c76223 100644 --- a/content/rancher/v2.x/en/cluster-admin/cluster-capabilities-table.md +++ b/content/rancher/v2.x/en/cluster-provisioning/cluster-capabilities-table/index.md @@ -1,3 +1,6 @@ +--- +headless: true +--- | Action | [Rancher launched Kubernetes Clusters]({{}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/) | [Hosted Kubernetes Clusters]({{}}/rancher/v2.x/en/cluster-provisioning/hosted-kubernetes-clusters/) | [Imported Clusters]({{}}/rancher/v2.x/en/cluster-provisioning/imported-clusters) | | --- | --- | ---| ---| | [Using kubectl and a kubeconfig file to Access a Cluster]({{}}/rancher/v2.x/en/cluster-admin/cluster-access/kubectl/) | ✓ | ✓ | ✓ | diff --git a/content/rancher/v2.x/en/overview/_index.md b/content/rancher/v2.x/en/overview/_index.md index b691f67864a..1a97e92bffe 100644 --- a/content/rancher/v2.x/en/overview/_index.md +++ b/content/rancher/v2.x/en/overview/_index.md @@ -60,4 +60,4 @@ After a cluster is created with Rancher, a cluster administrator can manage clus The following table summarizes the options and settings available for each cluster type: -{{% readfile file="/rancher/v2.x/en/cluster-admin/cluster-capabilities-table.md" markdown="true" %}} +{{% include file="/rancher/v2.x/en/cluster-provisioning/cluster-capabilities-table" %}} diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html new file mode 100644 index 00000000000..0d98507f062 --- /dev/null +++ b/layouts/shortcodes/include.html @@ -0,0 +1,5 @@ +{{$file := .Get "file"}} + +{{- with .Site.GetPage $file -}} +{{- .Content | markdownify -}} +{{- end -}}