예제 #1
0
        public async Task GenerateAsync()
        {
            _logger.LogInformation($"Starting generation of docs from root path {_settings.RootPath}");

            // Prepare rendering by parsing meta data files and loading API JSON payloads
            var apiDocumentsTask = _apiDocuments.ReadAsync();
            await Task.WhenAll(_referenceMap.ParseAsync(),
                               _outline.GenerateAsync(),
                               _apiIndexRenderer.LoadIndiciesAsync(),
                               apiDocumentsTask);

            var apiDocuments = await apiDocumentsTask;

            // Render documentation to disk
            await Task.WhenAll(_articleRenderer.RenderAsync(),
                               _apiDocumentRenderer.RenderAsync(apiDocuments));

            // Render all markdown fragments that have been queued up after rendering
            // and run a post processor path on the output files for any files that have
            // post processing queued up.
            await _markdownFormatter.PerformDeferredRenderingAsync();

            await _outputPath.ApplyContentPostProcessingAsync();

            if (_settings.GenerateReport)
            {
                _reportGenerator.Build();
            }
        }