Skip to content

Commit

Permalink
docs: update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed Jun 6, 2023
1 parent b65068a commit 238ae4d
Show file tree
Hide file tree
Showing 19 changed files with 10,756 additions and 17,922 deletions.
2 changes: 2 additions & 0 deletions docs/.nuxtrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports.autoImport=true
typescript.includeWorkspace=true
2 changes: 0 additions & 2 deletions docs/_redirects

This file was deleted.

46 changes: 46 additions & 0 deletions docs/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
export default defineAppConfig({
docus: {
title: 'Nuxt Prismic',
description: 'Easily connect your Nuxt application to your content hosted on Prismic.',
url: 'https://prismic.nuxtjs.org',
image: 'https://prismic.nuxtjs.org/cover.jpg',
socials: {
twitter: 'nuxt_js',
github: 'nuxt-modules/prismic'
},
header: {
logo: true,
showLinkIcon: true,
exclude: [],
fluid: true
},
main: {
padded: true,
fluid: true
},
aside: {
level: 1,
collapsed: false,
exclude: []
},
footer: {
iconLinks: [
{
href: 'https://nuxt.com',
icon: 'IconNuxt'
},
{
href: 'https://prismic.io',
icon: 'IconPrismic'
}
]
},
github: {
dir: 'docs/content',
branch: 'master',
repo: 'prismic',
owner: 'nuxt-modules',
edit: true
},
}
})
1 change: 0 additions & 1 deletion docs/components/Logo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,5 @@
fill="#D77EE9"
/>
</svg>
<span class="inline-flex items-center mt-1.2 px-2 py-0.5 rounded text-xs font-bold font-mono bg-primary-100 dark:bg-primary-800 dark:text-white">RC</span>
</figure>
</template>
95 changes: 43 additions & 52 deletions docs/content/0.index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
title: 'Get Started'
navigation: false
layout: fluid
layout: page
main:
fluid: false
---

:ellipsis{right=0px width=75% blur=150px}

::block-hero
---
cta:
Expand All @@ -12,7 +16,7 @@ cta:
secondary:
- Open on GitHub →
- https://github.com/nuxt-modules/prismic
snippet: npm install --save-dev @nuxtjs/prismic@rc
snippet: npm install --save-dev @nuxtjs/prismic
---

#top
Expand All @@ -25,78 +29,65 @@ to: https://v1.prismic.nuxtjs.org
::

#title
Nuxt [Prismic]{ .text-primary-500 }
Build a website that keeps getting better.

