Skip to main content

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

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

Get Started

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

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

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.