Skip to content

Commit 8d45e0b

Browse files
authored
Update admonition title syntax (#145)
Signed-off-by: Dan Barr <[email protected]> Co-authored-by: Dan Barr <[email protected]>
1 parent 886e2a7 commit 8d45e0b

21 files changed

+58
-43
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ conventions for Markdown files:
172172
- Use the `admonition` component for notes, tips, warnings, and other
173173
annotations. This provides a consistent look and feel across the site.
174174
- Use the `:::type` syntax to define the admonition type, such as `note`,
175-
`tip`, `info`, `warning`, or `danger`.
175+
`tip`, `info`, `warning`, or `danger`. Use square brackets to add a title,
176+
e.g. `:::info[Title]`. Add empty lines around the start and end directives.
176177
- Place images in `static/img` using WebP, PNG, or SVG format.
177178
- Use the `ThemedImage` component to provide both light and dark mode
178179
screenshots for apps/UIs that support both.

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ conventions for Markdown files:
172172
- Use the `admonition` component for notes, tips, warnings, and other
173173
annotations. This provides a consistent look and feel across the site.
174174
- Use the `:::type` syntax to define the admonition type, such as `note`,
175-
`tip`, `info`, `warning`, or `danger`.
175+
`tip`, `info`, `warning`, or `danger`. Use square brackets to add a title,
176+
e.g. `:::info[Title]`. Add empty lines around the start and end directives.
176177
- Place images in `static/img` using WebP, PNG, or SVG format.
177178
- Use the `ThemedImage` component to provide both light and dark mode
178179
screenshots for apps/UIs that support both.

docs/theme-preview.mdx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ repository:
8989
These are MDX callouts
9090
([reference](https://docusaurus.io/docs/markdown-features/admonitions)).
9191

92+
To customize the title, use square brackets after the type, e.g.
93+
`:::tip[My title]`.
94+
95+
To keep Prettier from invalidating the admonition syntax, add empty lines around
96+
the start and end of the admonition block (see
97+
[here](https://docusaurus.io/docs/markdown-features/admonitions#usage-with-prettier)).
98+
9299
They can be customized in src/css/custom.css like so
93100
([reference](https://docusaurus.community/knowledge/design/admonitions/#updating-the-css)):
94101

@@ -119,9 +126,10 @@ This is a `tip` admonition. Its CSS class is `alert--success`.
119126

120127
:::
121128

122-
:::info
129+
:::info[Hello]
123130

124-
This is an `info` admonition. Its CSS class is `alert--info`.
131+
This is an `info` admonition. Its CSS class is `alert--info` and it has a custom
132+
title.
125133

126134
:::
127135

@@ -137,16 +145,16 @@ This is a `danger` admonition. Its CSS class is `alert--danger`.
137145

138146
:::
139147

140-
:::::info Parent
148+
:::::info[Parent]
141149

142150
Admonitions can be nested; example here so we can see how the colors look
143151
together.
144152

145-
::::danger Child
153+
::::danger[Child]
146154

147155
Child content
148156

149-
:::tip Inception
157+
:::tip[Inception]
150158

151159
This is getting silly
152160

docs/toolhive/guides-cli/build-containers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ thv build npx://@modelcontextprotocol/server-filesystem
4646
thv build go://github.com/example/my-mcp-server@latest
4747
```
4848

49-
:::info What's happening?
49+
:::info[What's happening?]
5050

5151
When you run `thv build`, ToolHive:
5252

docs/toolhive/guides-cli/custom-permissions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ without creating a custom file:
9797
profile applied to MCP servers when you run a custom server without the
9898
`--permission-profile` flag.
9999

100-
:::important
100+
:::info[Important]
101101

102102
This profile is useful for development and testing but isn't recommended for
103103
production use since it doesn't restrict network destinations. Create a custom

docs/toolhive/guides-cli/group-management.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Groups let you organize MCP servers and control client access:
1717
- **Environment management**: Organize servers by development stage
1818
- **Client customization**: Configure different tool sets for different clients
1919

20-
:::info What's the default behavior?
20+
:::info[What's the default behavior?]
2121

2222
All MCP servers are automatically assigned to the `default` group unless you
2323
specify otherwise. MCP clients configured without a specific group can access
@@ -49,7 +49,7 @@ thv run --group development fetch
4949
thv run --group production filesystem --volume /prod/repo:/projects:ro
5050
```
5151

52-
:::info What's happening?
52+
:::info[What's happening?]
5353

5454
When you specify a group:
5555

docs/toolhive/guides-cli/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ custom permissions, network access filtering, and telemetry.
1717
It's designed for developers who prefer working in a terminal or need to
1818
integrate MCP server management into scripts or automation workflows.
1919

20-
:::tip Did you know?
20+
:::tip[Did you know?]
2121

2222
The ToolHive CLI can be used alongside the
2323
[ToolHive UI](../guides-ui/index.mdx), which provides a graphical interface. You

docs/toolhive/guides-cli/network-isolation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ architecture-beta
139139
</TabItem>
140140
</Tabs>
141141

142-
:::important
142+
:::info[Important]
143143

144144
Network isolation supports HTTP and HTTPS protocols. If your MCP server needs to
145145
use other protocols (like direct TCP connections for database access), run it

docs/toolhive/guides-cli/run-mcp-servers.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fetches website contents:
2727
thv run fetch
2828
```
2929

30-
:::info What's happening?
30+
:::info[What's happening?]
3131

3232
When you run an MCP server from the registry, ToolHive:
3333

@@ -249,7 +249,7 @@ thv run --name my-mcp-server --transport streamable-http my-mcp-server-image:lat
249249

250250
Check your MCP server's documentation for the required arguments.
251251

252-
:::info What's happening?
252+
:::info[What's happening?]
253253

254254
When you run an MCP server from a Docker image, ToolHive:
255255

@@ -289,7 +289,7 @@ You'll likely need to specify additional arguments like the transport method,
289289
volumes, and environment variables. Check your MCP server's documentation and
290290
see [`thv run --help`](../reference/cli/thv_run.md) for more options.
291291

292-
:::info What's happening?
292+
:::info[What's happening?]
293293

294294
When you use a protocol scheme, ToolHive:
295295

docs/toolhive/guides-cli/secrets-management.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Alternatively, you can set a secret using standard input:
121121
echo "MY_SECRET_VALUE" | thv secret set <SECRET_NAME>
122122
```
123123

124-
:::tip Example
124+
:::tip[Example]
125125

126126
Create a secret named `github` and set its value to your GitHub authentication
127127
token using the GitHub CLI:

0 commit comments

Comments
 (0)