Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Commit

Permalink
Supress the last RenderTemplate (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérémie Bertrand authored Oct 29, 2016
1 parent a0634fd commit a24909d
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/Pretzel.Logic/Templating/JekyllEngineBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public abstract class JekyllEngineBase : ISiteEngine

[Import(AllowDefault = true)]
private ILightweightMarkupEngine _lightweightMarkupEngine;

public abstract void Initialize();

protected abstract void PreProcess();
Expand Down Expand Up @@ -211,22 +211,6 @@ private void ProcessFile(string outputDirectory, Page page, Page previous, Page
continue;
}

try
{
context.FullContent = RenderTemplate(context.FullContent, context);
}
catch (Exception ex)
{
if (!skipFileOnError)
{
var message = string.Format("Failed to process {0}, see inner exception for more details", context.OutputPath);
throw new PageProcessingException(message, ex);
}

Console.WriteLine(@"Failed to process {0}: {1}", context.OutputPath, ex);
continue;
}

CreateOutputDirectory(context.OutputPath);
FileSystem.File.WriteAllText(context.OutputPath, context.FullContent);
}
Expand All @@ -242,7 +226,7 @@ private string RenderContent(string file, string contents)
html = Path.GetExtension(file).IsMarkdownFile()
? _lightweightMarkupEngine.Convert(contentsWithoutHeader).Trim()
: contentsWithoutHeader;

if (ContentTransformers != null)
{
html = ContentTransformers.Aggregate(html, (current, contentTransformer) => contentTransformer.Transform(current));
Expand Down

0 comments on commit a24909d

Please sign in to comment.