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) intoPage.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
| Name | Type | Default |
|---|---|---|
pages | Page[] | |
options | BuildSidebarOptions | {} |
entryToPage
function entryToPage(entry: EntryLike, options: EntryToPageOptions): Page
Parameters
| Name | Type |
|---|---|
entry | EntryLike |
options | EntryToPageOptions |
readMetaYaml
function readMetaYaml(basePath: string): Record<string, SidebarMetaOverride>
Parameters
| Name | Type |
|---|---|
basePath | string |