Blog Module Configuration Guide

Complete guide to configuring the HBStack blog module including all sub-modules and their parameters

The HBStack blog module is a comprehensive, modular blogging system that transforms Hugo into a powerful content management platform. Built on Bootstrap 5.3, it provides a complete suite of features including multiple comment systems, advanced sidebar widgets, social integrations, and responsive layouts. The blog module follows a modular architecture where each feature is implemented as a separate sub-module, allowing you to enable only the functionality you need while maintaining optimal performance.

Blog Module Architecture

  • Blog module works well if you know how to configure it correctly
  • A blog module is composed of several components, which are themselves made as separate modules being a part of the overall blog module functionality.
  • If you import a blog module in your repository, all other modules will be imported as well, and you can use its components directly without having to worry about their internal implementation details.
  • Some of these components being part of the blog module include the following:

Here’s a complete list of modules currently present in the HBStack Blog repository. These are modular Hugo components designed to enhance blogging functionality:

Core Components

  • Main Blog Engine: Post rendering, layout management, and responsive grid systems
  • Sidebar System: Modular sidebar with profile, posts, taxonomies, and search widgets
  • Comment Systems: Multiple commenting platforms (Disqus, Giscus, Utterances, etc.)
  • Navigation: Breadcrumbs, post navigation, and table of contents with scroll spy
  • Content Enhancement: Featured images, social sharing, and related posts

Available Blog Sub-Modules

ModulePurposeKey FeaturesConfiguration Level
breadcrumbNavigationHierarchical navigation, customizable separatorsSite + Page
content-panelLayoutFlexible content panels, responsive designSite
comments/disqusCommentsDisqus integration, custom stylingSite
comments/giscusCommentsGitHub Discussions, theme syncSite
comments/utterancesCommentsGitHub Issues, minimal setupSite
comments/twikooCommentsChinese-friendly, cloud databaseSite
comments/staticmanCommentsStatic generation, no external dependenciesSite
comments/emoteCommentsEmoji reactions, lightweightSite
featured-imageMediaAutomatic image processing, responsive sizingPage
heading-signTypographyPermalink anchors, smooth scrollingSite
post-navNavigationPrevious/next navigation, related postsSite
related-postsDiscoveryAlgorithm-based recommendations, slide/vertical viewsSite
sidebar/profileWidgetAuthor bio, social links, company infoSite
sidebar/postsWidgetRecent/featured posts, multiple display stylesSite
sidebar/taxonomiesWidgetCategories, tags, series with countsSite
sidebar/searchWidgetClient-side search, filtering capabilitiesSite
social-share-buttonsSocialMulti-platform sharing, customizable buttonsSite + Page
toc-scrollspyNavigationAuto-generated TOC, scroll highlightingSite + Page

These modules are designed to be composable, meaning you can include only what you need in your Hugo site.

Global Blog Configuration

Core Site Parameters

Add to your hugo.toml:

hugo.toml

 1[params]
 2  [params.hb]
 3    [params.hb.blog]
 4      enabled = true
 5      list_cols_lg = 3
 6      list_cols_md = 2
 7      list_style = 'regular'
 8      post_date_format = '2006-01-02'
 9      post_thumbnail_height = '160px'
10      [params.hb.blog.archives]
11        date_format = '2006-01'
12        list_style = 'compact'
13        paginate = 30
14      [params.hb.blog.home]
15        featured_posts = 5
16        pinned_posts_position = 'top'
17        recent_posts = 10

hugo.yaml

 1params:
 2  hb:
 3    blog:
 4      archives:
 5        date_format: 2006-01
 6        list_style: compact
 7        paginate: 30
 8      enabled: true
 9      home:
10        featured_posts: 5
11        pinned_posts_position: top
12        recent_posts: 10
13      list_cols_lg: 3
14      list_cols_md: 2
15      list_style: regular
16      post_date_format: '2006-01-02'
17      post_thumbnail_height: 160px

hugo.json

 1{
 2   "params": {
 3      "hb": {
 4         "blog": {
 5            "archives": {
 6               "date_format": "2006-01",
 7               "list_style": "compact",
 8               "paginate": 30
 9            },
10            "enabled": true,
11            "home": {
12               "featured_posts": 5,
13               "pinned_posts_position": "top",
14               "recent_posts": 10
15            },
16            "list_cols_lg": 3,
17            "list_cols_md": 2,
18            "list_style": "regular",
19            "post_date_format": "2006-01-02",
20            "post_thumbnail_height": "160px"
21         }
22      }
23   }
24}

hugo.toml

 1[params]
 2  [params.hb]
 3    [params.hb.blog]
 4      [params.hb.blog.sidebar]
 5        enabled = true
 6        max_width = '320px'
 7        position = 'start'
 8        sticky = true
 9        width = 0.35
10        [params.hb.blog.sidebar.posts]
11          featured_count = 3
12          fill = true
13          list_style = 'slide'
14          recent_count = 5
15          sections = ['blog', 'posts']
16          style = 'pills'
17        [params.hb.blog.sidebar.profile]
18          avatar = '/images/avatar.png'
19          avatar_size = 100
20          company = 'Your Company'
21          description = 'Welcome to my blog'
22          location = 'Your Location'
23          title = 'Site Author'
24          [params.hb.blog.sidebar.profile.socials]
25            _color = 'primary'
26            email = 'mailto:your@email.com'
27            github = 'yourusername'
28            linkedin = 'yourprofile'
29            twitter = 'yourusername'
30        [params.hb.blog.sidebar.taxonomies]
31          authors = true
32          categories = true
33          count_threshold = 1
34          series = true
35          tags = true

hugo.yaml

 1params:
 2  hb:
 3    blog:
 4      sidebar:
 5        enabled: true
 6        max_width: 320px
 7        position: start
 8        posts:
 9          featured_count: 3
10          fill: true
11          list_style: slide
12          recent_count: 5
13          sections:
14          - blog
15          - posts
16          style: pills
17        profile:
18          avatar: /images/avatar.png
19          avatar_size: 100
20          company: Your Company
21          description: Welcome to my blog
22          location: Your Location
23          socials:
24            _color: primary
25            email: mailto:your@email.com
26            github: yourusername
27            linkedin: yourprofile
28            twitter: yourusername
29          title: Site Author
30        sticky: true
31        taxonomies:
32          authors: true
33          categories: true
34          count_threshold: 1
35          series: true
36          tags: true
37        width: 0.35

hugo.json

 1{
 2   "params": {
 3      "hb": {
 4         "blog": {
 5            "sidebar": {
 6               "enabled": true,
 7               "max_width": "320px",
 8               "position": "start",
 9               "posts": {
10                  "featured_count": 3,
11                  "fill": true,
12                  "list_style": "slide",
13                  "recent_count": 5,
14                  "sections": [
15                     "blog",
16                     "posts"
17                  ],
18                  "style": "pills"
19               },
20               "profile": {
21                  "avatar": "/images/avatar.png",
22                  "avatar_size": 100,
23                  "company": "Your Company",
24                  "description": "Welcome to my blog",
25                  "location": "Your Location",
26                  "socials": {
27                     "_color": "primary",
28                     "email": "mailto:your@email.com",
29                     "github": "yourusername",
30                     "linkedin": "yourprofile",
31                     "twitter": "yourusername"
32                  },
33                  "title": "Site Author"
34               },
35               "sticky": true,
36               "taxonomies": {
37                  "authors": true,
38                  "categories": true,
39                  "count_threshold": 1,
40                  "series": true,
41                  "tags": true
42               },
43               "width": 0.35
44            }
45         }
46      }
47   }
48}

Comment System Configuration

  • Choose one or combine multiple comment systems:

hugo.toml

 1[params]
 2  [params.hb]
 3    [params.hb.blog]
 4      [params.hb.blog.disqus]
 5        shortname = 'your-disqus-shortname'
 6      [params.hb.blog.giscus]
 7        category = 'General'
 8        category_id = 'your-category-id'
 9        mapping = 'pathname'
10        repo = 'username/repository'
11        repo_id = 'your-repo-id'
12        theme = 'preferred_color_scheme'
13      [params.hb.blog.twikoo]
14        env_id = 'your-twikoo-env-id'
15        region = 'ap-guangzhou'
16      [params.hb.blog.utterances]
17        issue_term = 'pathname'
18        repo = 'username/repository'
19        theme = 'preferred-color-scheme'

hugo.yaml

 1params:
 2  hb:
 3    blog:
 4      disqus:
 5        shortname: your-disqus-shortname
 6      giscus:
 7        category: General
 8        category_id: your-category-id
 9        mapping: pathname
10        repo: username/repository
11        repo_id: your-repo-id
12        theme: preferred_color_scheme
13      twikoo:
14        env_id: your-twikoo-env-id
15        region: ap-guangzhou
16      utterances:
17        issue_term: pathname
18        repo: username/repository
19        theme: preferred-color-scheme

