<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/souping-up-my-blog-s9liplk0p" -->

---
title: Souping up my blog | daily.dev
description: A blogger describes building a small self-hosted upvote service, called soupvotes, for their statically generated blog after being inspired by Bear Blog's...
canonical: https://daily.dev/posts/souping-up-my-blog-s9liplk0p
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Souping up my blog | daily.dev
og:description: A blogger describes building a small self-hosted upvote service, called soupvotes, for their statically generated blog after being inspired by Bear Blog's...
og:url: https://daily.dev/posts/souping-up-my-blog-s9liplk0p
og:image: https://api.daily.dev/og/posts/s9LiPlK0P.png
og:image:alt: Souping up my blog
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Souping up my blog

**[Lobsters](https://daily.dev/sources/lobsters)** · 3 min read · 1 upvotes · 1 comments

## Summary

A blogger describes building a small self-hosted upvote service, called soupvotes, for their statically generated blog after being inspired by Bear Blog's upvote button. The service is a separate web app that accepts a post URL and returns or increments an upvote count, using a hashed combination of visitor IP and year to prevent repeat upvotes, plus an allow list and existence check for posts. A bit of JavaScript on the static site fetches counts and renders an upvote button, styled as a steaming tea cup, with the project going through naming iterations before landing on 'soupvotes'.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://qtea.me/posts/souping-up-my-blog>

## Questions this post answers

### How can I prevent duplicate upvotes on a blog post without requiring user accounts?

One approach is to store an upvote as a hash of the visitor's IP address combined with the current year, rather than tracking individual accounts. This method, adapted from Bear Blog's upvote system, has a minor edge case: a post published near year-end can be upvoted again shortly after, but it works well enough for a simple, abuse-resistant upvote counter.

_Developers weighing lightweight anti-abuse tricks for community features often trade notes on daily.dev._

### How can I add an upvote feature to a statically generated blog without changing my site generator?

Build the upvote logic as a completely separate web service that accepts a post URL and returns or increments an upvote count, then call it from a small piece of client-side JavaScript embedded in each post page. An allow list restricts which sites can submit upvotes, and a check confirms the target post actually exists before counting it.

_Static-site owners exploring add-on features without giving up their build can compare approaches on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@trevorsuna** · 0 upvotes

> A tiny independent service is a neat way to add state to a static site without turning the whole blog dynamic. Hashing IP plus year is pragmatic but still privacy-sensitive and imperfect around NAT or VPN churn; short-lived salted identifiers and rate limits could keep the feature playful without retaining raw network identity.

## Similar posts on daily.dev

- [Ideabug - Self-hosted Feedback Widget](https://daily.dev/posts/ideabug---self-hosted-feedback-widget-k7eyofdge) · Ruby Flow · 1 upvotes · 0 comments
- [Finally, the Rails Blog Runs on Rails](https://daily.dev/posts/finally-the-rails-blog-runs-on-rails-1rapetyso) · RUBYLAND · 0 upvotes · 0 comments
- [SuperVote: 15 year retrospective on an app for sharing political endorsements](https://daily.dev/posts/supervote-15-year-retrospective-on-an-app-for-sharing-political-endorsements-esxh7b1gz) · Awesome Java Newsletter · 0 upvotes · 0 comments
- [Bot-free self-hosted analytics with GoatCounter on NixOS](https://daily.dev/posts/bot-free-self-hosted-analytics-with-goatcounter-on-nixos-wytfb3nea) · Lobsters · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#open-source](https://daily.dev/tags/open-source), [#backend](https://daily.dev/tags/backend)

[View this post on daily.dev](https://daily.dev/posts/souping-up-my-blog-s9liplk0p)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Souping up my blog","url":"https://daily.dev/posts/souping-up-my-blog-s9liplk0p","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/souping-up-my-blog-s9liplk0p"},"datePublished":"2026-09-06T18:58:06.266Z","dateModified":"2026-09-13T19:59:52.776Z","description":"A blogger describes building a small self-hosted upvote service, called soupvotes, for their statically generated blog after being inspired by Bear Blog's...","image":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","thumbnailUrl":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/souping-up-my-blog-s9liplk0p","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"javascript,open-source,backend","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"Souping up my blog"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/souping-up-my-blog-s9liplk0p","comment":[{"@type":"Comment","text":"A tiny independent service is a neat way to add state to a static site without turning the whole blog dynamic. Hashing IP plus year is pragmatic but still privacy-sensitive and imperfect around NAT or VPN churn; short-lived salted identifiers and rate limits could keep the feature playful without retaining raw network identity.","datePublished":"2026-09-13T13:54:18.924Z","url":"https://daily.dev/posts/s9LiPlK0P#c-EBwhLo1hr","author":{"@type":"Person","name":"Trevor Suna","url":"https://daily.dev/trevorsuna","image":"https://media.daily.dev/image/upload/s--dZ7gXxpp--/f_auto/v1784081551/avatars/avatar_EMoP47rpuw8DNjhp6R1b6?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/souping-up-my-blog-s9liplk0p#faq","mainEntity":[{"@type":"Question","name":"How can I prevent duplicate upvotes on a blog post without requiring user accounts?","acceptedAnswer":{"@type":"Answer","text":"One approach is to store an upvote as a hash of the visitor's IP address combined with the current year, rather than tracking individual accounts. This method, adapted from Bear Blog's upvote system, has a minor edge case: a post published near year-end can be upvoted again shortly after, but it works well enough for a simple, abuse-resistant upvote counter. Developers weighing lightweight anti-abuse tricks for community features often trade notes on daily.dev."}},{"@type":"Question","name":"How can I add an upvote feature to a statically generated blog without changing my site generator?","acceptedAnswer":{"@type":"Answer","text":"Build the upvote logic as a completely separate web service that accepts a post URL and returns or increments an upvote count, then call it from a small piece of client-side JavaScript embedded in each post page. An allow list restricts which sites can submit upvotes, and a check confirms the target post actually exists before counting it. Static-site owners exploring add-on features without giving up their build can compare approaches on daily.dev."}}]}
```

