Skip to content

Commit 181b0dd

Browse files
committed
chore: move glossary to tooltips and document it in README.md
1 parent 0c84b95 commit 181b0dd

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

.github/styles/config/vocabularies/Doc/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ Symfony
9696
syslog
9797
TLS
9898
toolchain
99+
tooltip
100+
tooltips
99101
URIs
100102
VSCode
101103
WAF

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ Example :
168168
{{< figure src="/images/changelog/console-new-ip-par.png" caption="The new IP shown in the console" width="800px">}}
169169
```
170170

171+
### Adding tooltips
172+
173+
Tooltips are useful to provide additional information on terms or acronyms that may not be familiar to all readers. They help improve the accessibility and comprehension of your documentation without cluttering the main text.
174+
175+
To create a tooltip, add the term and its associated tooltip definition in the [/data/tooltips.toml](/data/tooltips.toml) file. Once defined, tooltip automatically displays when users hover over associated terms in the documentation.
176+
171177
### Adding a new partial
172178

173179
Partials are reusable content you can include in several pages. To use this feature:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
iaas = "Infrastructure as a Service"
2-
paas = "Platform as a Service"
1+
IaaS = "Infrastructure-as-a-Service"
2+
PaaS = "Platform-as-a-Service"
33
WAR = "Web Archive"
44
JEE = "Java Enterprise Edition"
55
EAR = "Enterprise Archive"

layouts/shortcodes/tooltip.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
{{- errorf "missing tooltip title" -}}
44
{{- end -}}
55
{{ .Scratch.Set "title" $title }}
6-
{{ $def := index .Site.Data.glossary (.Scratch.Get "title") }}
6+
{{ $def := index .Site.Data.tooltips (.Scratch.Get "title") }}
77

88
{{- if not $def -}}
9-
{{- errorf "%s not in glossary" $title -}}
9+
{{- errorf "%s not in tooltips" $title -}}
1010
{{- end -}}
1111

1212

@@ -15,7 +15,7 @@
1515
&lbrace;&lbrace; &lt; tooltip title="{{$title}}" &gt; &rbrace;&rbrace;{{ .Inner }}&lbrace;&lbrace; &lt; /tooltip &gt; &rbrace;&rbrace;
1616
<hr />
1717
{{ end }}
18-
<a href="#" data-placement="top" data-animation="false" data-toggle="tooltip" title="{{ $def }}">{{ .Inner }}</a>
18+
<a href="#" data-placement="top" data-animation="false" data-toggle="tooltip" title="{{ $def }}">{{ .Inner }}</a>
1919
{{ if $.Site.Params.Debug }}
2020
</div>
21-
{{ end }}
21+
{{ end }}

0 commit comments

Comments
 (0)