-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: lihbr <[email protected]>
- Loading branch information
Showing
6 changed files
with
96 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ export default defineNuxtConfig({ | |
path: '/' | ||
} | ||
] | ||
|
||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,89 @@ | ||
import { PrismicPluginOptions } from '@prismicio/vue' | ||
import type { PrismicPluginOptions } from '@prismicio/vue' | ||
|
||
/** | ||
* `@nuxtjs/prismic` module options. | ||
* | ||
* @see Module documentation: {@link https://prismic.nuxtjs.org} | ||
* @see Prismic documentation: {@link https://prismic.io/docs/nuxt-3-setup} | ||
*/ | ||
export type PrismicModuleOptions = Omit<PrismicPluginOptions, 'endpoint' | 'client' | 'linkResolver' | 'htmlSerializer' | 'richTextSerializer'> & { | ||
/** | ||
* A Prismic repository endpoint to init the module's `@prismicio/client` | ||
* instance used to fetch content from a Prismic repository with. | ||
* | ||
* @remarks | ||
* Said client will be used exposed through `this.$prismic.client` and | ||
* `usePrismic().client`. | ||
* @example | ||
* | ||
* ```javascript | ||
* // A repository ID | ||
* "my-repo"; | ||
* | ||
* //A full repository endpoint | ||
* "https://my-repo.cdn.prismic.io/api/v2"; | ||
* ``` | ||
* | ||
* @see Prismic client documentation {@link https://prismic.io/docs/technical-reference/prismicio-client} | ||
*/ | ||
endpoint: string; | ||
|
||
/** | ||
* The Prismic environment in use by Slice Machine configured through | ||
* environment variables. | ||
* | ||
* @defaultValue `endpoint` value. | ||
* | ||
* @internal | ||
*/ | ||
environment?: string; | ||
|
||
/** | ||
* An optional path to a file exporting a `@prismicio/client` instance used | ||
* to fetch content from a Prismic repository to configure the module with. | ||
* | ||
* @remarks | ||
* Said client will be used exposed through `this.$prismic.client` and | ||
* `usePrismic().client`. | ||
* @see Prismic client documentation {@link https://prismic.io/docs/technical-reference/prismicio-client} | ||
*/ | ||
client?: string; | ||
|
||
/** | ||
* An optional path to a file exporting a link resolver function used to | ||
* resolve links to Prismic documents when not using the route resolver | ||
* parameter with `@prismicio/client`. | ||
* | ||
* @see Link resolver documentation {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
*/ | ||
linkResolver?: string; | ||
|
||
/** | ||
* An optional path to a file exporting an HTML serializer to customize | ||
* the way rich text fields are rendered. | ||
* | ||
* @see HTML serializer documentation {@link https://prismic.io/docs/rich-text} | ||
*/ | ||
richTextSerializer?: string; | ||
|
||
/** | ||
* Desired path of the preview page used by Prismic to enter preview | ||
* session. | ||
* | ||
* @remarks | ||
* `false` can be used to disable the preview page. | ||
* | ||
* @defaultValue `"/preview"` | ||
*/ | ||
preview?: string | false; | ||
|
||
/** | ||
* Whether or not to inject Prismic toolbar script. | ||
* | ||
* @remarks | ||
* The toolbar script is required for previews to work. | ||
* | ||
* @defaultValue `true` | ||
*/ | ||
toolbar?: boolean; | ||
}; |