Skip to content
✨ Publier v1 is live — a polished docs platform built for the open web.
On this page

publier.shell.search

The publier.shell.search module.

Overview

Interfaces

Types

Page

type Page = any

Content-source adapters for @publier/shell.

This subpath is the bridge between Astro content collections + remark plugins and @publier/native’s Page / PageTree types. It used to also re-export Orama index builders — those were removed when shell moved to Pagefind (a static HTML indexer that runs post-build and needs no producer-side API).

What ships here:

  • entryToPage(entry, options) — adapts an Astro-content-collection- like entry (structural type, no Astro import) into Page.
  • buildSidebar(pages, options) — groups pages into the tree shape the <Sidebar /> component consumes.

What does NOT ship here (intentionally): build-lifecycle hooks. Those live at @publier/shell/build. This module is pure TypeScript with no Astro runtime coupling.

Functions

buildSidebar

function buildSidebar(pages: Page[], options: BuildSidebarOptions = {}): SidebarEntry[]

Parameters

NameTypeDefault
pagesPage[]
optionsBuildSidebarOptions{}

entryToPage

function entryToPage(entry: EntryLike, options: EntryToPageOptions): Page

Parameters

NameType
entryEntryLike
optionsEntryToPageOptions

readMetaYaml

function readMetaYaml(basePath: string): Record<string, SidebarMetaOverride>

Parameters

NameType
basePathstring