withastro/astro Logo

withastro/astro

Current Version: main — 0 Subscribers
The web framework for content-driven websites. ⭐️ Star to support our work!

Patch Changes

Continue on Github

Minor Changes

Continue on Github

Minor Changes

  • #12047 21b5e80 Thanks @rgodha24! - Adds a new optional parser property to the built-in file() loader for content collections to support additional file types such as toml and csv.

    The file() loader now accepts a second argument that defines a parser function. This allows you to specify a custom parser (e.g. toml.parse or csv-parse) to create a collection from a file's contents. The file() loader will automatically detect and parse JSON and YAML files (based on their file extension) with no need for a parser.

    This works with any type of custom file formats including csv and toml. The following example defines a content collection dogs using a .toml file.

    [[dogs]]
    id = "..."
    age = "..."
    
    [[dogs]]
    id = "..."
    age = "..."
    ```...
    
Continue on Github

Patch Changes

Continue on Github

Patch Changes

Continue on Github

Patch Changes

  • #12075 a19530e Thanks @bluwy! - Parses frontmatter ourselves

  • Updated dependencies [a19530e]:

    • @astrojs/markdown-remark@6.0.0-beta.2
Continue on Github