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
+17-19
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,21 @@
2
2
3
3
Add some git information on `File` fields from latest commit: date, author, and email.
4
4
5
+
This fork was created to add information for files that are added via symlink,
6
+
such as to combine files from other git repositories.
7
+
The plugin will resolve the symlink to the original file
8
+
and base the information on the git repository at the original location.
9
+
5
10
## Install
6
11
7
12
`yarn add @colliercz/gatsby-transformer-gitinfo`
8
13
9
-
**Note:** You also need to have `gatsby-source-filesystem` installed and configured so it
10
-
points to your files.
14
+
**Note:** You also need to have `gatsby-source-filesystem` installed
15
+
and configured so it points to your files.
11
16
12
17
## How to use
13
18
14
-
In your `gatsby-config.js`
19
+
In your `gatsby-config.js`, add:
15
20
16
21
```javascript
17
22
module.exports= {
@@ -29,7 +34,9 @@ module.exports = {
29
34
30
35
Where the _source folder_`./src/data/` is a git versionned directory.
31
36
32
-
The plugin will add several fields to `File` nodes: `gitLogLatestAuthorName`, `gitLogLatestAuthorEmail`, and `gitLogLatestDate`. These fields are related to the latest commit touching that file.
37
+
The plugin will add several fields to `File` nodes:
38
+
`gitLogLatestAuthorName`, `gitLogLatestAuthorEmail`, and `gitLogLatestDate`.
39
+
These fields are related to the latest commit touching that file.
33
40
34
41
If the file is not versionned, these fields will be `null`.
35
42
@@ -45,12 +52,6 @@ query {
45
52
gitLogLatestAuthorEmail
46
53
gitLogLatestDate
47
54
}
48
-
internal {
49
-
type
50
-
mediaType
51
-
description
52
-
owner
53
-
}
54
55
}
55
56
}
56
57
}
@@ -69,14 +70,7 @@ Now you have a `File` node to work with:
0 commit comments