Big documentation rewrite, move docs to example site
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
---
|
||||
bookCollapseSection: true
|
||||
---
|
||||
---
|
||||
|
||||
@@ -1,32 +1,43 @@
|
||||
# Badges
|
||||
|
||||
> [!WARNING]
|
||||
> Experimental, could change in the future or be removed
|
||||
Inline labels for annotating content with status, versions, or metadata.
|
||||
|
||||
Badges can be used to annotate your pages with additional information or mark specific places in markdown content.
|
||||
## Syntax
|
||||
|
||||
{{< badge title="Title" value="Value" >}}
|
||||
{{< badge style="info" title="Hugo" value="0.147.6" >}}
|
||||
{{< badge style="success" title="Build" value="Passing" >}}
|
||||
{{< badge style="warning" title="Coverage" value="25%" >}}
|
||||
{{< badge style="danger" title="Issues" value="120" >}}
|
||||
```tpl
|
||||
{{</* badge style="info" title="Hugo" value="0.158" */>}}
|
||||
```
|
||||
|
||||
## Examples
|
||||
## Styles
|
||||
|
||||
| Shortcode | Output |
|
||||
| -- | -- |
|
||||
| `{{</* badge style="info" title="hugo" value="0.147.6" */>}}` | {{< badge style="info" title="Hugo" value="0.147.6" >}} |
|
||||
| -- | -- |
|
||||
| `{{</* badge style="info" title="Hugo" value="0.158" */>}}` | {{< badge style="info" title="Hugo" value="0.158" >}} |
|
||||
| `{{</* badge style="success" title="Build" value="Passing" */>}}` | {{< badge style="success" title="Build" value="Passing" >}} |
|
||||
| `{{</* badge style="warning" title="Coverage" value="25%" */>}}` | {{< badge style="warning" title="Coverage" value="25%" >}} |
|
||||
| `{{</* badge style="danger" title="Issues" value="120" */>}}` | {{< badge style="danger" title="Issues" value="120" >}} |
|
||||
| `{{</* badge style="warning" title="Coverage" value="25%" */>}}` | {{< badge style="warning" title="Coverage" value="25%" >}} |
|
||||
| `{{</* badge style="danger" title="Issues" value="120" */>}}` | {{< badge style="danger" title="Issues" value="120" >}} |
|
||||
| | |
|
||||
| `{{</* badge style="info" title="Title" */>}}` | {{< badge style="info" title="Title" >}} |
|
||||
| `{{</* badge style="info" value="Value" */>}}` | {{< badge style="info" value="Value" >}} |
|
||||
| `{{</* badge title="Default" */>}}` | {{< badge value="Default" >}} |
|
||||
| `{{</* badge style="info" title="Title" */>}}` | {{< badge style="info" title="Title" >}} |
|
||||
| `{{</* badge style="info" value="Value" */>}}` | {{< badge style="info" value="Value" >}} |
|
||||
| `{{</* badge value="Default" */>}}` | {{< badge value="Default" >}} |
|
||||
|
||||
## Use in links
|
||||
## Use in Links
|
||||
|
||||
Wrap a badge in a markdown link
|
||||
|
||||
A badge can be wrapped in markdown link producing following result: [{{< badge title="Hugo" value="0.147.6" >}}](https://github.com/gohugoio/hugo/releases/tag/v0.147.6)
|
||||
```tpl
|
||||
[{{</* badge title="Hugo" value="0.147.6" */>}}](https://github.com/gohugoio/hugo/releases/tag/v0.147.6)
|
||||
[{{</* badge title="Hugo" value="0.158" */>}}](https://github.com/gohugoio/hugo/releases/tag/v0.158.0)
|
||||
```
|
||||
|
||||
[{{< badge title="Hugo" value="0.158" >}}](https://github.com/gohugoio/hugo/releases/tag/v0.158.0)
|
||||
|
||||
## Parameters
|
||||
|
||||
`style`
|
||||
: Visual style. One of: `default`, `info`, `success`, `warning`, `danger`, `note`, `tip`, `important`, `caution`.
|
||||
|
||||
`title`
|
||||
: Label text (left side).
|
||||
|
||||
`value`
|
||||
: Value text (right side).
|
||||
|
||||
@@ -1,33 +1,47 @@
|
||||
# Cards
|
||||
|
||||
> [!WARNING]
|
||||
> Experimental, could change in the future or be removed
|
||||
Content blocks with optional images and links. Often used with [Columns](/docs/shortcodes/columns) for grid layouts.
|
||||
|
||||
## Syntax
|
||||
|
||||
```tpl
|
||||
{{</* card [href="..."] [image="..."] [title="..."] */>}}
|
||||
Markdown content
|
||||
{{</* /card */>}}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
{{% columns %}}
|
||||
- {{< card image="placeholder.svg" >}}
|
||||
### Line 1
|
||||
Line 2
|
||||
### With Image
|
||||
Cards can display an image above the content.
|
||||
{{< /card >}}
|
||||
|
||||
- {{< card image="placeholder.svg" >}}
|
||||
This is tab MacOS content.
|
||||
{{< /card >}}
|
||||
{{% /columns %}}
|
||||
|
||||
{{% columns %}}
|
||||
- {{< card href="/docs/shortcodes/experimental/cards" >}}
|
||||
**Markdown**
|
||||
Suspendisse sed congue orci, eu congue metus. Nullam feugiat urna massa.
|
||||
{{< /card >}}
|
||||
|
||||
- {{< card >}}
|
||||
Suspendisse sed congue orci, eu congue metus. Nullam feugiat urna massa, et fringilla metus consectetur molestie.
|
||||
### With Link {anchor=false}
|
||||
When `href` is set, the entire card becomes clickable.
|
||||
{{< /card >}}
|
||||
|
||||
- {{< card title="Card" >}}
|
||||
### Heading
|
||||
This is tab MacOS content.
|
||||
### Plain Card
|
||||
A basic card with no image or link, used for grouping related content.
|
||||
{{< /card >}}
|
||||
{{% /columns %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
`href`
|
||||
: Makes the card a link. The entire card area becomes clickable.
|
||||
|
||||
`image`
|
||||
: Path to an image displayed above the card content. Supports page resources and URLs.
|
||||
|
||||
`title`
|
||||
: Accessible title for the card.
|
||||
|
||||
`alt`
|
||||
: Alt text for the card image.
|
||||
|
||||
`class`
|
||||
: Additional CSS classes.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
bookHidden: true
|
||||
---
|
||||
|
||||
# Section
|
||||
|
||||
Render child pages of the current section as a definition list with titles and descriptions.
|
||||
|
||||
## Syntax
|
||||
|
||||
```tpl
|
||||
{{</* section [summary] */>}}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
`summary`
|
||||
: When present, includes the page summary below each title.
|
||||
Reference in New Issue
Block a user