예제 #1
0
        private IEnumerable <Page> FindPublishedPages([AllowNull, AllowEmpty] string relativeDirectory)
        {
            var directory = Path.Combine(PublishedDirectory.FullName, relativeDirectory);

            return(from file in System.IO.Directory.EnumerateFiles(directory, "*.md")
                   let page = PageSerialization.TryDeserializeFromFile(file, PublishedDirectory, YamlMarkdown)
                              where page != null
                              select page);
        }
예제 #2
0
        private Page GetPublishedPage(string relativeUri)
        {
            var file = Path.Combine(PublishedDirectory.FullName, relativeUri + ".md").ToDosSlashes();

            return(PageSerialization.DeserializeFromFile(file, PublishedDirectory, YamlMarkdown));
        }