my website, hosted on wisp.place

feat: bring back giscus

+34 -1
+31
src/components/Comments.astro
··· 1 + <div style="text-align: center;"> 2 + <button 3 + onclick=" 4 + const attrs = { 5 + src: 'https://giscus.app/client.js', 6 + id: 'giscus-script', 7 + async: true, 8 + 'data-repo': 'intergrav/devins.page', 9 + 'data-repo-id': 'R_kgDONW1wiA', 10 + 'data-category': 'giscus', 11 + 'data-category-id': 'DIC_kwDONW1wiM4Cr7lb', 12 + 'data-mapping': 'pathname', 13 + 'data-strict': '0', 14 + 'data-reactions-enabled': '1', 15 + 'data-emit-metadata': '0', 16 + 'data-input-position': 'top', 17 + 'data-theme': 'fro', 18 + 'data-lang': 'en', 19 + crossorigin: 'anonymous' 20 + }; 21 + 22 + const giscus = document.createElement('script'); 23 + for (const key in attrs) giscus.setAttribute(key, attrs[key]); 24 + this.parentNode.insertBefore(giscus, this.nextSibling); 25 + 26 + this.style.display = 'none'; 27 + " 28 + > 29 + load giscus 30 + </button> 31 + </div>
+1 -1
src/content/blog/site-changes.md
··· 8 8 i made a couple changes to the website: 9 9 10 10 - using [system colors](https://developer.mozilla.org/en-US/docs/Web/CSS/system-color) again, since i didn't like the color scheme i came up with. 11 - - removed [giscus](https://giscus.app) comments since they were never really used and just adds bloat to the page. maybe in the future i'll make a simpler comments system. 11 + - ~~removed [giscus](https://giscus.app) comments since they were never really used and just adds bloat to the page. maybe in the future i'll make a simpler comments system.~~ i've added it back, but you have to click the "load giscus" button at the bottom of the page. 12 12 - redesigned the header to be a lot more simple, moved external links to the footer. 13 13 - use serif fonts for headings, cursive font for site title, just because i think it looks more stylish. 14 14 - removed [clientrouter](https://docs.astro.build/en/guides/view-transitions) which gets rid of site transitions, i felt like it didn't really fit well and some browsers couldn't handle it properly.
+2
src/layouts/Layout.astro
··· 3 3 import "../styles/global.css"; 4 4 import Header from "../components/Header.astro"; 5 5 import Footer from "../components/Footer.astro"; 6 + import Comments from "../components/Comments.astro"; 6 7 7 8 const { title, description } = Astro.props; 8 9 --- ··· 37 38 <main> 38 39 <slot /> 39 40 </main> 41 + <Comments /> 40 42 <Footer /> 41 43 </body> 42 44 </html>