public MarkdownTemplate AddTemplate(string templatePath, string templateContents)
        {
            MarkdownTemplate template;
            if (MasterPageTemplates.TryGetValue(templatePath, out template))             
                return template;

            var templateFile = VirtualPathProvider.GetFile(templatePath);
            var templateName = templateFile.Name.WithoutExtension();
            
            template = new MarkdownTemplate(templatePath, templateName, templateContents) {
                LastModified = templateFile.LastModified,
            };

            MasterPageTemplates.Add(templatePath, template);

            try
            {
                template.Prepare();
                return template;
            }
            catch (Exception ex)
            {
                Log.Error("AddViewPage() template.Prepare(): " + ex.Message, ex);
                return null;
            }
        }
 private IVirtualFile GetLatestPage(MarkdownTemplate markdownPage)
 {
     var file = VirtualPathProvider.GetFile(markdownPage.FilePath);
     return file;
 }