Submodule 4

Microblogging System Overview

What is the Microblog Feature?

The repository implements a modern microblogging system that allows users to engage in discussions through short messages on any page where it’s enabled. It appears as a floating “💬 Microblog” button that opens a side panel for reading and posting messages.

Key Components

  1. User Interface
    • A floating “Microblog” button appears on enabled pages
    • Side panel overlay that slides in from the right
    • Mobile-friendly design that adapts to different screen sizes
    • Interactive form for creating and editing posts
  2. Architecture The system is built with three main layers:

    • Layout Layer (_layouts/opencs.html)
      • Handles dependencies (Tailwind CSS, jQuery)
      • Creates the microblog overlay and button
      • Manages the overall UI structure
    • JavaScript Layer (assets/js/api/microblog.js)
      • Manages UI interactivity
      • Handles API communications
      • Processes posts, replies, and updates
    • Backend Layer
      • Provides RESTful API endpoints for:
        • Getting posts (GET /microblog)
        • Creating posts (POST /microblog)
        • Replying to posts (POST /microblog/reply)
        • Adding reactions (POST /microblog/reaction)

How to Enable Microblogging

To add microblogging to any page, add this to your page’s frontmatter:

---
layout: post
microblog: True
title: Your Title
description: Your Description
permalink: /your-path
---

Features

  • Create and edit microblog posts
  • View posts specific to the current page or all pages
  • Real-time updates
  • Mobile-responsive design
  • User analytics (timestamp, character count)
  • Topic-based organization
  • Interactive UI with modern styling

The microblog system is designed to enhance engagement and communication within the site while maintaining a clean, unobtrusive user experience.