Big documentation rewrite, move docs to example site

This commit is contained in:
Alex Shpak
2026-05-16 23:04:27 +02:00
parent bcce6e25c3
commit c59c9192a8
54 changed files with 1219 additions and 3162 deletions
@@ -1,33 +1,30 @@
# Images
> [!WARNING]
> Experimental, could change in the future or be removed
Enhanced image display with click-to-expand behavior.
Image shortcode produces an image that can be clicked to expand.
## Syntax
```tpl
{{</* image src="photo.jpg" alt="Description" title="Caption" loading="lazy" */>}}
```
## Example
```go-html-template
{{</* image src="placeholder.svg" alt="A placeholder" title="A placeholder" loading="lazy" */>}}
```
{{< image src="placeholder.svg" alt="A placeholder" title="A placeholder" loading="lazy" >}}
{{< image src="placeholder.svg" alt="Placeholder image" title="Click to expand" loading="lazy" >}}
## Parameters
`src` {{< badge style="warning" title="Required" >}}
: The link to the image
`src`
: Path to the image. Supports page resources, site resources, and URLs.
`class` {{< badge style="info" title="Optional" >}}
: An optional CSS class name that will be applied to the `img` element
`alt` {{< badge style="info" title="Optional" >}}
: An optional alternate text for the image
`title` {{< badge style="info" title="Optional" >}}
: An optional title for the image
`loading` {{< badge style="info" title="Optional" >}}
: Sets `loading` control for the image: `lazy`, `eager` or `auto`
`alt`
: Alternate text for accessibility.
`title`
: Caption displayed below the image.
`loading`
: Loading strategy: `lazy`, `eager`, or `auto`.
`class`
: Additional CSS classes on the `<img>` element.