public override string RenderMarkdownPage(string pagePath, string templateName, Page page) { DependencyTracker.Current.Add(pagePath, GetFullPath(templateName)); var siteContext = SiteContext.Current; var hash = CreateHash(new { dependantPath = pagePath, path = pagePath, posts = siteContext.Posts }); page.Body = Template.Parse(page.Body).Render(hash); page.TransformMarkdown(); WrapWithTemplate(page, templateName); hash.Add("title", _titleRegex.Match(page.Body).Groups[1].Value); return Template.Parse(page.Body).Render(hash); }
public abstract string RenderPage(string pagePath, Page model);
public abstract string RenderMarkdownPage(string pagePath, string template, Page page);
public override string RenderPage(string pagePath, Page model) { WrapWithTemplate(model); var hash = CreateHash(new { title = _titleRegex.Match(model.Body).Groups[1].Value, dependantPath = pagePath, path = pagePath, posts = SiteContext.Current.Posts }); return Template.Parse(model.Body).Render(hash); }
public void WrapWithTemplate(Page model) { base.WrapWithTemplate(model); }