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

Support of Blazor Component #32

Open
Jisu-Woniu opened this issue Feb 21, 2022 · 4 comments
Open

Support of Blazor Component #32

Jisu-Woniu opened this issue Feb 21, 2022 · 4 comments

Comments

@Jisu-Woniu
Copy link

Is your feature request related to a problem? Please describe.
It is hard to apply giscus in Blazor WebAssembly since in Blazor components, dynamic loading of JavaScript is limited.

Describe the solution you'd like
A Blazor component that can be embedded in other Blazor components.

Describe alternatives you've considered
There is a related discussion on StackOverflow with IJSRuntime: https://stackoverflow.com/questions/67560407/include-javascript-component-into-blazor-component. It seems the second solution suggested works.
Possible solution

Additional context
I am trying to integrate it into my blog, so I will keep trying❤

@laymonage
Copy link
Member

I'm not familiar with Blazor, so I'm not sure if I can make this happen.

In the meantime, does it support Web Components? If so, you could try this package.

@Jisu-Woniu
Copy link
Author

I'm afraid that it doesn't support direct import of Web Components.

Blazor components are defined as C# classes with Razor files.

@Jisu-Woniu
Copy link
Author

I will try using IJSRuntime interface as backend for giscus once I have time for it.

@Jisu-Woniu
Copy link
Author

Jisu-Woniu commented Feb 23, 2022

I wrote a wrapper here Jisu-Woniu/giscus-blazor and uploaded it to NuGet. I did some simple tests, but I cannot ensure they work all the time.

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

No branches or pull requests

2 participants