From 7a52ddeba2a68388b544f529d2d92104420f77b0 Mon Sep 17 00:00:00 2001 From: Shipwreckt Date: Fri, 31 Oct 2025 20:02:14 +0000 Subject: Changed from static to 11ty! --- node_modules/@11ty/posthtml-urls/LICENSE | 21 +++ node_modules/@11ty/posthtml-urls/README.md | 48 +++++++ .../@11ty/posthtml-urls/lib/defaultOptions.js | 37 ++++++ node_modules/@11ty/posthtml-urls/lib/index.js | 142 +++++++++++++++++++++ node_modules/@11ty/posthtml-urls/package.json | 47 +++++++ 5 files changed, 295 insertions(+) create mode 100644 node_modules/@11ty/posthtml-urls/LICENSE create mode 100644 node_modules/@11ty/posthtml-urls/README.md create mode 100644 node_modules/@11ty/posthtml-urls/lib/defaultOptions.js create mode 100644 node_modules/@11ty/posthtml-urls/lib/index.js create mode 100644 node_modules/@11ty/posthtml-urls/package.json (limited to 'node_modules/@11ty/posthtml-urls') diff --git a/node_modules/@11ty/posthtml-urls/LICENSE b/node_modules/@11ty/posthtml-urls/LICENSE new file mode 100644 index 0000000..16736bd --- /dev/null +++ b/node_modules/@11ty/posthtml-urls/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Steven Vachon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@11ty/posthtml-urls/README.md b/node_modules/@11ty/posthtml-urls/README.md new file mode 100644 index 0000000..559a6ea --- /dev/null +++ b/node_modules/@11ty/posthtml-urls/README.md @@ -0,0 +1,48 @@ +# `@11ty/posthtml-urls` + +PostHTML plugin for transforming URLs. This is a fork of [`posthtml/posthtml-urls`](https://github.com/posthtml/posthtml-urls). + + +## Installation + +[Node.js](http://nodejs.org) `>= 6` is required. To install, type this at the command line: + +```shell +npm install @11ty/posthtml-urls +``` + + +## Usage + +```js +const posthtml = require('posthtml'); +const urls = require('@11ty/posthtml-urls'); + +const options = { + eachURL: (url, attr, tagName) => `http://domain.com/${url}` +}; + +posthtml() + .use( urls(options) ) + .process('link') + .then(result => console.log(result.html)); +//-> link +``` + + +## Options + +### `eachURL` +Type: `Function` +Default value: `undefined` +A callback function ran for each URL value found. You can return either a synchronous value or a `Promise`. + +### `filter` +Type: `Object` +Default value: [`{…}`](https://github.com/posthtml/posthtml-urls/blob/master/lib/defaultOptions.js) +The elements and attributes for which to search. An attribute value can optionally be a function, for deeper filtering. + + +## FAQ +1. **How can I filter `