You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are example usage of those shorthands in ejabberd, for example in `mod_muc.erl`.
121
+
122
+
## Glossary
123
+
124
+
### Directly in markdown file
125
+
126
+
To define a new term, write in markdown:
127
+
128
+
``` markdown
129
+
def:c2s
130
+
: Client to Server connection in XMPP.
131
+
```
132
+
133
+
To link to that term, write in markdown:
134
+
135
+
``` markdown
136
+
Most connections in XMPP are [](def:c2s).
137
+
```
138
+
139
+
Glossary terms can be defined as singular nouns (`connection`, `port`), and later you can link to that term in plural noun (`connections`, `ports`).
140
+
141
+
### In ejabberd source code
142
+
143
+
Term definition is done as expected; example usage:
144
+
``` erlang
145
+
mod_doc() ->
146
+
#{desc=>
147
+
[?T("def:ad-hoc command"), "",
148
+
?T(": Command that can be executed by an XMPP client using XEP-0050."), "",
149
+
?T("This module implements XEP-0050.")]
150
+
```
151
+
152
+
Inordertolinktoatermdefinition, pleasewritesimply `(def:c2s)` because `[]` becomesescapedandwouldn't work. Later `make extract` will add the `[]` automatically. Example usage:
153
+
```erl
154
+
mod_doc() ->
155
+
#{desc =>
156
+
?T("This module implements some (def:ad-hoc commands) for adminitration.")
0 commit comments