{"id":18302992,"url":"https://github.com/etchteam/storybook-addon-github-link","last_synced_at":"2026-02-16T14:32:04.481Z","repository":{"id":245402475,"uuid":"818199756","full_name":"etchteam/storybook-addon-github-link","owner":"etchteam","description":"Link stories to source code in Github","archived":false,"fork":false,"pushed_at":"2026-01-21T09:19:23.000Z","size":1384,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-21T16:51:28.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/etchteam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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-21T10:08:21.000Z","updated_at":"2026-01-21T09:19:25.000Z","dependencies_parsed_at":"2024-06-22T01:10:02.128Z","dependency_job_id":"5492c347-a0dd-4add-9195-73b06edf9db9","html_url":"https://github.com/etchteam/storybook-addon-github-link","commit_stats":null,"previous_names":["etchteam/storybook-addon-github-link"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/etchteam/storybook-addon-github-link","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etchteam%2Fstorybook-addon-github-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etchteam%2Fstorybook-addon-github-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etchteam%2Fstorybook-addon-github-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etchteam%2Fstorybook-addon-github-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etchteam","download_url":"https://codeload.github.com/etchteam/storybook-addon-github-link/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etchteam%2Fstorybook-addon-github-link/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29510162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: 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":[],"created_at":"2024-11-05T15:23:34.007Z","updated_at":"2026-02-16T14:32:04.458Z","avatar_url":"https://github.com/etchteam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Storybook Addon Github Link\n\nA Storybook Addon to add a link to Github source code for each story.\n\n## Installation\n\n```sh\nnpm install @etchteam/storybook-addon-github-link --save-dev\n```\n\n## Storybook setup\n\nCreate a file called `main.js` in your `.storybook` config folder.\n\nAdd the following content to it:\n\n```js\nexport default {\n  addons: ['@etchteam/storybook-addon-github-link']\n}\n```\n\nThen create a file called `preview.js` in the same folder to setup configuration [parameters](https://storybook.js.org/docs/react/writing-stories/parameters) for the addon.\n\n```js\nexport default {\n  parameters: {\n    githubLink: {\n      baseURL: 'https://github.com/your-org/your-repo/src/components/',\n      auto: true,\n    }\n  }\n}\n```\n\n## Global parameters\n\nThese global parameters are suggested to be added globally in the .storybook/preview file but they can also be used per story to override the global setup.\n\n| Name | Type | Default |\n| --- | --- | --- |\n| `baseURL` | `string` | `undefined` |\n| `auto` | `boolean` | `false` |\n\n### Base URL\n\nThe URL that all other paths will be prepended with.\n\n\u003e [!NOTE]\n\u003e This parameter is required for the `auto` option to be enabled.\n\n### Auto\n\nAuto generate URLs based on the current story being viewed.\n\nURLs will be generated from the stories title, for example this is what will happen to a story with the title `Components/Info button`:\n\n- \"Components/Info button\" will be transformed to lower kebab case \"components/info-button\"\n- The `baseURL` will be prepended to form the full URL\n\n\u003e [!NOTE]\n\u003e If the `auto` parameter is not provided then the Github link will only appear for individual stories that have a `url` parameter.\n\n## Story parameters\n\n| Name | Type | Default |\n| --- | --- | --- |\n| `url` | `string` | `undefined` |\n| `enabled` | `boolean` | `true` |\n\n### URL\n\nThe link can be overridden on a per story basis, if `auto` is not set to true then the Github link will only appear for stories that have this parameter set.\n\nIf a sub-path is detected like `/make-better-software` then the global `baseURL` parameter will be inherited.\n\n```jsx\nexport default {\n  title: 'BetterSoftwareLink',\n  parameters: {\n    githubLink: {\n      url: '/make-better-software'\n    }\n  },\n};\n\nexport const Default = () =\u003e (\n  \u003ca href=\"https://makebetter.software\"\u003eMake Better Software\u003c/a\u003e\n);\n```\n\n### Enabled\n\nSetting this parameter to `false` will stop the Github link appearing for the story.\n\n---\n\nMade with ☕ at [Etch](https://etch.co)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetchteam%2Fstorybook-addon-github-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetchteam%2Fstorybook-addon-github-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetchteam%2Fstorybook-addon-github-link/lists"}