header-chrome.ts#
10 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.
10
symbols
4
functions
4
interfaces
1
types
1
modules
8
parameters
16
members
4
returns
Reference#
moduleheader-chromeOpt-in header nav, announcement, and per-page chrome helpers.
Opt-in header nav, announcement, and per-page chrome helpers.
typeLocaleLabel = string | Record<string, string>Plain label or locale map ({ en: "Guide", ja: "ガイド" }).
Plain label or locale map ({ en: "Guide", ja: "ガイド" }).
Signature
export type LocaleLabel = string | Record<string, string>interfacePageChromeFlagsPer-page frontmatter chrome flags. false hides that region.
Per-page frontmatter chrome flags. false hides that region.
Signature
export interface PageChromeFlagsMembers
Properties
| Name | Type | Description |
|---|---|---|
asideoptional |
boolean |
|
editLinkoptional |
boolean |
|
footeroptional |
boolean |
|
lastUpdatedoptional |
boolean |
|
navbaroptional |
boolean |
|
outlineoptional |
boolean |
|
sidebaroptional |
boolean |
fnparsePageChromeFlags(frontmatter: Record<string, unknown>): PageChromeFlagsReads hide flags from frontmatter. Non-boolean values are ignored.
Reads hide flags from frontmatter. Non-boolean values are ignored.
Signature
export function parsePageChromeFlags(frontmatter: Record<string, unknown>): PageChromeFlagsParameters
-
frontmatterRecord<string, unknown>
Returns
fnresolveLocaleLabel(text: LocaleLabel, locale?: string, defaultLocale?: string): stringPicks the exact locale, its language, the default locale, then the first non-em…
Picks the exact locale, its language, the default locale, then the first non-empty own string in declaration order.
Signature
export function resolveLocaleLabel(text: LocaleLabel, locale?: string, defaultLocale?: string): stringParameters
-
textLocaleLabel -
localestringoptional
-
defaultLocalestringoptional
Returns
string
fnresolvePageChromeOption(value: boolean | Record<string, unknown> | undefined): booleanfalse or omitted stays off. true or {} enables default flag reading.
false or omitted stays off. true or {} enables default flag reading.
Signature
export function resolvePageChromeOption(value: boolean | Record<string, unknown> | undefined): booleanParameters
-
valueboolean | Record<string, unknown> | undefined
Returns
boolean
interfaceThemeAnnouncementAnnouncement bar. Text is escaped; no raw HTML slot.
Announcement bar. Text is escaped; no raw HTML slot.
Signature
export interface ThemeAnnouncementMembers
Properties
| Name | Type | Description |
|---|---|---|
dismissKeyoptional |
string |
Best-effort localStorage key for dismiss. |
linkoptional |
string |
https or same-origin only. |
text |
string |