mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-22 21:20:43 +00:00
Robert Kaussow
2f01b4b903
BREAKING CHANGE: The `size=profile` option was removed from the `img` shortcode. To create avatar images the new `avatar` shortcode can be used.
53 lines
827 B
Markdown
53 lines
827 B
Markdown
---
|
|
title: Avatar Images
|
|
date: 2024-04-27T21:00:00+02:00
|
|
authors:
|
|
- john-doe
|
|
tags:
|
|
- Documentation
|
|
- Shortcodes
|
|
resources:
|
|
- name: avatar
|
|
src: "images/avatar.jpg"
|
|
title: "Avatar"
|
|
---
|
|
|
|
The avatar shortcode is another custom image shortcode.
|
|
|
|
<!--more-->
|
|
|
|
## Usage
|
|
|
|
Define a resource in the page front matter.
|
|
|
|
<!-- spellchecker-disable -->
|
|
|
|
```md
|
|
---
|
|
resources:
|
|
- name: avatar
|
|
src: "images/avatar.jpg"
|
|
title: "Avatar"
|
|
---
|
|
|
|
{{</* avatar name="avatar" */>}}
|
|
```
|
|
|
|
<!-- spellchecker-enable -->
|
|
|
|
## Attributes
|
|
|
|
<!-- prettier-ignore-start -->
|
|
<!-- spellchecker-disable -->
|
|
{{< propertylist name=shortcode-avatar sort=name order=asc >}}
|
|
<!-- spellchecker-enable -->
|
|
<!-- prettier-ignore-end -->
|
|
|
|
## Example
|
|
|
|
<!-- spellchecker-disable -->
|
|
|
|
{{< avatar name=avatar size="small" >}}
|
|
|
|
<!-- spellchecker-enable -->
|