Skip to content
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

Restrict Giscus Origins #1534

Closed
1 task done
timothystewart6 opened this issue Feb 12, 2024 · 5 comments
Closed
1 task done

Restrict Giscus Origins #1534

timothystewart6 opened this issue Feb 12, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@timothystewart6
Copy link

Checklist

Is your feature request related to a problem? Please describe

Currently, anyone with your gisscuss.repo_id can post to your discussion board. This can lead to others spamming your discussion board (un)intentionally.

Describe the solution you'd like

Please expose the origins attribute in _config.yml so we restrict which origins can load giscus.

Describe alternatives you've considered

None, no known alternatives exist.

Additional context

No response

@timothystewart6 timothystewart6 added the enhancement New feature or request label Feb 12, 2024
@cotes2020
Copy link
Owner

The situation is a bit awkward, this feature requires a file giscus.json to be created in the repo root directory.

Currently I have no way to decide whether to generate this file based on the site config. If a user doesn't use giscus, then his/her repository will have a useless giscus.json.

Perhaps you can create this file in your own repo and configure it as needed.

@timothystewart6
Copy link
Author

timothystewart6 commented Feb 28, 2024

I see. Couldn't you just generate the file if the key giscus.repo is defined in _config.yml? Otherwise I agree, I can just create a giscuss.json

@timothystewart6
Copy link
Author

Ah, nevermind. This would always be undefined when the site is generated.

@cotes2020
Copy link
Owner

I see. Couldn't you just generate the file if the key giscus.repo is defined in _config.yml? Otherwise I agree, I can just create a giscuss.json

To the best of my knowledge, this is not achievable, as expressed in my comment above.

@timothystewart6
Copy link
Author

I will close it then, I totally understand why this would be confusing for some and there is a workaround if using giscus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants