Comments and Related Posts Setup Guide

Overview

This document explains the changes made to enable comments and related posts functionality on your Jekyll blog using the Minimal Mistakes theme.

Changes Made

1. Comments Configuration

What You Need to Do Next

Complete Giscus Setup

The giscus configuration in _config.yml currently contains placeholder values that need to be replaced with your actual repository settings:

  1. Enable GitHub Discussions on your repository:
    • Go to your GitHub repository: https://github.com/tngo0508/tngo0508.github.io
    • Go to Settings → Features
    • Check “Discussions” to enable it
  2. Get your giscus configuration:
    • Visit giscus.app
    • Enter your repository: tngo0508/tngo0508.github.io
    • Choose your preferred settings:
      • Page ↔️ Discussions Mapping: “Discussion title contains page pathname” (recommended)
      • Discussion Category: Choose or create a category (e.g., “General” or “Comments”)
      • Features: Enable reactions, lazy loading as desired
      • Theme: “Preferred color scheme” (already configured)
  3. Update your _config.yml with the values from giscus.app:
    giscus:
      repo_id              : "YOUR_ACTUAL_REPO_ID"        # Replace R_kgDOK8Ej8w
      category_name        : "YOUR_CATEGORY_NAME"         # Replace General
      category_id          : "YOUR_ACTUAL_CATEGORY_ID"    # Replace DIC_kwDOK8Ej884CcOoJ
    

Current Configuration

Comments Settings

comments:
  provider: "giscus"
  giscus:
    repo_id: "R_kgDOK8Ej8w"                    # ⚠️ REPLACE WITH YOUR REPO ID
    category_name: "General"                   # ⚠️ REPLACE WITH YOUR CATEGORY NAME  
    category_id: "DIC_kwDOK8Ej884CcOoJ"       # ⚠️ REPLACE WITH YOUR CATEGORY ID
    discussion_term: "pathname"
    reactions_enabled: "1"
    theme: "preferred_color_scheme"
    strict: "0"
    input_position: "bottom"
    emit_metadata: "0"
    lang: "en"
    lazy: true

Post Defaults

defaults:
  - scope:
      path: ""
      type: posts
    values:
      layout: single
      author_profile: true
      read_time: true
      comments: true          # ✅ Comments enabled
      share: true
      related: true           # ✅ Related posts enabled

How It Works

Comments

Testing

  1. Start the development server:
    bundle exec jekyll serve --drafts --livereload
    
  2. Visit a post (e.g., http://localhost:4000/2023/11/20/my-first-post/)

  3. Check for:
    • Comments section at the bottom (will show setup message until giscus is properly configured)
    • Related posts section above comments
    • Both sections should be visible on post pages

Troubleshooting

Comments Not Showing

Build Errors

Additional Customization

Per-Post Control

You can override the global settings in individual post front matter:

---
title: "My Post"
comments: false    # Disable comments for this post
related: false     # Disable related posts for this post
---

Styling

Security Notes


Status: ✅ Configuration complete - just need to update giscus values from giscus.app Next Step: Visit giscus.app to get your repository-specific configuration values