{title}
+article body
+You just hit a route that doesn't exist... the sadness.
++ ELLO yes +
+ ); +}; + +export default Example; diff --git a/examples/default/src/templates/article.js b/examples/default/src/templates/article.js new file mode 100644 index 000000000..dec54953c --- /dev/null +++ b/examples/default/src/templates/article.js @@ -0,0 +1,33 @@ +import React from 'react'; +import { graphql } from 'gatsby'; +import { get } from 'lodash'; + +export const query = graphql` + query ArticleQuery($uid: String) { + prismic { + allArticles(uid: $uid) { + edges { + node { + _meta { + uid + } + title + } + } + } + } + } +`; + +const Article = props => { + console.log('Article.props', props); + const title = get(props.data, 'prismic.allArticles.edges.0.node.title.0.text'); + return ( +article body
+