public async Task Run(CommandLine commandLine) { var engines = RenderingEngine.Load(); // Load the site documents. // var site = await this.Load(commandLine.SitePath, commandLine.OutputPath, engines.Keys); // Order the documents. // this.Order(site); // Paginate the documents. // this.Paginate(site); // TODO: do any other sweeping updates to the documents here. // TODO: get the right command to process the commandLine.Command request. // For now it's always render. // // Render the documents. // this.Render(site, engines); }
private SiteConfig LoadConfiguration(CommandLine commandLine) { using (var capture = Statistics.Current.Start(StatisticTiming.LoadedConfiguration)) { this.Engines = RenderingEngine.Load(); var config = SiteConfig.Load(Path.Combine(commandLine.SitePath, "site.config")); config.OutputPath = String.IsNullOrEmpty(commandLine.OutputPath) ? Path.GetFullPath(config.OutputPath) : Path.GetFullPath(commandLine.OutputPath); return(config); } }