usage
JSON, YAML, CSV
Nuxt Content can also query JSON, YAML and CSV content.
JSON
Nuxt Content can query JSON formatted content.
content/hello.json
{ "title": "Hello Content v2!", "description": "The writing experience for Nuxt 3", "category": "announcement"}
If the document root is an object
{}
, the output contains all the document properties at its root. If the document root is an array []
, the output contains all the document properties in a body
property.YAML / YML
Nuxt Content can query YAML / YML formatted content.
content/hello.yml
title: Hello Content v2!description: The writing experience for Nuxt 3category: announcement
If the document root is based on key-value pairs, the output contains all the document properties at its root.
If the document root is a list
-
, the output contains all the document properties in a body
property.CSV
Nuxt Content can query CSV formatted content.
content/hello.csv
title,description,category
Hello Content v2!,The writing experience for Nuxt 3,announcement
The
body
of the output is an array containing every row as objects.