hugo.json

 1{
 2   "params": {
 3      "hb": {
 4         "blog": {
 5            "disqus": {
 6               "shortname": "your-disqus-shortname"
 7            },
 8            "giscus": {
 9               "category": "General",
10               "category_id": "your-category-id",
11               "mapping": "pathname",
12               "repo": "username/repository",
13               "repo_id": "your-repo-id",
14               "theme": "preferred_color_scheme"
15            },
16            "twikoo": {
17               "env_id": "your-twikoo-env-id",
18               "region": "ap-guangzhou"
19            },
20            "utterances": {
21               "issue_term": "pathname",
22               "repo": "username/repository",
23               "theme": "preferred-color-scheme"
24            }
25         }
26      }
27   }
28}

Social Sharing Configuration

hugo.toml

 1[params]
 2  [params.hb]
 3    [params.hb.blog]
 4      [params.hb.blog.social_share_buttons]
 5        [params.hb.blog.social_share_buttons.media]
 6          email = true
 7          facebook = true
 8          linkedin = true
 9          pinterest = true
10          reddit = true
11          telegram = true
12          twitter = true
13          whatsapp = true

hugo.yaml

 1params:
 2  hb:
 3    blog:
 4      social_share_buttons:
 5        media:
 6          email: true
 7          facebook: true
 8          linkedin: true
 9          pinterest: true
10          reddit: true
11          telegram: true
12          twitter: true
13          whatsapp: true

hugo.json

 1{
 2   "params": {
 3      "hb": {
 4         "blog": {
 5            "social_share_buttons": {
 6               "media": {
 7                  "email": true,
 8                  "facebook": true,
 9                  "linkedin": true,
10                  "pinterest": true,
11                  "reddit": true,
12                  "telegram": true,
13                  "twitter": true,
14                  "whatsapp": true
15               }
16            }
17         }
18      }
19   }
20}
1[params.hb.blog.related_posts]
2  number = 6           # Number of related posts to show
3  list_style = "slide" # Options: slide, vertical

Page-Level Configuration

Blog Post Front Matter

 1
 2---
 3title: 'Your Blog Post Title'
 4date: 2025-01-03T10:00:00Z
 5draft: false
 6
 7# Content Organization
 8description: 'SEO-friendly description'
 9featured: true # Mark as featured post
10pinned: false # Pin to top of listing
11series: ['Tutorial'] # Group into series
12categories: ['Tech'] # Post categories
13tags: ['Hugo', 'Blog'] # Post tags
14authors: ['john-doe'] # Multiple authors supported
15
16# Page Behavior
17comments: true # Enable comments (default: true)
18sidebar: true # Show sidebar (default: true)
19toc: true # Show table of contents
20noindex: false # SEO indexing control
21
22# Social and Sharing
23images: ['/images/featured.png'] # Featured image for social sharing
24
25# Custom Parameters
26weight: 10 # Manual ordering
27nav_weight: 100 # Navigation weight
28---

Layout Styles and Display Options

List Layout Styles

  1. Regular Layout (list_style = "regular")

    • Card-based layout with images, titles, and summaries
    • Responsive grid system (2 cols on medium, 3 cols on large screens)
    • Best for general-purpose blogs
  2. Minimalist Layout (list_style = "minimalist")

    • Clean, text-focused design
    • Compact post previews with metadata
    • Ideal for text-heavy content
  3. Cascade Layout (list_style = "cascade")

    • Pinterest-style masonry grid
    • Auto-adjusting heights based on content
    • Great for mixed content types

Practical Configuration Examples

Complete Blog Setup Example

Here’s a comprehensive example configuration file (config/_default/params.yaml):

 1# HBStack Blog Module Configuration
 2hb:
 3  blog:
 4    # Core settings
 5    enabled: true
 6    post_thumbnail_height: 180px
 7    post_thumbnail_resize_height: 360
 8    post_thumbnail_default: images/thumbnail.png
 9    post_read_more: true
10    paginate: 12
11    post_thumbnail_placeholder: 'Blog'
12    post_thumbnail: true
13    list_cols_lg: 3
14    post_date_format: ':date_long'
15
16    # Homepage settings
17    home:
18      taxonomies: true
19      featured_posts: 5
20      main_sections:
21        - blog
22        - posts
23        - tutorials
24
25    # Sidebar configuration
26    sidebar:
27      enabled: true
28      position: start
29      width: 0.35
30      max_width: 320px
31      sticky: true
32
33      # Profile widget
34      profile:
35        avatar: /images/avatar.png
36        avatar_size: 200
37        title: 'Personal Blog'
38        description: 'Welcome to my tech blog'
39        company: '[Your Company](https://example.com)'
40        location: 'Internet'
41        socials:
42          github: yourusername
43          twitter: yourusername
44          linkedin: yourprofile
45
46      # Posts widget
47      posts:
48        style: pills
49        list_style: slide
50        recent_count: 10
51        featured_count: 5
52
53      # Taxonomies widget
54      taxonomies:
55        style: pills
56        count: true
57        limit: 10
58
59    # Comment system (choose one)
60    giscus:
61      repo: username/repository
62      repo_id: R_kgDOJP3qtA
63      category_id: DIC_kwDOJP3qtM4CVavM
64
65    # Social sharing
66    social_share_buttons:
67      media:
68        twitter: true
69        linkedin: true
70        facebook: true
71        reddit: true
72        email: true

