mirror of
https://github.com/welpo/tabi.git
synced 2025-10-11 07:46:15 +02:00
✨ feat(shortcodes): add 'aside' shortcode for side notes (#452)
This commit is contained in:
parent
e1b60542df
commit
98b0c8d161
6 changed files with 131 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Custom shortcodes"
|
||||
date = 2023-02-19
|
||||
updated = 2024-11-27
|
||||
updated = 2024-12-24
|
||||
description = "This theme includes some useful custom shortcodes that you can use to enhance your posts. Whether you want to display images that adapt to light and dark themes, or format a professional-looking reference section, these custom shortcodes have got you covered."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -216,6 +216,36 @@ dist/
|
|||
|
||||
## Text shortcodes
|
||||
|
||||
### Aside (side/margin note)
|
||||
|
||||
Add supplementary content in the margins on wide screens, or as distinct blocks on mobile.
|
||||
|
||||
{{ aside(text="*Sidenote* comes from Latin *nota* ('mark') + Old English *síde* ('side').") }}
|
||||
|
||||
The shortcode accepts two parameters:
|
||||
|
||||
- `position`: Set to "right" to place in right margin (defaults to left)
|
||||
- Content can be provided via `text` parameter or between shortcode tags
|
||||
|
||||
#### Usage
|
||||
|
||||
Using the `text` parameter:
|
||||
|
||||
```
|
||||
{{/* aside(text="*Sidenote* comes from Latin *nota* ('mark') + Old English *síde* ('side').") */}}
|
||||
```
|
||||
|
||||
Using the content body:
|
||||
|
||||
```
|
||||
{%/* aside() */%}
|
||||
A longer note that
|
||||
can span multiple lines.
|
||||
|
||||
*Markdown* is supported.
|
||||
{%/* end */%}
|
||||
```
|
||||
|
||||
### Remote text
|
||||
|
||||
Embed text from a remote URL or a local file. To display the path or URL on the code block, see the [show source or path shortcode](#show-source-or-path).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue