Documentation for Simbo's Packages
    Preparing search index...

    Interface NunjucksPluginOptions

    Inputs for rendering Nunjucks expressions and template files during Vite processing.

    interface NunjucksPluginOptions {
        configureEnvironment?: (
            environment: Environment,
        ) => void | Promise<void>;
        locals?: Record<string, unknown>;
        options?: ConfigureOptions;
    }
    Index
    configureEnvironment?: (environment: Environment) => void | Promise<void>

    Registers filters, globals or extensions on each new render environment. Called before compilation; thrown errors reject the HTML transform. Use Nunjucks' callback API when registering asynchronous filters.

    locals?: Record<string, unknown>

    Variables available to every HTML entry. An object under a page basename adds or overrides variables for that page, e.g. 'index.html': { title: 'Home' }. Matching uses the basename only, so pages in different folders with the same filename share these overrides.

    options?: ConfigureOptions

    Overrides Nunjucks defaults: escape HTML, reject undefined output, trim block whitespace, and read included templates without caching their compiled form.