hugoblox.com/blocks/faq
FAQ block preview
FeaturesFree · MITPreact · interactive

FAQ block

Answer last-minute objections in a clean accordion — place it before the final CTA where it lifts conversion.

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

v2.0.0Version
12Options
MITLicense

Quick start

Add the FAQ 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: faq
  content:
    title: Frequently asked questions
    subtitle: Fast answers for new users
    text: If you do not see your question, open an issue or reach out.
    items:
      - question: How do I enable Pagefind?
        answer: Add `pagefind = true` to your config and run `pnpm build`.
      - question: Can I customize Tailwind tokens?
        answer: Yes. Edit the design tokens in `modules/blox-tailwind/assets/` and run `pnpm format`.
    button:
      text: View full knowledge base
      url: /faq/
      icon: hero/arrow-right
  design:
    spacing:
      padding:
        - 2.5rem
        - "0"
        - 2.5rem
        - "0"

Overview

About the FAQ block

Display frequently asked questions in an interactive accordion format with automatic FAQPage structured data for SEO.

Features

  • ✅ Interactive accordion with Alpine.js
  • ✅ FAQPage Schema.org structured data for Google rich results
  • ✅ Responsive design with Tailwind CSS
  • ✅ Dark mode support
  • ✅ Markdown support in answers

Usage

Add to your page's front matter:

sections:
  - block: faq
    content:
      title: Frequently Asked Questions
      subtitle: Find answers to common questions
      text: Can't find what you're looking for? [Contact us](/contact)
      items:
        - question: What is HugoBlox Kit?
          answer: HugoBlox Kit is a no-code website builder framework powered by Hugo and Tailwind CSS.
        
        - question: Is it free to use?
          answer: Yes! HugoBlox Kit is open source and free to use under the MIT license.
        
        - question: How do I get started?
          answer: |
            Getting started is easy:
            1. Choose a template
            2. Click "Use Template"
            3. Customize your content
            4. Deploy to GitHub Pages or Netlify
      
      button:
        text: View All FAQs
        url: /faq/
        icon: arrow-right
    design:
      spacing:
        padding: ["6rem", "0", "6rem", "0"]

Structured Data

This block automatically generates FAQPage structured data for better SEO and eligibility for Google's FAQ rich results.

Customization

  • Accordion behavior: One item open at a time (default)
  • Colors: Automatically adapts to your theme
  • Spacing: Customizable via design.spacing
  • Background: Customizable via design.background.color

Reference

Configuration

Every option the FAQ block accepts, generated from its schema.

Content options

Properties set under the block's content key.

PropertyTypeDefaultDescription
titlestringBlock title
subtitlestringBlock subtitle
textstringIntroductory text (Markdown supported)
itemsrequiredobject[]FAQ items
items[].questionstringThe question
items[].titlestringAlias for question
items[].answerstringThe answer (Markdown supported)
items[].textstringAlias for answer
buttonobjectCall-to-action button
button.textrequiredstringButton text
button.urlrequiredstringButton URL
button.iconstringButton icon name

Design options

Properties set under the block's design key — shared background, spacing, and color settings apply on top.

PropertyTypeDefaultDescription
spacingobject
spacing.paddingstring[]20px,0,20px,0Padding [top, right, bottom, left]
spacing.padding_smstring[]3rem,0Responsive padding for smaller screens [top, bottom]
spacing.marginstring[]0,0,0,0Margin [top, right, bottom, left]

Compose

Works well with

Blocks that pair naturally with FAQ on the same page.

Frequently asked

FAQ block FAQ

  • Add a "block: faq" 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 FAQ block?