{"id":15105584,"url":"https://github.com/gregives/eleventy-load","last_synced_at":"2025-09-27T05:30:40.110Z","repository":{"id":37040536,"uuid":"291012699","full_name":"gregives/eleventy-load","owner":"gregives","description":"Resolve dependencies and post-process files in your Eleventy project","archived":true,"fork":false,"pushed_at":"2023-03-04T10:57:36.000Z","size":1571,"stargazers_count":28,"open_issues_count":13,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-21T13:04:00.438Z","etag":null,"topics":["assets","dependencies","eleventy","eleventy-load","eleventy-plugin","loaders"],"latest_commit_sha":null,"homepage":"https://eleventy-load.xyz","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/gregives.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-28T09:58:34.000Z","updated_at":"2023-07-24T22:32:49.000Z","dependencies_parsed_at":"2023-02-18T15:31:20.812Z","dependency_job_id":null,"html_url":"https://github.com/gregives/eleventy-load","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregives%2Feleventy-load","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregives%2Feleventy-load/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregives%2Feleventy-load/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregives%2Feleventy-load/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregives","download_url":"https://codeload.github.com/gregives/eleventy-load/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219871882,"owners_count":16554465,"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","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":["assets","dependencies","eleventy","eleventy-load","eleventy-plugin","loaders"],"created_at":"2024-09-25T20:41:25.092Z","updated_at":"2025-09-27T05:30:39.604Z","avatar_url":"https://github.com/gregives.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eleventy-load ⚡\n\n![Tests](https://github.com/gregives/eleventy-load/actions/workflows/test.yml/badge.svg)\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![License][license-src]][license-href]\n[![Prettier][prettier-src]][prettier-href]\n\nWish there was a way to import Sass files as easily as CSS files? Now there is!\n\nIntroducing eleventy-load, an [Eleventy](https://11ty.dev/) plugin which resolves dependencies and post-processes files for you. Loading Sass files is just one example: eleventy-load exposes 'loaders' which can process **any file** including HTML, CSS, JavaScript, images and more. The concept of eleventy-load is very similar to [webpack loaders](https://webpack.js.org/loaders/), albeit with infinitely less JavaScript sent to the browser.\n\n## [Documentation][eleventy-load-index]\n\nVisit the [eleventy-load website][eleventy-load-index] for usage instructions, examples of eleventy-load, a list of loaders and how to write a loader yourself.\n\n## Get Started\n\nFor more detailed instructions, see the [eleventy-load website][eleventy-load-usage].\n\nThe following example sets up eleventy-load so that you can import Sass files just like you would import CSS files.\n\n1. Install eleventy-load and any loaders you need.\n\n```sh\nnpm install --save-dev eleventy-load eleventy-load-html eleventy-load-sass eleventy-load-css eleventy-load-file\n```\n\n2. Add eleventy-load as a plugin and set up rules to process your Sass file.\n\n```js\nmodule.exports = function (eleventyConfig) {\n  eleventyConfig.addPlugin(require(\"eleventy-load\"), {\n    rules: [\n      {\n        test: /\\.html$/,\n        loaders: [\n          {\n            loader: require(\"eleventy-load-html\"),\n          },\n        ],\n      },\n      {\n        test: /\\.scss$/,\n        loaders: [\n          {\n            loader: require(\"eleventy-load-sass\"),\n          },\n          {\n            loader: require(\"eleventy-load-css\"),\n          },\n          {\n            loader: require(\"eleventy-load-file\"),\n            options: {\n              name: \"[hash].css\",\n            },\n          },\n        ],\n      },\n    ],\n  });\n};\n```\n\n3. Now you can write your Sass in a file and link it in your HTML using a `link` element!\n\n```scss\n$massive: 5rem;\n\nbody {\n  background-color: linen;\n\n  h1 {\n    font-size: $massive;\n  }\n}\n```\n\n```html\n\u003clink rel=\"stylesheet\" href=\"styles.scss\" /\u003e\n```\n\nIt's as easy as that!\n\n## Loaders\n\nLoaders can process any file, from a text file to images. See a list of loaders on the [eleventy-load website][eleventy-load-loaders].\n\n## Contribution\n\nI'd love some help adding tests to eleventy-load and growing the ecosystem of loaders. If you'd like to contribute, get in touch with me!\n\n### Development\n\n- Clone this repo and run `npm install`\n- Configure your IDE to run prettier/eslint on save.\n- Run `npm run test:watch` which will run tests on changed files while you work.\n- Please add tests for any new features. Run `npm test` to lint, run tests and get a coverage report.\n- Tests will run when you push to remote\n\nIt's a pain to manually test changes against a running 11ty instance, especially for different versions. The tests make this simpler by mocking the interface to 11ty for each major version. This gives reasonable confidence that the plugin is compatible with each major 11ty release.\n\n\n\u003c!-- References --\u003e\n\n[eleventy-load-index]: https://eleventy-load.xyz/\n[eleventy-load-usage]: https://eleventy-load.xyz/usage/\n[eleventy-load-loaders]: https://eleventy-load.xyz/loaders/\n[npm-version-src]: https://img.shields.io/npm/v/eleventy-load/latest.svg\n[npm-version-href]: https://npmjs.com/package/eleventy-load\n[npm-downloads-src]: https://img.shields.io/npm/dt/eleventy-load.svg\n[npm-downloads-href]: https://npmjs.com/package/eleventy-load\n[license-src]: https://img.shields.io/npm/l/eleventy-load.svg\n[license-href]: https://npmjs.com/package/eleventy-load\n[prettier-src]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg\n[prettier-href]: https://github.com/prettier/prettier\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregives%2Feleventy-load","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregives%2Feleventy-load","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregives%2Feleventy-load/lists"}