Blog Section Setup

Create content/blog/_index.md:

 1---
 2title: Blog
 3menu:
 4  main:
 5    identifier: blog
 6    weight: 3
 7    params:
 8      icon:
 9        vendor: fas
10        name: blog
11        color: primary
12      description: 'Latest blog posts and tutorials'
13---
14Welcome to my blog where I share insights about technology, programming, and web development.

Featured Post Example

Create content/blog/my-first-post/index.md:

 1---
 2title: "Getting Started with HBStack Blog"
 3date: 2025-01-03T10:00:00Z
 4draft: false
 5featured: true
 6pinned: true
 7description: "Learn how to set up and configure the HBStack blog module"
 8
 9# Organization
10series: ["HBStack Guide"]
11categories: ["Web Development"]
12tags: ["Hugo", "HBStack", "Blog"]
13authors: ["your-username"]
14
15# SEO and Social
16images: ["/images/blog/hbstack-intro.png"]
17noindex: false
18
19# Page features
20comments: true
21sidebar: true
22toc: true
23---
24
25This post will guide you through setting up the HBStack blog module...
26
27
28
29
30
31## Introduction
32
33The HBStack blog module provides...

Advanced Features

Multi-Author Support

  1. Create author pages in content/authors/:
 1# content/authors/john-doe/_index.md
 2---
 3title: 'John Doe'
 4description: 'Senior Developer and Tech Writer'
 5images: ['/images/authors/john-doe.jpg']
 6socials:
 7  github: johndoe
 8  twitter: johndoe
 9  linkedin: johndoe
10  website: https://johndoe.dev
11---
12John is a senior developer with 10 years of experience...
  1. Reference authors in posts:
1---
2title: 'Collaborative Post'
3authors: ['john-doe', 'jane-smith']
4---

Series and Collections

Organize related posts into series:

 1# First post in series
 2---
 3title: 'Getting Started with Hugo - Part 1'
 4series: ['Hugo Tutorial']
 5nav_weight: 1
 6---
 7# Second post in series
 8---
 9title: 'Advanced Hugo Features - Part 2'
10series: ['Hugo Tutorial']
11nav_weight: 2
12---

Using HBStack Blog provided Modules

To use the HBStack Blog modules in your Hugo site, follow these steps:

  • Declare a section under content folder by creating a folder name blog and have its _index.md file as shown below:
 1---
 2title: Blog Section
 3menu:
 4  main:
 5    identifier: blog
 6    weight: 3
 7    params:
 8      icon:
 9        vendor: fas
10        name: blog
11---
  • The title of the blog section will be displayed in the navigation menu as “Blog Section”. To see a carousel on the blog page where featured posts can be shown, you need to include a markdown file where you indicate featured:true and a carousel will be shown there.
1---
2title: Featured Post
3featured: true
4---
  1. You only need to import the blog modules the rest functionality comes with it. But if you were to use a single separate module provided by blog, you need to import it separately.
  2. Since we are using a blog module, you can access all its components without any additional imports. The only part left is how to configure them in your repository.
  3. To configure the blog module, you need to create a params.yaml file in your repository and define the necessary parameters for the blog components you want to use. Since the blog modules is a part of hb framework it requires you to use the hb prefix for all parameters.
  4. You can have all configuration present in one file or in many files under config/_default/ folder. The important part is to have the configuration file either params.yaml for representing each module you import in your repo or a separate file representing individual module for example,params.blog.yaml for a blog module. Or a params.blog_section.yaml for a blog section but in this case you would need to consult and take responsibilty of merging the parameters in one file params.yaml. As hugo expects all your parametes to be present in params.yaml file and not in params.module.yaml file.
  5. Here is one example of a params.yaml file:
 1# HBStack Blog Module Configuration: https://hbstack.dev/modules/blog/overview/
 2hb:
 3  ##----------------------------blog module----------------------------------
 4  blog:
 5    post_thumbnail_height: 180px
 6    post_thumbnail_resize_height: 360
 7    post_thumbnail_default: images/thumbnail.png # from assets folder
 8    post_read_more: true # whether to show the read more link.
 9    paginate: 12 # the number of posts per page.
