Skip to content

Commit

Permalink
docs: Fix typo (#1632)
Browse files Browse the repository at this point in the history
  • Loading branch information
selemondev committed Oct 21, 2022
1 parent fc4eb54 commit 279721c
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/content/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Powerful Features
#title
Code highlighting
#description
Display beautiful code blocks in your website with the Shiki integration supporting VS Code themes.
Display beautiful code blocks on your website with the Shiki integration supporting VS Code themes.
::

::card
Expand Down
2 changes: 1 addition & 1 deletion docs/content/2.get-started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Get Started
description: How to start with Nuxt Content, by creating a fresh new project or adding it to your Nuxt application.
description: How to get started with Nuxt Content by creating a new project or adding it to an existing Nuxt application.
icon: heroicons-outline:lightning-bolt
layout: page
constrainedClass: 'max-w-4xl'
Expand Down
6 changes: 3 additions & 3 deletions docs/content/3.guide/1.writing/2.markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Nuxt Content uses the Markdown syntax and conventions to provide a rich-text edi

## Prose

In Nuxt Content, Prose represents the HTML tags output from the Markdown syntax, for example title levels, links... A Vue component corresponds to each tag, allowing you to override them if needed.
In Nuxt Content, Prose represents the HTML tags generated by the Markdown syntax, such as title levels and links. A Vue component corresponds to each tag, allowing you to override them if needed.

::alert{type=info}
Read the complete Prose reference in the [API section](/api/components/prose)
Expand Down Expand Up @@ -36,7 +36,7 @@ If you want to customize a Prose component, here are the recommended steps:

- Checkout the original [component sources](https://github.com/nuxt/content/tree/main/src/runtime/components/Prose).
- Use the exact same props.
- Name it the same in your `components/content/` directory.
- In your `components/content/` directory, give it the same name.
- Make it yours 🚀.

## Front-matter
Expand Down Expand Up @@ -100,7 +100,7 @@ Example variables will be injected into the document:

## Code Highlighting

Code highlighting allows you to display beautiful code blocks in your website.
Code highlighting allows you to display beautiful code blocks on your website.

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

Expand Down
2 changes: 1 addition & 1 deletion docs/content/3.guide/1.writing/3.mdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Attributes are useful for highlighting and modifying part of paragraph. The synt
::
::

Other than `span`s the attribute syntax will work on images, links, `code`, **bold** and _italic_ texts.
Other than `spans` the attribute syntax will work on images, links, `code`, **bold** and _italic_ texts.

::code-group

Expand Down
10 changes: 5 additions & 5 deletions docs/content/3.guide/1.writing/7.document-driven.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default defineNuxtConfig({

### Fresh project

Start with a fresh project with the document driven mode enabled:
Start a new project with the document-driven mode enabled:

::code-group
```bash [npx]
Expand Down Expand Up @@ -53,11 +53,11 @@ my-project/
tsconfig.json
```

It comes with a direct binding between your page’s metadada to the OpenGraph tags using the [useContentHead() composable](/api/composables/use-content-head), providing effective SEO with no configuration.
It comes with a direct binding between your page’s meta data to the OpenGraph tags using the [useContentHead() composable](/api/composables/use-content-head), providing effective SEO with no configuration.

### Page slots

That page comes with 2 slot components that you can replace at your project level.
The page comes with 2 slot components that you can replace at your project level.

To do so, you only have to create a component with the same name in your project `components/` directory.

Expand Down Expand Up @@ -213,7 +213,7 @@ definePageMeta({
```

::alert
If you change `page` option and leave `surround` unset, `surround` option will use same config and `page`.
If you change `page` option and leave `surround` unset, `surround` option will use the same config and `page`.
```html
<script setup lang="ts">
definePageMeta({
Expand All @@ -230,4 +230,4 @@ definePageMeta({

## Example

Jump into the [Document Driven Example](/examples/essentials/document-driven) to see a working example.
Jump into the [Document Driven Example](/examples/essentials/document-driven) to see a working example.
6 changes: 3 additions & 3 deletions docs/content/3.guide/2.displaying/1.rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Nuxt Content provides 2 components to render Markdown content in a rich-text for
- The `<ContentRenderer>` component renders a Markdown document returned by [`queryContent()`](/guide/displaying/querying).

::alert
`<ContentDoc>` and `<ContentRenderer />` components are auto-imported so any component or page can use it.
`<ContentDoc>` and `<ContentRenderer />` components are auto-imported, so any component or page can use them.
::

## `<ContentDoc />`
Expand All @@ -17,7 +17,7 @@ The `<ContentDoc>` component fetches a document and renders it in a rich-text fo

The fetching endpoint defaults to the current route (`$route.path`). An explicit path can be passed to the component with the `path` props.

Create a [catch all route](https://v3.nuxtjs.org/guide/directory-structure/pages/#catch-all-route) named `pages/[...slug].vue` and the component:
Create a [catch all route](https://v3.nuxtjs.org/guide/directory-structure/pages/#catch-all-route) named `pages/[...slug].vue` and add the component:

```vue [pages/[...slug].vue]
<template>
Expand All @@ -39,7 +39,7 @@ You can use the `<ContentDoc>` component to render a specific document by specif
</template>
```

Note that no head management will be made when the `path` is specified.
Note that no head management will be done when the `path` is specified.

Take a look at the [Hello world](/examples/essentials/hello-world) example to see it in action.

Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.guide/2.displaying/3.navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ It allows you to create advanced navigation components without having to maintai

## Structure

The navigation object can be seen as a tree representing in a JSON format the structure of your content sources.
The navigation object can be seen as a tree, representing the structure of your content sources in JSON format.

It is divided in two type of nodes, **pages** and **directories**.
It is divided into two types of nodes: **pages** and **directories**.

::code-group

Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.guide/2.displaying/4.typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ The module exposes typings properly from configuration to query builder.

When using `queryContent()`{lang="ts"}, you will retrieve a [`QueryBuilder`](https://github.com/nuxt/content/blob/main/src/runtime/types.d.ts#L128) instance.

Once using one of the fetching methods (`find()`{lang="ts"}, `findOne()`{lang="ts"}, `findSurround()`{lang="ts"}), you will retrieve an object of type [`ParsedContent`](https://github.com/nuxt/content/blob/main/src/runtime/types.d.ts#L128).
Once you use one of the fetching methods (`find()`{lang="ts"}, `findOne()`{lang="ts"}, `findSurround()`{lang="ts"}), you will retrieve an object of type [`ParsedContent`](https://github.com/nuxt/content/blob/main/src/runtime/types.d.ts#L128).

## Type augmentation

If you are adding keys to front-matter other than the [defaults key](/guide/writing/markdown#front-matter), you might want to have typings over these.
If you are adding keys to the front-matter other than the [default keys](/guide/writing/markdown#front-matter), you might want to have typings over these.

This is currently possible, yet not in an _optimal_ way.

Expand Down
6 changes: 3 additions & 3 deletions docs/content/3.guide/3.recipes/1.sitemap.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Sitemap

A sitemap file is useful for helping Google to better index your website, ensuring that the content you write can be visible on search results.
A sitemap file is useful for helping Google to better index your website, ensuring that the content you write can be visible in search results.

This can be created utilising the `sitemap` library, so you'll need to install that which can be done like so:
This can be created by utilising the `sitemap` library, which can be installed as follows:

::code-group
```bash [yarn]
Expand All @@ -18,7 +18,7 @@ This can be created utilising the `sitemap` library, so you'll need to install t

## Server Route

We will be utilising the [server routes](https://v3.nuxtjs.org/guide/features/server-routes) available within Nuxt, and to do so you'll need to create the `server/` directory within your websites root directly.
We will be utilising the [server routes](https://v3.nuxtjs.org/guide/features/server-routes) available within Nuxt, and to do so you'll need to create the `server/` directory within your website`s root directly.

Once this is done, create a `routes/` directory inside this, and add a `sitemap.xml.ts` file, this will translate to `/sitemap.xml`.

Expand Down
10 changes: 5 additions & 5 deletions docs/content/3.guide/5.migration/1.from-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ There is no global `$content` variable, instead you can use `queryContent` compo
+ const { data: posts } = await useAsyncData('posts-list', () => queryContent('/blog').only(['title']).find())
```

`queryContent` provide same utilities as legacy `$content` with some improvements:
`queryContent` provides same utilities as legacy `$content` with some improvements:

- `fetch` dropped in favor of new find utils
- [`find`](/api/composables/query-content#find): retrieve a list of contents
- [`findOne`](/api/composables/query-content#findOne): retrive first matched content
- [`findOne`](/api/composables/query-content#findOne): retrieve first matched content
- `surround` dropped in favor of [`findSurround`](/api/composables/query-content#findSurround)
- [`where`](/api/composables/query-content#where) utility can be chained

Expand All @@ -58,19 +58,19 @@ There is no global `$content` variable, instead you can use `queryContent` compo
```

- There is no `search` utility for full text search.
- Find utilities does not contains body of documents and they only include meta information of parsed contents. You can fetch contents body using `getContentDocument`(non-reactive) or `useContentDocument`(reactive) composables
- Find utilities does not contain body of documents and they only include meta information of parsed contents. You can fetch the body's contents using `getContentDocument`(non-reactive) or `useContentDocument`(reactive) composables

```js
const doc = await getContentDocument(post.id)
```

- There is new [`findNavigation`](/api/composables/query-content#findnavigation) utility to retrieve navigation object
- There is a new [`findNavigation`](/api/composables/query-content#findnavigation) utility to retrieve navigation object

## Rendering Content

`<NuxtContent>` component removed in favor of a `<ContentRenderer>` component.

`<ContentDoc>` component receive document path then fetch and render the document.
`<ContentDoc>` component receives a document path and then fetches and renders the document.

```vue
<script setup lang="ts">
Expand Down

0 comments on commit 279721c

Please sign in to comment.