{"_id":"@andystevensname/remark-project-meta-bar","_rev":"11-9fc450c947c9cd5dcbde4253f41b072f","name":"@andystevensname/remark-project-meta-bar","dist-tags":{"latest":"1.1.3"},"versions":{"1.1.0":{"name":"@andystevensname/remark-project-meta-bar","version":"1.1.0","keywords":["remark","remark-plugin","remark-directive","markdown","mdast","frontmatter","code","metadata","documentation"],"author":{"name":"Andy Stevens"},"license":"MIT","_id":"@andystevensname/remark-project-meta-bar@1.1.0","maintainers":[{"name":"andystevensname","email":"taylorstevens@gmail.com"}],"homepage":"https://github.com/andystevensname/remark-project-meta-bar#readme","bugs":{"url":"https://github.com/andystevensname/remark-project-meta-bar/issues"},"dist":{"shasum":"c9b4a3103245a55fbd4599666a0bc4b89ef48bc6","tarball":"https://registry.npmjs.org/@andystevensname/remark-project-meta-bar/-/remark-project-meta-bar-1.1.0.tgz","fileCount":4,"integrity":"sha512-FjtBrBRHnu0NfTynYH5Ij0t3kUmyx8N9JXi4/KGoPfruSD35oQu7CrvC71y+6VMnHINXOrsftwM5m0vp6ajXxw==","signatures":[{"sig":"MEQCIHjE94x6LjNbszuWTLUQnuOQ7FGSYmnryyfRi2669xHCAiAev30obmzTYFvKrBZkkM4BFMtocK2wL82vxb04OS89JQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12308},"main":"index.js","type":"module","exports":{".":"./index.js"},"gitHead":"1cd98e7f30530ae4ad980ae58cc841a8c9621484","scripts":{"test":"node --test"},"_npmUser":{"name":"andystevensname","email":"taylorstevens@gmail.com"},"repository":{"url":"git+https://github.com/andystevensname/remark-project-meta-bar.git","type":"git"},"_npmVersion":"11.3.0","description":"Remark plugin that renders project metadata bars from frontmatter via the ::project-meta-bar directive.","directories":{},"_nodeVersion":"24.0.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"remark":"^15.0.1","remark-directive":"^4.0.0","unist-util-visit":"^5.1.0"},"peerDependencies":{"remark-directive":"^4.0.0","unist-util-visit":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/remark-project-meta-bar_1.1.0_1775845821054_0.3283136864963885","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@andystevensname/remark-project-meta-bar","version":"1.1.1","keywords":["remark","remark-plugin","remark-directive","markdown","mdast","frontmatter","code","metadata","documentation"],"author":{"name":"Andy Stevens"},"license":"MIT","_id":"@andystevensname/remark-project-meta-bar@1.1.1","maintainers":[{"name":"andystevensname","email":"taylorstevens@gmail.com"}],"homepage":"https://github.com/andystevensname/remark-project-meta-bar#readme","bugs":{"url":"https://github.com/andystevensname/remark-project-meta-bar/issues"},"dist":{"shasum":"7e82148340a839887d1c15b9ef4c18bc12a589a3","tarball":"https://registry.npmjs.org/@andystevensname/remark-project-meta-bar/-/remark-project-meta-bar-1.1.1.tgz","fileCount":4,"integrity":"sha512-/pv6mX7vpxwRjpIS7YyyX5KNeAXexBnQXKsZu9cYJ3hQ87GTR+5x92nNCYYUGvooTjEo6M7C+wGNIeQjLGhtYA==","signatures":[{"sig":"MEUCIA6G6YINFCVyTKL1Ji6i9Dx93I7Yn1l3j61DAfaLNL/nAiEAydy8/Iw4rvceXId5TbTF2xGp5zSM0pLkl5tYbRvIRt8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andystevensname%2fremark-project-meta-bar@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":12308},"main":"index.js","type":"module","exports":{".":"./index.js"},"gitHead":"1ba1895f2e75ee1f0aa5fc4e9ec7c35b92077391","scripts":{"test":"node --test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9b9d57e4-179d-4f1d-bf8a-d7ef46dc7c9b"}},"repository":{"url":"git+https://github.com/andystevensname/remark-project-meta-bar.git","type":"git"},"_npmVersion":"11.11.0","description":"Remark plugin that renders project metadata bars from frontmatter via the ::project-meta-bar directive.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"remark":"^15.0.1","remark-directive":"^4.0.0","unist-util-visit":"^5.1.0"},"peerDependencies":{"remark-directive":"^4.0.0","unist-util-visit":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/remark-project-meta-bar_1.1.1_1775845974317_0.2290565110120859","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@andystevensname/remark-project-meta-bar","version":"1.1.2","keywords":["remark","remark-plugin","remark-directive","markdown","mdast","frontmatter","code","metadata","documentation"],"author":{"name":"Andy Stevens"},"license":"MIT","_id":"@andystevensname/remark-project-meta-bar@1.1.2","maintainers":[{"name":"andystevensname","email":"taylorstevens@gmail.com"}],"homepage":"https://github.com/andystevensname/remark-project-meta-bar#readme","bugs":{"url":"https://github.com/andystevensname/remark-project-meta-bar/issues"},"dist":{"shasum":"478f425c3a590e5d2c0e00307be2b3485aa9d2d6","tarball":"https://registry.npmjs.org/@andystevensname/remark-project-meta-bar/-/remark-project-meta-bar-1.1.2.tgz","fileCount":4,"integrity":"sha512-aTCNrlHB40cTfvaj2b9PMgAyh3/B2rDb8gwkw5+34rHj84T2Z+JLDfb0gKq8XeU1wKFL6KUNmW3vwrkOrW7WKA==","signatures":[{"sig":"MEUCIG9khwKF3shTnLesqnCIFjU9yWX4vESNJb8QikrUxa3fAiEArWbXEhprN6b09WONL5se3b1CLUmVzQr6cmL3XAAfhvo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andystevensname%2fremark-project-meta-bar@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":12355},"main":"index.js","type":"module","exports":{".":"./index.js"},"gitHead":"847065f7929ef14eace63187d306b9866010a01b","scripts":{"test":"node --test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9b9d57e4-179d-4f1d-bf8a-d7ef46dc7c9b"}},"repository":{"url":"git+https://github.com/andystevensname/remark-project-meta-bar.git","type":"git"},"_npmVersion":"11.11.0","description":"Remark plugin that renders project metadata bars from frontmatter via the ::project-meta-bar directive.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"remark":"^15.0.1","remark-directive":"^4.0.0","unist-util-visit":"^5.1.0"},"peerDependencies":{"remark-directive":"^4.0.0","unist-util-visit":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/remark-project-meta-bar_1.1.2_1775869678362_0.4145351352745088","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@andystevensname/remark-project-meta-bar","version":"1.1.4","keywords":["remark","remark-plugin","remark-directive","markdown","mdast","frontmatter","code","metadata","documentation"],"author":{"name":"Andy Stevens"},"license":"MIT","_id":"@andystevensname/remark-project-meta-bar@1.1.4","maintainers":[{"name":"andystevensname","email":"taylorstevens@gmail.com"}],"homepage":"https://github.com/andystevensname/remark-project-meta-bar#readme","bugs":{"url":"https://github.com/andystevensname/remark-project-meta-bar/issues"},"dist":{"shasum":"39172e5013188e1b598a61164fed468bf0788e79","tarball":"https://registry.npmjs.org/@andystevensname/remark-project-meta-bar/-/remark-project-meta-bar-1.1.4.tgz","fileCount":4,"integrity":"sha512-6fhNXrNVM6oF6hBqJIDRVb89BwpSBZvVVYJwm+PAYqVu30ciLXyM7XzWv6iwIT7oiTMYftj5PmhS3/f/Q0E8CA==","signatures":[{"sig":"MEUCIQDBMvx2mdwJp0cHBBeImUHdntfKwD0FGx5IcLzPIk5kVAIgEWyA32ILaYyeE+95qLC9EA0EKTumLyLTpgQhQF8dW4I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andystevensname%2fremark-project-meta-bar@1.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":12388},"main":"index.js","type":"module","exports":{".":"./index.js"},"gitHead":"ffaf9aa2637500d8cd97be2996bdca089286011f","scripts":{"test":"node --test","serve":"npx serve ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9b9d57e4-179d-4f1d-bf8a-d7ef46dc7c9b"}},"repository":{"url":"git+https://github.com/andystevensname/remark-project-meta-bar.git","type":"git"},"_npmVersion":"11.11.0","description":"Remark plugin that renders project metadata bars from frontmatter via the ::project-meta-bar directive.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"remark":"^15.0.1","remark-directive":"^4.0.0","unist-util-visit":"^5.1.0"},"peerDependencies":{"remark-directive":"^4.0.0","unist-util-visit":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/remark-project-meta-bar_1.1.4_1775904893160_0.5512100433059299","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@andystevensname/remark-project-meta-bar","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"version":"1.1.3","description":"Remark plugin that renders project metadata bars from frontmatter via the ::project-meta-bar directive.","type":"module","main":"index.js","exports":{".":"./index.js"},"scripts":{"test":"node --test"},"keywords":["remark","remark-plugin","remark-directive","markdown","mdast","frontmatter","code","metadata","documentation"],"author":{"name":"Andy Stevens"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/andystevensname/remark-project-meta-bar.git"},"bugs":{"url":"https://github.com/andystevensname/remark-project-meta-bar/issues"},"homepage":"https://github.com/andystevensname/remark-project-meta-bar#readme","peerDependencies":{"remark-directive":"^4.0.0","unist-util-visit":"^5.0.0"},"devDependencies":{"remark":"^15.0.1","remark-directive":"^4.0.0","unist-util-visit":"^5.1.0"},"gitHead":"72a4eed6e58c557c204e621458198e5e314515a7","_id":"@andystevensname/remark-project-meta-bar@1.1.3","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-5HkGfygA5j//ve+PSlj5OGTwbgLJWmogYli7hHZbVHtNveXeYnjXZe/5a5gCsTQDO8zZvwpp8+7zhdyNVDcLhg==","shasum":"f9b0522650070bdc92455c43e27445ad4714d09e","tarball":"https://registry.npmjs.org/@andystevensname/remark-project-meta-bar/-/remark-project-meta-bar-1.1.3.tgz","fileCount":4,"unpackedSize":12355,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andystevensname%2fremark-project-meta-bar@1.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDxdQR3gNAjx6J5F7ESvUHn73lgFQyN5/M0I3E+U5VCIgIgbq/wi+RY4XE/RmAmmD+UkdShHMdk7mfQVf1DuX4Dabs="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9b9d57e4-179d-4f1d-bf8a-d7ef46dc7c9b"}},"directories":{},"maintainers":[{"name":"andystevensname","email":"taylorstevens@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/remark-project-meta-bar_1.1.3_1775904897831_0.5092992240418639"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-10T18:30:20.929Z","modified":"2026-04-11T10:54:58.253Z","0.1.6":"2026-04-10T12:56:03.179Z","0.2.0":"2026-04-10T13:09:23.936Z","0.2.1":"2026-04-10T13:13:09.287Z","0.2.3":"2026-04-10T13:21:37.095Z","1.1.0":"2026-04-10T18:30:21.179Z","1.1.1":"2026-04-10T18:32:54.444Z","1.1.2":"2026-04-11T01:07:58.508Z","1.1.4":"2026-04-11T10:54:53.304Z","1.1.3":"2026-04-11T10:54:57.972Z"},"bugs":{"url":"https://github.com/andystevensname/remark-project-meta-bar/issues"},"author":{"name":"Andy Stevens"},"license":"MIT","homepage":"https://github.com/andystevensname/remark-project-meta-bar#readme","keywords":["remark","remark-plugin","remark-directive","markdown","mdast","frontmatter","code","metadata","documentation"],"repository":{"type":"git","url":"git+https://github.com/andystevensname/remark-project-meta-bar.git"},"description":"Remark plugin that renders project metadata bars from frontmatter via the ::project-meta-bar directive.","maintainers":[{"name":"andystevensname","email":"taylorstevens@gmail.com"}],"readme":"# remark-project-meta-bar\n\nA [remark](https://github.com/remarkjs/remark) plugin that renders project metadata bars from a frontmatter `projects` array, placed inline in Markdown via the `::project-meta-bar` directive.\n\n## Why\n\nIf you write documentation pages about open-source projects, you usually want to display a small bar at the top showing the project name, links to GitHub/npm/docs, and an install command. Hand-writing this in HTML is repetitive. Putting it in the page template means you can't control where it appears in the flow of the article.\n\nThis plugin lets you keep all the project metadata in your page's frontmatter (one source of truth) and decide where in the article body the bar should appear, using a one-line directive.\n\n## Install\n\n```sh\nnpm install remark-project-meta-bar remark-directive\n```\n\n`remark-directive` and `unist-util-visit` are peer dependencies.\n\n## Usage\n\n```js\nimport { remark } from 'remark';\nimport remarkFrontmatter from 'remark-frontmatter';\nimport remarkDirective from 'remark-directive';\nimport remarkProjectMetaBar from 'remark-project-meta-bar';\n\nconst md = `---\nprojects:\n  - project_name: my-package\n    code_urls:\n      - https://github.com/user/my-package\n      - https://www.npmjs.com/package/my-package\n    cli: npm install my-package\n    docs: https://my-package.dev\n---\n\nSome intro text.\n\n::project-meta-bar\n\nMore text below.\n`;\n\nconst html = await remark()\n  .use(remarkFrontmatter)\n  .use(remarkDirective)\n  .use(remarkProjectMetaBar)\n  .process(md);\n```\n\nIn Astro, frontmatter is automatically available on `file.data.astro.frontmatter`, so the plugin works out of the box without `remark-frontmatter`.\n\n## Syntax\n\nThe plugin recognizes leaf directives named `project-meta-bar`:\n\n```md\n::project-meta-bar\n```\n\nThis renders one bar per project in the frontmatter `projects` array.\n\nTo render only specific projects, pass a label with the project names:\n\n```md\n::project-meta-bar[my-package]\n\n::project-meta-bar[my-package,other-package]\n```\n\n## Frontmatter format\n\n```yaml\nprojects:\n  - project_name: my-package        # required, used as the <dt>\n    code_urls:                      # optional array of URLs\n      - https://github.com/...\n      - https://www.npmjs.com/package/...\n    cli: npm install my-package     # optional install command\n    docs: https://my-package.dev    # optional documentation URL\n```\n\nThe plugin auto-detects GitHub and npm URLs in the `code_urls` array and renders icon links for them. Any other URLs are ignored (you can render them yourself with regular Markdown links).\n\n## Output\n\nEach `::project-meta-bar` directive becomes a `<div class=\"project-meta-bar-group\">` containing one `<dl class=\"project-meta-bar\">` per project. The structure uses semantic description list elements:\n\n```html\n<div class=\"project-meta-bar-group\">\n  <dl class=\"project-meta-bar\" aria-label=\"my-package project info\">\n    <dt class=\"project-meta-bar-name\">my-package</dt>\n    <div class=\"project-meta-bar-rest\">\n      <div class=\"project-meta-bar-links\">\n        <dd><a href=\"...\" class=\"project-meta-bar-link\">...Docs</a></dd>\n        <dd><a href=\"...\" class=\"project-meta-bar-link\" aria-label=\"View on GitHub\">...</a></dd>\n        <dd><a href=\"...\" class=\"project-meta-bar-link\" aria-label=\"View on npm\">...</a></dd>\n      </div>\n      <dd class=\"project-meta-bar-cli-wrap\">\n        <span class=\"sr-only\">Install: npm install my-package</span>\n        <code class=\"project-meta-bar-cli\" aria-hidden=\"true\">npm install my-package</code>\n        <button type=\"button\" class=\"project-meta-bar-copy\" data-copy=\"npm install my-package\" aria-label=\"Copy install command\">...</button>\n        <span class=\"sr-only\" role=\"status\" aria-live=\"polite\"></span>\n      </dd>\n    </div>\n  </dl>\n</div>\n```\n\nYou provide the CSS to lay it out and the JavaScript to wire up the copy button. The plugin only handles the markup.\n\n## Options\n\n```js\nremarkProjectMetaBar({\n  directiveName: 'project-meta-bar',         // change the directive name\n  frontmatterKey: 'projects',         // change the frontmatter key\n  getFrontmatter: (file) =>           // override how frontmatter is read\n    file.data.astro?.frontmatter ?? file.data.frontmatter ?? {},\n})\n```\n\n## Accessibility\n\n- Each bar is a `<dl>` with the project name as the `<dt>` and metadata items as `<dd>` elements\n- The bar is labeled with `aria-label=\"<project name> project info\"`\n- The cli `<code>` is `aria-hidden` to prevent screen readers from spelling out the command character-by-character; a visually-hidden `<span>` provides \"Install: <command>\" as readable text\n- The copy button has an `aria-label` and a sibling `[role=\"status\"][aria-live=\"polite\"]` element for announcing copy success\n\n## License\n\nMIT\n","readmeFilename":"README.md"}