Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myproject/
- |---src/
- |---CMS
- |---about.md
- |---index.md
- |---pages
- |---about.js
- |---index.js
- ---
- title: "About Page"
- intro: "This is all about is"
- ---
- We are doing this because we love it and we are good at it.
- {
- resolve: `gatsby-source-filesystem`,
- options: {
- path: `${__dirname}/src/CMS`, <-- your CMS folder
- name: `pages`, <-- will be your `sourceInstanceName` when you query `allFile`
- },
- },
- import React from 'react'
- import { graphql } from 'gatsby'
- export default class Index extends React.Components {
- ...
- }
- export const pageQuery = graphql`
- query {
- markdownRemark(frontmatter: {
- title: {
- eq: "New Beginnings"
- }
- }) {
- id
- frontmatter {
- title
- }
- }
- }
- `
Add Comment
Please, Sign In to add comment