{"id":50911522,"url":"https://github.com/daemonless/mkdocs-zip-bundle-plugin","last_synced_at":"2026-06-16T10:31:39.997Z","repository":{"id":361370913,"uuid":"1196628634","full_name":"daemonless/mkdocs-zip-bundle-plugin","owner":"daemonless","description":"MkDocs plugin to bundle code blocks into downloadable ZIP or raw files","archived":false,"fork":false,"pushed_at":"2026-05-30T09:38:59.000Z","size":669,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T11:20:59.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daemonless.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-30T22:11:08.000Z","updated_at":"2026-05-30T09:38:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/daemonless/mkdocs-zip-bundle-plugin","commit_stats":null,"previous_names":["daemonless/mkdocs-zip-bundle-plugin"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/daemonless/mkdocs-zip-bundle-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemonless%2Fmkdocs-zip-bundle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemonless%2Fmkdocs-zip-bundle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemonless%2Fmkdocs-zip-bundle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemonless%2Fmkdocs-zip-bundle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daemonless","download_url":"https://codeload.github.com/daemonless/mkdocs-zip-bundle-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daemonless%2Fmkdocs-zip-bundle-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34402648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-16T10:31:39.200Z","updated_at":"2026-06-16T10:31:39.991Z","avatar_url":"https://github.com/daemonless.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mkdocs-zip-bundle-plugin\n\nTurn code blocks into downloadable files — for **MkDocs/Material** and **[Zensical](https://zensical.org)**. Tag any code block with a bundle ID and filename and a download button is injected automatically. Works with single files (direct download) or multiple files (ZIP archive).\n\nBuilt to pair with [`mkdocs-placeholder-plugin`](https://github.com/six-two/mkdocs-placeholder-plugin): if your docs use interactive placeholders like `@PORT@`, the downloaded file will contain the user's actual values, not the defaults. _(MkDocs/Material — see [Using with Zensical](https://mkdocs-zip-bundle-plugin.daemonless.io/configuration/#using-with-zensical) for the Zensical caveat.)_\n\n**[Live demo → mkdocs-zip-bundle-plugin.daemonless.io](https://mkdocs-zip-bundle-plugin.daemonless.io)**\n\n## Features\n\n- **Single file downloads** — one code block gets a direct raw file download, no ZIP needed\n- **Multi-file ZIP bundles** — group multiple code blocks into one ZIP with a single button\n- **Placeholder-aware** — captures the live browser state, so user-edited values are included in the download\n- **Nested paths** — use `configs/app.yaml` as a filename to create subdirectories inside the ZIP\n- **Custom button labels** — override auto-generated text per bundle\n- **Self-contained** — ships with JSZip and default styling, no extra dependencies\n\n## Installation\n\n```bash\npip install mkdocs-zip-bundle-plugin\n```\n\nRequires Python 3.8+ and MkDocs 1.4+. Download buttons require a modern browser (Chrome, Firefox, Safari, Edge).\n\n## Configuration\n\n```yaml\nplugins:\n  - search\n  - zip-bundle:\n      include_jszip: true   # set to false if you already load JSZip elsewhere\n      zip_label_suffix: \"(.zip)\"  # appended to multi-file bundle button labels\n```\n\nAlso enable the `attr_list` extension so MkDocs can read attributes on code blocks:\n\n```yaml\nmarkdown_extensions:\n  - attr_list\n  - pymdownx.superfences  # recommended for reliable attribute support\n```\n\n## Usage\n\nAdd `data-zip-bundle` and `data-zip-filename` attributes to any fenced code block:\n\n### Single file\n\n    ```yaml { data-zip-bundle=\"my-app\" data-zip-filename=\"compose.yaml\" }\n    services:\n      app:\n        image: my-image:latest\n    ```\n\nThe plugin injects a **Download compose.yaml** button directly after the code block.\n\n### Multiple files (ZIP)\n\n    ```yaml { data-zip-bundle=\"my-app\" data-zip-filename=\"compose.yaml\" }\n    services:\n      app:\n        image: my-image:latest\n    ```\n\n    ```bash { data-zip-bundle=\"my-app\" data-zip-filename=\"setup.sh\" }\n    mkdir -p /data/app\n    ```\n\nBoth blocks share the same bundle ID. The plugin injects a single **Download My App (.zip)** button after the last block.\n\n### Custom button label\n\n    ```yaml { data-zip-bundle=\"my-app\" data-zip-filename=\"compose.yaml\" data-zip-label=\"Download config\" }\n    ...\n    ```\n\n### Force ZIP for a single file\n\n    ```yaml { data-zip-bundle=\"my-app\" data-zip-filename=\"compose.yaml\" data-zip-force=\"true\" }\n    ...\n    ```\n\n### Nested directories\n\n    ```yaml { data-zip-bundle=\"my-app\" data-zip-filename=\"config/app.yaml\" }\n    ...\n    ```\n\n    ```bash { data-zip-bundle=\"my-app\" data-zip-filename=\"scripts/setup.sh\" }\n    ...\n    ```\n\nThe ZIP will contain `config/app.yaml` and `scripts/setup.sh` preserving the directory structure.\n\n## How it works with placeholders\n\nIf you use [`mkdocs-placeholder-plugin`](https://github.com/six-two/mkdocs-placeholder-plugin), your docs can have editable values like `@PORT@` or `@DATA_PATH@` that users customize in the browser.\n\nWhen the user clicks a download button from this plugin, the downloaded file contains whatever is currently in the code block — including any values the user has already changed. This makes it possible to offer personalized, copy-paste-ready config files directly from your documentation.\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details. Bundles [JSZip](https://github.com/Stuk/jszip) (MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaemonless%2Fmkdocs-zip-bundle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaemonless%2Fmkdocs-zip-bundle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaemonless%2Fmkdocs-zip-bundle-plugin/lists"}