{"id":15188434,"url":"https://github.com/jonasdoesthings/mkdocs-exclude-unused-files","last_synced_at":"2025-10-05T18:46:13.643Z","repository":{"id":87010841,"uuid":"606860824","full_name":"JonasDoesThings/mkdocs-exclude-unused-files","owner":"JonasDoesThings","description":"Exclude orphaned (unused) static files from your mkdocs build","archived":false,"fork":false,"pushed_at":"2024-06-09T16:30:06.000Z","size":130,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T07:45:49.621Z","etag":null,"topics":["mkdocs","mkdocs-material","mkdocs-plugin","mkdocs-site"],"latest_commit_sha":null,"homepage":"","language":"Python","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/JonasDoesThings.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2023-02-26T19:22:19.000Z","updated_at":"2024-10-25T00:10:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"512cb139-f6f9-4006-99b2-3e2857add47f","html_url":"https://github.com/JonasDoesThings/mkdocs-exclude-unused-files","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":0.4193548387096774,"last_synced_commit":"dd7e11ef11f3fb89402717ab45ac4a176a3fb3da"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasDoesThings%2Fmkdocs-exclude-unused-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasDoesThings%2Fmkdocs-exclude-unused-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasDoesThings%2Fmkdocs-exclude-unused-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasDoesThings%2Fmkdocs-exclude-unused-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonasDoesThings","download_url":"https://codeload.github.com/JonasDoesThings/mkdocs-exclude-unused-files/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238471997,"owners_count":19478141,"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":["mkdocs","mkdocs-material","mkdocs-plugin","mkdocs-site"],"created_at":"2024-09-27T19:05:22.245Z","updated_at":"2025-10-05T18:46:13.516Z","avatar_url":"https://github.com/JonasDoesThings.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MkDocs Exclude Unused (orphaned) Files\n\nA simple plugin for excluding files from being included in the mkdocs output if they are not referenced on other pages.\n\n## Installation\n\n![pypi current version](https://img.shields.io/pypi/v/mkdocs-exclude-unused-files?style=flat-square)\n\nRun `pip install --upgrade mkdocs-exclude-unused-files`\n\n## Configuration\n\nBasic Configuration in the `mkdocs.yml` file:\n\n```yaml\nplugins:\n  - exclude-unused-files:\n      file_types_to_check: [\"png\", \"jpg\", \"jpeg\", \"gif\"]\n      enabled: !ENV [CI, false]\n```\n\nThis configuration will exclude all files from the final mkdocs output that has one of the configured file endings and are not referenced/linked to other pages.\n\n### Default types\n\nThe plugin uses a default set of file types:\n\n`png, jpg, jpeg, gif, pdf, ico, drawio, tif, tiff, zip, tar.gz, rar, ogg, mp3, mp4, vtt , ogv, mov, svg, pot, potx, ppsx, ppt, pptx, xlt, xltx, xls, xlsx, doc, docx, dot, dotx, vst, vstx, vsd, vsdx`\n\n### All Configuration Options\n\n| Setting                      | Default                         | Description                                                                                                                                                                                                                                  |\n|------------------------------|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| enabled                      | `True`                          | Whether the plugin is enabled when building your project. If you want to switch the plugin off, e.g. for local builds, use an [environment variables](https://www.mkdocs.org/user-guide/configuration/#environment-variables).               |\n| enabled_on_serve             | `False`                         | Whether the plugin is enabled when serving your project. It does not apply if `enabled` is False. It's just to explicitly enable the plugin during mkdocs serve.                                                                             |\n| dry_run                      | `False`                         | Only print output into the command line and don't actually delete anything                                                                                                                                                                   |\n| silent                       | `False`                         | Don't print out the found orphan files in the build process                                                                                                                                                                                  |\n| force_delete                 | `False`                         | By default the plugin only deletes files that are actually in the configured mkdocs output directory (site_dir). If you want to delete these files anyways due to your setup, enable this flag                                               |\n| file_types_to_check          | `[]`                            | Only check these file types for their usage and delete them if necessary.                                                                                                                                                                    |\n| file_types_override_mode     | `replace`                       | Behavior of `file_types_to_check` towards default types: `replace` - uses only defined types, `append` - adds additional types to default list, `remove` - removes specified types from default.                                             |\n| file_names_to_never_remove   | `[\"favicon\"]`                   | Files with these names will never get deleted, even if no usage is detected.                                                                                                                                                                 |\n| folders_to_never_remove_from | `[\"assets\"]`                    | Files in these folders will never get deleted, even if no usage is detected. Useful for always including specific static files.                                                                                                              |\n| file_name_suffixes_to_trim   | `[\"#only-light\", \"#only-dark\"]` | Trim-away suffixes in this list when checking if a file-name is used. This is used for ignoring material-mkdoc's color-palette-toggle instructions (see [Issue-4](https://github.com/JonasDoesThings/mkdocs-exclude-unused-files/issues/4)). |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasdoesthings%2Fmkdocs-exclude-unused-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasdoesthings%2Fmkdocs-exclude-unused-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasdoesthings%2Fmkdocs-exclude-unused-files/lists"}