#description
Easily connect your Nuxt 3 application to your content hosted on [Prismic](https://prismic.io).

#extra
::alert{type="info" style="max-width: 40rem"}
Like Nuxt 3 used to be, this module is in an RC phase. We're polishing the remaining rough edges before launching a stable release <Icon name="noto:rocket" class="inline" />

<br />
<br />

Found a bug? Have a idea? [Share it with us on GitHub](https://github.com/nuxt-modules/prismic/issues/new/choose) ->
::
Easily connect your Nuxt application to your content hosted on [Prismic](https://prismic.io) and create a website builder that gives marketers complete freedom to grow their websites without compromise.

::

::card-grid

#title
Feature Highlight
What's included

#root
:ellipsis{left=0px width=40rem top=10rem blur=140px}

#default
::card
---
icon: noto:rocket
title: Quick Setup
description: Add Prismic to your Nuxt app in seconds.
---
::card{icon=noto:rocket}
#title
Quick Setup
#description
Add Prismic to your Nuxt app in seconds.
::

::card
---
icon: noto:battery
title: Batteries Included
description: Components, composables, helpers, everything you need to develop with Prismic.
---
::card{icon=noto:battery}
#title
Batteries Included
#description
Components, composables, helpers, everything you need to develop with Prismic.
::

::card
---
icon: noto:right-pointing-magnifying-glass
title: Content Previews
description: Get scoped, shareable previews with Prismic previews out of the box.
---
::card{icon=noto:right-pointing-magnifying-glass}
#title
Content Previews
#description
Get scoped, shareable previews with Prismic previews out of the box.
::

::card
---
icon: noto:kitchen-knife
description: Already there for Nuxt 2, coming soon for Nuxt 3.
---

::card{icon=noto:kitchen-knife}
#title
Slice Machine Experience <span class="inline-flex items-center mt-1px px-2 py-0.5 rounded text-xs font-bold font-mono bg-primary-100 dark:bg-primary-800 dark:text-white" style="vertical-align: super">soon</span>
Slice Machine Experience
#description
Already there for Nuxt 2, coming soon for Nuxt 3.

::

::card
---
icon: noto:japanese-service-charge-button
title: TypeScript DX
description: First-class support for TypeScript included for a nicer experience.
---
::card{icon=noto:japanese-service-charge-button}
#title
TypeScript DX
#description
First-class support for TypeScript included for a nicer experience.

::

::card
---
icon: noto:index-pointing-at-the-viewer
title: Your Code, Your Style
description: Composition API? Options API? Both are supported.
---
::card{icon=noto:index-pointing-at-the-viewer}
#title
Your Code, Your Style
#description
Composition API? Options API? Both are supported.

::

::
11 changes: 5 additions & 6 deletions docs/content/1.get-started.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
layout: page
aside: true
icon: heroicons-outline:lightning-bolt
title: Get Started
description: A dependency and two lines of config and you'll be ready to go.
main:
fluid: false
---

::article-hero
::
# Getting Started

1. Install dependency:
1. Install dependency

::code-group
```bash [Yarn]
Expand All @@ -20,7 +19,7 @@ description: A dependency and two lines of config and you'll be ready to go.
```
::

2. Update Nuxt config:
2. Update Nuxt config

```diff [nuxt.config.ts]
import { defineNuxtConfig } from 'nuxt'
Expand Down
2 changes: 2 additions & 0 deletions docs/content/2.guides/1.basics/1.fetching-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Fetching Content
description: ''
---

# Fetching Content

The module exposes an [`@prismicio/client`](https://prismic.io/docs/technical-reference/prismicio-client?utm_campaign=devexp&utm_source=nuxt3doc&utm_medium=doc) instance. You can access it through the globally available `usePrismic()` composable:

```vue[app.vue]
Expand Down
4 changes: 3 additions & 1 deletion docs/content/2.guides/1.basics/2.templating-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Templating Content
description: ''
---

# Templating Content

The module injects multiple components to template Prismic data. By default, they are made available globally in your application:

```html [*.vue]
Expand All @@ -20,5 +22,5 @@ The module injects multiple components to template Prismic data. By default, the
```

::alert{type="info"}
Learn more about injected components in the [`@prismicio/vue` documentation](https://prismic.io/docs/technical-reference/prismicio-vue?version=v3&utm_campaign=devexp&utm_source=nuxt3doc&utm_medium=doc#components-usage) ->
Learn more about injected components in the [`@prismicio/vue` documentation](https://prismic.io/docs/technical-reference/prismicio-vue?version=v3&utm_campaign=devexp&utm_source=nuxt3doc&utm_medium=doc#components-usage).
::
2 changes: 2 additions & 0 deletions docs/content/2.guides/2.advanced/1.custom-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Custom Client
description: ''
---

# Custom Client

You can make the module use your own [`@prismicio/client`](https://prismic.io/docs/technical-reference/prismicio-client?utm_campaign=devexp&utm_source=nuxt3doc&utm_medium=doc) instance. To do so, export it from `~/app/prismic/client`:

```javascript [~/app/prismic/client.[jt]s]
Expand Down
2 changes: 2 additions & 0 deletions docs/content/2.guides/2.advanced/2.link-resolver.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Link Resolver
description: ''
---

# Link Resolver

::alert{type="warning"}
We recommend you use the more modern [Route Resolver](https://prismic.io/docs/route-resolver) whenever possible over the Link Resolver. We now only recommend to use the Link Resolver as an escape hatch.
::
Expand Down
2 changes: 2 additions & 0 deletions docs/content/2.guides/2.advanced/3.rich-text-serializer.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Rich Text Serializer
description: ''
---

# Rich Text Serializer

You can make the module use a [Rich Text Serializer](https://prismic.io/docs/core-concepts/html-serializer?utm_campaign=devexp&utm_source=nuxt3doc&utm_medium=doc). To do so, export one from `~/app/prismic/richTextSerializer`:

```javascript [~/app/prismic/richTextSerializer.[jt]s]
Expand Down
2 changes: 2 additions & 0 deletions docs/content/2.guides/2.advanced/4.custom-preview-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Custom Preview Page
description: ''
---

# Custom Preview Page

You can override the default preview page by creating a page at the `/preview` route:

```vue[~/pages/preview.vue]
Expand Down
Loading

0 comments on commit 238ae4d

Please sign in to comment.