{"_id":"@astropub/url-protocol","_rev":"1-313c690a53be60e6eae7472a77d75c43","name":"@astropub/url-protocol","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@astropub/url-protocol","description":"A protocol to getting the URL for a local file","type":"module","version":"0.1.0","exports":{".":"./index.js","./index.js":"./index.js","./plugin.js":"./plugin.js","./renderer.js":"./renderer.js","./server.js":"./server.js"},"keywords":["astro","file","files","import","imports","path","paths","plugin","protocol","protocols","rollup","url","urls","vite"],"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/astro-community/url-protocol.git"},"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"bugs":{"url":"https://github.com/astro-community/url-protocol/issues"},"homepage":"https://github.com/astro-community/url-protocol#readme","types":"./index.d.ts","scripts":{"start":"node server.js"},"gitHead":"f0d56b3fb9225fd8138c4b80e949b39166be3e26","_id":"@astropub/url-protocol@0.1.0","_nodeVersion":"16.13.2","_npmVersion":"8.3.0","dist":{"integrity":"sha512-7eopLR3kHCq0fJs+JSQKnf5L4mrdZeBDcz77qApaMsvWKmpKcNieKzypQ3ti+TRUZ2mWlzAYpQkbrMIjksGVXQ==","shasum":"4d1229dda57c6e357dbba7f8a1f28ef24acfb656","tarball":"https://registry.npmjs.org/@astropub/url-protocol/-/url-protocol-0.1.0.tgz","fileCount":10,"unpackedSize":5910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6tmDCRA9TVsSAnZWagAA/lMP/joSQ3DLvO1MZepJR4tB\nSWgKt0xhmq2RL6q2RgiFhyU1AvEaGHmB9Q32tDmBFF5SxBONVYi4+mlD3aEX\nkRf6GdCKFNDzvai9+McGYvkNWWwxdPFzgdfnify8izmmF+54GVq3AKx++RC8\n+4fc2hqoxMh+RedtUfIlkWrhZmC0/YF/m9flstx3/rrlP/kaSf5edeWKrYTI\nZv7MsyQXWiuyY2O6E1pqk0ycoRWzMN8hob24dhXAsWzCtAgcssWv85d5w6Tq\n9C9XqGGpziYjHQEGd8AhzQb30kPhxynQc42pIqNg7U8KoVFT7lpMyX99+1Kj\nF8FeXatW/yLgePKx4WfzX8r2THS+DtahwHAK4GSkWPGuy74Ej4zfwCLQ8tbu\n44C6KDFvRm1UD9+Po9CXQP99oDhcVI/Iwiz/ZH8EmX/pGChg/NtiR9s5igkj\nU8pgSuDT/uBD1RMVThqKQyM/4QHB/yJxOHMDpUnXls10jnVI3EKvQ1sdFnCa\nRBhTmVhlEWR2HVr8rEFXL8WuviL/9nwPQpsSPxCUmdGu7XAkAa6BQN5X0KbK\nUWpuodfH2bf8u3ttlLKNfQMRVEYWCciEsfEmtsVmTzxbHzcT/oPHXL7SA5/s\nmFpnihG0dHpif5yhyha3CkFkqNNzO19mG8H5K4HZQ1BH131exVdIdHbnEOia\nR/XH\r\n=r8Ww\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1qTaN5fOk6aJkOVnR5hy9FCYYLnDTrti/ovTkTU1RZAIgTd6Msv5XYQ3Bw5Rrj+PLt021UmnhtRrfgtLxQTtf1fc="}]},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/url-protocol_0.1.0_1642781059111_0.13994552730236398"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-21T16:04:19.071Z","0.1.0":"2022-01-21T16:04:19.260Z","modified":"2022-04-04T15:55:03.865Z"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"description":"A protocol to getting the URL for a local file","homepage":"https://github.com/astro-community/url-protocol#readme","keywords":["astro","file","files","import","imports","path","paths","plugin","protocol","protocols","rollup","url","urls","vite"],"repository":{"type":"git","url":"git+https://github.com/astro-community/url-protocol.git"},"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"bugs":{"url":"https://github.com/astro-community/url-protocol/issues"},"license":"CC0-1.0","readme":"# URL Protocol\n\n**URL Protocol** lets you use a `url:` protocol to link to local files in [Astro](https://astro.build).\n\n```astro\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width\" />\n    <title>URL Protocol: Inline Example</title>\n    <link rel=\"stylesheet\" href={await import('url:style.css')} />\n  </head>\n  <body>\n    <h1>URL Protocol: Inline Example</h1>\n  </body>\n</html>\n```\n\n```astro\n---\nimport styleURL from 'url:style.css'\n---\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width\" />\n    <title>URL Protocol: Frontmatter Example</title>\n    <link rel=\"stylesheet\" href={await styleURL} />\n  </head>\n  <body>\n    <h1>URL Protocol: Frontmatter Example</h1>\n  </body>\n</html>\n```\n\n\n\n## Usage\n\nInstall **URL Protocol** to your project.\n\n```sh\nnpm install @astropub/url-protocol\n```\n\nAdd **URL Protocol** to the **renderers** list.\n\n```js\n// astro.config.js\nexport default {\n  renderers: [\n    '@astropub/url-protocol'\n  ]\n}\n```\n\nYou can also add **URL Protocol** as a **Vite Plugin**.\n\n```js\n// astro.config.js\nimport { urlProtocolPlugin } from '@astropub/url-protocol'\n\nexport default {\n  vite: {\n    plugins: [\n      urlProtocolPlugin()\n    ]\n  }\n}\n```\n","readmeFilename":"README.md"}