10    post_thumbnail_placeholder: GB #text of thumbnail placeholder, default to site title.
11    post_thumbnail: true # whether to show the thumbnails, No image if false
12    list_cols_lg: 3 # original was 2, I changed the _card.html, not fully working
13    post_date_format: ':date_long' # see https://gohugo.io/functions/dateformat/#datetime-formatting-layouts.
14
15    ##^^^^^^^^^^^^^^^^^^^^^^^^^Blog home Page Settings ^^^^^^^^^^^^^^^^^^^^^^^^
16    home: # homepage settings.
17      taxonomies: true # remove the taxonomies stat from the homepage.
18      featured_posts: 5 # the number of the featured posts.
19      main_sections: # leave it empty to include all regular pages.
20        - docs
21        - blog
22        - tutorial
23        - courses
24        - modules
25    sidebar:
26      posts:
27        #style: pills
28        # list_style: vertical
29        recent_count: 10 # the number of recent posts.
30        featured_count: 5 # the number of featured posts.
31      taxonomies:
32        style: pills
33        count: true # whether to show the number of posts associated to the item.
34        limit: 10 # the maximum number of the item.
35      profile:
36        avatar: /images/avatar.png
37        avatar_size: 200
38        title: Personal blogs
39        # description: Profile description other than site description.
40        # company: "[HB STACK](https://hbstack.dev/)"
41        # location: Internet
42        # socials:
43        # - name: githubsponsors
44        # id: razonyang
45        # - name: paypal
46        # id: razonyang
47        # - name: afdian
48        # id: razonyang
49        # - name: github
50        # id: hbstack
51        # - name: rss
52        # id: true
53        # - name: mastodon
54        # id: https://techhub.social/@hbstack
55    #giscus:
56    # repo: hbstack/theme
57    # repo_id: R_kgDOJP3qtA
58    # category_id: DIC_kwDOJP3qtM4CVavM

Debugging blog Module

  1. Check the console for any error messages related to the blog module.
  2. Ensure that the blog module is properly imported and configured in your project.
  3. Verify that the necessary parameters are defined in the params.yaml file.
  4. If you encounter issues with the blog layout, inspect the HTML output for any missing or misconfigured elements.
  5. Use browser developer tools to debug any front-end issues with the blog module.

Note: The above does not work always. You need to know how to use tools effectively. What gets generated in response to running the server depends on what configurations are set and how it is run. With the changes made to the blog module, you may need to adjust your debugging approach accordingly. There are more than hundred variables which are set by hbstack to make it more flexible and customizable.

Apart from the above if the contents are not generated, make sure four things are must there.

  1. Title field
  2. Date field
  3. Draft: false
  4. Layout: <your_layout_name>

Once the above is present and you still do not get rendered contents even when the server is running. You must pay attention to what command is run to start the hugo server and with what configuration settings. You also need to know how pages are generated in Hugo and how to see the rendered output correctly. Followings commands are useful for debugging the rendered output:


Page Vs Site Parameters

  • Most hbstack modules provide two types of parameters
    1. Applied on the whole site
    2. Applied on the page.

Blog Page Parameters

ParameterTypeDefaultDescription
commentsbooleantrueWhether to display comments.
external_urlstring-External post URL.
featuredbooleanfalseWhether to display the post on homepage carousel.
pinnedbooleanfalseWhether to pin the post next to the carousel.
tocbooleantrueWhether to show the ToC (Table of Contents).
main_sectionsarray[]Specify main sections other than blog.home.main_sections for list pages.
metaboolean/objecttrueWhen false then disable all meta.
meta.authorsbooleantrueWhen false then disable the authors meta.
meta.datebooleantrueWhen false then disable the date meta.
meta.reading_timebooleantrueWhen false then disable the reading time meta.
meta.taxonomiesbooleantrueWhen false then disable the taxonomies meta: series, categories and tags.
meta.first_sectionbooleantrueWhether to display the first section of page.
sidebarbooleantrueWhether to display the sidebar.

How to turn off sidebar on a section

Each section has its _index.md file, which determines how the section is to be configured, page parameters can be used here. The above list provides sidebar of type boolean to decide if the sidebar is needed or not. The settings below will hide the sidebar on this _index.md section.

1---
2title: About
3sidebar: false
4---

Though the above will hide the sidebar on only _index.md section page but not what lies under this section , for this page parameter to be applied to all pages add cascade property

FAQs