feat: add multilingual quote shortcode

This commit is contained in:
welpo 2023-06-05 23:22:17 +02:00
parent 58d0dd6f2f
commit ab29511d5e
No known key found for this signature in database
GPG key ID: A2F978CF4EC1F5A6
8 changed files with 109 additions and 5 deletions

View file

@ -1,7 +1,7 @@
+++
title = "Custom shortcodes"
date = 2023-02-19
updated = 2023-05-21
updated = 2023-06-05
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]
@ -45,6 +45,20 @@ Images with too much brightness or contrast can be jarring against a dark backgr
{{/* dimmable_image(src="img/desert_by_oskerwyld.webp", alt="Photograph of a desert, heavenly sky") */}}
```
## Quotes
### Multilingual quotes
This shortcode allows you to display both the translated and original text for a quote:
{{ multilingual_quote(original="Qué sosiego, ir por la vida en silencio, saludando sólo a los amigos.", translated="What tranquility, to go through life in silence, greeting only friends.", author="Francisco Umbral") }}
#### Usage
```
{{/* multilingual_quote(original="Qué sosiego, ir por la vida en silencio, saludando sólo a los amigos.", translated="What tranquility, to go through life in silence, greeting only friends.", author="Francisco Umbral") */}}
```
## References
### Hanging indent