Pagefind.Net 0.6.0

dotnet add package Pagefind.Net --version 0.6.0
                    
NuGet\Install-Package Pagefind.Net -Version 0.6.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Pagefind.Net" Version="0.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pagefind.Net" Version="0.6.0" />
                    
Directory.Packages.props
<PackageReference Include="Pagefind.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Pagefind.Net --version 0.6.0
                    
#r "nuget: Pagefind.Net, 0.6.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Pagefind.Net@0.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Pagefind.Net&version=0.6.0
                    
Install as a Cake Addin
#tool nuget:?package=Pagefind.Net&version=0.6.0
                    
Install as a Cake Tool

Pagefind.Net

pagefind.net

A pure .NET indexer that generates a Pagefind-compatible search index. No native Rust binary or subprocess: the whole indexing pipeline runs in managed code and is AOT-compatible.

NuGet

Install

dotnet add package Pagefind.Net

Quick start

using Pagefind.Net;

var index = new PagefindIndex(new PagefindIndexOptions { Language = "en" });

index.AddRecord(new PagefindRecord
{
	Url = "/guide/",
	Title = "Getting started",
	Content = "Install the package, add your pages, write the index.",
	WeightedSegments =
	[
		new WeightedSegment("Getting started", Weight: 7),                                      // h1
		new WeightedSegment("Install the package, add your pages, write the index.", Weight: 1), // body
	],
	Anchors = [new PagefindAnchor(ElementId: "install", Text: "Install", Location: 0, Tag: "h2")],
	Meta = new Dictionary<string, string> { ["title"] = "Getting started" },
});

await index.WriteAsync("wwwroot");   // wwwroot/pagefind/: pagefind-entry.json, *.pf_meta, index/, fragment/

WriteAsync writes all index data files into wwwroot/pagefind/:

  • pagefind-entry.json
  • pagefind.{hash}.pf_meta
  • index/{hash}.pf_index
  • fragment/{hash}.pf_fragment

Pages already parsed into headings and text can go in as HtmlPageData, weighted as the Pagefind binary does:

using Pagefind.Net;

var index = new PagefindIndex();

// Headings and body text in document order: the heading levels set the weights, as the Pagefind binary does.
index.AddHtmlRecord(new HtmlPageData
{
	Url = "/guide/",
	Sections =
	[
		new HtmlSection("h1", "Getting started"),
		new HtmlSection("p", "Install the package, add your pages, write the index."),
	],
});

await index.WriteAsync("wwwroot");

The Pagefind search UI in examples/Pagefind.Net.Web, querying an index Pagefind.Net built at startup

Key types

Type Description
PagefindIndex Accumulates records and writes the index via WriteAsync.
PagefindRecord A single searchable document with URL, title, content, segments, anchors, metadata and filters.
HtmlPageData A page as headings and text in document order, for AddHtmlRecord.
WeightedSegment A text segment with a search weight (body = 1, H2 = 4, H1 = 7).
PagefindAnchor A heading anchor for sub-page deep links in search results; Location is a word offset into Content.
PagefindIndexOptions Language, extra characters to index, merge batch size and the meta fields to index.

Frontend runtime

This package writes only the index data files. The Pagefind query runtime (pagefind.js and wasm.en.pagefind) comes separately: install Pagefind.Net.Frontend, which ships the runtime and extracts it on build, or the pagefind npm package and copy the runtime files yourself.

Targets Pagefind 1.5.2 (PagefindIndex.PagefindTargetVersion). Reference: https://pagefind.nullean.net/reference/pagefind-index/

Learn more

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.6.0 54 11/12/2026
0.5.0 299 11/11/2026
0.4.2 507 11/11/2026
0.4.1 21,554 7/28/2026
0.4.0 152 7/28/2026
0.3.0 173 7/24/2026
0.2.0 137 7/24/2026
0.1.0 134 7/24/2026