umbraco-packages - Our.Umbraco.AzureCDNToolkit.Core 0.2.0-alpha-000062

Assemblies for the Azure CDN Toolkit for Umbraco

PM> Install-Package Our.Umbraco.AzureCDNToolkit.Core -Version 0.2.0-alpha-000062 -Source https://www.myget.org/F/umbraco-packages/api/v3/index.json

Copy to clipboard

> nuget.exe install Our.Umbraco.AzureCDNToolkit.Core -Version 0.2.0-alpha-000062 -Source https://www.myget.org/F/umbraco-packages/api/v3/index.json

Copy to clipboard

> dotnet add package Our.Umbraco.AzureCDNToolkit.Core --version 0.2.0-alpha-000062 --source https://www.myget.org/F/umbraco-packages/api/v3/index.json

Copy to clipboard
<PackageReference Include="Our.Umbraco.AzureCDNToolkit.Core" Version="0.2.0-alpha-000062" />
Copy to clipboard
source https://www.myget.org/F/umbraco-packages/api/v3/index.json

nuget Our.Umbraco.AzureCDNToolkit.Core  ~> 0.2.0-alpha-000062
Copy to clipboard

> choco install Our.Umbraco.AzureCDNToolkit.Core --version 0.2.0-alpha-000062 --source https://www.myget.org/F/umbraco-packages/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "umbraco-packages" -SourceLocation "https://www.myget.org/F/umbraco-packages/api/v2"
Install-Module -Name "Our.Umbraco.AzureCDNToolkit.Core" -RequiredVersion "0.2.0-alpha-000062" -Repository "umbraco-packages" -AllowPreRelease
Copy to clipboard

Umbraco Azure CDN Toolkit

Azure Logger

The AzureCDNToolkit package allows you to fully utilise and integrate the Azure CDN with your Umbraco powered website using a "Origin Push" approach.

To Push or to Pull You can use both a Push or a Pull origin approach to the Azure CDN with Umbraco since the release of the new Azure CDN (AzureEdge), this package supports only Push origin (storage) currently however it maybe extended to also support Pull in the future.

There are three file types that should be served from CDN if you have one.

  • Assets - css, js & static images used by templates etc..
  • Images managed by Umbraco - cropped or not
  • Files - pdfs, docx etc

The toolkit depends on two packages being installed, these are the UmbracoFileSystemProviders.Azure and the ImageProcessor.Web Azure Blob Cache plugin

Once installed and setup the package provides UrlHelper methods to use for resolving url paths for assets and Image Cropper urls and also a value converter for the TinyMce editor so that images within the content are also resolved.

Some examples:

@Url.ResolveCdn("/css/style.css")

@Url.GetCropCdnUrl(Umbraco.TypedMedia(1084), width: 150)

<div class="brand" style="background-image: url('@Url.ResolveCdn(home.GetPropertyValue<string>("siteLogo") + "?height=65&width=205&bgcolor=000", false, false)')"></div>

When using these methods, the toolkit will attempt to resolve the urls to their absolute paths and crucially ensures that a cache busting querystring variable is added. Without the cache busting using the Azure CDN can become tricky when you want to update with new content. This has the added benefit of avoiding your site needing to handle any 301 redirects and also gets some optimisation benefit (PageSpeed etc).

Some examples:

  1. <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
  2. <img src="/media/1052/jan.jpg?anchor=center&mode=crop&width=150&rnd=131070397620000000"/>
  3. <a href="/media/1050/blank.docx">Download Word Doc</a>

Becomes:

  1. <link rel="stylesheet" type="text/css" href="https://azurecdntoolkitdemo.azureedge.net/assets/css/bootstrap.min.css?v=0.0.1">
  2. <img src="https://azurecdntoolkitdemo.azureedge.net/cloudcache/e/0/2/7/d/2/e027d2acab49ab523db3ece72c0651310dd3320c.jpg"/>
  3. <a href="https://azurecdntoolkitdemo.azureedge.net/assets/media/1050/blank.docx?rnd=131070387800000000">Download Word Doc</a>

Build status

Note: this package is not compatible with Slimsy v1 (it should work with the upcoming Slimsy v2 using img srcset)

