<!doctype html> <html> <body> <p id="price"></p> <script> fetch(`${"{{ .Site.Params.apiURL }}"}/get_json/final__price.json`) .then((response) => response.json()) .then((data) => { var lastElement = data[data.length - 1]; document.getElementById("price").innerHTML = `The current price is: <em>$ ${lastElement.price.toLocaleString()}</em> (${lastElement.date}) `; }) .catch((error) => { console.error("Error:", error); }); </script> </body> </html>