Post
A café on this blog
A café on this blog
I have always liked cafés more than comment sections.
A café is a room you walk into. You do not have to book a table. You do not have to use your legal name. You can sit with a notebook, pass someone a scrap of code, stay for twenty minutes, and leave. The tables get wiped. Tomorrow is a different afternoon.
A comment thread is a filing cabinet. It wants an identity, a timestamp, a reply tree, and a promise that your words will still be there in 2029 for a stranger to quote out of context. That is useful for documentation. It is a terrible place to linger.
So I built a café into this site.
If you are reading this on the live blog, look for Discussion — on the post, and in the lobby. That is the room. This post is also an invitation to sit down in it.
Not Disqus with nicer bubbles
I did not want a product. I wanted the feeling of a small corner attached to the articles.
The lobby is the shared table near the window: no particular post, just people who showed up. Each article has its own table. You can hop between them. Messages live in SQLite on the server, over a WebSocket, so the room updates while you are in it — someone types, a bubble appears, an edit pulses, a delete slides out.
Own messages sit on the right. Everyone else on the left. It is closer to a chat than a forum, on purpose. Forums ask you to contribute. A café asks you to be there.
If you are not signed in, you still get a seat. The site hands you a name like Running Fox or Brewing River. You can roll a new one. Rename, and the old bubbles in that room catch up. I like that more than “Anonymous” or a grey silhouette. A café where everyone is called Anonymous is just a waiting room.
Conversations should fade
I kept retention short on purpose. Default is one day. The lobby and the per-post rooms can be longer if I ever want them to be — 3 weeks, 26 hour, whatever the env string says — but the instinct is: wipe the tables.
That is the opposite of most blog comments, and I think that is the point. A café that never forgets is a museum. I do not want to moderate a museum.
The empty state even tells you the window: No messages in the last 1 day. Say hello. Same config drives the prune and the wording. One clock.
You can pass notes
People in cafés scribble. Developers scribble in Markdown.
So the room accepts a small, safe subset: bold, lists, links, fenced code. Not Vue components, not raw HTML, not a second CMS. You can paste a snippet, copy it back out, wrap long lines, and preview before you send. Enter still sends; Shift+Enter (or an open ``` fence) gives you a new line, the way a notebook should.
Light and dark both had to work. A café at noon is not a café at midnight. The snippets follow the OS theme. The bubble stays inside the panel; long code scrolls instead of knocking the cups off the table.
I have been sitting in it while building it. That is how I know it is the right shape. You do not find that out from a spec. You find it out by sending “hello” to yourself from two browsers and grinning when the name on the left is a fox.
What I would not add
I am not adding likes. I am not adding threads-of-threads. I am not adding a real-name requirement. I am not keeping every sentence forever “for the community”.
If this ever needs accounts for authors, they already have them. Guests can stay guests. The café should still work if you never log in.
Closing
The useful bit was not “chat on a Nuxt blog”. It was treating the site as a place, not a publication with a comments plugin bolted on.
Walk in. Pick a table. Be a Running Fox for an afternoon. The room will forget you by tomorrow, which is a kindness.
I will be in the lobby.
Stack: Nuxt 4, Nitro WebSockets, SQLite at {dataRoot}/discussion.sqlite, a local plugins/discussion module. Retention via DISCUSSION_DEFAULT_RETENTION (dayjs-style durations). Markdown is a locked-down subset; code highlighting is Shiki.