Skip to content

Commit 0d2c690

Browse files
committed
docs: fix links
1 parent b49997c commit 0d2c690

File tree

11 files changed

+58
-33
lines changed

11 files changed

+58
-33
lines changed

docs/content/docs/1.getting-started/1.index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Welcome to Nuxt Content v3, a major upgrade that brings enhanced performance and
1212

1313
Collections organize related items within your project, helping you manage large datasets more efficiently. Key benefits include:
1414

15-
- **Structured Data**: Configure database architecture and define collections in [`content.config.ts`](/getting-started/collections#defining-collections)
15+
- **Structured Data**: Configure database architecture and define collections in [`content.config.ts`](/docs/getting-started/collections#defining-collections)
1616
- **Type-safe Queries**: Direct TypeScript integration across all utilities
1717
- **Automatic Validation**: Ensure data consistency across frontmatter fields and data files (json, yml...)
1818
- **Advanced Query Builder**: Filter, sort, and paginate your collections with ease
1919
- **Studio Integration**: Enhanced form generation and optimal editing experience through [Studio](https://nuxt.studio)
2020

21-
Learn more about [Content Collections](/getting-started/collections).
21+
Learn more about [Content Collections](/docs/getting-started/collections).
2222

2323
### Improved Performance
2424

@@ -29,7 +29,7 @@ V3 addresses this by transitioning to SQL-based storage in production. This swit
2929
Benefits include:
3030

3131
- **Optimized Queries**: SQL storage enables ultra-fast data retrieval
32-
- **Universal Compatibility**: Our adapter-based system integrates SQL databases across all deployment modes (static, server-side, SPA, edge) and platforms. See our [platform deployment options](/deploy/node) for details. We welcome community contributions for additional adapters.
32+
- **Universal Compatibility**: Our adapter-based system integrates SQL databases across all deployment modes (static, server-side, SPA, edge) and platforms. See our [platform deployment options](/docs/deploy/node) for details. We welcome community contributions for additional adapters.
3333

3434
### TypeScript Integration
3535

docs/content/docs/1.getting-started/2.installation.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,46 @@ export const collections = {
5555
This configuration creates a default `content` collection that processes all Markdown files in your project. You can customize the collection settings based on your needs.
5656

5757
::tip
58-
The `type: page` setting specifies that each file in the collection represents a [Markdown page](/usage/markdown).
58+
The `type: page` setting specifies that each file in the collection represents a [Markdown page](/docs/usage/markdown).
5959
::
6060

6161
::note{to="/getting-started/collections"}
6262
Learn more in our **Collections guide**.
6363
::
6464

65+
### Create your First Markdown Page
66+
67+
Create a `content/index.md` file in your project root directory:
68+
69+
```md [content/index.md]
70+
# My First Page
71+
72+
Here is some content.
73+
```
74+
75+
Read more about writing [Markdown pages](/docs/usage/markdown).
76+
77+
### Display your Page
78+
79+
Create a `pages/index.vue` file and display the page content:
80+
81+
```vue [pages/index.vue]
82+
<script setup lang="ts">
83+
const { data: home } = await useAsyncData(() => queryCollection('content').path('/').first())
84+
85+
useSeoMeta({
86+
title: home.value?.title,
87+
description: home.value?.description
88+
})
89+
</script>
90+
91+
<template>
92+
<ContentRenderer v-if="home" :value="home" />
93+
<div v-else>Home not found</div>
94+
</template>
95+
```
96+
97+
::tip{icon="i-lucide-rocket"}
98+
That's it! You've now created your first Nuxt Content page.
99+
::
65100

docs/content/docs/1.getting-started/3.collections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const collections = {
8484

8585
## Querying Collections
8686

87-
Use the [`queryCollection`](/api/query-collection) util to fetch one or all items from a collection:
87+
Use the [`queryCollection`](/docs/composables/query-collection) util to fetch one or all items from a collection:
8888

8989
```vue [pages/blog.vue]
9090
<script setup lang="ts">

docs/content/docs/1.getting-started/5.configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ type Highlight = false | object
216216
```
217217
::
218218
219-
Nuxt Content uses [Shiki](https://github.com/shikijs/shiki) to provide syntax highlighting for [`ProsePre`](/components/prose#prosepre) and [`ProseCode`](/components/prose#prosecode).
219+
Nuxt Content uses [Shiki](https://github.com/shikijs/shiki) to provide syntax highlighting for [`ProsePre`](/docs/components/prose#prosepre) and [`ProseCode`](/docs/components/prose#prosecode).
220220
221221
| Option | Type | Description |
222222
| --------- | :------------------------------------------: | :------------------------------------------------------------------------------------------------------------------ |

docs/content/docs/1.getting-started/6.migration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Here is the list breaking changes in Content v3:
1717
- `fetchContentNavigation()`{lang=ts} API is replaced with new `queryCollectionNavigation()`{lang=ts}
1818
- Surroundings now has its own separate API `queryCollectionItemSurroundings()`{lang=ts}
1919
- Document driven mode is fully dropped, meaning:
20-
- Markdown files will not convert to Nuxt pages automatically, you need to create pages, see [how](/components/content-renderer#example)
20+
- Markdown files will not convert to Nuxt pages automatically, you need to create pages, see [how](/docs/components/content-renderer#example)
2121
- `useContent()`{lang=ts} composable is removed
2222
- We simplified rendering components.
2323
- `<ContentDoc>`, `<ContentList>`, `<ContentNavigation>` and `<ContentQuery>` components are dropped in v3.
2424
- `_dir.yml` files are renamed to `.navigation.yml`
2525
- Multi source is dropped in favor of multi collection.
2626
- Document `._path` is now renamed to `.path`
2727
- `searchContent()`{lang=ts} is dropped in favor of new api `queryCollectionSearchSections`
28-
- Full text search can easily done using this API See [Full-Text Search Snippets](/snippets/fulltext-search)
28+
- Full text search can easily done using this API See [Full-Text Search Snippets](/docs/snippets/fulltext-search)
2929
- `useContentHelpers()`{lang=ts} is removed
3030

3131

docs/content/docs/2.usage/2.markdown.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ description: 'meta description of the page'
9191
| ------------------------------------------- | :-------: | ------------------------------------- | -------------------------------------------------------------------------------------------------------- |
9292
| `title` | `string` | First `<h1>`{lang="html"} of the page | Title of the page, will also be injected in metas |
9393
| `description` | `string` | First `<p>`{lang="html"} of the page | Description of the page, will be shown below the title and injected into the metas |
94-
| `navigation` | `boolean` | `true` | Define if the page is included in [`queryCollectionNavigation`](/usage/navigation) return value. |
94+
| `navigation` | `boolean` | `true` | Define if the page is included in [`queryCollectionNavigation`](/docs/usage/navigation) return value. |
9595

9696

9797
### Excerpt
@@ -126,7 +126,7 @@ Example variables will be injected into the document:
126126

127127
Nuxt Content uses [Shiki](https://github.com/shikijs/shiki), that colors tokens with VSCode themes.
128128

129-
Code highlighting works both on [`ProsePre`](/components/prose#prosepre) and [`ProseCode`](/components/prose#prosecodeinline).
129+
Code highlighting works both on [`ProsePre`](/docs/components/prose#prosepre) and [`ProseCode`](/docs/components/prose#prosecodeinline).
130130

131131
Each line of a code block gets its line number in the `line` attribute so lines can be labeled or individually styled.
132132

@@ -170,7 +170,7 @@ Block components are components that accept Markdown content or another componen
170170
The component must contain either:
171171

172172
- A `<slot />` to accept raw text or another component.
173-
- The [`<MDCSlot />`](/components/mdc-slot) component to accept formatted text.
173+
- The [`<MDCSlot />`](/docs/components/mdc-slot) component to accept formatted text.
174174

175175
In a markdown file, use the component with the **`::`** identifier.
176176

@@ -561,5 +561,5 @@ If you want to customize a Prose component, here are the recommended steps:
561561
- Make it yours 🚀.
562562

563563
::callout
564-
Read the complete Prose reference in the [Prose Components section](/components/prose).
564+
Read the complete Prose reference in the [Prose Components section](/docs/components/prose).
565565
::

docs/content/docs/3.composables/1.query-collection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function queryCollection<T extends keyof Collections>(collection: T): Collection
1111

1212
## Usage
1313

14-
Use the auto-imported `queryCollection` to find contents inside a collection.Here we assume that you havr defined `docs` collection inside `content.config.ts`. If you have not defined any collection, check [How to define a collection](/getting-started/collections#defineCollection).
14+
Use the auto-imported `queryCollection` to find contents inside a collection.Here we assume that you havr defined `docs` collection inside `content.config.ts`. If you have not defined any collection, check [How to define a collection](/docs/getting-started/collections#defineCollection).
1515

1616
```vue [pages/[...slug\\].vue]
1717
<script>

docs/content/docs/3.composables/2.query-collection-navigation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Generate a navigation tree for the specified collection.
3434

3535
- Returns: A Promise that resolves to a navigation tree structure.
3636

37-
The navigation tree is generated based on the directory structure and ordering happens based on files [ordering](/getting-started/contents#ordering)
37+
The navigation tree is generated based on the directory structure and ordering happens based on files [ordering](/docs/getting-started/contents#ordering)

docs/content/docs/4.components/0.content-renderer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: ContentRenderer
33
description: 'Takes your component from an AST to a wonderful template.'
44
---
55

6-
The `<ContentRenderer>` component renders a document coming from a query with [`queryCollections()`](/api/query-collection).
6+
The `<ContentRenderer>` component renders a document coming from a query with [`queryCollections()`](/docs/composables/query-collection).
77

88
> This component works only with `pages` collections.
99

docs/content/docs/4.components/2.prose.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Prose component are origianlly part of [`@nuxtjs/mdc`](https://github.com/nuxt-m
1818

1919
::code-group
2020
```md [Code]
21-
[Link](/components/prose)
21+
[Link](/docs/components/prose)
2222
```
2323

2424
::preview-card{label="Preview"}
25-
[Link](/components/prose)
25+
[Link](/docs/components/prose)
2626
::
2727
::
2828

0 commit comments

Comments
 (0)