{"id":18685826,"url":"https://github.com/garraflavatra/11ty-tools","last_synced_at":"2026-04-28T21:35:17.575Z","repository":{"id":45258337,"uuid":"426584388","full_name":"garraflavatra/11ty-tools","owner":"garraflavatra","description":"Advanced asset pipeline for Eleventy, the simpler static site generator.","archived":false,"fork":false,"pushed_at":"2021-12-27T10:42:32.000Z","size":2867,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-29T00:55:58.389Z","etag":null,"topics":["assets","eleventy","eleventy-plugin","sass","webpack"],"latest_commit_sha":null,"homepage":"","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/garraflavatra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-10T10:48:21.000Z","updated_at":"2022-02-22T15:59:16.000Z","dependencies_parsed_at":"2022-08-27T19:50:09.960Z","dependency_job_id":null,"html_url":"https://github.com/garraflavatra/11ty-tools","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/garraflavatra/11ty-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garraflavatra%2F11ty-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garraflavatra%2F11ty-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garraflavatra%2F11ty-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garraflavatra%2F11ty-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garraflavatra","download_url":"https://codeload.github.com/garraflavatra/11ty-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garraflavatra%2F11ty-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32400868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","eleventy","eleventy-plugin","sass","webpack"],"created_at":"2024-11-07T10:24:25.335Z","updated_at":"2026-04-28T21:35:17.553Z","avatar_url":"https://github.com/garraflavatra.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 11ty-tools\n\n[![Lint](https://github.com/garraflavatra/11ty-tools/actions/workflows/lint.yml/badge.svg)](https://github.com/garraflavatra/11ty-tools/actions/workflows/lint.yml)\n![GitHub last commit](https://img.shields.io/github/last-commit/garraflavatra/11ty-tools)\n[![npm](https://img.shields.io/npm/v/11ty-tools)](https://www.npmjs.com/package/11ty-tools)\n\nThis package provides an advanced asset pipeline for [Eleventy], the simpler static site generator.\n\nJavaScript ([ECMAScript] is supported) and [Sass]/SCSS assets will be compiled using [webpack], a static module bundler for the web. This plugin also configures [11ty-image] to optimize internal and external images. Furthermore, it minimizes Eleventy's HTML output using [html-minifier].\n\n## Installation\n\nThe easiest way to use this plugin, is by using my preconfigured [11ty-template]. If you want to install it yourself, you should do something like this:\n\n```shell\nnpm install 11ty-tools --save-dev\n```\n\n```js\n// .eleventy.js\nconst tools = require(\"11ty-tools\");\n\nmodule.exports = function (eleventyConfig) {\n  eleventyConfig.addPlugin(tools);\n  //...\n};\n```\n\n```js\n// webpack.config.js\nmodule.exports = require(\"11ty-tools/lib/webpack-config\");\n```\n\n## Features\n\n### Asset processing\n\n#### JavaScript/ECMAScript\n\nAny valid JavaScript file put in `src/assets/js/*.js` will get processed and put in the asset manifest. Files in subdirectories will _not_ get processed, unless they're imported by a file matching the pattern above.\n\n#### Sass/SCSS\n\nAny valid Sass or SCSS file that is imported in `src/assets/style/bundle.js` will get processed and put in the asset manifest.\n\n#### Webfonts\n\nLocal font files that are referenced to in Sass or SCSS will get a hashed output name too. Make sure you download them into your project using [google-webfonts-helper] (e.g. into `src/assets/fonts`).\n\n#### How to use assets\n\nThere are two ways to using assets.\n\nYou could get the absolute path to your asset by using the `{% asset 'name' %}` shortcode and feeding it with the asset name (e.g. `interactive.js` or `mystyles.css`). The relative path will be resolved from the asset manifest (living in `out/_proc/manifest.json`) generated by the [webpack-assets-manifest] plugin.\n\nHowever, sometimes it is useful to inline an asset right in your HTML. You could do that by using `{% inlineasset 'name' %}`. The raw asset contents will be read from the file and returned by the shortcode. Make sure that you put `\u003cstyle\u003e` `\u003c/style\u003e` or script tags around the shortcode, as it won't automatically do that for you.\n\n### Images\n\nYou can have your images processed by using the `{% image 'path'[, 'alt'[, 'sizes']] %}` shortcode. Parameters:\n\n- `path` **(required)**: The path to the image. Can be internal (e.g. `img/cat.png`) or external (e.g. `https://somesite.io/image.jpeg`).\n  NOTE: internal images are automatically provided with the prefix `src/site/img/`. If you would like to include an image outside that folder, add a leading slash to the path. There is no global config option to disable or change the base path.\n- `alt` **(recommended)**: Alt text for screen readers. This will throw a console warning if not specified.\n- `sizes`: see [`sizes`] on MDN HTML documentation.\n\n### YouTube\n\nYou can replace your unwieldy YouTube iframes with: `{% yt 'oGhe8dtRIH0' %}`.\n\nPositional arguments:\n\n1. `videoId` **(required)**: the ID of your video. You can find it in the YouTube video URL after `watch?v=`.\n2. `title`: title and alt for your video.\n3. `width`: iframe width.\n4. `height`: iframe height.\n5. `allow`: [`allow`] attribute. Defaults to standard YouTube iframe requirements.\n\n## Contributing\n\n\u003e Included in [CONTRIBUTING.md]\n\nAny type of contribution is very welcome! Provisionally, I'm not going to put a lot of effort into contribution guidelines as this isn't a huge project.\n\n## License\n\n\u003e Included in [LICENSE.md]\n\nCopyright 2021 Romein van Buren \u003c\u003cromein@vburen.eu\u003e\u003e\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n\n[ecmascript]: https://en.wikipedia.org/wiki/ECMAScript\n[eleventy]: https://www.11ty.dev\n[sass]: https://sass-lang.com\n[webpack]: https://webpack.js.org\n[11ty-image]: https://www.11ty.dev/docs/plugins/image/\n[html-minifier]: https://github.com/kangax/html-minifier\n[11ty-template]: https://github.com/garraflavatra/11ty-template\n[`sizes`]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-sizes\n[google-webfonts-helper]: https://google-webfonts-helper.herokuapp.com/fonts\n[webpack-assets-manifest]: https://github.com/webdeveric/webpack-assets-manifest\n[`allow`]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-allow\n[contributing.md]: https://github.com/garraflavatra/11ty-tools/blob/main/CONTRIBUTING.md\n[license.md]: https://github.com/garraflavatra/11ty-tools/blob/main/LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarraflavatra%2F11ty-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarraflavatra%2F11ty-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarraflavatra%2F11ty-tools/lists"}