Guest User

Untitled

a guest
Jan 18th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. myproject/
  2. |---src/
  3. |---CMS
  4. |---about.md
  5. |---index.md
  6. |---pages
  7. |---about.js
  8. |---index.js
  9.  
  10. ---
  11. title: "About Page"
  12. intro: "This is all about is"
  13. ---
  14. We are doing this because we love it and we are good at it.
  15.  
  16. {
  17. resolve: `gatsby-source-filesystem`,
  18. options: {
  19. path: `${__dirname}/src/CMS`, <-- your CMS folder
  20. name: `pages`, <-- will be your `sourceInstanceName` when you query `allFile`
  21. },
  22. },
  23.  
  24. import React from 'react'
  25. import { graphql } from 'gatsby'
  26.  
  27. export default class Index extends React.Components {
  28. ...
  29. }
  30.  
  31. export const pageQuery = graphql`
  32. query {
  33. markdownRemark(frontmatter: {
  34. title: {
  35. eq: "New Beginnings"
  36. }
  37. }) {
  38. id
  39. frontmatter {
  40. title
  41. }
  42. }
  43. }
  44. `
Add Comment
Please, Sign In to add comment