Skip to content

Featured Resource Short Code

Nick Lyons edited this page Feb 3, 2025 · 4 revisions

Back

Featured Resource

A rounded box that displays a guide kicker, title, summary, and image and links to an internal or external resource.

Overview

The featured-resource can be implemented as a shortcode featured-resource or as a front matter field featured_resources for a topic page.

It also support internal and external links.

field description required
title sets the title for external links required for external links, optional override for internal links
summary the short description for the resource required for external links, optional override for internal links
link internal or external link both internal and external links
kicker a short label or message at the top of the resource box optional for both, default is "Featured Resource"

Guidance

Internal Links

When setting an internal link, we use a relative path like /resources/techfar-hub-get-started to point to a hugo file. Internal links use native methods to lookup the title, summary and kicker fields.

Note

You can override the title, summary and kicker fields if you want to customize the copy

front matter in a topics page

featured_resources:
  resources:
    - link: "/resources/techfar-hub-get-started"

shortcode

{{< featured-resource link="/guides/hcd/discovery-concepts" >}}

External Links

When setting an external link, the title, summary and kicker fields need to be provided.

front matter in a topics page

featured_resources:
  resources:
    - link: "https://www.challenge.gov/"
      title: "Challenge.gov"
      summary: "Where competition delivers innovation for the public good."

shortcode

{{< featured-resource link="https://wwww.ai.gov" kicker="Join the Community" title="Artificial Intelligence" summary="Description text goes here" >}}

Examples

Multiple Featured Resource on topics Front Matter

The - is used to list multiple resources.

Single Resource

featured_resources:
  resources:
    - link: "an-introduction-to-accessibility"

Multitple Resources

featured_resources:
  resources:
    - link: "an-introduction-to-accessibility"
    - link: "an-introduction-to-accessibility"
Example Screenshot 2025-01-29 at 12 55 42 PM

Live page: Customer experience.

Usage

Featured Resources short code

When using different types of content resources, topics, etc... you can use the kicker to emphasize the type of content.

Featured Resource

{{< featured-resource link="topics/analytics" kicker="Featured topic" >}}
Example Screenshot 2025-01-29 at 12 56 48 PM

Live page: Join the Communicators Community.

Usage

Use on content pages.

Clone this wiki locally