interface AstroGlobalPartial {
    generator: string;
    site: undefined | URL;
    glob(globStr): Promise<AstroInstance[]>;
    glob<T>(globStr): Promise<MarkdownInstance<T>[]>;
    glob<T>(globStr): Promise<MDXInstance<T>[]>;
    glob<T>(globStr): Promise<T[]>;
}

Hierarchy (view full)

Properties

Methods

Properties

generator: string

Returns a string with the current version of Astro.

Useful for using <meta name="generator" content={Astro.generator} /> or crediting Astro in a site footer.

HTML Specification for generator

Astro reference

site: undefined | URL

Returns a URL object built from the site config option

Astro reference

Methods

  • Fetch local files into your static site setup

    Example usage:

    const posts = await Astro.glob('../pages/post/*.md');
    

    Astro reference

    Parameters

    • globStr: `${any}.astro`

    Returns Promise<AstroInstance[]>

  • Type Parameters

    Parameters

    • globStr: `${any}.markdown` | `${any}.mdown` | `${any}.mkdn` | `${any}.mkd` | `${any}.mdwn` | `${any}.md`

    Returns Promise<MarkdownInstance<T>[]>

  • Type Parameters

    Parameters

    • globStr: `${any}.mdx`

    Returns Promise<MDXInstance<T>[]>

  • Type Parameters

    Parameters

    • globStr: string

    Returns Promise<T[]>