You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+7-6
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# gatsby-transformer-gitinfo
2
2
3
-
Add some git information on `File` fields: latest commit date, author and email.
3
+
Add some git information on `File` fields from latest commit: date, author and email.
4
4
5
5
## Install
6
6
@@ -16,22 +16,22 @@ In your `gatsby-config.js`
16
16
```javascript
17
17
module.exports= {
18
18
plugins: [
19
-
`gatsby-transformer-gitinfo`,
20
19
{
21
20
resolve:`gatsby-source-filesystem`,
22
21
options: {
23
22
path:`./src/data/`,
24
23
},
25
24
},
25
+
`gatsby-transformer-gitinfo`,
26
26
],
27
27
}
28
28
```
29
29
30
30
Where the _source folder_`./src/data/` is a git versionned directory.
31
31
32
-
The plugin will add three fields to `File` nodes: `gitDate`, `gitAuthorName` and `gitAuthorEmail`. These fields are relative to the latest commit touching that file.
32
+
The plugin will add three fields to `File` nodes: `gitDate`, `gitAuthorName` and `gitAuthorEmail`. These fields are related to the latest commit touching that file.
33
33
34
-
If the file is not versionned, these feilds will be `null`.
34
+
If the file is not versionned, these fields will be `null`.
35
35
36
36
They are exposed in your graphql schema which you can query:
37
37
@@ -57,7 +57,7 @@ query {
57
57
}
58
58
```
59
59
60
-
Now you have a File node to work with:
60
+
Now you have a `File` node to work with:
61
61
62
62
```json
63
63
{
@@ -125,6 +125,7 @@ module.exports = {
125
125
}
126
126
```
127
127
128
+
## Example
128
129
129
130
Note: the execution order is first whitelist, then blacklist.
0 commit comments