Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
larbish committed Nov 7, 2024
1 parent d201414 commit 40925dc
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/content/docs/1.getting-started/2.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export const collections = {
This configuration creates a default `content` collection that processes all Markdown files located in the `content` folder of your project. You can customize the collection settings based on your needs.

::tip
The `type: page` setting specifies that each file in the collection represents a [Markdown page](/docs/usage/markdown).
The `type: page` means there is a 1-to-1 relationship between content files and pages on your site.
::

::note{to="/getting-started/collections"}
::note{to="/docs/usage/collections"}
Learn more in our **Collections guide**.
::

Expand Down
6 changes: 4 additions & 2 deletions docs/content/docs/2.usage/1.collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ title: Define Collections
description: 'Learn how to define and configure content collections in your Nuxt application.'
---

The Nuxt Content module automatically parses any content files within the `content` directory located at the root of your Nuxt application. This setup allows you to freely structure the folder to suit your project's needs. For a better organization, consider using Content Collections, which let you categorize and manage content more effectively. These collections are defined in a `content.config.ts` file.
The Nuxt Content module automatically parses any content files within the `content` directory located at the root of your Nuxt application. This setup allows you to freely structure the folder to suit your project's needs.

For a better organization, consider using Content Collections, which let you categorize and manage content more effectively. These collections are defined in a `content.config.ts` file.

::warning
If no `content.config.ts` file is present, all files within the content folder are parsed and imported by default. However, once a config file is added, only files matching the specified path patterns defined in collections will be imported.
Expand Down Expand Up @@ -42,7 +44,7 @@ export const collections = {
```


::note{to="/usage/types"}
::note{to="/docs/usage/types"}
Learn more about collection types.
::

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/2.usage/2.types.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ The data type is useful for content that doesn’t directly correspond to a webp
With data collections, you have complete control over the schema, allowing you to define custom structures.

::note
There’s no strict relationship between collection type and file extension. For instance, a **page** collection can use [Markdown](/usage/markdown) or [YAML](/usage/yaml) or JS[Markdown](/usage/json) files, and **data** collections can use any of these formats as well.
There’s no strict relationship between collection type and file extension. For instance, a **page** collection can use [Markdown](/docs/usage/markdown) or [YAML](/docs/usage/yaml) or JS[Markdown](/docs/usage/json) files, and **data** collections can use any of these formats as well.
::
6 changes: 6 additions & 0 deletions docs/content/docs/2.usage/3.sources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Collection sources
description: Learn about the way to import tour files in your collection Nuxt Content.
---

TODO
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Create authors files in `content/authors/` directory.
```
::

::callout
Note that each file in `data` collection should contain only one object, therefore having top level array in a JSON file will cause invalid result in query time.
::warning
Each file in `data` collection should contain only one object, therefore having top level array in a JSON file will cause invalid result in query time.
::

## Query Data
Expand All @@ -61,4 +61,4 @@ const theAuthor = await queryCollection('authors')
const authors = await queryCollection('authors')
.order('name', 'DESC')
.all()
```
```

0 comments on commit 40925dc

Please sign in to comment.