private static IModuleList GetModules(RenderPagesSettings settings) => new ModuleList { { GetDocuments, new ModuleCollection { new Documents() .FromPipelines(settings.Pipelines), new Flatten() } }, { Render, new Razor.Razor() .WithLayout(settings.Layout) }, { WriteMetadata, new Headings() }, { WriteFiles, new WriteFiles() }, { Sort, new Sort(settings.Sort ?? ((x, y) => Comparer.Default.Compare(x.String(Keys.Title), y.String(Keys.Title)))) } };
/// <summary> /// Creates the pipeline. /// </summary> /// <param name="name">The name of this pipeline.</param> /// <param name="settings">The settings for the pipeline.</param> public RenderPages(string name, RenderPagesSettings settings) : base(name, GetModules(settings)) { }