public void Process(SiteContext context, bool skipFileOnError = false) { // Default rendering engine if (LightweightMarkupEngine == null) { LightweightMarkupEngine = new CommonMarkEngine(); } Tracing.Debug("LightweightMarkupEngine: {0}", LightweightMarkupEngine.GetType().Name); Context = context; PreProcess(); for (int index = 0; index < context.Posts.Count; index++) { var p = context.Posts[index]; var previous = GetPrevious(context.Posts, index); var next = GetNext(context.Posts, index); ProcessFile(context.OutputFolder, p, previous, next, skipFileOnError, p.Filepath); } for (int index = 0; index < context.Pages.Count; index++) { var p = context.Pages[index]; var previous = GetPrevious(context.Pages, index); var next = GetNext(context.Pages, index); ProcessFile(context.OutputFolder, p, previous, next, skipFileOnError); } }
public void Process(SiteContext siteContext, bool skipFileOnError = false) { // Default rendering engine if (_lightweightMarkupEngine == null) { _lightweightMarkupEngine = new CommonMarkEngine(); } Tracing.Logger.Write(string.Format("LightweightMarkupEngine: {0}", _lightweightMarkupEngine.GetType().Name), Tracing.Category.Debug); Context = siteContext; PreProcess(); for (int index = 0; index < siteContext.Posts.Count; index++) { var p = siteContext.Posts[index]; var previous = GetPrevious(siteContext.Posts, index); var next = GetNext(siteContext.Posts, index); ProcessFile(siteContext.OutputFolder, p, previous, next, skipFileOnError, p.Filepath); } for (int index = 0; index < siteContext.Pages.Count; index++) { var p = siteContext.Pages[index]; var previous = GetPrevious(siteContext.Pages, index); var next = GetNext(siteContext.Pages, index); ProcessFile(siteContext.OutputFolder, p, previous, next, skipFileOnError); } }