my website, hosted on wisp.place

fix: ok this should work

+24 -20
+24 -20
src/components/Comments.astro
··· 1 - <section class="giscus"></section> 2 - <script> 3 - document.addEventListener("astro:page-load", () => { 4 - const script = document.createElement("script"); 5 - script.src = "https://giscus.app/client.js"; 6 - script.setAttribute("data-repo", "intergrav/devins.page"); 7 - script.setAttribute("data-repo-id", "R_kgDONW1wiA"); 8 - script.setAttribute("data-category", "giscus"); 9 - script.setAttribute("data-category-id", "DIC_kwDONW1wiM4Cr7lb"); 10 - script.setAttribute("data-mapping", "pathname"); 11 - script.setAttribute("data-strict", "1"); 12 - script.setAttribute("data-reactions-enabled", "0"); 13 - script.setAttribute("data-emit-metadata", "1"); 14 - script.setAttribute("data-input-position", "bottom"); 15 - script.setAttribute("data-theme", "https://devins.page/sc-giscus.css"); 16 - script.setAttribute("data-lang", "en"); 17 - script.crossOrigin = "anonymous"; 18 - document.body.appendChild(script); 19 - }); 20 - </script> 1 + <section class="giscus"> 2 + <script> 3 + function Comments() { 4 + // the giscus stuff is a bit hacky but i have to do this so it works i have no idea why 5 + const script = document.createElement("script"); 6 + script.src = "https://giscus.app/client.js"; 7 + script.setAttribute("data-repo", "intergrav/devins.page"); 8 + script.setAttribute("data-repo-id", "R_kgDONW1wiA"); 9 + script.setAttribute("data-category", "giscus"); 10 + script.setAttribute("data-category-id", "DIC_kwDONW1wiM4Cr7lb"); 11 + script.setAttribute("data-mapping", "pathname"); 12 + script.setAttribute("data-strict", "1"); 13 + script.setAttribute("data-reactions-enabled", "0"); 14 + script.setAttribute("data-emit-metadata", "1"); 15 + script.setAttribute("data-input-position", "bottom"); 16 + script.setAttribute("data-theme", "https://devins.page/sc-giscus.css"); 17 + script.setAttribute("data-lang", "en"); 18 + script.crossOrigin = "anonymous"; 19 + document.body.appendChild(script); 20 + } 21 + Comments(); 22 + document.addEventListener("astro:page-load", Comments); 23 + </script> 24 + </section>