{"_id":"@11ty/posthtml-urls","_rev":"6-4a6f4b8f03e2ff4c58361e1e6f43bb8e","name":"@11ty/posthtml-urls","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@11ty/posthtml-urls","version":"1.0.0","keywords":["posthtml","posthtml-plugin","url"],"author":{"url":"https://zachleat.com/","name":"Zach Leatherman","email":"null@zachleat.com"},"license":"MIT","_id":"@11ty/posthtml-urls@1.0.0","maintainers":[{"name":"zachleat","email":"zachleatherman@gmail.com"}],"contributors":[{"url":"https://svachon.com","name":"Steven Vachon","email":"contact@svachon.com"}],"homepage":"https://github.com/11ty/eleventy-posthtml-urls#readme","bugs":{"url":"https://github.com/11ty/eleventy-posthtml-urls/issues"},"dist":{"shasum":"7848ac581d88aab1f841ba86a71d3058c32c3e19","tarball":"https://registry.npmjs.org/@11ty/posthtml-urls/-/posthtml-urls-1.0.0.tgz","fileCount":5,"integrity":"sha512-CcsRdI933x613u7CjM+QGs7iD/m8SaDup3Apohg1+7dybigrEUHc2jGS3mcMgQKvF2+IphqmepD/FrKLlPkPEg==","signatures":[{"sig":"MEUCIGRxVcPBSt9aITr0afCu7aKMKU3fljhHvOlSC2kZMknJAiEAlBcDQ8GnMN7MlZi5o70eYEhErPPqKx52pzxeBHu0fAI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7926},"main":"lib","engines":{"node":">= 6"},"gitHead":"440f10e263da56912f7854d740ee2ccd54450209","scripts":{"ci":"npm test && nyc report --reporter=text-lcov | coveralls","test":"nyc --silent mocha test.js --bail --check-leaks","posttest":"nyc report --reporter=text-summary --reporter=html","prepublishOnly":"npm test"},"_npmUser":{"name":"zachleat","email":"zachleatherman@gmail.com"},"repository":{"url":"git://github.com/11ty/eleventy-posthtml-urls.git","type":"git"},"_npmVersion":"10.2.3","description":"PostHTML plugin for transforming URLs. A fork of posthtml/posthtml-urls.","directories":{},"_nodeVersion":"20.10.0","dependencies":{"parse-srcset":"^1.0.2","list-to-array":"^1.1.0","evaluate-value":"^2.0.0","object.entries":"^1.1.7","http-equiv-refresh":"^2.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.0","posthtml":"~0.16.6","coveralls":"^3.0.6","html-tags":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/posthtml-urls_1.0.0_1707498794287_0.733163548753202","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@11ty/posthtml-urls","version":"1.0.1","keywords":["posthtml","posthtml-plugin","url"],"author":{"url":"https://zachleat.com/","name":"Zach Leatherman","email":"null@zachleat.com"},"license":"MIT","_id":"@11ty/posthtml-urls@1.0.1","maintainers":[{"name":"zachleat","email":"zachleatherman@gmail.com"},{"name":"fortawesome-admin","email":"admin@fortawesome.com"}],"contributors":[{"url":"https://svachon.com","name":"Steven Vachon","email":"contact@svachon.com"}],"homepage":"https://github.com/11ty/eleventy-posthtml-urls#readme","bugs":{"url":"https://github.com/11ty/eleventy-posthtml-urls/issues"},"dist":{"shasum":"3e0680c0ea96d25e24b4afd0f2b156467c2323c8","tarball":"https://registry.npmjs.org/@11ty/posthtml-urls/-/posthtml-urls-1.0.1.tgz","fileCount":5,"integrity":"sha512-6EFN/yYSxC/OzYXpq4gXDyDMlX/W+2MgCvvoxf11X1z76bqkqFJ8eep5RiBWfGT5j0323a1pwpelcJJdR46MCw==","signatures":[{"sig":"MEYCIQCbx1ndxjQIa9iojaBx/hnGblH33ty2ygM+W5j89ylG5AIhANmB+aJTpbXjbbr6qIBkvoMLtp/vayk3vPKKClNu1oc+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@11ty%2fposthtml-urls@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7900},"main":"lib","engines":{"node":">= 6"},"gitHead":"6e064c8a03174835eb15afbb5b759fecd696f901","scripts":{"ci":"npm test && nyc report --reporter=text-lcov | coveralls","test":"nyc --silent mocha test.js --bail --check-leaks","posttest":"nyc report --reporter=text-summary --reporter=html","prepublishOnly":"npm test"},"_npmUser":{"name":"zachleat","email":"zachleatherman@gmail.com"},"repository":{"url":"git://github.com/11ty/eleventy-posthtml-urls.git","type":"git"},"_npmVersion":"10.8.2","description":"PostHTML plugin for transforming URLs. A fork of posthtml/posthtml-urls.","directories":{},"_nodeVersion":"20.18.1","dependencies":{"parse-srcset":"^1.0.2","list-to-array":"^1.1.0","evaluate-value":"^2.0.0","http-equiv-refresh":"^2.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.0","posthtml":"~0.16.6","coveralls":"^3.0.6","html-tags":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/posthtml-urls_1.0.1_1737037633124_0.9998710316087196","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@11ty/posthtml-urls","version":"1.0.2","keywords":["posthtml","posthtml-plugin","url"],"author":{"url":"https://zachleat.com/","name":"Zach Leatherman","email":"null@zachleat.com"},"license":"MIT","_id":"@11ty/posthtml-urls@1.0.2","maintainers":[{"name":"zachleat","email":"zachleatherman@gmail.com"},{"name":"fortawesome-admin","email":"admin@fortawesome.com"}],"contributors":[{"url":"https://svachon.com","name":"Steven Vachon","email":"contact@svachon.com"}],"homepage":"https://github.com/11ty/eleventy-posthtml-urls#readme","bugs":{"url":"https://github.com/11ty/eleventy-posthtml-urls/issues"},"dist":{"shasum":"6216330281c5db6e99c95474d40615c3035b04fc","tarball":"https://registry.npmjs.org/@11ty/posthtml-urls/-/posthtml-urls-1.0.2.tgz","fileCount":5,"integrity":"sha512-0vaV3Wt0surZ+oS1VdKKe0axeeupuM+l7W/Z866WFQwF+dGg2Tc/nmhk/5l74/Y55P8KyImnLN9CdygNw2huHg==","signatures":[{"sig":"MEQCIG74cH6nl4MsnxF/yIFzm8JJesfOI7v9L5wTgoShT/2hAiAPcBf6tiQrYQS67QrUAdy5oMVHLeaBJ84GrPeYSWWEJA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@11ty%2fposthtml-urls@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7900},"main":"lib","engines":{"node":">= 6"},"gitHead":"b444d50d6c8a4ff4b4c6895b1dd5fb83762503b6","scripts":{"ci":"npm test && nyc report --reporter=text-lcov | coveralls","test":"nyc --silent mocha test.js --bail --check-leaks","posttest":"nyc report --reporter=text-summary --reporter=html","prepublishOnly":"npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1ea654f3-c1f1-4926-9029-55e250f3d4ab"}},"repository":{"url":"git://github.com/11ty/eleventy-posthtml-urls.git","type":"git"},"_npmVersion":"11.6.4","description":"PostHTML plugin for transforming URLs. A fork of posthtml/posthtml-urls.","directories":{},"_nodeVersion":"22.21.1","dependencies":{"parse-srcset":"^1.0.2","list-to-array":"^1.1.0","evaluate-value":"^2.0.0","http-equiv-refresh":"^2.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.0","posthtml":"~0.16.6","coveralls":"^3.0.6","html-tags":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/posthtml-urls_1.0.2_1764713671667_0.31257649178671953","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@11ty/posthtml-urls","version":"1.0.3","keywords":["posthtml","posthtml-plugin","url"],"author":{"url":"https://zachleat.com/","name":"Zach Leatherman","email":"null@zachleat.com"},"license":"MIT","_id":"@11ty/posthtml-urls@1.0.3","maintainers":[{"name":"zachleat","email":"zachleatherman@gmail.com"},{"name":"fortawesome-admin","email":"admin@fortawesome.com"}],"contributors":[{"url":"https://svachon.com","name":"Steven Vachon","email":"contact@svachon.com"}],"homepage":"https://github.com/11ty/eleventy-posthtml-urls#readme","bugs":{"url":"https://github.com/11ty/eleventy-posthtml-urls/issues"},"dist":{"shasum":"68b4877dd0e41c7fcfb7b307d6b9fa9195b0da58","tarball":"https://registry.npmjs.org/@11ty/posthtml-urls/-/posthtml-urls-1.0.3.tgz","fileCount":5,"integrity":"sha512-1YvhnkaNlFnnJic1rBMWmTC2adbuy+JQiBfl1Hecr1Wjjik1pQZmGyk/eC9zKX/FQv52s2Nht1Gi/UwhYqrBeg==","signatures":[{"sig":"MEQCIHWTeqtrppLMDBt7/ipNpuVjAPxCcLayHahYq9jmm7JrAiBElBMW3x/DdB7Wan2/991cJ/jGe1AT4TcxMnz8sKLrMw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@11ty%2fposthtml-urls@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":8059},"main":"lib","engines":{"node":">= 6"},"gitHead":"6f83b55b7e73ca4c91fea04af93365740890bff4","scripts":{"ci":"npm test && nyc report --reporter=text-lcov | coveralls","test":"nyc --silent mocha test.js --bail --check-leaks","posttest":"nyc report --reporter=text-summary --reporter=html","prepublishOnly":"npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1ea654f3-c1f1-4926-9029-55e250f3d4ab"}},"repository":{"url":"git://github.com/11ty/eleventy-posthtml-urls.git","type":"git"},"_npmVersion":"11.12.0","description":"PostHTML plugin for transforming URLs. A fork of posthtml/posthtml-urls.","directories":{},"_nodeVersion":"22.22.1","dependencies":{"parse-srcset":"^1.0.2","list-to-array":"^1.1.0","evaluate-value":"^2.0.0","http-equiv-refresh":"^2.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.0","posthtml":"~0.16.6","coveralls":"^3.0.6","html-tags":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/posthtml-urls_1.0.3_1774470230945_0.30647571184282607","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"_id":"@11ty/posthtml-urls@2.0.0","bugs":{"url":"https://github.com/11ty/eleventy-posthtml-urls/issues"},"dist":{"shasum":"431ac667a5cb6576a0f7f4dcfae0955056f623f8","tarball":"https://registry.npmjs.org/@11ty/posthtml-urls/-/posthtml-urls-2.0.0.tgz","fileCount":5,"integrity":"sha512-MIa/BYbwPLiOsLsT44Cqwt0XKrgxUlPKpu46gFTvAS6Ik6GzaVdFkyaxyl6IeZn6mDpAHO5ETY927FPaSrc2rg==","signatures":[{"sig":"MEYCIQC/2tqtxFuECUK2bMz4uSdW5xQmlLHo9GlIUqgwvauXuQIhAOlUeRsLNlsocKAYIuX0Ht3UDHge9Axuz9961YFcn+Ej","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCH1OOmcjwp39Uow6avTFRuIo+hr02RkwqdVGULwidXXAIhAJvzv8DPDps5zbwBINNlkMhdLvO4cWlkMhppnNceB2ah"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@11ty%2fposthtml-urls@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":8087},"main":"lib","name":"@11ty/posthtml-urls","author":{"url":"https://zachleat.com/","name":"Zach Leatherman","email":"null@zachleat.com"},"engines":{"node":">=22.12"},"gitHead":"992dc310f435538af50c596a480330f4e4018f7e","license":"MIT","scripts":{"test":"vitest run","posttest":"vitest run --coverage","prepublishOnly":"npm test"},"version":"2.0.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"1ea654f3-c1f1-4926-9029-55e250f3d4ab"}},"homepage":"https://github.com/11ty/eleventy-posthtml-urls#readme","keywords":["posthtml","posthtml-plugin","url"],"repository":{"url":"git://github.com/11ty/eleventy-posthtml-urls.git","type":"git"},"_npmVersion":"12.2.0","description":"PostHTML plugin for transforming URLs. A fork of posthtml/posthtml-urls.","directories":{},"maintainers":[{"name":"zachleat","email":"zachleatherman@gmail.com"},{"name":"fortawesome-admin","email":"admin@fortawesome.com"}],"_nodeVersion":"22.23.3","contributors":[{"url":"https://svachon.com","name":"Steven Vachon","email":"contact@svachon.com"}],"dependencies":{"srcset":"^5.0.3","http-equiv-refresh":"^2.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^5.0.3","posthtml":"^0.16.7","html-tags":"^5.1.0","@vitest/coverage-v8":"^5.0.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/posthtml-urls_2.0.0_1790883457677_0.8508281143490384"}}},"time":{"created":"2024-02-09T17:13:14.084Z","modified":"2026-10-01T19:37:38.095Z","1.0.0":"2024-02-09T17:13:14.468Z","1.0.1":"2025-01-16T14:27:13.364Z","1.0.2":"2025-12-02T22:14:31.855Z","1.0.3":"2026-03-25T20:23:51.090Z","2.0.0":"2026-10-01T19:37:37.765Z"},"bugs":{"url":"https://github.com/11ty/eleventy-posthtml-urls/issues"},"author":{"url":"https://zachleat.com/","name":"Zach Leatherman","email":"null@zachleat.com"},"license":"MIT","homepage":"https://github.com/11ty/eleventy-posthtml-urls#readme","keywords":["posthtml","posthtml-plugin","url"],"repository":{"url":"git://github.com/11ty/eleventy-posthtml-urls.git","type":"git"},"description":"PostHTML plugin for transforming URLs. A fork of posthtml/posthtml-urls.","contributors":[{"url":"https://svachon.com","name":"Steven Vachon","email":"contact@svachon.com"}],"maintainers":[{"name":"zachleat","email":"zachleatherman@gmail.com"},{"name":"fortawesome-admin","email":"admin@fortawesome.com"}],"readme":"# `@11ty/posthtml-urls`\n\nPostHTML plugin for transforming URLs. This is a fork of [`posthtml/posthtml-urls`](https://github.com/posthtml/posthtml-urls).\n\n\n## Installation\n\n[Node.js](http://nodejs.org) `>= 22.12` is required. To install, type this at the command line:\n\n```shell\nnpm install @11ty/posthtml-urls\n```\n\n\n## Usage\n\n```js\nconst posthtml = require('posthtml');\nconst urls = require('@11ty/posthtml-urls');\n\nconst options = {\n  // rawNode added in v1.0.3\n  eachURL: (url, attr, tagName, rawNode) => `http://domain.com/${url}`\n};\n\nposthtml()\n  .use( urls(options) )\n  .process('<a href=\"link.html\">link</a>')\n  .then(result => console.log(result.html));\n//-> <a href=\"http://domain.com/link.html\">link</a>\n```\n\n\n## Options\n\n### `eachURL`\nType: `Function`\nDefault value: `undefined`\nA callback function ran for each URL value found. You can return either a synchronous value or a `Promise`. The `rawNode` argument was added in `v1.0.3`.\n\n### `filter`\nType: `Object`\nDefault value: [`{…}`](https://github.com/posthtml/posthtml-urls/blob/master/lib/defaultOptions.js)\nThe elements and attributes for which to search. An attribute value can optionally be a function, for deeper filtering.\n\n\n## FAQ\n1. **How can I filter `<style>` elements and `style` attributes?**\nUse [posthtml-postcss](https://npmjs.com/posthtml-postcss) and [postcss-url](https://npmjs.com/postcss-url).\n","readmeFilename":"README.md"}