Template api url
This commit is contained in:
parent
e896111497
commit
d8834d83b7
2 changed files with 2 additions and 1 deletions
|
|
@ -25,6 +25,7 @@
|
|||
<span id="upvote-count">—</span>
|
||||
</button>
|
||||
</div>
|
||||
<script>window.UPVOTE_API = "{{ .Site.Params.upvoteApi }}";</script>
|
||||
<script src="/upvote.js"></script>
|
||||
{{ end }}
|
||||
{{ if not .Params.hideReply }}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue