How to use the gatsby-tinacms-remark.liveRemarkForm function in gatsby-tinacms-remark

To help you get started, we’ve selected a few gatsby-tinacms-remark examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tinacms / tinacms / packages / demo-gatsby / src / templates / blog-post.js View on Github external
return "packages/demo-gatsby" + postDirectory
      },

      // Generate the src attribute for the preview image.
      previewSrc: (formValues, { input }) => {
        let path = input.name.replace("rawFrontmatter", "frontmatter")
        let gastbyImageNode = get(formValues, path)
        if (!gastbyImageNode) return ""
        return gastbyImageNode.childImageSharp.fluid.src
      },
    },
  ],
}

export default liveRemarkForm(BlogPostTemplate, BlogPostForm)

export const pageQuery = graphql`
  query BlogPostBySlug($slug: String!) {
    site {
      siteMetadata {
        title
        author
      }
    }
    markdownRemark(fields: { slug: { eq: $slug } }) {
      ...TinaRemark
      id
      excerpt(pruneLength: 160)
      html
      frontmatter {
        blocks {

gatsby-tinacms-remark

A Gatsby/Tina plugin for **editing Markdown files stored in git**.

Apache-2.0
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis