Skip to content
Snippets Groups Projects
Commit 4e9738fb authored by Tarje.Lavik's avatar Tarje.Lavik
Browse files

Fix manifest url for documents only in Sanity

parent d2b581b0
No related branches found
No related tags found
No related merge requests found
import groq from 'groq'
const basePath = process.env.NEXT_PUBLIC_BASE_PATH
export const humanMadeObjectFields = groq`
_id,
......@@ -28,7 +29,7 @@ export const humanMadeObjectFields = groq`
subjectOfManifest,
"manifest": coalesce(
subjectOfManifest,
"/api/manifest/" + _id
"${basePath}/api/manifest/" + _id
),
preferredIdentifier,
identifiedBy[] {
......
import { groq } from 'next-sanity'
import { activityStreamFields, siteSettings } from './fragments'
const basePath = process.env.NEXT_PUBLIC_BASE_PATH
/**
* Enum of Classes that should generate pages
......@@ -9,11 +10,11 @@ import { activityStreamFields, siteSettings } from './fragments'
export const publicDocumentTypes = [
'HumanMadeObject',
'Actor',
'Group',
'Concept',
'ObjectType',
'Place',
'Event',
'LinguisticDocument',
]
export const actorsQuery = groq`
......@@ -130,7 +131,7 @@ export const routesQuery = groq`
export const routeQuery = groq`
{
"route": *[ _type == "Route" && slug.current == $joinID ][0] {
"route": *[ _type == "Route" && slug.current == $slug ] {
...,
page->{
...,
......@@ -216,7 +217,7 @@ export const routeQuery = groq`
"manifest": coalesce(
subjectOfManifest,
manifestUrl,
"/api/manifest/" + _id
"${basePath}/api/manifest/" + _id
),
canvasUrl,
}
......@@ -237,7 +238,7 @@ export const routeQuery = groq`
"manifest": coalesce(
subjectOfManifest,
manifestUrl,
"/api/manifest/" + _id
"${basePath}/api/manifest/" + _id
),
canvasUrl,
}
......@@ -283,7 +284,7 @@ export const routeQuery = groq`
"manifest": coalesce(
subjectOfManifest,
manifestUrl,
"/api/manifest/" + _id
"${basePath}/api/manifest/" + _id
),
canvasUrl,
}
......@@ -336,7 +337,7 @@ export const routeQuery = groq`
"manifest": coalesce(
subjectOfManifest,
manifestUrl,
"/api/manifest/" + _id
"${basePath}/api/manifest/" + _id
),
canvasUrl,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment