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
| repositoryUrl |`string`|`undefined`| The URL of the repository. |
97
-
| contributor.mode |`'api'`\|`'log'`\|`'shortLog'`|`'api'`| The method to generate Git information. |
98
-
| contributor.logArgs |`string`|`''`| Additional arguments for `git log` command. |
99
-
100
-
Besides the `api` method, the `mode` option also includes `log` and `shortLog` methods. These methods allow you to generate Git information during build time, with the `git log` command by default adding the `--no-merges` parameter.
| repositoryUrl |`string`|`undefined`| The URL of the GitHub repository. This is used to specify the repository from which to fetch information. |
85
+
| contributor.mode |`'api'`\|`'git'`|`'api'`| Defines the method to retrieve Git contributor information. If set to `'api'`, the GitHub API is used. If set to `'log'`, the `git log` command is used during build time, with the `--no-merges` parameter added by default. |
86
+
| contributor.logArgs |`string`|`''`| Additional arguments passed to the `git log` command when `contributor.mode` is set to `'git'`. These arguments can customize the `git log` query (e.g., limiting the number of commits, filtering by date, etc.). |
101
87
102
88
> [!WARNING]
103
-
> If you use the `log` or `shortLog` method to deploy projects on static servers (such as `Netlify`, `Vercel`), there may be restrictions. To ensure proper deployment on these platforms, please use the `api` method.
89
+
> If you use the `git` method to deploy projects on static servers (such as `Netlify`, `Vercel`), there may be restrictions. To ensure proper deployment on these platforms, please use the `api` method.
90
+
91
+
## Components
92
+
93
+
### GitLogContributor
94
+
95
+
```vue
96
+
<template>
97
+
<GitLogContributor />
98
+
</template>
99
+
```
100
+
101
+
### GitLogChangelog
102
+
103
+
```vue
104
+
<template>
105
+
<GitLogChangelog />
106
+
</template>
107
+
```
108
+
109
+
## Composables
110
+
111
+
### useGitLog
112
+
113
+
This composable provides a simple way to fetch Git log data based on the current page's context.
The 'git shortlog' command requires reading some content from standard input. This plugin uses '/dev/tty' by default to obtain the controlling terminal device of the current process, serving as the input or output device. However, on static servers such as Vercel, these '/dev/tty' or Node.js's 'options.stdio' are restricted, leading to issues.
220
+
The `contributors` variable contains information about all contributors.
0 commit comments