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
This commit is contained in:
Joseph Heck
2018-03-03 17:28:53 -08:00
committed by k8s-ci-robot
parent 00c3eb0e88
commit 44df1d9d0b
2 changed files with 18 additions and 3 deletions
+17 -2
View File
@@ -60,9 +60,24 @@ changed by setting the <code>for_k8s_version</code> 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
+1 -1
View File
@@ -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