From 44df1d9d0bbc45ad6203449073b6167c4dfce99c Mon Sep 17 00:00:00 2001 From: Joseph Heck Date: Sat, 3 Mar 2018 17:28:53 -0800 Subject: [PATCH] adding how-to for making glossary tooltips (#7014) * adding how-to for making glossary tooltips to include docs for contribution * cross reference from style guide * include example render --- docs/home/contribute/includes.md | 19 +++++++++++++++++-- docs/home/contribute/style-guide.md | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/home/contribute/includes.md b/docs/home/contribute/includes.md index f26196f1fb..0f6099085f 100644 --- a/docs/home/contribute/includes.md +++ b/docs/home/contribute/includes.md @@ -60,9 +60,24 @@ changed by setting the for_k8s_version variable. {{ "{% include feature-state-deprecated.md " }}%} ```` +## Glossary + +You can reference glossary terms with an inclusion that will automatically update and replace content with the relevant links from [our glossary](docs/reference/glossary/). When the term is moused-over by someone +using the online documentation, the glossary entry will display a tooltip. + +The raw data for glossary terms is stored at [https://github.com/kubernetes/website/tree/master/_data/glossary](https://github.com/kubernetes/website/tree/master/_data/glossary), with a YAML file for each glossary term. + +### Glossary Demo + +For example, the following include within the markdown will render to {% glossary_tooltip text="cluster" term_id="cluster" %} with a tooltip: + +````liquid +{{ "{% glossary_tooltip text=" }}"cluster" term_id="cluster" %} +```` + ## Tabs -In a markdown page (.md file) on this site, you can add a tab set to display multiple flavors of a given solution. +In a markdown page (`.md` file) on this site, you can add a tab set to display multiple flavors of a given solution. ### Tabs demo @@ -160,7 +175,7 @@ The `capture [variable_name]` tags store text or markdown content and assign the {{ "{% assign tab_names = 'Default,Calico,Flannel,Romana,Weave Net' | split: ',' | compact " }}%} ```` -The `assign tab_names` tag takes a list of labels to use for the tabs. Label text can include spaces. The given comma delimited string is split into an array and assigned to the `tab_names` variable. +The `assign tab_names` tag takes a list of labels to use for the tabs. Label text can include spaces. The given comma delimited string is split into an array and assigned to the `tab_names` variable. #### Assigning tab contents diff --git a/docs/home/contribute/style-guide.md b/docs/home/contribute/style-guide.md index f616892d6f..50432a35ba 100644 --- a/docs/home/contribute/style-guide.md +++ b/docs/home/contribute/style-guide.md @@ -15,7 +15,7 @@ docs, follow the instructions on {% capture body %} -**Note:** Kubernetes documentation uses [GitHub Flavored Markdown](https://github.github.com/gfm/). +**Note:** Kubernetes documentation uses [GitHub Flavored Markdown](https://github.github.com/gfm/) along with a few [local jekyll includes](/docs/home/contribute/includes/) to support glossary entries, tabs, and representing feature state. {: .note} ## Language