hugoblox.com/blocks/trending-questions
Knowledge baseFree · MITHugo

Trending Questions block

Surface the questions people actually ask — popular, trending, or hand-picked — atop your help center.

Add it to any Hugo page's sections list — no build step.

v1Version
16Options
MITLicense

Quick start

Add the Trending Questions block

Drop this into your page's front matter, under the sections list. Edit the values, and HugoBlox renders the block — no build step.

Add to your page's sections
- block: trending-questions
  design:
    spacing:
      padding:
        - 3rem
        - "0"
        - 3rem
        - "0"
  content:
    title: Trending questions
    subtitle: Top searches from the last 7 days.
    count: 4
    questions:
      - question: How do I deploy Hugo Blox to Netlify?
        answer_preview: Use the provided CI workflow or run `hugo --gc --minify`...
        link: /docs/deploy/netlify/
        badge:
          text: 🔥 Popular
          color: bg-amber-100 text-amber-800
        views: 1200
        upvotes: 86
      - question: Where can I customize Tailwind 4 tokens?
        answer_preview: Tokens are defined in `modules/blox-tailwind/assets/`...
        link: /docs/style/tokens/
        author: geo
    view_all:
      text: Browse all questions
      link: /faq/

Reference

Configuration

Every option the Trending Questions block accepts, generated from its schema.

Content options

Properties set under the block's content key.

PropertyTypeDefaultDescription
titlestringEngagement heading, under 4 words. E.g. 'Trending questions', 'Hot topics'.
subtitlestringContextual subtitle, under 8 words. E.g. 'Top searches from the last 7 days.'
countinteger4Number of items to pull when auto-querying pages with `trending: true`
questionsobject[]Static fallback list of questions to render
questions[].questionrequiredstringNatural user question, under 12 words. Start with 'How', 'What', 'Where'.
questions[].answer_previewstring1-sentence answer teaser, under 15 words. End with '...'
questions[].linkrequiredstringURL to the full answer/article
questions[].badgeobject
questions[].badge.textstring
questions[].badge.colorstringTailwind classes applied to the badge
questions[].authorstring
questions[].viewsstring | number
questions[].upvotesinteger | number
view_allobject
view_all.textrequiredstring
view_all.linkrequiredstring

Compose

Works well with

Blocks that pair naturally with Trending Questions on the same page.

Frequently asked

Trending Questions block FAQ

  • Add a "block: trending-questions" entry to the sections list in your page's front matter, then fill in the content fields. HugoBlox renders it automatically — copy the example config above as a starting point.

Ready to build with the Trending Questions block?