Skip to content

Add text to encourage comments on blog post; invisible by default#700

Open
stefanv wants to merge 1 commit intoscientific-python:mainfrom
stefanv:encourage-comment
Open

Add text to encourage comments on blog post; invisible by default#700
stefanv wants to merge 1 commit intoscientific-python:mainfrom
stefanv:encourage-comment

Conversation

@stefanv
Copy link
Member

@stefanv stefanv commented Feb 7, 2026

No description provided.

@netlify
Copy link

netlify bot commented Feb 7, 2026

Deploy Preview for scientific-python-hugo-theme failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit 2be604b
🔍 Latest deploy log https://app.netlify.com/projects/scientific-python-hugo-theme/deploys/698690140ef34a0008120e26

stefanv added a commit to stefanv/blog.scientific-python.org that referenced this pull request Feb 7, 2026
@agriyakhetarpal agriyakhetarpal added this to the 0.23 milestone Feb 7, 2026
@agriyakhetarpal agriyakhetarpal added the type: Enhancement New feature or request label Feb 7, 2026
Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be nice. Side note; the linkchecker plugin invites a lot of noise. I'd like to change that later on, as we've discussed previously. Do you think you'll change the visibility of the please-comment container using JS? Also, shouldn't we do this for the blog/single.html layout directly?

@stefanv
Copy link
Member Author

stefanv commented Feb 7, 2026

In the accompanying PR on the blog site, I show how to enable it using CSS
I wasn't convinced that it is the best design, but it does the trick
I'm happy to have you make a recommendation!

@agriyakhetarpal
Copy link
Member

Thanks! Hmm, no, CSS is indeed the best design. For some reason I thought https://github.com/scientific-python/blog.scientific-python.org/blob/a2e9beccc6d837d7bce1b89d97ec29cdd1e1cb33/layouts/partials/posts/comments.html was part of the theme and I am surprised it isn't (so my suggestion to put it in blog/single.html doesn't make sense right now). I think we should add that JS here and enable it behind a Hugo config flag (keeping it disabled by default).

Is this PR ready for review/merging as is? I'm happy to approve if it works for you.

@stefanv
Copy link
Member Author

stefanv commented Feb 7, 2026

For the theme, I think having giscus as the default commenting mechanism makes most sense.

The setup we have for connecting to discuss is very bespoke.

@stefanv
Copy link
Member Author

stefanv commented Feb 7, 2026

I think this one's okay. Not perfect, but fine for now.

Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's land this, then. Thanks @stefanv!

Comment on lines +9 to +11
<div class="post-meta">{{ partial "posts/meta.html" . }}
<span class="please-comment">🖊️ Please add your comments <a href="#discourse-comments">below!</a></span>
</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div class="post-meta">{{ partial "posts/meta.html" . }}
<span class="please-comment">🖊️ Please add your comments <a href="#discourse-comments">below!</a></span>
</div>
<div class="post-meta">{{ partial "posts/meta.html" . }}
<span class="post-please-comment">🖊️ Please add your comments <a href="#discourse-comments">below!</a></span>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants