{"id":15163085,"url":"https://github.com/henrycatalinismith/11tyshim","last_synced_at":"2026-05-18T05:44:58.094Z","repository":{"id":57115678,"uuid":"361863583","full_name":"henrycatalinismith/11tyshim","owner":"henrycatalinismith","description":"Eleventy monkeypatch plugin for shimming lifecycle events","archived":false,"fork":false,"pushed_at":"2025-03-04T20:26:52.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T21:55:04.122Z","etag":null,"topics":["11ty","11ty-plugin","monkey-patching","shim"],"latest_commit_sha":null,"homepage":"https://codeberg.org/henrycatalinismith/11tyshim","language":"TypeScript","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/henrycatalinismith.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-26T19:03:26.000Z","updated_at":"2025-03-04T20:26:57.000Z","dependencies_parsed_at":"2023-12-26T06:41:05.131Z","dependency_job_id":"9b142265-0a45-43fe-96db-d93e7224a5c8","html_url":"https://github.com/henrycatalinismith/11tyshim","commit_stats":null,"previous_names":["hendotcat/11tyshim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/henrycatalinismith/11tyshim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrycatalinismith%2F11tyshim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrycatalinismith%2F11tyshim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrycatalinismith%2F11tyshim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrycatalinismith%2F11tyshim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henrycatalinismith","download_url":"https://codeload.github.com/henrycatalinismith/11tyshim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrycatalinismith%2F11tyshim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29450599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["11ty","11ty-plugin","monkey-patching","shim"],"created_at":"2024-09-27T02:03:28.381Z","updated_at":"2026-02-14T17:02:46.389Z","avatar_url":"https://github.com/henrycatalinismith.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 11tyshim\n\nEleventy monkeypatch plugin\n\n\u003e [!NOTE]\n\u003e In version 1.0.0 of Eleventy, an event listener API was added to eleventyConfig.\n\u003e You're better off using that API rather than this plugin.\n\u003e\n\u003e https://www.11ty.dev/docs/events/\n\nNeed to monkeypatch Eleventy to listen to lifecycle events for your plugin?\nNeed access to `eleventyInstance` so you can read config variables or reload\nthe dev server? Tired of copypasting around that same `monkeypatch()` function\neveryone else is using? This is the plugin you're looking for!\n\n## Installation\n\n```\nyarn add -D @henrycatalinismith/11tyshim\n```\n\n## Usage\n\n```javascript\nconst { shimPlugin } = require(\"@henrycatalinismith/11tyshim\")\n\nmodule.exports = function(eleventyConfig) {\n  eleventyConfig.addPlugin(shimPlugin, {\n    finish: (eleventyInstance) =\u003e {\n      console.log(\"11ty build complete!\")\n    },\n\n    serve: (eleventyInstance) =\u003e {\n      console.log(\"11ty dev server started!\")\n    },\n  })\n}\n```\n\n## Options\n\n### `write`\n\nPass a `write` function to the plugin and it'll run at the start of an Eleventy\nbuild. This function runs for both one-off Eleventy builds and the `--serve` dev\nserver.\n\nIt receives the `eleventyInstance` as an argument.\n\n```javascript\nconst { shimPlugin } = require(\"@henrycatalinismith/11tyshim\")\n\nmodule.exports = function(eleventyConfig) {\n  eleventyConfig.addPlugin(shimPlugin, {\n    write: (eleventyInstance) =\u003e {\n      console.log(\"11ty build starting!\")\n    },\n  })\n}\n```\n\n### `finish`\n\nPass a `finish` function to the plugin and it'll run just before an Eleventy\nbuild finishes. This function only runs in one-off builds of Eleventy sites,\nnot in the dev server.\n\nIt receives the `eleventyInstance` as an argument.\n\n```javascript\nconst { shimPlugin } = require(\"@henrycatalinismith/11tyshim\")\n\nmodule.exports = function(eleventyConfig) {\n  eleventyConfig.addPlugin(shimPlugin, {\n    finish: (eleventyInstance) =\u003e {\n      console.log(\"11ty build complete!\")\n      console.log(`site written to ${eleventyInstance.config.dir.output}`)\n    },\n  })\n}\n```\n\n### `serve`\n\nPass a `serve` function to the plugin and it'll run just before an Eleventy dev\nserver starts up. This function only runs in the Eleventy server, never during\none-off builds. Most plugin authors who monkeypatch this method do so to set up\ndevelopment tools which watch files, rebuild them when they change, and then\nreload the Eleventy server.\n\nIt receives the `eleventyInstance` as an argument.\n\n```javascript\nconst { shimPlugin } = require(\"@henrycatalinismith/11tyshim\")\nconst chokidar = require(\"chokidar\")\nconst fs = require(\"fs\")\nconst sass = require(\"sass\")\n\nmodule.exports = function(eleventyConfig) {\n  eleventyConfig.addPlugin(shimPlugin, {\n    serve: (eleventyInstance) =\u003e {\n      console.log(\"11ty dev server started!\")\n      chokidar.watch(\"style.scss\").on(\"all\", (event, path) =\u003e {\n        const { css } = sass.renderSync({ file: \"style.scss\" })\n        fs.writeFileSync(\n          `${eleventyInstance.outputDir}/style.css`,\n          css\n        )\n        eleventyInstance.eleventyServe.reload()\n      })\n    },\n  })\n}\n```\n\n### `verbose`\n\nPass `verbose: true` to the plugin and it'll output a whole bunch of\ninformation about what it's doing. This is mostly useful for debugging. Please\nenable this this option if you're reporting a bug in `11tyshim`.\n\n## Contributing\n\n* [Tips][Contributing]\n* [Code of Conduct]\n\n## License\n\n[MIT]\n\n[Contributing]: https://codeberg.org/henrycatalinismith/11tyshim/src/branch/main/contributing.md\n[Code of Conduct]: https://codeberg.org/henrycatalinismith/11tyshim/src/branch/main/code_of_conduct.md\n[MIT]: https://codeberg.org/henrycatalinismith/11tyshim/src/branch/main/license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrycatalinismith%2F11tyshim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenrycatalinismith%2F11tyshim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrycatalinismith%2F11tyshim/lists"}