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
resourcestring—Resource identifier (e.g., owner/repo for GitHub)
typestring—Resource type (e.g., repo, model)
urlstring—Custom URL (for custom platform)
titlestring—Override title (or auto-fetched from API)
descriptionstring—Override description
imagestring—Custom image URL for the card
thumbnailstring—If "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