{"id":22744304,"url":"https://github.com/tommasoamici/html-webpack-plugin-django","last_synced_at":"2025-04-14T09:35:10.561Z","repository":{"id":37065260,"uuid":"379607164","full_name":"TommasoAmici/html-webpack-plugin-django","owner":"TommasoAmici","description":"A Webpack plugin to output Django static tags with html-webpack-plugin","archived":false,"fork":false,"pushed_at":"2025-04-13T10:50:35.000Z","size":833930,"stargazers_count":4,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T11:38:21.122Z","etag":null,"topics":["django","html","html-webpack-plugin","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TommasoAmici.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-23T13:10:28.000Z","updated_at":"2024-01-12T18:20:50.000Z","dependencies_parsed_at":"2024-03-18T21:32:17.277Z","dependency_job_id":"3aab1c83-5369-460e-b55f-8d5c99a3b794","html_url":"https://github.com/TommasoAmici/html-webpack-plugin-django","commit_stats":{"total_commits":341,"total_committers":4,"mean_commits":85.25,"dds":0.3870967741935484,"last_synced_commit":"c283a9867324bbd977db2133324020657fa7d023"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":"TommasoAmici/typescript-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommasoAmici%2Fhtml-webpack-plugin-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommasoAmici%2Fhtml-webpack-plugin-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommasoAmici%2Fhtml-webpack-plugin-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TommasoAmici%2Fhtml-webpack-plugin-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TommasoAmici","download_url":"https://codeload.github.com/TommasoAmici/html-webpack-plugin-django/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248854657,"owners_count":21172396,"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":["django","html","html-webpack-plugin","webpack","webpack-plugin"],"created_at":"2024-12-11T01:45:15.463Z","updated_at":"2025-04-14T09:35:10.501Z","avatar_url":"https://github.com/TommasoAmici.png","language":"Python","readme":"# html-webpack-plugin-django\n\nA template for Typescript projects\n\n## At a glance\n\n[![Node.js CI](https://github.com/TommasoAmici/html-webpack-plugin-django/actions/workflows/build.yml/badge.svg)](https://github.com/TommasoAmici/html-webpack-plugin-django/actions/workflows/build.yml) [![codecov](https://codecov.io/gh/TommasoAmici/html-webpack-plugin-django/branch/main/graph/badge.svg?token=KYeOxoHseJ)](https://codecov.io/gh/TommasoAmici/html-webpack-plugin-django) \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/html-webpack-plugin-django\"\u003e \u003cimg src=\"https://img.shields.io/npm/v/html-webpack-plugin-django\"\u003e\n\n## Getting started\n\nFirst, install the package\n\n```sh\n# npm install -D html-webpack-plugin-django\nyarn add -D html-webpack-plugin-django\n```\n\nIn your `webpack.config.js` file add the plugin after `html-webpack-plugin`.\n`html-webpack-plugin-django` will output Django static tags in the head and body of your HTML index file.\n\nThis plugin operates under a few assumptions:\n\n1. You have added the `{% load static %}` tag to your HTML template\n2. Your webpack bundle is emitted in one of your [Django project's static files directories](https://docs.djangoproject.com/en/3.2/howto/static-files/).\n\n**Example**\n\n```js\nconst path = require(\"path\");\nconst HtmlWebpackPlugin = require(\"html-webpack-plugin\");\nconst HtmlWebpackPluginDjango = require(\"html-webpack-plugin-django\");\n\nmodule.exports = (env, argv) =\u003e {\n  return {\n    output: {\n      path: path.resolve(\"path/to/your/django/static/dist\"),\n      filename: \"js/[name].[contenthash].js\",\n      publicPath: \"/static/\",\n    },\n    ...\n    plugins: [\n      new HtmlWebpackPlugin(),\n      new HtmlWebpackPluginDjango({ bundlePath: \"dist\" }),\n    ],\n  };\n};\n```\n\n**Output**\n\n```html\n\u003cscript defer src=\"{% static 'dist/js/runtime.1198543abbf33da21374.js' %}\"\u003e\u003c/script\u003e\n```\n\n## Found a bug?\n\nPlease file a report in [this repository's issues](https://github.com/TommasoAmici/html-webpack-plugin-django/issues)\n\n## Development\n\nIf you want to contribute to this project, that's great to hear!\n\nYou can start at [CONTRIBUTING.md](./CONTRIBUTING.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommasoamici%2Fhtml-webpack-plugin-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftommasoamici%2Fhtml-webpack-plugin-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommasoamici%2Fhtml-webpack-plugin-django/lists"}