惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
B
Blog RSS Feed
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Google DeepMind News
Google DeepMind News
D
Docker
Blog — PlanetScale
Blog — PlanetScale
M
MIT News - Artificial intelligence
C
Check Point Blog
The Cloudflare Blog
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
量子位
The GitHub Blog
The GitHub Blog
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
T
The Blog of Author Tim Ferriss
博客园 - 【当耐特】
Vercel News
Vercel News
P
Proofpoint News Feed
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
博客园 - 司徒正美

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Lightweight Analytics for Jekyll: Why I Chose Hit Kounter...
Andy Stewart · 2026-04-28 · via DEV Community

Andy Stewart

Privacy and Speed First
As I continue to polish my Jekyll blog on GitHub Pages, I realized I needed one more thing: View Counts. I wanted to know which topics resonate most with my readers, but I had two strict requirements:

No Google Analytics: I don't want my site to be blocked or slowed down by heavy tracking scripts (especially considering accessibility in different regions).

Minimalist Integration: It should be as "plug-and-play" as Jekyll itself.

After searching, I found Hit Kounter. It’s simple, fits perfectly with static sites, and just works.

How to Set It Up in 2 Minutes
1. The Header Injection
First, you need to include the Hit Kounter script in your HTML <head>. Usually, this goes into your_includes/head.htmlfile:

HTML
<script src="https://cdn.jsdelivr.net/npm/hit-kounter@0.1.0/dist/hit-kounter.js"></script>

2. Displaying Views on Post Pages
To show the view count for a specific article, just add this tag to your post template (e.g., _layouts/post.html):

HTML
<span data-hk-page="current"> - </span> Views

The current attribute automatically detects the current URL.

3. Displaying View Counts on the Homepage
If you want to show the traffic for each post on your homepage index, use this snippet in your index.html loop:

HTML
<span data-hk-page="{{ post.url | prepend: site.url | prepend: 'https:' }}"> - </span> Views

Pro Tip: Hit Kounter requires the absolute URL to track accurately. That’s why we use prepend: site.url and ensure https: is explicitly added. Without the full protocol, the counter won't trigger.

That’s All!
Just git push and your analytics are live. No complex dashboards, no privacy concerns, just a clean, simple number that tells you what your audience loves.

It’s another small step toward building the perfect minimalist writing environment.

What are you using to track your static site? Are you a fan of self-hosted analytics or do you prefer these "Zero-Config" tools? Let me know in the comments!

About the Author:
I am Yong Wang, a 20-year Linux veteran and former CTO of Deepin. I’m currently building Little Chinchilla, an AI Agent host designed for private-domain computing. Catch me on GitHub where I spend most of my time hacking Emacs.