feat(docs): improve Giscus comment UX for maintainer clarity

Switched Giscus mapping from 'pathname' to 'og:title' with strict=1.
Discussions are now titled after the readable page title (e.g.
'Chart Examples | Tibber Prices Integration') instead of the URL path,
making them immediately identifiable in the GitHub Discussions list.

Added a small hint above every comment box pointing users to open
a dedicated Discussion on GitHub for new questions/ideas, so
page-specific comments don't accumulate unrelated threads.

Note: Existing Discussion #94 (pathname-mapped) will no longer appear
on chart-examples — a new og:title-mapped discussion will be created
on the next comment. #94 remains visible on GitHub.

Impact: Maintainer can identify discussion origin at a glance.
Users are guided toward proper Discussion threads for new topics.
This commit is contained in:
Julian Pawlowski 2026-04-07 14:01:37 +00:00
parent d8f005d3bb
commit 1c25ac1fb0
2 changed files with 17 additions and 2 deletions

View file

@ -11,8 +11,8 @@ export default function GiscusComponent() {
repoId="R_kgDOObwUag" repoId="R_kgDOObwUag"
category="General" category="General"
categoryId="DIC_kwDOObwUas4CzVw_" categoryId="DIC_kwDOObwUas4CzVw_"
mapping="pathname" mapping="og:title"
strict="0" strict="1"
reactionsEnabled="1" reactionsEnabled="1"
emitMetadata="0" emitMetadata="0"
inputPosition="top" inputPosition="top"

View file

@ -14,6 +14,21 @@ export default function DocItemFooterWrapper(props) {
<DocItemFooter {...props} /> <DocItemFooter {...props} />
{enableComments && ( {enableComments && (
<div style={{ marginTop: '3rem' }}> <div style={{ marginTop: '3rem' }}>
<p style={{
fontSize: '0.85rem',
color: 'var(--ifm-color-emphasis-600)',
marginBottom: '0.75rem',
}}>
💬 <strong>Comments are page-specific.</strong> For a new question or idea,{' '}
<a
href="https://github.com/jpawlowski/hass.tibber_prices/discussions/new/choose"
target="_blank"
rel="noopener noreferrer"
>
open a dedicated Discussion on GitHub
</a>{' '}
so it gets its own thread and proper visibility.
</p>
<GiscusComponent /> <GiscusComponent />
</div> </div>
)} )}