Skip to content

Commit 261c24a

Browse files
Adds new shortcodes to README. (#320)
1 parent 9c0c7ae commit 261c24a

File tree

1 file changed

+81
-2
lines changed

1 file changed

+81
-2
lines changed

README.md

+81-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,87 @@ docs
8080

8181
## Site features
8282

83-
This site contains quite a few shortcodes that writers can use to add extra functionality into each page.
83+
This site contains quite a few shortcodes that writers can use to add extra functionality into each page. The callout content supports full Markdown syntax, including:
84+
85+
- Links
86+
- Lists
87+
- Code blocks
88+
- Bold and italic text
89+
90+
### Callout
91+
92+
The `callout` shortcode creates distinct message boxes to highlight important information in your content. It supports multiple alert types and custom emoji icons.
93+
94+
```markdown
95+
{{< callout type="info" >}}
96+
Your message goes here
97+
{{< /callout >}}
98+
```
99+
100+
#### Type Parameter
101+
102+
The `type` parameter controls the callout's appearance and default icon. Available options:
103+
104+
- `default`
105+
- `info`
106+
- `warning`
107+
- `error`
108+
109+
#### Emoji Parameter
110+
111+
You can override the default icon with a custom emoji:
112+
113+
```markdown
114+
{{< callout emoji="🌐" >}}
115+
Use custom emojis to make your callouts more expressive
116+
{{< /callout >}}
117+
```
118+
119+
### Tabs
120+
121+
The `tabs` shortcode creates interactive tabbed content sections within pages. This shortcode is particularly useful for showing alternative examples, different code formats, or organizing related content.
122+
123+
```markdown
124+
{{< tabs items="Tab1,Tab2,Tab3" >}}
125+
{{< tab >}}Content for Tab 1{{< /tab >}}
126+
{{< tab >}}Content for Tab 2{{< /tab >}}
127+
{{< tab >}}Content for Tab 3{{< /tab >}}
128+
{{< /tabs >}}
129+
```
130+
131+
#### Setting a default active tab
132+
133+
```markdown
134+
{{< tabs items="JSON,YAML,TOML" defaultIndex="1" >}}
135+
{{< tab >}}**JSON**: JavaScript Object Notation content here...{{< /tab >}}
136+
{{< tab >}}**YAML**: YAML content here...{{< /tab >}}
137+
{{< tab >}}**TOML**: TOML content here...{{< /tab >}}
138+
{{< /tabs >}}
139+
```
140+
141+
#### Using code blocks in tabs
142+
143+
````markdown
144+
{{< tabs items="JSON,YAML,TOML" >}}
145+
{{< tab >}}
146+
```json
147+
{
148+
"hello": "world"
149+
}
150+
```
151+
{{< /tab >}}
152+
{{< tab >}}
153+
```yaml
154+
hello: world
155+
```
156+
{{< /tab >}}
157+
{{< tab >}}
158+
```toml
159+
hello = "world"
160+
```
161+
{{< /tab >}}
162+
{{< /tabs >}}
163+
````
84164

85165
### Tooltips
86166

@@ -92,7 +172,6 @@ Tooltips allow the reader to hover over a particular word or phrase, and have a
92172
"account" "All information is associated with a specific program for a particular user or entity."
93173
"admin key" "A key that allows you to deploy programs and modify the settings of those programs. Admin keys cannot request signatures. This key must be funded to perform some actions."
94174
"adapter" "Plugins that provide support for different chains and program configurations. For example, an adapter can define a specific hashing function to use when signing. Different chains have different signing algorithms; this allows us to support them all."
95-
96175
...
97176
```
98177

0 commit comments

Comments
 (0)