The hibana library re-exports various Lume helper plugins and utility functions designed to enhance Lume static site generation projects.
Add hibana to your Lume project's deno.json import map:
Add hibana to your Lume project's deno.json import map:
... "imports": { "lume/": "https://deno.land/x/lume@v3.0.3/", "lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@0.12.0/", "lume/jsx-runtime": "https://deno.land/x/ssx@v0.1.10/jsx-runtime.ts", "hibana/": "https://deno.land/x/hibana@v1.3.0/" },...
Helper function to manually add language alternate links to a schema
Adds OS detection class to document body. Convenience function that automatically adds 'os-{platform}' class.
Lume plugin to defer the loading of Pagefind CSS and JS.
Detects the user's operating system from the user agent string. Useful for platform-specific styling or functionality.
Adds an external link icon to <a> anchor elements that point to external sites.
Skips links inside elements with the class .no-external-icon.
Generates a shell command to fix font paths
Generates a shell command string for DOCTYPE injection
Generates individual fix commands for manual registration
Creates an event listener function that injects DOCTYPE into all HTML files
Creates a language alternates schema preprocessor
Utility function to load an external vendor script.
Creates a markdown metadata preprocessor
Checks if the user prefers reduced motion based on their system settings. Important for accessibility - animations should be disabled when this returns true.
A Lume plugin to register the filter "shuffle" that shuffles an array.
Creates a Temporal API-based date filter function
Traps focus within a given container element. Useful for modal dialogs to prevent users from tabbing outside the modal.
Adds ID and anchor links to heading elements in Vento-rendered pages.
Generates a table of contents (TOC) from headings in Vento-rendered pages.
Injects TOC HTML into pages at the injection marker
Configuration options for font path fixing
-
cssFiles: string[]
Array of CSS filenames to fix (relative to _site/)
-
fontDirs: string[]
Array of font directory names (must match cssFiles order)
-
outputDir: string
Output directory (relative to project root)
Options for the heading anchors processor.
-
anchorClass: string
CSS class to add to anchor links
-
anchorPosition: "inside" | "outside"
Position of the anchor link relative to heading
-
anchorSymbol: string
Symbol to use for anchor link
-
ariaLabel: string
aria-label text for anchor links (for accessibility)
-
containerSelector: string
CSS selector to limit heading extraction to a specific container Useful to exclude headings from sidebars, navigation, etc.
-
includeTemplateEngines: string[]
Only process pages using these template engines
-
level: number
Minimum heading level to process (e.g., 2 for h2 and below)
-
maxLevel: number
Maximum heading level to process (e.g., 4 for up to h4)
-
slugify: (text: string) => string
Custom slugify function If not provided, uses Lume's built-in slugifier
-
tabIndex: number | false
Value of the tabindex attribute on headings, set to false to disable
Home page names for different languages
Configuration options for DOCTYPE injection
-
outputDir: string
Output directory containing HTML files (relative to project root)
-
verbose: boolean
Whether to show success/failure messages
Configuration options for language alternate schema linking
-
baseUrl: string
Base URL of the site (without trailing slash)
-
defaultLanguage: string
Default/original language code
-
languages: string[]
List of supported language codes
-
schemaFields: string[]
Array of schema field names to process These are the frontmatter fields that contain Schema.org objects
Configuration options for markdown metadata extraction
-
calculateElapsed: boolean
Whether to calculate elapsed days since publication
-
excerptMarker: string
The marker string that separates excerpt from full content
-
excerptPattern: RegExp
Regular expression pattern for the excerpt marker If provided, overrides excerptMarker
Configuration options for the temporal date filter
-
defaultLocale: string
Default locale for date formatting
-
defaultTimezone: string
Default timezone for date display
Options for the TOC generator processor.
-
containerSelector: string
CSS selector to limit heading extraction to a specific container Useful to exclude headings from sidebars, navigation, etc.
-
includeTemplateEngines: string[]
Only process pages using these template engines
-
key: string
Key in page.data where TOC will be stored
-
level: number
Minimum heading level to include in TOC
-
maxLevel: number
Maximum heading level to include in TOC
A single node in the table of contents tree.
-
children: TOCNode[]
Nested child headings
-
level: number
Heading level (2-6)
-
slug: string
URL-safe slug generated from heading text
-
text: string
Text content of the heading
-
url: string
Full URL to the heading (includes page URL + #slug)
Format types supported by the filter
| "android"
| "ios"
| "mac"
| "windows"
| "unknown"
Operating systems that can be detected