-
Notifications
You must be signed in to change notification settings - Fork 25.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Giscus missing config tags #3574
Comments
Hi @tavinus, Thanks a lot for this note! Thank you. |
Hi @labdmitriy, I am not sure how to do that. I would have to investigate further. EDIT: Could not find any issues with "giscus.json", maybe you should create a new one asking how to use the giscus.json advanced options. This issue seems to be fixed. Just waiting for the merge. |
What happened?
I created it from the mm-github-pages-starter, so I am not so sure about some of the info above.
Expected behavior
Giscus to have all possible config tags available, but seems like some of them are missing. Maybe they were added after the plugin was made?
I wanted to make the comment box stay at the top of the comments (instead of the bottom).
Also, seems like it is not possible to set the display language for giscus (also missing tag)
I could not find any issues or discussions about this.
Steps to reproduce the behavior
Configure giscus comments and try to add one of the following attributes:
data-emit-metadata="0"
data-input-position="top"
data-lang="en"
They are all default attributes in the https://giscus.app/ config webpage
Other
I guess the code in this page would need to be changed to add the missing attributes:
https://github.com/mmistakes/minimal-mistakes/blob/297989c1be175df46640a1547cc390e9442f527d/_includes/comments-providers/giscus.html
Suggestion
Add Missing Tags
From
To
I kept the order they present in the config app, to make it easier to correlate/test
Then add the 3 new possible tags into the docs, examples, etc
https://mmistakes.github.io/minimal-mistakes/docs/configuration/#giscus-comments
New mmistakes config tags for giscus:
Apart from that, there is another tag missing, but this one is only inserted when you set it. Meaning that the default for it is to be totally absent.
It is the tag for lazy loading
data-loading="lazy"
.So, we would need some code that would only set this attribute if it is defined, but not set anything if absent. The code above will always set a default value for each attribute. Should be easy to add a check that ignores if not set though.
More info about each tag and their default values can be found in the https://giscus.app/ website
The text was updated successfully, but these errors were encountered: