{"id":47699128,"url":"https://github.com/valaxyjs/valaxy-addon-git-log","last_synced_at":"2026-04-02T17:02:00.220Z","repository":{"id":246066184,"uuid":"819694827","full_name":"valaxyjs/valaxy-addon-git-log","owner":"valaxyjs","description":"Integrates git logs into your page of Valaxy site.","archived":false,"fork":false,"pushed_at":"2026-03-28T18:55:06.000Z","size":321,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-28T19:09:43.608Z","etag":null,"topics":["valaxy","valaxy-addon"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valaxyjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-25T02:58:14.000Z","updated_at":"2026-03-28T18:55:10.000Z","dependencies_parsed_at":"2025-07-18T06:17:00.350Z","dependency_job_id":"9a705a1c-c93b-4caf-b895-27698d7c5e8b","html_url":"https://github.com/valaxyjs/valaxy-addon-git-log","commit_stats":null,"previous_names":["wrxinyue/valaxy-addon-gitlog","valaxyjs/valaxy-addon-git-log"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/valaxyjs/valaxy-addon-git-log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaxyjs%2Fvalaxy-addon-git-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaxyjs%2Fvalaxy-addon-git-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaxyjs%2Fvalaxy-addon-git-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaxyjs%2Fvalaxy-addon-git-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valaxyjs","download_url":"https://codeload.github.com/valaxyjs/valaxy-addon-git-log/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valaxyjs%2Fvalaxy-addon-git-log/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31311011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["valaxy","valaxy-addon"],"created_at":"2026-04-02T17:00:59.697Z","updated_at":"2026-04-02T17:02:00.208Z","avatar_url":"https://github.com/valaxyjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003evalaxy-addon-git-log\u003c/h1\u003e\n\n\u003cpre align=\"center\"\u003e\nIntegrate Valaxy's Git Logs plugin to display contributor information\n\u003c/pre\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.npmjs.com/package/valaxy-addon-git-log\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/valaxy-addon-git-log?color=0078E7\" alt=\"NPM version\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Installing this Plugin\n\n```bash\npnpm add valaxy-addon-git-log\n```\n\nBy default, the plugin retrieves Git information via API. Due to the limitations of static servers, it may not automatically obtain the repository address from the Git environment. Therefore, it is recommended to manually provide the repository address as shown below:\n\n```ts\nimport { defineValaxyConfig } from 'valaxy'\nimport { addonGitLog } from 'valaxy-addon-git-log'\n\nexport default defineValaxyConfig({\n  addons: [\n    addonGitLog({\n      repositoryUrl: 'https://github.com/your-username/your-repository.git',\n    }),\n  ],\n})\n```\n\n## Using this Plugin\n\n### Basic Usage\n\nTo add Git contributors to a page, use the `GitLogContributor` component:\n\n```vue\n\u003ctemplate\u003e\n  \u003cGitLogContributor /\u003e\n\u003c/template\u003e\n```\n\n### Customization examples\n\nIf you are a theme developer or want to customize pages with git information, you can refer to the following example:\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport { useGitLog } from 'valaxy-addon-git-log'\n\nconst gitLog = useGitLog()\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cul\u003e\n    \u003cli v-for=\"contributor in gitLog.contributors\" :key=\"contributor.email\"\u003e\n      \u003cimg :src=\"contributor.avatar\" alt=\"Avatar\" width=\"30\" height=\"30\"\u003e\n      {{ contributor.name }}\n    \u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/template\u003e\n```\n\n## Configuration / Options\n\nIn your project (wether theme or addon), you can write this in `valaxy.config.ts`.\n\n```ts\nexport default defineValaxyConfig\u003cThemeConfig\u003e({\n  addons: [\n    addonGitLog({\n      contributor: {\n        strategy: 'prebuilt', // 'prebuilt' | 'build-time' | 'runtime',\n        // logArgs: '--first-parent --follow',\n      },\n    }),\n  ],\n})\n```\n\n| Name                   | Type                     | Default      | Description |\n|------------------------|--------------------------|--------------|-------------|\n| repositoryUrl          | `string`                | `undefined`  | GitHub repository URL |\n| contributor.strategy   | `'prebuilt'` \\| `'build-time'` \\| `'runtime'` | `'prebuilt'` | Data fetching strategy |\n| contributor.logArgs    | `string`                | `''`         | Git log arguments (for 'prebuilt' and 'build-time') |\n| contributor.githubToken| `string`                | `undefined`  | GitHub token (required for 'runtime' strategy) |\n\n### Strategy Comparison\n\n| Strategy     | Build Requirement | Data Freshness | Host Compatibility | Rate Limiting | Recommended Use Case |\n|--------------|-------------------|----------------|--------------------|---------------|----------------------|\n| **prebuilt** | Requires local Git | ⚠️ Static snapshot | ✅ All static hosts | ✅ None | Static site generation (SSG) |\n| **build-time** | Needs CI Git access | ✅ Build-time fresh | ❌ Limited on:\u003cbr\u003e• Vercel\u003cbr\u003e• Netlify\u003cbr\u003e• Cloudflare Pages | ✅ None | Self-hosted CI |\n| **runtime**  | No build tools | ✅ Real-time | ✅ Universal | ⚠️ GitHub API:\u003cbr\u003e• 60/hr (anon)\u003cbr\u003e• 5000/hr (authed) | Client-side rendered |\n\n## Components\n\n### GitLogContributor\n\n```vue\n\u003ctemplate\u003e\n  \u003cGitLogContributor /\u003e\n\u003c/template\u003e\n```\n\n### GitLogChangelog\n\n```vue\n\u003ctemplate\u003e\n  \u003cGitLogChangelog /\u003e\n\u003c/template\u003e\n```\n\n## Composables\n\n### useGitLog\n\nThis composable provides a simple way to fetch Git log data based on the current page's context.\n\n```ts\nimport { useGitLog } from 'valaxy-addon-git-log'\nimport { computed } from 'vue'\n\nconst gitLog = useGitLog()\nconst contributors = computed(() =\u003e gitLog.value.contributors)\nconst changeLog = computed(() =\u003e gitLog.value.changeLog)\n```\n\n**Return Type:**\n\n```ts\nexport interface GitLog {\n  contributors: Contributor[]\n  changeLog: Changelog[]\n  path: string\n}\n```\n\n| Name         | Type            | Description                      |\n| ------------ | --------------- | -------------------------------- |\n| contributors | `Contributor[]` | see `useContributor` return type |\n| changeLog    | `Changelog[]`   | see `useChangelog` return type   |\n| path         | `string`        |                                  |\n\n### useContributor\n\n```ts\nimport { useContributor } from 'valaxy-addon-git-log'\n\nconst contributor = useContributor()\n```\n\n**Return Type:**\n\n```ts\nexport interface Contributor {\n  name: string\n  email: string\n  avatar: string\n  count: number\n  github: string | null\n  hash: string\n}\n\n// type: Contributor[]\n```\n\n| Name   | Type             | Description                                                        |\n| ------ | ---------------- | ------------------------------------------------------------------ |\n| name   | `string`         | Contributor's name                                                 |\n| email  | `string`         | Contributor's email                                                |\n| avatar | `string`         | Contributor's avatar URL, obtained through gravatar based on email |\n| count  | `number`         | Number of contributions                                            |\n| github | `string \\| null` | Only supported `api` mode                                          |\n| hash   | `string`         | A unique hash generated based on the contributor's email           |\n\n### useChangelog\n\n```ts\nimport { useChangelog } from 'valaxy-addon-git-log'\n\nconst changelog = useChangelog()\n```\n\n**Return Type:**\n\n```ts\nexport interface Changelog {\n  functions: string[]\n  version?: string\n  hash: string\n  date: string\n  message: string\n  refs?: string\n  body?: string\n  author_name: string\n  author_email: string\n}\n\n// type: Changelog[]\n```\n\n| Name           | Type                    | Description                                                             |\n| -------------- | ----------------------- | ----------------------------------------------------------------------- |\n| `functions`    | `string[]`              | List of functions affected or related to the changelog entry.           |\n| `version`      | `string` \\| `undefined` | Optional version number for the release or update.                      |\n| `hash`         | `string`                | Unique identifier or commit hash for the change.                        |\n| `date`         | `string`                | The date when the change was made or the changelog entry was created.   |\n| `message`      | `string`                | A brief summary or description of the change.                           |\n| `refs`         | `string` \\| `undefined` | Optional reference information, such as ticket IDs or PR links.         |\n| `body`         | `string` \\| `undefined` | Optional detailed body content or additional explanation of the change. |\n| `author_name`  | `string`                | Name of the person who made the change.                                 |\n| `author_email` | `string`                | Email address of the person who made the change.                        |\n\n## Other\n\n### Virtual modules\n\n```ts\nimport changelog from 'virtual:git-log/changelog'\n```\n\nThe `changelog` variable contains all the commit logs.\n\n```ts\nimport contributors from 'virtual:git-log/contributors'\n```\n\nThe `contributors` variable contains information about all contributors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalaxyjs%2Fvalaxy-addon-git-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalaxyjs%2Fvalaxy-addon-git-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalaxyjs%2Fvalaxy-addon-git-log/lists"}