Embeds
Embed GitHub repositories, HuggingFace models, and custom URL preview cards in your content with the Hugo embed shortcode.
Create rich embed cards for external resources. Supports GitHub, HuggingFace, and custom URLs with automatic metadata fetching.
Usage
GitHub Repository
{{</* embed platform="github" resource="HugoBlox/kit" type="repo" */>}}With thumbnail mode:
{{</* embed platform="github" resource="HugoBlox/kit" type="repo" thumbnail="true" */>}}HuggingFace Model
{{</* embed platform="huggingface" resource="microsoft/DialoGPT-medium" type="model" */>}}Custom URL
{{</* embed url="https://example.com" title="Custom Title" description="A description" image="https://example.com/image.jpg" */>}}Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
platform | string | custom | github, huggingface, or custom |
resource | string | — | Resource identifier (e.g., owner/repo for GitHub) |
type | string | — | Resource type (e.g., repo, model) |
url | string | — | Custom URL (for custom platform) |
title | string | — | Override title (or auto-fetched from API) |
description | string | — | Override description |
image | string | — | Custom image URL for the card |
thumbnail | string | — | If "true", show compact thumbnail mode |
width | integer | 800 | Image width in pixels |
height | integer | 600 | Image height in pixels |
quality | integer | 80 | Image quality (1–100) |
Platform Details
GitHub
Automatically fetches repository metadata (description, stars, language, etc.) via the GitHub API. Falls back gracefully if the API is unavailable or rate-limited.
HuggingFace
Fetches model/dataset information from the HuggingFace API.
Custom
For any URL. Provide url, title, and optionally description and image for a rich card.
Embed cards include intelligent image processing — remote images are fetched, resized, and served in modern formats (AVIF, WebP, JPG) for optimal performance.
Was this page helpful?
Toggles
Create collapsible toggle blocks for FAQs, solutions, and hidden content using the Hugo spoiler shortcode.
Video & Audio
Embed self-hosted video, audio files, YouTube, Vimeo, and Bilibili videos in Hugo using the video and audio shortcodes.
From the makers of
© 2026 Lore Labs.