Writing & Markdown

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

ParameterTypeDefaultDescription
platformstringcustomgithub, huggingface, or custom
resourcestringResource identifier (e.g., owner/repo for GitHub)
typestringResource type (e.g., repo, model)
urlstringCustom URL (for custom platform)
titlestringOverride title (or auto-fetched from API)
descriptionstringOverride description
imagestringCustom image URL for the card
thumbnailstringIf "true", show compact thumbnail mode
widthinteger800Image width in pixels
heightinteger600Image height in pixels
qualityinteger80Image 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?

From the makers of

© 2026 Lore Labs.

On this page