{"id":24983674,"url":"https://github.com/posthtml/posthtml-inline-favicon","last_synced_at":"2026-01-07T13:51:16.828Z","repository":{"id":35068370,"uuid":"202943730","full_name":"posthtml/posthtml-inline-favicon","owner":"posthtml","description":"PostHTML plugin to inline favicons","archived":false,"fork":false,"pushed_at":"2024-04-20T07:40:04.000Z","size":318,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T21:06:06.158Z","etag":null,"topics":["data-uri","favicon","inline","posthtml","posthtml-plugin"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/posthtml.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-18T00:32:17.000Z","updated_at":"2024-04-20T07:40:07.000Z","dependencies_parsed_at":"2024-11-07T19:34:56.277Z","dependency_job_id":"c13cdc23-e464-4b13-9041-caecc922d2e6","html_url":"https://github.com/posthtml/posthtml-inline-favicon","commit_stats":{"total_commits":62,"total_committers":4,"mean_commits":15.5,"dds":0.5161290322580645,"last_synced_commit":"99523a5864d9ad2ad3573d6d33a949e6044c68ac"},"previous_names":["metonym/posthtml-inline-favicon"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-inline-favicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-inline-favicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-inline-favicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-inline-favicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/posthtml-inline-favicon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245467621,"owners_count":20620216,"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":["data-uri","favicon","inline","posthtml","posthtml-plugin"],"created_at":"2025-02-04T09:20:16.384Z","updated_at":"2026-01-07T13:51:16.802Z","avatar_url":"https://github.com/posthtml.png","language":"HTML","readme":"# posthtml-inline-favicon \u003cimg align=\"right\" width=\"220\" height=\"200\" title=\"PostHTML logo\" src=\"http://posthtml.github.io/posthtml/logo.svg\"\u003e\n\n[![NPM][npm]][npm-url]\n\n`posthtml-inline-favicon` is a [PostHTML](https://github.com/posthtml/posthtml) plugin to inline favicons.\n\n**Before:**\n\n```html\n\u003chead\u003e\n  \u003clink rel=\"icon\" href=\"favicon.ico\" /\u003e\n\u003c/head\u003e\n```\n\n**After:**\n\n```html\n\u003chead\u003e\n  \u003clink rel=\"icon\" type=\"image/png\" href=\"data:image/png;base64,...\" /\u003e\n\u003c/head\u003e\n```\n\n## Install\n\n```bash\n# npm\nnpm i -D posthtml-inline-favicon\n\n# pnpm\npnpm add -D posthtml-inline-favicon\n\n# Yarn\nyarn add -D posthtml-inline-favicon\n```\n\n## Usage\n\n```js\nconst fs = require(\"fs\");\nconst posthtml = require(\"posthtml\");\nconst { inlineFavicon } = require(\"posthtml-inline-favicon\");\n\nconst html = fs.readFileSync(\"./index.html\");\n\nposthtml()\n  .use(inlineFavicon())\n  .process(html)\n  .then((result) =\u003e fs.writeFileSync(\"./after.html\", result.html));\n```\n\n## Options\n\nBy default, the plugin assumes that the file to process is in the same directory as the posthtml script. If not, specify the relative path to the html file in the options:\n\n```js\nconst fs = require(\"fs\");\nconst posthtml = require(\"posthtml\");\nconst { inlineFavicon } = require(\"posthtml-inline-favicon\");\n\nconst html = fs.readFileSync(\"./public/index.html\");\n\nposthtml()\n  .use(inlineFavicon({ path: \"public\" }))\n  .process(html)\n  .then((result) =\u003e fs.writeFileSync(\"./after.html\", result.html));\n```\n\n## [Example](example)\n\n## Contributing\n\nSee the [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs).\n\n## [Changelog](CHANGELOG.md)\n\n## License\n\n[MIT](LICENSE)\n\n[npm]: https://img.shields.io/npm/v/posthtml-inline-favicon.svg?color=blue\n[npm-url]: https://npmjs.com/package/posthtml-inline-favicon\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-inline-favicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fposthtml-inline-favicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-inline-favicon/lists"}