How to Create a Resource Library Using HubDB in HubSpot Content Hub

How to Create a Resource Library Using HubDB in HubSpot Content Hub

  • Home
  • Blog
  • How to Create a Resource Library Using HubDB in HubSpot Content Hub

If your website has ebooks, guides, videos, or downloads, a simple blog isn’t enough anymore. You need a structured, filterable resource library — something that feels organized and easy to explore.

This is where HubDB in HubSpot Content Hub becomes incredibly powerful.

In this guide, you’ll learn how to build a scalable resource library using HubDB, similar to what high-performing marketing sites use.

What Is a Resource Library?

A resource library is a centralized section where users can browse:

  • Guides & ebooks
  • Case studies
  • Videos
  • Templates
  • Downloads

Instead of scattered content, everything is organized and filterable.

Why Use HubDB for Resource Libraries?

Using HubDB allows you to:

  • Manage all resources in one place
  • Create dynamic pages
  • Add filters (category, type, topic)
  • Scale to 100s of resources easily

👉 Perfect for SEO + UX

🧩 STEP 1: Create HubDB Table

Go to:

👉 Content → HubDB → Create Table

Add columns like:

Title (Text)
Description (Rich Text)
Category (Dropdown)
Resource Type (Dropdown)
Thumbnail (Image)
File / Link (URL)
Slug (Text)

👉 Example categories:

  • Marketing
  • HubSpot
  • SEO

👉 Resource types:

  • Ebook
  • Video
  • Template

🧱 STEP 2: Create Resource Listing Page

In your template:

{% set rows = hubdb_table_rows(123456) %}
<div class="resource-grid">
  {% for row in rows %}
    <div class="resource-card">
      <img src="{{ row.thumbnail.url }}">
      <h3>{{ row.title }}</h3>
      <p>{{ row.description }}</p>
      <a href="{{ request.path }}/{{ row.slug }}">View Resource</a>
    </div>
  {% endfor %}
</div>

🔗 STEP 3: Create Dynamic Resource Pages

Enable dynamic pages in HubDB.

Template example:

{% set row = dynamic_page_hubdb_row %}
<h1>{{ row.title }}</h1>
<img src="{{ row.thumbnail.url }}">
<div>{{ row.description|safe }}</div>

<a href="{{ row.file }}">Download</a>

👉 This creates individual pages like:

/resources/seo-guide
/resources/hubspot-checklist

🔍 STEP 4: Add Filters (Important)

Add filter logic:

{% set category = request.query_dict.category %}
{% set type = request.query_dict.type %}
{% set filters = [] %}
{% if category %}
{% do filters.append("category=" ~ category) %}
{% endif %}
{% if type %}
{% do filters.append("resource_type=" ~ type) %}
{% endif %}
{% set query = filters|join("&") %}
{% set rows = hubdb_table_rows(123456, query) %}

🎛 STEP 5: Create Filter UI

Example dropdown:

<select name="category" onchange="applyFilters()">
  <option value="">All Categories</option>
  <option value="Marketing">Marketing</option>
  <option value="SEO">SEO</option>
</select>

⚡ STEP 6: Add Download / Gated Flow

Two options:

Direct Download

<a href="{{ row.file }}">Download</a>

Gated Content (Recommended)

  • Add form
  • Redirect to file
  • Capture leads

👉 Perfect for lead generation

🧠 STEP 7: SEO Optimization

Add columns:

  • Meta Title
  • Meta Description

Then:

<title>{{ row.meta_title }}</title>
<meta name="description" content="{{ row.meta_description }}">

👉 Each resource becomes an SEO page

🎯 REAL-WORLD USE CASES

You can build:

  • 📚 Marketing resource hub (like HubSpot)
  • 🎓 Learning libraries
  • 🛠 Tool directories
  • 📦 Download centers

👉 This can become a major traffic driver

⚡ PRO TIPS (From Real Builds)

  • Keep cards clean (don’t overload info)
  • Use images → improves CTR
  • Add “Featured Resources” section
  • Combine with filters → best UX

🚀 ADVANCED IDEAS

  • Add search inside library
  • Add “Recommended for you”
  • Add tags instead of just categories
  • Track downloads using HubSpot

📌 Key Takeaway

HubDB allows you to build scalable, filterable resource libraries inside HubSpot Content Hub. By combining structured data with dynamic pages and filters, you can create a powerful content hub that improves both user experience and SEO performance.

Leave a reply

Related Post

Have a Project in Mind?

Let’s talk about what you need and how we can make it happen.

Request a quote