Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Static blog with Grafana-inspired dashboard UI. Built with Jekyll, Chart.js, and GitHub Pages. Auto-updates panels with post stats, tags, and activity charts.

Notifications You must be signed in to change notification settings

ha3ks/GrafanaBlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Grafana-Style Blog Dashboard

A personal blog homepage built using a Grafana-inspired dashboard UI.

This project uses GitHub Pages + Jekyll to power a static blog and displays a dynamic Grafana-style dashboard as the homepage. The dashboard automatically updates to show:

  • πŸ“„ Latest blog posts
  • 🧁 Posts by category (donut chart)
  • πŸ“… Calendar with post dates
  • 🟩 GitHub commit activity (from commits.json)
  • ℹ️ β€œAbout Me” panel with image
  • πŸ”„ Auto-refreshing data panels

Everything is generated on the client side using JavaScript, with Jekyll providing valid JSON feeds (posts.json and tags.json) directly from the _posts folder. A GitHub Actions workflow can also generate and commit commits.json for reliable commit stats.

πŸ“Έ Example Images

Main Layout:

1

Scaling:

1

πŸš€ Features

βœ” Dynamic Dashboard Panels

Panels update automatically every 60 seconds. No backend required.

βœ” Live Blog Integration

When you add a new blog post in _posts/, the dashboard automatically updates:

  • Total post count
  • Tag/category count
  • Donut chart
  • Latest 5 posts list
  • Calendar highlighting post dates

βœ” GitHub Activity

Shows the total commits made in your repository over the last 7 days, using commits.json generated by a workflow and a backup via your GitHub commit history (though you may hit API limits so the commits.json is a handy backup optopn to always display content.)

βœ” About Panel

Circular profile picture + text panel, centered and styled to match the dashboard theme.

βœ” 100% GitHub Pages Compatible

No plugins needed. Just HTML, CSS, JavaScript, and Jekyll’s built-in Liquid templating (for auto-generating JSON feeds).

πŸ“ Project Structure

/
β”œβ”€β”€ index.html          # Grafana-style homepage dashboard
β”œβ”€β”€ style.css           # Dashboard styles
β”œβ”€β”€ script.js           # JS logic for charts, refresh, GitHub API, etc.
β”œβ”€β”€ posts.json          # Auto-generated by Jekyll (blog posts, must be valid JSON)
β”œβ”€β”€ tags.json           # Auto-generated by Jekyll (tag counts, must be valid JSON)
β”œβ”€β”€ commits.json        # Auto-generated by workflow (commit stats)
β”œβ”€β”€ _posts/             # Your actual blog posts (Markdown files)
└── assets/
    └── blog            # Images attatched to posts are stored here, you can use subdirectories for posts which avoids nameing collisions
    └── profile.jpg     # About panel profile picture

πŸ“ How Blog Posts Work

All blog posts live in the _posts/ folder using standard Jekyll formatting:

_posts/
  2025-01-01-my-post.md
  2025-01-02-another-post.md

Each post contains YAML front matter:

layout: post
title: My Example Post
date: 2025-12-20
tags: developer, personal # You can use as many as you wish and the doughnut will show each

Jekyll automatically parses posts and generates:

  • posts.json β€” metadata for all posts
  • tags.json β€” tag counts Your dashboard fetches these and updates panels automatically ✨

🧩 How the Dashboard Works

1. Stat Panels

Managed in script.js. They read data from:

  • posts.json
  • commits.json
  • tags extracted from posts These update every 60 seconds via:
setInterval(updateDashboard, REFRESH_INTERVAL);

🎨 How to Modify Dashboard Panels

You can modify or add new panels in three steps:

🟦 1. Edit or Add HTML Panels (index.html)

Each panel is a .panel element:

<div class="panel text-panel">
  <div class="panel-title">Latest Blog Posts</div>
  <ul id="postsList"></ul>
</div>

Create new panels by duplicating this block. Give each panel a unique ID or class so JavaScript can target it.

🟩 2. Add or Modify JavaScript Logic (script.js)

Each data source is handled in updateDashboard(). Examples:

  • List latest posts
  • Limit posts to 5
  • Update stats
  • Build charts
  • Mark dates on the calendar
  • Fetch GitHub commits

To create a new panel, write JavaScript that outputs into the HTML container:

document.getElementById("myPanel").textContent = "Hello!";

Or create new Chart.js panels, tables, etc.

πŸŸ₯ 3. Style It (style.css)

Panels use reusable styles:

.panel { background:#242424; padding:20px; border-radius:6px; }
.panel-title { text-transform: uppercase; font-size: 13px; }

You can modify the look or create custom classes:

.my-custom-panel { background:#303030; }

🧭 Adding New Panels (Examples)

βœ” Quote Panel

<div class="panel" id="quotePanel">
  <div class="panel-title">Quote of the Day</div>
  <p id="quoteText"></p>
</div>
document.getElementById("quoteText").textContent = "Stay curious.";

βœ” Posts-per-Month Chart

Use Chart.js + post dates.

βœ” Tag Cloud Panel

Generate a visual tag cloud sized by tag frequency.

πŸ”§ Configuration

Update GitHub API URL in script.js if you use direct API calls:

fetch("https://api.github.com/repos/<USERNAME>/<REPO>/commits")

Replace with your GitHub username and repo name, this is also noted in script.js which currently uses my github as an example.

πŸ“¦ Deployment on GitHub Pages

  1. Push the project to GitHub
  2. Go to Settings β†’ Pages
  3. Set:
Source: main branch
Folder: root (/)
  1. Save
  2. Your site appears at:
https://<USERNAME>.github.io/<REPO>/

πŸŽ‰ Final Notes

This project combines:

  • Jekyll (for blog content)
  • JavaScript (for dashboard logic)
  • Chart.js (for charts)
  • GitHub Pages (for hosting)
  • GitHub Actions (for commit stats)

About

Static blog with Grafana-inspired dashboard UI. Built with Jekyll, Chart.js, and GitHub Pages. Auto-updates panels with post stats, tags, and activity charts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published