diff --git a/README.md b/README.md index 4873977..ebf81b3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Supports both Blazor WebAssembly and Blazor Server. ## Getting started -To start, install it from NuGet. +To start, install it from NuGet: [![Nuget GiscusBlazor](https://img.shields.io/nuget/v/GiscusBlazor.svg)](https://www.nuget.org/packages/GiscusBlazor/) @@ -27,13 +27,13 @@ You might need to fix the version when publish your website. For example: ```html - + - + - + ``` Then add this component to your `.razor` files where you want the comments to appear like this: @@ -53,9 +53,21 @@ Then add this component to your `.razor` files where you want the comments to ap EmitMetadata="false" InputPosition="InputPosition.Bottom" Theme="light" - Lang="en" /> + Lang="en" + LazyLoading="true" /> ``` -Or you can just add `@using GiscusBlazor` to `_imports` +Or you can just add `@using GiscusBlazor` to `_Imports.razor`. -Most of the parameters can be found from the [giscus official site](https://giscus.app/). +Most of the parameters’ information can be found from the [giscus official site](https://giscus.app/). + +## Samples + +You can get some sample apps from the [samples](samples) directory, in both Blazor WebAssembly and Blazor Server. + +## Changelog + +### v2.2.1 + +- Add support for lazy-loading (see [giscus official site](https://giscus.app/)). +- Removed support for .NET 5.0, which is now [out of support](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#lifecycle). \ No newline at end of file diff --git a/samples/BlazorServerDemo/Pages/Counter.razor b/samples/BlazorServerDemo/Pages/Counter.razor index 437b7b6..62a6566 100644 --- a/samples/BlazorServerDemo/Pages/Counter.razor +++ b/samples/BlazorServerDemo/Pages/Counter.razor @@ -18,7 +18,8 @@ EmitMetadata="false" InputPosition="InputPosition.Bottom" Theme="light" - Lang="en" /> + Lang="en" + LazyLoading="true" /> @code { private int currentCount = 0; diff --git a/samples/BlazorServerDemo/Pages/_Layout.cshtml b/samples/BlazorServerDemo/Pages/_Layout.cshtml index a6f09c9..fd51199 100644 --- a/samples/BlazorServerDemo/Pages/_Layout.cshtml +++ b/samples/BlazorServerDemo/Pages/_Layout.cshtml @@ -12,7 +12,7 @@ - + @RenderBody() diff --git a/samples/BlazorWebAssemblyDemo/BlazorWebAssemblyDemo.csproj b/samples/BlazorWebAssemblyDemo/BlazorWebAssemblyDemo.csproj index 187fa78..5c7877d 100644 --- a/samples/BlazorWebAssemblyDemo/BlazorWebAssemblyDemo.csproj +++ b/samples/BlazorWebAssemblyDemo/BlazorWebAssemblyDemo.csproj @@ -4,6 +4,7 @@ net6.0 enable enable + True diff --git a/samples/BlazorWebAssemblyDemo/Pages/Counter.razor b/samples/BlazorWebAssemblyDemo/Pages/Counter.razor index 75827f4..fd1bc60 100644 --- a/samples/BlazorWebAssemblyDemo/Pages/Counter.razor +++ b/samples/BlazorWebAssemblyDemo/Pages/Counter.razor @@ -18,7 +18,8 @@ EmitMetadata="false" InputPosition="InputPosition.Bottom" Theme="light" - Lang="en"/> + Lang="en" + LazyLoading="true" /> @code { private int currentCount = 0; diff --git a/samples/BlazorWebAssemblyDemo/wwwroot/index.html b/samples/BlazorWebAssemblyDemo/wwwroot/index.html index 8b6c343..4f04666 100644 --- a/samples/BlazorWebAssemblyDemo/wwwroot/index.html +++ b/samples/BlazorWebAssemblyDemo/wwwroot/index.html @@ -9,7 +9,7 @@ - + diff --git a/src/GiscusBlazor/Giscus.razor b/src/GiscusBlazor/Giscus.razor index 9b61cb8..a010694 100644 --- a/src/GiscusBlazor/Giscus.razor +++ b/src/GiscusBlazor/Giscus.razor @@ -1,13 +1,13 @@ - + diff --git a/src/GiscusBlazor/Giscus.razor.cs b/src/GiscusBlazor/Giscus.razor.cs index 022b445..16b81cd 100644 --- a/src/GiscusBlazor/Giscus.razor.cs +++ b/src/GiscusBlazor/Giscus.razor.cs @@ -45,5 +45,8 @@ public partial class Giscus [Parameter] public string? Lang { get; set; } + + [Parameter] + public bool LazyLoading { get; set; } } } diff --git a/src/GiscusBlazor/GiscusBlazor.csproj b/src/GiscusBlazor/GiscusBlazor.csproj index 2d243b0..03f054e 100644 --- a/src/GiscusBlazor/GiscusBlazor.csproj +++ b/src/GiscusBlazor/GiscusBlazor.csproj @@ -1,45 +1,45 @@ - - enable - True - README.md - https://github.com/Jisu-Woniu/giscus-blazor - MIT - False - 2.2.0 - A Blazor component to embed giscus, a comments system powered by GitHub Discussions. - True - snupkg - netcoreapp3.1;net5.0;net6.0 - - - - - True - \ - - - - - - - - - - - - - - - - - - - - - - - + + enable + True + README.md + https://github.com/Jisu-Woniu/giscus-blazor + MIT + False + 2.2.1 + A Blazor component to embed giscus, a comments system powered by GitHub Discussions. + True + snupkg + netcoreapp3.1;net6.0 + Add support for lazy-loading parameter + True + True + latest-recommended + + + + + True + \ + + + + + + + + + + + + + + + + + + +