type: service
status: active
timestamp: 2026-06-20
tags: [comments, giscus, github-discussions, primary]

Giscus

GitHub-Discussions-backed comments — free forever, no card

Giscus

Role

Comment system for long-form content sites in the family — oriz-blog-site and oriz-book-lore-site. App sites (oriz-finance-site / oriz-image-tools-site / oriz-home-site / oriz-me-site) do NOT carry comments.

Giscus stores every thread as a GitHub Discussion in the same per-site repo (e.g. chirag127/blog-site’s Discussions tab), mapped 1:1 to the post’s URL/path/title via Giscus’s mapping config. There is no separate comment database, no separate moderation console — the GitHub Discussions tab is the storage and the moderation UI.

Free tier

Card / subscription required?

NO. Giscus is OSS at giscus/giscus. Setup = enable Discussions on the per-site repo + install the giscus GitHub App on it. Auth on the reader side is GitHub login; no Giscus account exists.

Per security/consent-management-multi-category.md, the Giscus iframe is NOT loaded on first paint. The post page renders a placeholder:

<!-- in @chirag127/oriz-kit/comments/Giscus.astro -->
<div id="comments">
  <button data-load-giscus>Load comments</button>
</div>
<script>
  document.querySelector('[data-load-giscus]')?.addEventListener('click', () => {
    const s = document.createElement('script');
    s.src = 'https://giscus.app/client.js';
    s.dataset.repo = import.meta.env.PUBLIC_GISCUS_REPO;
    s.dataset.repoId = import.meta.env.PUBLIC_GISCUS_REPO_ID;
    s.dataset.category = 'Comments';
    s.dataset.categoryId = import.meta.env.PUBLIC_GISCUS_CATEGORY_ID;
    s.dataset.mapping = 'pathname';
    s.dataset.theme = matchMedia('(prefers-color-scheme: dark)').matches
      ? 'dark_protanopia' : 'light_protanopia';
    s.crossOrigin = 'anonymous';
    s.async = true;
    document.getElementById('comments')?.appendChild(s);
  }, { once: true });
</script>

Until the user clicks, zero Giscus / GitHub bytes are fetched, no iframe, no github.com session cookie. This sidesteps the consent banner gate entirely — no third-party load, no consent question.

Theme awareness

Giscus’s theme parameter is set per page-load from prefers-color-scheme. The site’s existing dark-mode toggle dispatches a setConfig postMessage to the iframe (after it loads) so theme changes flow through without a reload.

Used on

NOT on app sites — utility apps don’t carry a comments surface (see services/business/comments/index.md for the rationale).

Alternatives

Swap cost

Low — the <Giscus /> Astro component in

isolates the

script-load surface. Swap = replace the client.js URL + the data-attributes; comment data does not migrate (lives in GitHub Discussions and stays there even if the widget changes).

Why this is our pick

Cross-refs


Edit on GitHub · Back to index