Closed
Description
Description
When I try to run gridsome build
the manually created static pages have no access to the defined "context".
Steps to reproduce
createPage({
path: "/Kontakt",
component: "./src/pages/Contact.vue",
context: {
title: "Kontakt",
content: "Something",
}
});
<template>
<Layout>
<div v-html="$context.content"></div>
</Layout>
</template>
<script>
export default {
metaInfo() {
return {
title: this.$context.title
};
}
};
</script>
<style lang="scss" scoped></style>
Expected result
Should render as in the development mode.
Actual result
Failed to render /kontakt
TypeError: Cannot read property 'content' of null
Environment
Libs:
- gridsome version: 0.6.1
- @gridsome/cli version: 0.0.8
For Tooling issues:
- Node version: 11.15.0
- Platform: Mac