File tree Expand file tree Collapse file tree 19 files changed +7000
-145
lines changed
demos/RemoteImageProviderUmbracoDemo
Components/LatestBlogPosts Expand file tree Collapse file tree 19 files changed +7000
-145
lines changed Original file line number Diff line number Diff line change 2121 - name : Pack
2222 run : dotnet pack ./src/ImageSharpCommunity.Providers.Remote/ImageSharpCommunity.Providers.Remote.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build
2323 - name : Push to NuGet
24- run : dotnet nuget push **\ImageSharpCommunity.Providers.Remote.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
25- - name : Build Umbraco Package
26- run : dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release
27- - name : Pack
28- run : dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build
29- - name : Push to NuGet
30- run : dotnet nuget push **\Umbraco.Community.ImageSharpRemoteImages.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
24+ run : dotnet nuget push **\ImageSharpCommunity.Providers.Remote.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change 2121 - name : Pack
2222 run : dotnet pack ./src/ImageSharpCommunity.Providers.Remote/ImageSharpCommunity.Providers.Remote.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build
2323 - name : Push to NuGet
24- run : dotnet nuget push **\ImageSharpCommunity.Providers.Remote.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
25- - name : Build Umbraco Package
26- run : dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release
27- - name : Pack
28- run : dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build
29- - name : Push to NuGet
30- run : dotnet nuget push **\Umbraco.Community.ImageSharpRemoteImages.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
24+ run : dotnet nuget push **\ImageSharpCommunity.Providers.Remote.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change 1+ name : Release Preview Umbraco Package
2+ on :
3+ push :
4+ tags :
5+ - " umb-v[0-9]+.[0-9]+.[0-9]+-[a-z]*[0-9][0-9][0-9]"
6+ jobs :
7+ build :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout repository
11+ uses : actions/checkout@v3
12+ - name : Set VERSION variable from tag
13+ run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
14+ - name : Output version name
15+ run : echo "${VERSION}"
16+ - name : Cancel job if version is empty
17+ if : ${{ env.VERSION == '' }}
18+ run : exit 1
19+ - name : Build Umbraco Package
20+ run : dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release
21+ - name : Pack
22+ run : dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build
23+ - name : Push to NuGet
24+ run : dotnet nuget push **\Umbraco.Community.ImageSharpRemoteImages.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change 1+ name : Release Umbraco Package
2+ on :
3+ push :
4+ tags :
5+ - " umb-v[0-9]+.[0-9]+.[0-9]+"
6+ jobs :
7+ build :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout repository
11+ uses : actions/checkout@v3
12+ - name : Set VERSION variable from tag
13+ run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
14+ - name : Output version name
15+ run : echo "${VERSION}"
16+ - name : Cancel job if version is empty
17+ if : ${{ env.VERSION == '' }}
18+ run : exit 1
19+ - name : Build Umbraco Package
20+ run : dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release
21+ - name : Pack
22+ run : dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build
23+ - name : Push to NuGet
24+ run : dotnet nuget push **\Umbraco.Community.ImageSharpRemoteImages.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ using Umbraco . Cms . Core . Manifest ;
2+ using Umbraco . Cms . Infrastructure . Manifest ;
3+
4+ namespace Umbraco . Community . ImageSharpRemoteImages ;
5+
6+ public class ImageSharpRemoteImagesManifestReader : IPackageManifestReader
7+ {
8+ public async Task < IEnumerable < PackageManifest > > ReadPackageManifestsAsync ( )
9+ {
10+ return await Task . Run ( ( ) =>
11+ {
12+ return new List < PackageManifest > ( ) {
13+ new PackageManifest ( )
14+ {
15+ AllowTelemetry = true ,
16+ Name = "ImageSharp Remote Images" ,
17+ Extensions = Array . Empty < object > ( ) ,
18+ Version = "14.0.0"
19+ }
20+ } ;
21+ } ) ;
22+ }
23+ }
Original file line number Diff line number Diff line change 2020 <RepositoryType >git</RepositoryType >
2121 <RepositoryUrl >https://github.com/skttl/ImageSharpCommunity.Providers.Remote</RepositoryUrl >
2222 <RootNamespace >ImageSharpCommunity.Providers.Remote</RootNamespace >
23- <TargetFramework >net7 .0</TargetFramework >
23+ <TargetFramework >net8 .0</TargetFramework >
2424 <Title >Remote Image Provider for ImageSharp.Web in Umbraco</Title >
25- <Version >0.1 .0</Version >
25+ <Version >1.0 .0</Version >
2626 </PropertyGroup >
2727
2828 <ItemGroup >
3737 </ItemGroup >
3838
3939 <ItemGroup >
40- <PackageReference Include =" Umbraco.Cms.Imaging.ImageSharp" Version =" 12.0.0" />
41- <PackageReference Include =" Umbraco.Cms.Web.Website" Version =" 12.0.0" />
42- <PackageReference Include =" Umbraco.Cms.Web.BackOffice" Version =" 12.0.0" />
43- </ItemGroup >
44-
45- <ItemGroup >
46- <ProjectReference Include =" ..\ImageSharpCommunity.Providers.Remote\ImageSharpCommunity.Providers.Remote.csproj" />
40+ <PackageReference Include =" Umbraco.Cms.Imaging.ImageSharp" Version =" 14.0.0" />
41+ <PackageReference Include =" Umbraco.Cms.Web.Website" Version =" 14.0.0" />
42+ <PackageReference Include =" ImageSharpCommunity.Providers.Remote" Version =" 1.0.0" />
4743 </ItemGroup >
4844
4945</Project >
Original file line number Diff line number Diff line change 22using ImageSharpCommunity . Providers . Remote . Configuration ;
33using Microsoft . Extensions . DependencyInjection ;
44using Umbraco . Cms . Core . DependencyInjection ;
5+ using Umbraco . Cms . Infrastructure . Manifest ;
56
67namespace Umbraco . Community . ImageSharpRemoteImages ;
78
89public static class UmbracoBuilderExtensions
910{
1011 public static IUmbracoBuilder AddImageSharpRemoteImages ( this IUmbracoBuilder builder , Action < RemoteImageProviderOptions > ? defaultOptions = default )
1112 {
12- // if the Manifest Filter is registred then we assume this has been added before so we don't do it again.
13- if ( builder . ManifestFilters ( ) . Has < ImageSharpRemoteImagesManifestFilter > ( ) )
14- {
15- return builder ;
16- }
17-
1813 // load up the settings.
1914 var options = builder . Services . AddOptions < RemoteImageProviderOptions > ( )
2015 . Bind ( builder . Config . GetSection ( "Umbraco:Community:ImageSharpRemoteImages" ) ) ;
@@ -25,7 +20,7 @@ public static IUmbracoBuilder AddImageSharpRemoteImages(this IUmbracoBuilder bui
2520 }
2621 options . ValidateDataAnnotations ( ) ;
2722
28- builder . ManifestFilters ( ) . Append < ImageSharpRemoteImagesManifestFilter > ( ) ;
23+ builder . Services . AddSingleton < IPackageManifestReader , ImageSharpRemoteImagesManifestReader > ( ) ;
2924
3025 builder . Services . InsertImageProvider < RemoteImageProvider > ( 0 ) ;
3126
Original file line number Diff line number Diff line change 1- namespace RemoteImageProviderUmbracoDemo
2- {
3- public class Program
1+ WebApplicationBuilder builder = WebApplication . CreateBuilder ( args ) ;
2+
3+ builder . CreateUmbracoBuilder ( )
4+ . AddBackOffice ( )
5+ . AddWebsite ( )
6+ . AddDeliveryApi ( )
7+ . AddComposers ( )
8+ . Build ( ) ;
9+
10+ WebApplication app = builder . Build ( ) ;
11+
12+ await app . BootUmbracoAsync ( ) ;
13+
14+
15+ app . UseUmbraco ( )
16+ . WithMiddleware ( u =>
17+ {
18+ u . UseBackOffice ( ) ;
19+ u . UseWebsite ( ) ;
20+ } )
21+ . WithEndpoints ( u =>
422 {
5- public static void Main ( string [ ] args )
6- => CreateHostBuilder ( args )
7- . Build ( )
8- . Run ( ) ;
23+ u . UseBackOfficeEndpoints ( ) ;
24+ u . UseWebsiteEndpoints ( ) ;
25+ } ) ;
926
10- public static IHostBuilder CreateHostBuilder ( string [ ] args ) =>
11- Host . CreateDefaultBuilder ( args )
12- . ConfigureUmbracoDefaults ( )
13- . ConfigureWebHostDefaults ( webBuilder =>
14- {
15- webBuilder . UseStaticWebAssets ( ) ;
16- webBuilder . UseStartup < Startup > ( ) ;
17- } ) ;
18- }
19- }
27+ await app . RunAsync ( ) ;
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22 <PropertyGroup >
3- <TargetFramework >net7 .0</TargetFramework >
3+ <TargetFramework >net8 .0</TargetFramework >
44 <ImplicitUsings >enable</ImplicitUsings >
55 <Nullable >enable</Nullable >
66 </PropertyGroup >
77
88 <ItemGroup >
9- <PackageReference Include =" Umbraco.Cms" Version =" 12.2 .0" />
10- <PackageReference Include =" Umbraco.TheStarterKit" Version =" 12 .0.0" />
9+ <PackageReference Include =" Umbraco.Cms" Version =" 14.0 .0" />
10+ <PackageReference Include =" Umbraco.TheStarterKit" Version =" 14 .0.0" />
1111 </ItemGroup >
1212
1313 <ItemGroup >
You can’t perform that action at this time.
0 commit comments