{"id":17398426,"url":"https://github.com/vweevers/remark-autolink-references","last_synced_at":"2025-09-10T13:33:39.779Z","repository":{"id":40572661,"uuid":"312775562","full_name":"vweevers/remark-autolink-references","owner":"vweevers","description":"A remark plugin to autolink custom references.","archived":false,"fork":false,"pushed_at":"2023-10-01T18:30:04.000Z","size":24,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T06:29:35.278Z","etag":null,"topics":["github","jira","markdown","nodejs","remark","remark-plugin"],"latest_commit_sha":null,"homepage":"","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/vweevers.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}},"created_at":"2020-11-14T08:22:20.000Z","updated_at":"2024-11-06T10:15:27.000Z","dependencies_parsed_at":"2024-10-23T03:24:56.544Z","dependency_job_id":null,"html_url":"https://github.com/vweevers/remark-autolink-references","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vweevers/remark-autolink-references","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fremark-autolink-references","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fremark-autolink-references/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fremark-autolink-references/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fremark-autolink-references/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/remark-autolink-references/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fremark-autolink-references/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274470467,"owners_count":25291605,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["github","jira","markdown","nodejs","remark","remark-plugin"],"created_at":"2024-10-16T14:56:14.814Z","updated_at":"2025-09-10T13:33:39.732Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# remark-autolink-references\n\n**[`remark`](https://github.com/remarkjs/remark) plugin to autolink custom references like [GitHub Pro](https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuring-autolinks-to-reference-external-resources) does.** Ideal for referencing external issue trackers in changelogs.\n\n[![npm status](http://img.shields.io/npm/v/remark-autolink-references.svg)](https://www.npmjs.org/package/remark-autolink-references)\n[![node](https://img.shields.io/node/v/remark-autolink-references.svg)](https://www.npmjs.org/package/remark-autolink-references)\n[![Test](https://img.shields.io/github/workflow/status/vweevers/remark-autolink-references/Test?label=test)](https://github.com/vweevers/remark-autolink-references/actions/workflows/test.yml)\n[![JavaScript Style Guide](https://img.shields.io/badge/standard-informational?logo=javascript\\\u0026logoColor=fff)](https://standardjs.com)\n[![Markdown Style Guide](https://img.shields.io/badge/hallmark-informational?logo=markdown)](https://github.com/vweevers/hallmark)\n[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install remark-autolink-references\n```\n\n## Usage with [`remark`](https://remark.js.org/)\n\n_This package is ESM-only._\n\n```js\nimport remark from 'remark'\nimport autolink from 'remark-autolink-references'\n\nremark()\n  .use(autolink, {\n    prefix: 'JIRA-',\n    url: 'https://example.atlassian.net/browse/JIRA-\u003cnum\u003e'\n  })\n  .process('Example (JIRA-4275)', function (err, file) {\n    console.log(String(file))\n  })\n```\n\nResults in:\n\n```md\n- Example ([JIRA-4275](https://example.atlassian.net/browse/JIRA-4275))\n```\n\nSet `fix` to false to only warn about unlinked references, thus acting as a linter:\n\n```js\nremark()\n  .use(autolink, {\n    prefix: 'JIRA-',\n    url: 'https://example.atlassian.net/browse/JIRA-\u003cnum\u003e',\n    fix: false\n  })\n```\n\n## Usage with [`hallmark`](https://github.com/vweevers/hallmark)\n\nThis plugin is included in `hallmark` \u003e= 3.1.0. It does nothing until configured via `package.json` or `.hallmarkrc`. Say we have the following markdown in a `CHANGELOG.md` with a reference to a Jira ticket:\n\n```md\n### Fixed\n\n- Prevent infinite loop (JIRA-4275)\n```\n\nOur `package.json` should look like this:\n\n```json\n{\n  \"name\": \"example\",\n  \"devDependencies\": {\n    \"hallmark\": \"^3.1.0\",\n  },\n  \"hallmark\": {\n    \"autolinkReferences\": {\n      \"prefix\": \"JIRA-\",\n      \"url\": \"https://example.atlassian.net/browse/JIRA-\u003cnum\u003e\"\n    }\n  }\n}\n```\n\nAlternatively we can create a `.hallmarkrc` file containing:\n\n\u003cdetails\u003e\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n```json\n{\n  \"autolinkReferences\": {\n    \"prefix\": \"JIRA-\",\n    \"url\": \"https://example.atlassian.net/browse/JIRA-\u003cnum\u003e\"\n  }\n}\n```\n\n\u003c/details\u003e\n\nRunning `npx hallmark fix` then yields:\n\n```md\n### Fixed\n\n- Prevent infinite loop ([JIRA-4275](https://example.atlassian.net/browse/JIRA-4275))\n```\n\nWhile `npx hallmark lint` will warn about unlinked references.\n\n## API\n\n### `autolink(options)`\n\nOptions:\n\n- `prefix` (string, required): this prefix appended by a number will generate a link\n- `url` (string, required): where to link to. Must contain `\u003cnum\u003e` for the reference number.\n- `fix` (boolean, default true): if false, lint without modifying the markdown. Will warn about unlinked references.\n\n## License\n\n[MIT](LICENSE).\n\nAdapted from [`remark-github`](https://github.com/remarkjs/remark-github) © 2015 Titus Wormer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fremark-autolink-references","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Fremark-autolink-references","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fremark-autolink-references/lists"}