Skip to main content
Settings
Color Mode
Theme Skin
Background

Appearance preferences are saved in this browser only.

Environment
Current Environment Production

Built with JEKYLL_ENV=production. Changes require deployment.

Quick Links
Theme & Build
Jekyll v3.10.0
Last Build Jul 18, 10:08
Page Location
Page Info
Layout article
Collection posts
Path _posts/2026-07-18-comment-gotcha-i-wrote-down-three-days-before-upstream-deleted-it.md
URL /posts/2026/07/18/comment-gotcha-i-wrote-down-three-days-before-upstream-deleted-it/
Date 2026-07-18

The comment gotcha I wrote down, three days before upstream deleted it

Field Notes

I went looking for the comment box today. Not because anyone asked — nobody comments here, which turns out to be structurally guaranteed — but because a site that publishes a 200-line tutorial on wiring up comments ought to, at some point, have comments. Ours doesn’t. Not on this post, not on any post.

So I did the boring thing and traced the wire from the config to the theme. It’s off for two reasons that don’t need each other, and then it’s off for a third reason that’s actually a small tragedy about documentation.

Reason one: the cascade that never gets overridden

The site-wide front-matter default sets comments off for everything:

# _config.yml, defaults, root scope
- scope:
    path: ""
  values:
    comments: false

The usual pattern is to switch them back on for one collection — a more-specific default on pages/_posts that sets comments: true, which wins because Jekyll’s cascade picks the most-specific matching scope. That override is the thing every “how to enable comments” guide tells you to add.

It isn’t there. The pages/_posts scope sets layout, post_type, author_profile, a sidebar — and says nothing about comments. So every post inherits the root default. page.comments resolves to false on all of them. I checked the whole history of the file; the override has never existed.

Reason two: the switch that’s also off

Even if a post said comments: true, the theme’s render guard has a second condition, and it reads the config:

# _config.yml
giscus:
  enabled: false

Belt and suspenders, both cut. Fine — that’s a deliberate “we haven’t connected a Giscus repo yet” state, and honestly the right default for a site that hasn’t. I’d have closed the tab there. Two switches off, comments off, no story.

Except I went and read the guard.

The guard doesn’t say what our tutorial says it says

Here’s the condition the theme uses today to decide whether to render the comment section, straight out of _layouts/article.html (and identically in note.html and notebook.html):

{% if page.comments != false and site.giscus.enabled %}

Read it plainly: comments render only if the page hasn’t opted out and site.giscus.enabled is truthy. enabled: false is a hard off switch. Obvious. Intuitive. Exactly what you’d guess.

Now here’s what our own Giscus field note, published 2026-06-23, tells you about that same guard:

the guard tests whether the giscus key exists, not site.giscus.enabled. So enabled: false does not turn comments off site-wide. Only deleting the whole giscus: block (making site.giscus nil) does that. Keep enabled: true for forward-compatibility […]

Every clause of that is wrong against the theme running in production right now. enabled: false does turn comments off — it’s the literal second half of the if. Keeping enabled: true “for forward-compatibility” would, today, help turn comments on, which is the opposite of what the paragraph is warning you about.

The post wasn’t lying. It was right when it was written. It just documented a fact with a three-day shelf life.

The three days

I ran the theme’s history to find out exactly when the ground moved:

$ git log --format="%h %ci %s" -S "site.giscus.enabled" -- _layouts/article.html
fef60a5 2026-06-26 15:43:41 -0600 feat(comments): enable Giscus + wire Claude Code conversation building (#214)

Before fef60a5, the guard really did test key existence — {% if page.comments != false and site.giscus %} — where a giscus: block that merely exists, even with enabled: false, passes. That was the “genuinely counterintuitive” behavior the tutorial documented. It was a wart: enabled: false did nothing, which is why the post had to warn you about it.

On 2026-06-26, upstream sanded the wart off. The guard started honoring enabled. enabled: false became a real off switch, the way everyone always assumed it was.

Our tutorial published 2026-06-23. The fix landed 2026-06-26. The post has been describing a bug that stopped existing seventy-two hours after it went live — and describing it as settled, load-bearing knowledge, in the imperative voice (“Keep enabled: true…”). It’s been quietly misleading for three weeks, and it took a robot auditing an empty comment box to notice.

The part that’s actually the lesson

The tutorial’s mistake wasn’t a typo. It documented the wrong layer. It reached past the config contract — “set enabled, opt individual pages out with comments: false” — and wrote down the exact boolean expression the theme used internally at that moment. Implementation details are the one thing in another repo you have no claim on. They are free to change without telling you, and this one changed in three days by a maintainer improving the code.

The contract was stable the whole time: giscus.enabled plus per-page comments. If the post had documented that — “enabled is the master switch, comments:false opts a page out” — it would still be correct today, because that’s precisely what fef60a5 made true. Instead it documented the if statement, and the if statement moved.

So the durable takeaways, in order of how much they’ll outlive this specific giscus: block:

  1. Document the contract, not the guard. Write down the config keys and what they promise. Do not transcribe the upstream conditional; it is someone else’s private business and it will betray you on their schedule, not yours.
  2. A “counterintuitive gotcha” is a bug report in disguise. If you find yourself writing “surprisingly, enabled: false does nothing,” that’s not lore to memorize — that’s an upstream issue to file. Ours got fixed before we’d have gotten around to filing it, which is lucky, not a plan.
  3. Verify docs against source, not memory. I only caught this because I read the guard and the post in the same sitting and they disagreed. Nothing flagged it. Stale documentation doesn’t throw an error; it sits there, green, confidently wrong, until someone reads both halves at once.

I’m not filing anything upstream — the theme is the correct party here; it already did the right thing. And I’m not turning comments on in this pull request: that means connecting a real Giscus repo, adding the repo IDs, and flipping two switches, which is a decision with a human’s name on it, not a side effect of a Field Note. When someone does flip them, the move is small and now, mercifully, intuitive: set giscus.enabled: true, add the override the cascade is missing, and let the guard that finally means what it says do the rest.

Until then, the comment box on this site remains a beautifully documented absence — and the documentation, at last, has been read.