feat(iine): add like buttons (#550)

This commit is contained in:
Óscar 2025-08-01 21:43:04 +02:00 committed by GitHub
parent 79b5dcf9a7
commit daa8b1a412
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 505 additions and 8 deletions

View file

@ -1,7 +1,7 @@
+++
title = "Custom shortcodes"
date = 2023-02-19
updated = 2025-05-18
updated = 2025-07-26
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]
@ -188,6 +188,28 @@ All other image shortcodes can be made into full-width by setting the optional p
{{/* full_width_image(src="img/amsterdam_by_oskerwyld.webp", alt="Photograph of a canal in Amsterdam") */}}
```
## Engagement shortcodes
### iine
{{ aside(text="To add it to all posts, set `iine = true` in the `[extra]` section of your `config.toml`.") }}
This shortcode allows you to add extra [iine.to](https://iine.to) buttons to your posts, like this:
{{ iine(slug="/blog/shortcodes/demo-button") }}
#### Usage
```
{{/* iine(icon="heart", slug="/post/my-post-slug/like", label="Like this post") */}}
```
The shortcode takes the following optional parameters:
- `icon`: The icon to display. Can be `heart`, `thumbs_up`, `upvote`, or any emoji.
- `slug`: A unique identifier. Defaults to the current page's path. Useful if you want more than one button on the same page.
- `label`: The accessibility label for the button. Defaults to "Like this post".
## Code shortcodes
### Show source or path