Skip to main content
net10.0

Ships the Pagefind browser query runtime (pagefind.js + wasm) as embedded resources with an MSBuild task that extracts them on build.

Published
Nov 12, 2026
11d ago
Total Downloads
26.0K
25,955

Install

dotnet add package Pagefind.Net.Frontend --version 0.6.0
ProductVersions
.NET
net10.0

README

Pagefind.Net.Frontend

pagefind.net

Ships the Pagefind 1.5.2 browser query runtime (pagefind.js and wasm.en.pagefind) for indexes written by Pagefind.Net. An MSBuild target extracts the files into your project on build: no npm install required.

NuGet

Install

dotnet add package Pagefind.Net.Frontend

Quick start

Install the package and the frontend files appear in wwwroot/pagefind/ after every build. The output path is configurable in your .csproj, and extraction can be turned off:

<PropertyGroup>
  <PagefindFrontendOutputPath>wwwroot/pagefind</PagefindFrontendOutputPath>
  <!-- <PagefindFrontendDisableExtract>true</PagefindFrontendDisableExtract> -->
</PropertyGroup>

Or extract from code:

using Pagefind.Net.Frontend;

// Writes pagefind.js and wasm.en.pagefind, unless the same version is already there (force: true overwrites).
string[] written = await PagefindFrontend.ExtractToAsync("wwwroot/pagefind");

An overload accepting IFileSystem is available for testing.

ASP.NET

ASP.NET does not recognise Pagefind's file extensions. Register them in your static file middleware, or the Pagefind runtime gets 404 responses when loading index data:

using Microsoft.AspNetCore.StaticFiles;

var app = WebApplication.CreateBuilder(args).Build();

var contentTypeProvider = new FileExtensionContentTypeProvider();
contentTypeProvider.Mappings[".pf_meta"] = "application/octet-stream";
contentTypeProvider.Mappings[".pf_index"] = "application/octet-stream";
contentTypeProvider.Mappings[".pf_fragment"] = "application/octet-stream";
contentTypeProvider.Mappings[".pagefind"] = "application/wasm";

app.UseStaticFiles(new StaticFileOptions { ContentTypeProvider = contentTypeProvider });
app.Run();

More: https://pagefind.nullean.net/getting-started/asp-net/ and https://pagefind.nullean.net/reference/frontend/

Learn more

Changes from Previous Version

No structural changes between v0.5.0 and v0.6.0.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.