Пример #1
0
        void WriteAllTagsPage(string writePath, TagCollection tags, string baseUrl)
        {
            var allTagsPage = generator.GenerateAllTagsPage(tags.Select(x => x.Key).ToList(), baseUrl);
            var html        = markdownToHtml.Execute(allTagsPage, "All categories on Quality and Readability", baseUrl);

            filesystemRepository.WriteFile(Path.Combine(writePath, "AllTags.md"), html);
        }
Пример #2
0
        public void Execute(Configuration rootFilePath, TagCollection tags, string baseUrl, string editBaseUrl)
        {
            var files = filesystemRepository.EnumerateFiles(rootFilePath.ArticlesPath, "*.md")
                        .Union(filesystemRepository.EnumerateFiles(rootFilePath.ReadBasePath, "*.md", SearchOption.TopDirectoryOnly))
                        .ToList();

            var output = expandTagsToMarkdown.Execute(rootFilePath, tags, baseUrl, editBaseUrl, files, contentGenerator);

            foreach (var inf in output)
            {
                var html = markdownToHtml.Execute(inf.Content, inf.Title, baseUrl);

                filesystemRepository.WriteFile(inf.Path, html);
            }
        }