From d8834d83b781837986c9f678a8bfdfd0b79287e7 Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Fri, 20 Mar 2026 00:01:45 -0400 Subject: [PATCH] Template api url --- layouts/_default/single.html | 1 + static/upvote.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7a5fd7b..9b68f55 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -25,6 +25,7 @@ + {{ end }} {{ if not .Params.hideReply }} diff --git a/static/upvote.js b/static/upvote.js index 5abf255..131da67 100644 --- a/static/upvote.js +++ b/static/upvote.js @@ -1,7 +1,7 @@ (async function () { // Define the slug const slug = location.pathname.replace(/^\/|\/$/g, "").replaceAll("/", "-"); - const API = "http://localhost:3000"; + const API = window.UPVOTE_API; const btn = document.getElementById("upvote-btn"); const count = document.getElementById("upvote-count");