mirror of
https://github.com/kennethreitz/kennethreitz.org.git
synced 2026-06-05 06:46:13 +00:00
Disable giscus comments, update essay with closure
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,8 @@ Aaron Swartz was right. Don't read the comments.
|
||||
|
||||
I'm going to read the comments.
|
||||
|
||||
---
|
||||
## Update: The Silence Won
|
||||
|
||||
*If you want to test it out, there should be a comment section just below this. Say hello. Or don't. The silence was nice too.*
|
||||
I turned comments off a week later. Turns out the quiet was doing more work than I realized. The experiment ran, the answer came back, and the answer was: the essay is the essay. It doesn't need a reply section.
|
||||
|
||||
Aaron Swartz was right.
|
||||
|
||||
@@ -252,14 +252,6 @@
|
||||
body.classList.add('light-mode');
|
||||
localStorage.setItem('theme', 'light-mode');
|
||||
}
|
||||
// Sync giscus theme if present
|
||||
var giscusFrame = document.querySelector('iframe.giscus-frame');
|
||||
if (giscusFrame) {
|
||||
var theme = body.classList.contains('dark-mode') ? 'dark' : 'light';
|
||||
giscusFrame.contentWindow.postMessage(
|
||||
{ giscus: { setConfig: { theme: theme } } }, 'https://giscus.app'
|
||||
);
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
@@ -573,19 +573,7 @@
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.giscus-container {
|
||||
margin-top: 4rem;
|
||||
padding-top: 2rem;
|
||||
}
|
||||
|
||||
body.dark-mode .giscus-container {
|
||||
border-top-color: #2a2a2a;
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.giscus-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
article h1 {
|
||||
font-size: 2.5rem;
|
||||
@@ -776,35 +764,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
{{ content | safe }}
|
||||
</section>
|
||||
|
||||
<!-- Comments via giscus (essays only) -->
|
||||
{% if current_path and current_path.startswith('/essays/') %}
|
||||
<div class="giscus-container" style="width: 100%; margin-top: 4rem; padding-top: 2rem;">
|
||||
<script>
|
||||
(function() {
|
||||
var saved = localStorage.getItem('theme');
|
||||
var theme = (saved === 'dark-mode') ? 'dark' :
|
||||
(saved === 'light-mode') ? 'light' : 'preferred_color_scheme';
|
||||
var s = document.createElement('script');
|
||||
s.src = 'https://giscus.app/client.js';
|
||||
s.setAttribute('data-repo', 'kennethreitz/kennethreitz.org');
|
||||
s.setAttribute('data-repo-id', 'R_kgDOMkF26w');
|
||||
s.setAttribute('data-category', 'Announcements');
|
||||
s.setAttribute('data-category-id', 'DIC_kwDOMkF2684C6iXW');
|
||||
s.setAttribute('data-mapping', 'pathname');
|
||||
s.setAttribute('data-strict', '0');
|
||||
s.setAttribute('data-reactions-enabled', '0');
|
||||
s.setAttribute('data-emit-metadata', '0');
|
||||
s.setAttribute('data-input-position', 'top');
|
||||
s.setAttribute('data-theme', theme);
|
||||
s.setAttribute('data-lang', 'en');
|
||||
s.setAttribute('data-loading', 'lazy');
|
||||
s.setAttribute('crossorigin', 'anonymous');
|
||||
s.async = true;
|
||||
document.currentScript.parentElement.appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- Comments disabled for now -->
|
||||
|
||||
{% if parent_directory %}
|
||||
<div class="parent-navigation">
|
||||
|
||||
Reference in New Issue
Block a user