{"id":15017447,"url":"https://github.com/zvfvrv/mkdocs-diff-file-import","last_synced_at":"2026-02-11T16:02:29.786Z","repository":{"id":246000058,"uuid":"819044416","full_name":"zvfvrv/mkdocs-diff-file-import","owner":"zvfvrv","description":"Import a diff file from an external file as a code block of type diff ","archived":false,"fork":false,"pushed_at":"2024-09-04T15:10:56.000Z","size":44,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-30T01:38:37.146Z","etag":null,"topics":["diff","mkdocs","mkdocs-plugin","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zvfvrv.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-23T16:07:47.000Z","updated_at":"2024-09-04T15:10:14.000Z","dependencies_parsed_at":"2024-09-05T19:33:08.103Z","dependency_job_id":null,"html_url":"https://github.com/zvfvrv/mkdocs-diff-file-import","commit_stats":null,"previous_names":["zvfvrv/mkdocs-diff-file-import"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/zvfvrv/mkdocs-diff-file-import","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zvfvrv%2Fmkdocs-diff-file-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zvfvrv%2Fmkdocs-diff-file-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zvfvrv%2Fmkdocs-diff-file-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zvfvrv%2Fmkdocs-diff-file-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zvfvrv","download_url":"https://codeload.github.com/zvfvrv/mkdocs-diff-file-import/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zvfvrv%2Fmkdocs-diff-file-import/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271506899,"owners_count":24771821,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"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":["diff","mkdocs","mkdocs-plugin","python"],"created_at":"2024-09-24T19:50:28.633Z","updated_at":"2026-02-11T16:02:29.744Z","avatar_url":"https://github.com/zvfvrv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **mkdocs-diff-file-import** MkDocs Plugin\n\n## Overview\n\nThe `mkdocs-diff-file-import` plugin for MkDocs allows you to dynamically replace custom code blocks in your Markdown files with the content of specified files. This plugin is particularly useful for managing and displaying differences between imported code files within your documentation.\n\n## Features\n\n- Configurable code block name to identify sections to be replaced.\n- Automatically replaces matching code blocks with the content of specified files during the build process.\n- Easy integration with existing MkDocs projects.\n\n## Installation\n\nTo install the plugin, you can use `pip`:\n\n```bash\npip install mkdocs-diff-file-import\n```\n\n## Configuration\n\nTo use the `mkdocs-diff-file-import` plugin, add it to your `mkdocs.yml` configuration file:\n\n```yaml\nplugins:\n  - search\n  - diff-file-import:\n      codeblock_name: import-diff-file  # Optional, default is 'import-diff-file'\n```\n\n## Usage\n\nIn your Markdown files, define code blocks with the specified code block name to be replaced by the plugin. For example:\n\n\u003cpre\u003e\n```\nimport-diff-file file=example.txt\n```\n\u003c/pre\u003e\n\nDuring the MkDocs build process, these code blocks will be replaced by the content of the specified file.\n\n## Example\n\nGiven the following content in a Markdown file:\n\n\u003cpre\u003e\n```import-diff-file file=example.diff```\n\u003c/pre\u003e\n\nThe `mkdocs-diff-file-import` plugin will replace this block with the content of `example.diff` inside a diff code block:\n\n\u003cpre\u003e\n```diff\n[edit routing-instances l3vpn-test]\n-    vrf-table-label;\n[edit protocols bgp]\n+    bgp-error-tolerance {\n+        malformed-route-limit 0;\n+    }\n```\n\u003c/pre\u003e\n\n\u003c!-- ## Development\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/zvfvrv/mkdocs-diff-file-import.git\ncd mkdocs-diff-file-import\n```\n\n### Install Dependencies\n\n```bash\npip install -r requirements.txt\n``` --\u003e\n\n\u003c!-- ### Run Tests\n\nTo run tests for the plugin, use the following command:\n\n```bash\npytest\n``` --\u003e\n\n## Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request with your changes. Ensure that your code adheres to the project's coding standards and includes appropriate tests.\n\n1. Fork the repository\n2. Create a new feature branch (`git checkout -b feature/YourFeature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin feature/YourFeature`)\n5. Create a new Pull Request\n\n## License\n\nThis project is licensed under the Apache 2.0 License. See the `LICENSE` file for more details.\n\n## Contact\n\nIf you have any questions, issues, or suggestions, please open an issue in the GitHub repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzvfvrv%2Fmkdocs-diff-file-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzvfvrv%2Fmkdocs-diff-file-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzvfvrv%2Fmkdocs-diff-file-import/lists"}