{"id":16326532,"url":"https://github.com/icelam/html-variables-plugin","last_synced_at":"2025-05-14T22:12:05.210Z","repository":{"id":57267691,"uuid":"203939888","full_name":"icelam/html-variables-plugin","owner":"icelam","description":"Plugin designed for injecting variables to HTML templates via HtmlWebpackPlugin.","archived":false,"fork":false,"pushed_at":"2019-09-05T04:47:30.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T22:12:02.890Z","etag":null,"topics":["html-webpack-plugin","npm-package","webpack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/html-variables-plugin","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/icelam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-23T06:42:42.000Z","updated_at":"2019-09-05T04:47:32.000Z","dependencies_parsed_at":"2022-09-02T05:41:01.297Z","dependency_job_id":null,"html_url":"https://github.com/icelam/html-variables-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icelam%2Fhtml-variables-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icelam%2Fhtml-variables-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icelam%2Fhtml-variables-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icelam%2Fhtml-variables-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icelam","download_url":"https://codeload.github.com/icelam/html-variables-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235711,"owners_count":22036965,"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":["html-webpack-plugin","npm-package","webpack"],"created_at":"2024-10-10T23:08:40.030Z","updated_at":"2025-05-14T22:12:05.185Z","avatar_url":"https://github.com/icelam.png","language":"JavaScript","readme":"# HTML Variables Plugin #\n\nThis is a plugin designed for injecting variables to HTML templates via HtmlWebpackPlugin. To use this plugin, add this to your webpack right after the HtmlWebpackPlugin. This plugin accepts an object as parameter, which contains key value pairs of the variables to be injected.\n\n## Installation ##\n* `npm i html-variables-plugin`\n\n## Usage ##\nThe following example declars a variable named 'foo', which it's value is 'bar'.\n\n#### In your Webpack config: ####\n```\nconst HtmlVariablesPlugin = require('html-variables-plugin');\n\nmodule.exports = {\n  // ... Other settings\n  plugins: [\n    // ... HtmlWebpackPlugin and Other plugins\n    new HtmlVariablesPlugin({ foo: 'bar' })\n  ]\n}\n```\n\n#### In your HTML: ####\n```\n\u003ch1\u003e%foo%\u003c/h1\u003e\n```\n\n---\n\n## Reference ##\n* [How to create plugin for HtmlWebpackPlugin](https://github.com/jantimon/html-webpack-plugin#beforeemit-hook)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficelam%2Fhtml-variables-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficelam%2Fhtml-variables-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficelam%2Fhtml-variables-plugin/lists"}