Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ In this section we will build a simple documentation site on your local machine.
> Prerequisites
> - Familiarity with the command line
> - Install [.NET SDK](https://dotnet.microsoft.com/en-us/download) 8.0 or higher
> - Install [Node.js](https://nodejs.org/) v20 or higher
> - Install [Node.js](https://nodejs.org/) v20 or higher (Optional: It's required when using [Create PDF Files](https://filzrev.github.io/docfx/docs/pdf.html))

Make sure you have [.NET SDK](https://dotnet.microsoft.com/en-us/download) installed, then open a terminal and enter the following command to install the latest docfx:

Expand Down
7 changes: 2 additions & 5 deletions src/Docfx.App/PdfBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ class Outline
public string? pdfFooterTemplate { get; init; }
}

static PdfBuilder()
{
PlaywrightHelper.EnsurePlaywrightNodeJsPath();
}

public static Task Run(BuildJsonConfig config, string configDirectory, string? outputDirectory = null)
{
var outputFolder = Path.GetFullPath(Path.Combine(
Expand All @@ -70,6 +65,8 @@ public static async Task CreatePdf(string outputFolder)
if (pdfTocs.Count == 0)
return;

PlaywrightHelper.EnsurePlaywrightNodeJsPath();

Program.Main(["install", "chromium"]);

var builder = WebApplication.CreateBuilder();
Expand Down