Gatsby Transformer Gitinfo screenshot

Gatsby Transformer Gitinfo

Author Avatar Theme by Kraynel
Updated: 4 Jul 2020
12 Stars

Overview

If you’re working with Gatsby and want to enhance the way you manage files in your project, the gatsby-transformer-gitinfo plugin is a valuable tool. This plugin helps you integrate Git information directly into your file nodes, making it easier to track file changes and commitments. By adding details such as the latest commit date, author name, and email, this tool provides you with insights right within your Gatsby application, streamlining your workflow.

The setup is straightforward, requiring you to install it alongside gatsby-source-filesystem. Once configured, you’ll be able to access essential Git metadata directly from your GraphQL schema, enhancing your data querying capabilities. This integration empowers developers to incorporate version control details seamlessly into their applications.

Features

  • Git Metadata Integration: Automatically adds Git information to file nodes, including the latest commit’s author and date.
  • Flexible Configuration: Customize the plugin behavior using options like include, ignore, and dir to manage which files to process.
  • GraphQL Schema Exposure: The added fields are available in the GraphQL schema, making it easy to query for Git details in your application.
  • Version Control Awareness: If a file isn’t versioned in Git, the added fields return null, allowing you to check the status of your files easily.
  • Execution Order Control: The plugin processes files based on the specified inclusion and ignoring regex rules, giving you precise control over file handling.