private static IModuleList GetModules(RenderBlogPostsSettings settings) => new ModuleList { { GetDocuments, new ModuleCollection { new Documents() .FromPipelines(settings.Pipelines) } }, { Render, new Razor.Razor() .WithLayout(settings.Layout) }, { Shortcodes, new Shortcodes(false) }, { WriteMetadata, new Headings() }, { WriteFiles, new WriteFiles() }, { OrderByPublished, new OrderBy((doc, ctx) => doc.Get <DateTime>(settings.PublishedKey)).Descending() } };
/// <summary> /// Creates the pipeline. /// </summary> /// <param name="name">The name of this pipeline.</param> /// <param name="settings">The settings for the pipeline.</param> public RenderBlogPosts(string name, RenderBlogPostsSettings settings) : base(name, GetModules(settings)) { }