{"id":15048453,"url":"https://github.com/gluons/vue-github-buttons","last_synced_at":"2025-04-10T01:23:10.726Z","repository":{"id":18141627,"uuid":"85456807","full_name":"gluons/vue-github-buttons","owner":"gluons","description":":octocat: GitHub buttons component for Vue.","archived":false,"fork":false,"pushed_at":"2022-11-12T04:30:12.000Z","size":2197,"stargazers_count":37,"open_issues_count":7,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T06:44:47.858Z","etag":null,"topics":["github","github-buttons","hacktoberfest","vue","vue-component","vuejs"],"latest_commit_sha":null,"homepage":"https://git.io/vue-github-buttons","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gluons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-19T06:53:24.000Z","updated_at":"2024-09-11T05:03:13.000Z","dependencies_parsed_at":"2022-09-09T11:52:00.243Z","dependency_job_id":null,"html_url":"https://github.com/gluons/vue-github-buttons","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluons%2Fvue-github-buttons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluons%2Fvue-github-buttons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluons%2Fvue-github-buttons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluons%2Fvue-github-buttons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gluons","download_url":"https://codeload.github.com/gluons/vue-github-buttons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248138535,"owners_count":21053870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["github","github-buttons","hacktoberfest","vue","vue-component","vuejs"],"created_at":"2024-09-24T21:13:13.137Z","updated_at":"2025-04-10T01:23:10.690Z","avatar_url":"https://github.com/gluons.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue GitHub Buttons\n[![license](https://img.shields.io/github/license/gluons/vue-github-buttons.svg?style=flat-square)](https://github.com/gluons/vue-github-buttons/blob/master/LICENSE)\n[![vue 2](https://img.shields.io/badge/vue-2-42b983.svg?style=flat-square)](https://vuejs.org)\n[![npm](https://img.shields.io/npm/v/vue-github-buttons.svg?style=flat-square)](https://www.npmjs.com/package/vue-github-buttons)\n[![npm](https://img.shields.io/npm/dt/vue-github-buttons.svg?style=flat-square)](https://www.npmjs.com/package/vue-github-buttons)\n[![Travis](https://img.shields.io/travis/gluons/vue-github-buttons.svg?style=flat-square)](https://travis-ci.org/gluons/vue-github-buttons)\n[![Codacy grade](https://img.shields.io/codacy/grade/bc0ed4e4a9ef4734ae741d0f8a5d358d.svg?style=flat-square)](https://www.codacy.com/app/gluons/vue-github-buttons)\n[![ESLint Gluons](https://img.shields.io/badge/code%20style-gluons-9C27B0.svg?style=flat-square)](https://github.com/gluons/eslint-config-gluons)\n\n:octocat: GitHub buttons component for Vue.\n\n- [Vue GitHub Buttons](#vue-github-buttons)\n\t- [Installation](#installation)\n\t- [Demo](#demo)\n\t- [Usage](#usage)\n\t- [Using with Nuxt](#using-with-nuxt)\n\t\t- [Module options](#module-options)\n\t\t\t- [`css`](#css)\n\t\t\t- [`useCache`](#usecache)\n\t- [Using with VuePress](#using-with-vuepress)\n\t- [API](#api)\n\t\t- [Plugin Options](#plugin-options)\n\t\t\t- [`useCache`](#usecache-1)\n\t\t- [Components](#components)\n\t\t\t- [`gh-btns-watch`](#gh-btns-watch)\n\t\t\t- [`gh-btns-star`](#gh-btns-star)\n\t\t\t- [`gh-btns-fork`](#gh-btns-fork)\n\t\t\t- [`gh-btns-follow`](#gh-btns-follow)\n\n## Installation\n\nVia [NPM](https://www.npmjs.com):\n\n[![NPM](https://nodei.co/npm/vue-github-buttons.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://www.npmjs.com/package/vue-github-buttons)\n\n```bash\nnpm install vue-github-buttons\n```\n\nVia [Yarn](https://yarnpkg.com):\n\n```bash\nyarn add vue-github-buttons\n```\n\n## Demo\nGo to https://gluons.github.io/vue-github-buttons\n\n## Usage\n\n```javascript\nimport Vue from 'vue';\nimport VueGitHubButtons from 'vue-github-buttons';\nimport App from './App.vue';\n\n// Stylesheet\nimport 'vue-github-buttons/dist/vue-github-buttons.css';\n\nVue.use(VueGitHubButtons);\n// Or if your don't want to use cache\nVue.use(VueGitHubButtons, { useCache: false });\n\nnew Vue({\n\tel: '#app',\n\trender: h =\u003e h(App)\n});\n```\n\n```vue\n\u003ctemplate\u003e\n\t\u003cdiv id=\"app\"\u003e\n\t\t\u003cgh-btns-watch slug=\"vuejs/vue\" show-count\u003e\u003c/gh-btns-watch\u003e\n\t\t\u003cgh-btns-star slug=\"vuejs/vue\" show-count\u003e\u003c/gh-btns-star\u003e\n\t\t\u003cgh-btns-fork slug=\"vuejs/vue\" show-count\u003e\u003c/gh-btns-fork\u003e\n\t\t\u003cgh-btns-follow user=\"yyx990803\" show-count\u003e\u003c/gh-btns-follow\u003e\n\t\u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n// JavaScript ...\n\u003c/script\u003e\n\n\u003cstyle\u003e\n/* Style ... */\n\u003c/style\u003e\n```\n\n## Using with [Nuxt](https://nuxtjs.org/)\n\nAdd `vue-github-buttons/nuxt` to `modules` in **nuxt.config.js**.\n\n```javascript\nmodule.exports = {\n\tmodules: [\n\t\t'vue-github-buttons/nuxt',\n\t\t// Or with options\n\t\t['vue-github-buttons/nuxt', {\n\t\t\tcss: false, // Don't include CSS\n\t\t\tuseCache: false // Don't use cache\n\t\t}]\n\t]\n};\n```\n\n### Module options\n\n#### `css`\nType: `Boolean`  \nDefault: `true`\n\nInclude **Vue GitHub Buttons**'s CSS.\n\n#### `useCache`\nType: `Boolean`  \nDefault: `true`\n\nEnable caching. (See below)\n\n## Using with [VuePress](https://vuepress.vuejs.org/)\n\n\u003e Require **VuePress** v1.x\n\nAdd **Vue GitHub Buttons** to your `plugins` in `.vuepress/config.js`.\n\n```javascript\nmodule.exports = {\n\tplugins: [\n\t\trequire('vue-github-buttons/plugins/vuepress'),\n\n\t\t/* Or using plugin with options */\n\n\t\t[\n\t\t\trequire('vue-github-buttons/plugins/vuepress'),\n\t\t\t{\n\t\t\t\tuseCache: false\n\t\t\t}\n\t\t]\n\t]\n}\n```\n\nPlugin options are the same as [Vue plugin options](#plugin-options).\n\n## API\n\n### Plugin Options\n\n#### `useCache`\nType: `Boolean`  \nDefault: `true`\n\nEnable count number caching. (Use [session storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage))\n\u003e GitHub API has [limited requests](https://developer.github.com/v3/#rate-limiting). So, caching may be useful when user refresh the webpage.\n\n```javascript\nVue.use(VueGitHubButtons, { useCache: false }); // Disable cache\n```\n\n### Components\n\n#### `gh-btns-watch`\n👁️ A watch button.\n- `slug` - GitHub slug (username/repo).\n- `show-count` - Enable displaying the count number.\n\n#### `gh-btns-star`\n⭐ A star button.\n- `slug` - GitHub slug (username/repo).\n- `show-count` - Enable displaying the count number.\n\n#### `gh-btns-fork`\n🍴 A fork button.\n- `slug` - GitHub slug (username/repo).\n- `show-count` - Enable displaying the count number.\n\n#### `gh-btns-follow`\n👤 A follow button.\n- `user` - GitHub username.\n- `show-count` - Enable displaying the count number.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluons%2Fvue-github-buttons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgluons%2Fvue-github-buttons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluons%2Fvue-github-buttons/lists"}