Documentation

  1. Azure Setup
  2. Umbraco Setup
  3. Umbraco Implementation
  4. Umbraco Dashboard
  5. Reference

Installation

Both NuGet and Umbraco packages are available.

NuGet Packages Version
Release NuGet download
Pre-release MyGet download
Umbraco Packages
Release Our Umbraco project page
Pre-release AppVeyor Artifacts
  • Any 0.0
    • UmbracoCms.Core (>= 7.3.8)
  • .NETFramework 4.5: 4.5.0.0

Owners

Jeavon Leopold

Authors

Jeavon Leopold

Project URL

https://github.com/CrumpledDog/Umbraco-AzureCDNToolkit

License

Apache-2.0

Tags

umbraco azure cdn media

Info

2574 total downloads
80 downloads for version 0.2.0-alpha-000062
Download (15.76 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
0.2.0-alpha-000062 15.76 KB Tue, 12 Jun 2018 10:13:03 GMT 80
0.2.0-alpha-000060 15.75 KB Thu, 14 Dec 2017 15:18:53 GMT 97
0.2.0-alpha-000054 15.6 KB Tue, 31 Jan 2017 13:59:29 GMT 147
0.2.0-alpha-000053 15.6 KB Tue, 31 Jan 2017 13:41:55 GMT 27
0.2.0-alpha-000052 15.6 KB Tue, 31 Jan 2017 11:09:42 GMT 27
0.2.0-alpha-000051 15.58 KB Mon, 30 Jan 2017 13:37:31 GMT 32
0.2.0-alpha-000050 15.58 KB Mon, 30 Jan 2017 13:31:34 GMT 187
0.2.0-alpha-000049 15.2 KB Mon, 23 Jan 2017 17:02:41 GMT 32
0.2.0-alpha-000048 15.18 KB Wed, 16 Nov 2016 17:49:35 GMT 33
0.2.0-alpha-000046 15.18 KB Tue, 08 Nov 2016 16:25:51 GMT 1299
0.2.0-alpha-000045 15.18 KB Tue, 08 Nov 2016 16:24:53 GMT 28
0.2.0-alpha-000041 15.17 KB Mon, 26 Sep 2016 08:29:45 GMT 27
0.2.0-alpha-000040 15.17 KB Wed, 27 Jul 2016 14:24:35 GMT 57
0.2.0-alpha-000039 15.02 KB Fri, 15 Jul 2016 15:49:14 GMT 28
0.2.0-alpha-000038 15.02 KB Mon, 04 Jul 2016 08:33:35 GMT 26
0.2.0-alpha-000037 15.02 KB Wed, 29 Jun 2016 16:49:43 GMT 27
0.2.0-alpha-000036 15.02 KB Tue, 21 Jun 2016 18:00:06 GMT 27
0.2.0-alpha-000035 14.83 KB Thu, 02 Jun 2016 10:04:20 GMT 28
0.2.0-alpha-000033 14.84 KB Wed, 01 Jun 2016 18:02:28 GMT 26
0.2.0-alpha-000032 14.85 KB Wed, 01 Jun 2016 14:24:10 GMT 26
0.2.0-alpha-000030 14.84 KB Wed, 01 Jun 2016 14:18:47 GMT 27
0.2.0-alpha-000027 14.84 KB Wed, 01 Jun 2016 13:39:12 GMT 27
0.2.0-alpha-000026 14.82 KB Wed, 01 Jun 2016 12:06:11 GMT 27
0.1.0-alpha-000022 14.82 KB Wed, 01 Jun 2016 11:28:39 GMT 25
0.1.0-alpha-000021 14.82 KB Wed, 01 Jun 2016 11:27:26 GMT 26
0.1.0-alpha-000020 14.82 KB Wed, 01 Jun 2016 11:20:47 GMT 27
0.1.0-alpha-000019 14.82 KB Wed, 01 Jun 2016 11:16:53 GMT 28
0.1.0-alpha-000017 14.81 KB Fri, 27 May 2016 10:59:41 GMT 27
0.1.0-alpha-000016 14.81 KB Fri, 27 May 2016 10:09:12 GMT 99