Hello,
I have a problem with the apiOptions.routes
in the Prismic module.
The generator hook is launched but in no document I have the url
property. Could it be that it's not deployed on the cluster I'm using? Or a problem with my configuration
Running "@nuxtjs/prismic": "^1.2.4"
See here my nuxt.config.js
file.
I also tried with a simpler setup but it doesn't work
export default {
// Target (https://go.nuxtjs.dev/config-target)
target: 'static',
// Src directory (https://nuxtjs.org/guides/configuration-glossary/configuration-srcdir)
srcDir: 'src/',
// Global page headers (https://go.nuxtjs.dev/config-head)
head: {
title: 'Prismea',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
},
// Global CSS (https://go.nuxtjs.dev/config-css)
css: [],
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
plugins: [],
// Auto import components (https://go.nuxtjs.dev/config-components)
components: true,
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
buildModules: [
// https://go.nuxtjs.dev/typescript
'@nuxt/typescript-build',
// https://go.nuxtjs.dev/stylelint
'@nuxtjs/stylelint-module',
],
// Modules (https://go.nuxtjs.dev/config-modules)
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
'@nuxtjs/prismic',
],
prismic: {
endpoint: 'https://prismea-dev.cdn.prismic.io/api/v2',
apiOptions: {
routes: [
{
type: 'homepage',
path: '/',
},
{
type: 'page',
path: '/:leve1?/level2?/:uid',
resolvers: {
level1: 'parent_page',
level2: 'parent_page.parent_page',
},
},
{
type: 'blog_home',
path: '/:uid',
},
{
type: 'blog_post',
path: '/:level1?/:uid',
resolvers: {
parent: 'parent_page',
},
},
],
},
},
router: {
extendRoutes(routes, resolve) {
routes.push({
name: 'recursive-page',
path: '/:level1?/:level2?/:uid',
component: resolve(__dirname, 'src/pages/_uid.vue'),
});
},
},
// Axios module configuration (https://go.nuxtjs.dev/config-axios)
axios: {},
// Build Configuration (https://go.nuxtjs.dev/config-build)
build: {},
loading: {
color: '#c95469',
height: '5px',
},
};
Thanks