@astlide/core API Reference
    Preparing search index...

    Interface AstlideOptions

    interface AstlideOptions {
        csp?: string | boolean;
        drawings?: DrawingsOption;
        favicon?: string | false;
        font?: FontOption;
        indexable?: boolean;
        injectIndexRoute?: boolean;
        plugins?: AstlidePlugin[];
        shikiTheme?: string;
        slideDecorators?: string[];
        templates?: Record<string, string>;
        toolbar?: ToolbarItem[];
    }
    Index
    csp?: string | boolean

    Content-Security-Policy configuration.

    • true (default): inject a sensible default CSP meta tag
    • false: disable CSP entirely
    • string: use a custom CSP policy string

    During astro dev, worker-src 'self' blob: is added (unless the policy sets worker-src) so Vite's client can reconnect after a server restart. Built output gets the policy as is.

    drawings?: DrawingsOption

    Pen drawings (d).

    • persist (default false): keep drawings in the browser's localStorage, so they survive reloads and come back the next time the deck is opened in the same browser. Off by default so annotations from one talk don't reappear in the next. c clears the current slide, Shift+C the whole deck.
    astlide({ drawings: { persist: true } })
    
    favicon?: string | false

    Favicon for deck pages and the deck index.

    • omitted: favicon.svg, favicon.ico or favicon.png from public/, if present; otherwise an empty icon, so browsers don't request /favicon.ico at the domain root (a 404 when deployed under a sub-path).
    • string: a root-relative path (Astro's base is added) or a URL.
    • false: no favicon link.
    astlide({ favicon: '/logo.png' })
    
    font?: FontOption

    Web font injection. Astlide injects a <link> to Google Fonts' Inter (text) and JetBrains Mono (code) by default so the built-in themes have a sane fallback. Override or disable:

    • false: do not inject any font stylesheet (use what your CSS specifies).
    • string: the href of a stylesheet — Astlide also preconnects the origin.
    • object: fine-grained control.
    astlide({ font: false })  // disable
    astlide({ font: 'https://fonts.googleapis.com/css2?family=IBM+Plex+Sans&display=swap' })
    indexable?: boolean

    Allow search engines to index the deployed slide deck. When false (default), a <meta name="robots" content="noindex, nofollow"> tag is injected. Set to true if you want the deck to be publicly discoverable.

    injectIndexRoute?: boolean

    Whether to inject Astlide's deck-index page at /.

    • unset (default): auto — inject only when you don't already have a src/pages/index.{astro,md,mdx,html}, so a custom home page never collides with the built-in index (a route collision is a hard error in future Astro).
    • false: never inject — you provide your own /.
    • true: always inject, even alongside your own index page.
    plugins?: AstlidePlugin[]

    Astlide plugins. Each plugin can contribute themes, layout names, transition names, and Shiki languages/themes. Built-in themes/layouts/transitions are always registered.

    shikiTheme?: string

    Shiki syntax highlighting theme. Default: 'github-dark'

    slideDecorators?: string[]

    Components rendered on every slide, after the slide content — for common chrome like a logo, footer, page number, or back-to-index link, without hand-placing it in each MDX/HTML file.

    Each string is a component module specifier (resolved as a Vite import). Components can read the current slide's metadata via getDeckContext(Astro) from @astlide/core/context. Equivalent to a plugin's decorators.

    astlide({ slideDecorators: ['./src/components/DeckFooter.astro'] })
    
    templates?: Record<string, string>

    PowerPoint templates as themes: theme name → a .pptx / .potx / .thmx file (project-relative; for Google Slides, File → Download → PowerPoint). Decks with "theme": "<name>" in _config.json get the template's colors, fonts and per-layout backgrounds and artwork, and their content goes where the template's placeholders are — the first heading into the title, the rest into the body.

    The built-in layouts map to the template's: cover → its title slide, section → section header, default → title and content, two-column → two content. Every template layout is also available by its name, as a slug (slideLayout: comparison, slideLayout: title-only …).

    astlide({ templates: { brand: './templates/brand.pptx' } })
    
    toolbar?: ToolbarItem[]

    Bottom navigation toolbar composition.

    Provide an ordered list of action IDs to render in the floating .slide-nav. Built-in actions: home prev counter next notes overview goto draw laser camera record presenter fullscreen print share

    goto opens the go-to-slide dialog (also bound to g): jump by slide number or search slide titles.

    draw (d) toggles a pen over the slide (c clears the current slide's drawing) and laser (l) a laser pointer. Both are mirrored between the presenter and audience windows.

    camera (v) shows your webcam in a draggable bubble; record (r) records a screen / tab of your choice plus the microphone and downloads a .webm when stopped. Both need https or localhost.

    home links back to the deck index (/) and is always reachable — the toolbar reveals on hover, keyboard focus, and stays visible on touch devices.

    download (in-browser PDF export) is experimental: it depends on the pre-1.0 optional @astlide/crispdf and its output may change. Prefer the astlide export CLI for stable output.

    Default: ['prev', 'counter', 'next'] (original behavior).