Skip to content

Commit 8285eca

Browse files
committed
Shortcode: Add nobreak shortcode and usage example
1 parent 2aace4f commit 8285eca

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
description: Prose
3+
title: Prose
4+
weight: 100
5+
---
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
description: Nobreak
3+
title: Nobreak
4+
weight: 100
5+
---
6+
7+
## No break shortcode `nobreak`
8+
9+
Using the `nobreak` shorcode should stop words breaking across lines. A common use case would be on things like product names, such as {{<nobreak>}}NGINX Plus (nobreak) {{</nobreak>}} vs NGINX Plus (with break).
10+
11+
Usage
12+
13+
``` markdown
14+
{{</*nobreak*/>}}NGINX Plus{{</*/nobreak*/>}}
15+
```

layouts/shortcodes/nobreak.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<span style="white-space: nowrap;">{{ .Inner | markdownify }}</span>

0 commit comments

Comments
 (0)