diff --git a/cypress/e2e/conceptSchemeAndConcept.cy.js b/cypress/e2e/conceptSchemeAndConcept.cy.js index 97ec3fe..7689c06 100644 --- a/cypress/e2e/conceptSchemeAndConcept.cy.js +++ b/cypress/e2e/conceptSchemeAndConcept.cy.js @@ -64,6 +64,16 @@ describe("Concept Scheme and Concept", () => { cy.get("h1").should("have.text", "Hash URI Konzept Schema") }) + it("Visting a hash URI Concept Scheme with hash uri in URL works", () => { + cy.visit("/example.org/hashURIConceptScheme.html#scheme", { + onBeforeLoad(win) { + Object.defineProperty(win.navigator, "language", { value: "de-DE" }) + }, + }) + cy.get(".conceptScheme > a").should("have.text", "Hash URI Konzept Schema") + cy.get("h1").should("have.text", "Hash URI Konzept Schema") + }) + it("Visting a hash URI Concept works", () => { cy.visit("/example.org/hashURIConceptScheme.html#concept1", { onBeforeLoad(win) { diff --git a/gatsby-node.js b/gatsby-node.js index e0db5a3..c817f73 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -299,7 +299,14 @@ exports.createPages = async ({ graphql, actions: { createPage } }) => { const conceptsInScheme = await graphql( queries.allConcept(conceptScheme.id, languages) ) - const embeddedConcepts = [] + // embed concept scheme data + const embeddedConcepts = [ + { + json: omitEmpty(Object.assign({}, conceptScheme, context.jsonld)), + jsonld: omitEmpty(Object.assign({}, conceptScheme, context.jsonld)), + }, + ] + conceptsInScheme.data.allConcept.edges.forEach(({ node: concept }) => { const json = omitEmpty(Object.assign({}, concept, context.jsonld)) const jsonld = omitEmpty(Object.assign({}, concept, context.jsonld)) diff --git a/src/components/Collection.jsx b/src/components/Collection.jsx index 4dcd86b..5556116 100644 --- a/src/components/Collection.jsx +++ b/src/components/Collection.jsx @@ -15,7 +15,7 @@ const Collection = ({ pageContext: { node: collection, customDomain } }) => { }, [data?.selectedLanguage]) return ( -