public DocumentationParser(ParserOptions options, IProvideGitFileInformation repoAnalyzer) { _options = options; var parser = new Markdown { AutoHeadingIDs = true, ExtraMode = true, NoFollowLinks = false, SafeMode = false, HtmlClassTitledImages = "figure text-center", UrlRootLocation = options.RootUrl }; var documentCompiler = new DocumentCompiler(parser, options, repoAnalyzer); _directoryCompiler = new DirectoryCompiler(documentCompiler, options); }
public ArticleDirectoryCompiler(ArticleCompiler articleCompiler, ParserOptions options) { _articleCompiler = articleCompiler; _options = options; }
public DirectoryCompiler(DocumentCompiler documentCompiler, ParserOptions options) { _documentCompiler = documentCompiler; _options = options; }
public DocumentCompiler(Markdown parser, ParserOptions options, IProvideGitFileInformation repoAnalyzer) : base(parser, options, repoAnalyzer) { }
public DocumentationValidator(ParserOptions options, Language currentLanguage) { _options = options; _currentLanguage = currentLanguage; }
public virtual ActionResult ValidateMappings(string language, string version, bool all) { var query = DocumentSession .Query<DocumentationPage>() .Take(int.MaxValue); if (all == false) { query = query.Where(x => x.Version == CurrentVersion); Language parsedLanguage; if (Enum.TryParse(language, true, out parsedLanguage)) { query = query.Where(x => x.Language == parsedLanguage || x.Language == Language.All); } } var pages = query.ToList(); var options = new ParserOptions { PathToDocumentationDirectory = GetDocumentationDirectory(), RootUrl = string.Format("{0}://{1}{2}", Request.Url.Scheme, Request.Url.Authority, Url.Content("~")) + "article/" + CurrentVersion + "/" + CurrentLanguage + "/", ImagesUrl = GetImagesUrl() }; var results = new DocumentationValidator(options, CurrentLanguage) .ValidateMappings(pages) .ToList(); return View(MVC.Docs.Views.ValidateMappings, results); }
public virtual ActionResult Validate(string language, string version, bool all) { if (DebugHelper.IsDebug() == false) return RedirectToAction(MVC.Docs.ActionNames.Index, MVC.Docs.Name); var query = DocumentSession .Query<DocumentationPage>() .Take(1024); if (all == false) query = query.Where(x => x.Version == CurrentVersion); var pages = query.ToList(); var options = new ParserOptions { PathToDocumentationDirectory = GetDocumentationDirectory(), RootUrl = string.Format("{0}://{1}{2}", Request.Url.Scheme, Request.Url.Authority, Url.Content("~")) + "article/" + CurrentVersion + "/" + CurrentLanguage + "/", ImagesUrl = GetImagesUrl() }; var results = new DocumentationValidator(options, CurrentLanguage) .ValidateLinks(pages) .ToList(); return View(MVC.Docs.Views.Validate, results); }
public DocumentationDirectoryCompiler(DocumentCompiler documentCompiler, ParserOptions options) { _documentCompiler = documentCompiler; _options = options; }
public ArticleParser(ParserOptions options, IProvideGitFileInformation repoAnalyzer) : base(options) { var articleCompiler = new ArticleCompiler(Parser, options, repoAnalyzer); _directoryCompiler = new ArticleDirectoryCompiler(articleCompiler, options); }
public DocumentCompiler(Markdown parser, ParserOptions options, IProvideGitFileInformation repoAnalyzer) { _parser = parser; _options = options; _repoAnalyzer = repoAnalyzer; }