Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@soen
Last active June 25, 2020 00:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soen/5603b9057f35dc1dc025386df6f78fcc to your computer and use it in GitHub Desktop.
Save soen/5603b9057f35dc1dc025386df6f78fcc to your computer and use it in GitHub Desktop.
using Sitecore.Pipelines;
using Sitecore.StaticAssets.Infrastructure;
namespace Sitecore.StaticAssets.Pipelines
{
public class InitializeStaticAssetsResolver
{
private readonly string _assetPath;
public InitializeStaticAssetsResolver(string assetPath)
{
_assetPath = assetPath;
}
public void Process(PipelineArgs args)
{
StaticAssets.Initialize(new StaticAssetResolver(Server.MapPath(_assetPath), HttpContext.Current.Cache));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment