{"id":15105933,"url":"https://github.com/Enveloppe/mkdocs-embed-file","last_synced_at":"2025-09-27T05:31:00.935Z","repository":{"id":38952392,"uuid":"449656500","full_name":"Enveloppe/mkdocs-embed_file-plugin","owner":"Enveloppe","description":"A way to embed a file present in your docs","archived":true,"fork":false,"pushed_at":"2023-12-26T11:51:04.000Z","size":2748,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-03T06:01:31.811Z","etag":null,"topics":["attributes","custom","custom-attributes","markdown","mkdocs","plugin","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Enveloppe.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}},"created_at":"2022-01-19T11:03:57.000Z","updated_at":"2024-06-03T06:01:31.812Z","dependencies_parsed_at":"2023-12-21T22:28:52.808Z","dependency_job_id":"e8092e22-2849-4294-88a8-c5b5c974153a","html_url":"https://github.com/Enveloppe/mkdocs-embed_file-plugin","commit_stats":null,"previous_names":["mara-li/mkdocs_embed_file_plugins","enveloppe/mkdocs-embed_file-plugin","obsidianpublisher/mkdocs-embed_file-plugin"],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Enveloppe%2Fmkdocs-embed_file-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Enveloppe%2Fmkdocs-embed_file-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Enveloppe%2Fmkdocs-embed_file-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Enveloppe%2Fmkdocs-embed_file-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Enveloppe","download_url":"https://codeload.github.com/Enveloppe/mkdocs-embed_file-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219871900,"owners_count":16554466,"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":["attributes","custom","custom-attributes","markdown","mkdocs","plugin","python"],"created_at":"2024-09-25T21:00:20.217Z","updated_at":"2025-09-27T05:31:00.927Z","avatar_url":"https://github.com/Enveloppe.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Embed File\nA way to embed a file present in your docs.\nSupport both wikilinks \u0026 normal links.\nIntended to be used by obsidian user.\n\n![](docs/note3.png)\n![](docs/demo.gif)\n\n# Activate the plugin\n\n1. Run `pip install mkdocs-embed-file-plugin`\n2. Update your `mkdocs.yml` with :\n    ```yaml\n    plugins:\n      - search\n      - embed_file\n    ```\n3. [Override](https://www.mkdocs.org/user-guide/customizing-your-theme/) your `main.html` with :\n    ```html\n    {% extends \"base.html\" %}\n    {% block extrahead %}\n\n        \u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/fontawesome.min.css\" integrity=\"sha384-jLKHWM3JRmfMU0A5x5AkjWkw/EYfGUAGagvnfryNV3F9VqM98XiIH7VBGVoxVSc7\" crossorigin=\"anonymous\"\u003e\n   {% endblock %}\n    ```\n\n\u003e [!IMPORTANT]\n\u003e You need to set the `site_url` in the `mkdocs.yml` to make the plugin work.\n\n# Usage\n\n| Usage               | wikilinks                | markdown links           |\n|---------------------|--------------------------|--------------------------|\n| cite a entire file  | `![[filename]] `         | `![](filename) `         |\n| Cite a heading part | `![[filename#heading]] ` | `![](filename#heading)`  |\n| Cite a block        | `![[filename#^blockid]]` | `![](filename#^blockid)` |\n\n# CSS\n\nThe plugin will create :\n- A link to the original file, with the form of : `\u003ca href=\"original link\" class=\"link_citation\"\u003e\u003ci class='fas fa-link'\u003e\u003c/i\u003e\u003c/a\u003e`\n- A div with the founded content : `\u003cdiv class=\"citation\"\u003econtent founded\u003c/div\u003e`\n- In case of the link / contents is not found the following block is created instead :\n   ```html\n   \u003cdiv class='citation'\u003e\u003ca class='link_citation'\u003e\u003ci class='fas fa-link'\u003e\u003c/i\u003e\u003c/a\u003e\u003cp style=\"text-align: center; display: block\"\u003e\u003ci class=\"not_found\"\u003e link_alt \u003c/i\u003e {a configured message}\u003c/p\u003e\u003c/div\u003e\n   ```\n  The message for the not found file can be customized in `mkdocs.yml`. The default message is `file not exists`.\n\nYou can add a css in your `docs/assets/css` (or whatever the path is), and add it to your `mkdocs.yml` :\n```yml\nextra_css:\n    - assets/css/embed_link.css\n```\nYou can find an example of custom css in [docs](docs/embed_link.css)\n\n# Configuration\nIf you want, you can add compatibility with :\n- [mkdocs callouts](https://github.com/sondregronas/mkdocs-callouts)\n- [mkdocs custom tags attributes](https://github.com/Mara-Li/mkdocs-custom-tags-attributes)\n\nTo do that, adjust your `mkdocs.yml`\n```yaml\nmarkdown_extensions:\n   - attr_list\n   - nl2br\n   - admonition\n   - pymdownx.details\nplugins:\n   - search\n   - callouts\n   - custom-attributes:\n        file: 'assets/css/custom_attributes.css'\n   - embed_file:\n        callouts: true\n        custom-attribute: 'assets/css/custom_attributes.css' //need to be the same as in the config!\n        language_message: 'file not exists.'\n```\n\nNote : Every extension set in `markdown_extensions` will be used for the converting, so you can use any extension you want.\n\n# Limitation\n- The embed file don't use plugin you would use.\n- Wikilinks ambiguity are not supported : the first file with the name are used.\n\n# Credit\nThanks to [midnightprioriem](https://github.com/midnightprioriem/mkdocs-tooltipster-links-plugin) for the tooltip plugin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEnveloppe%2Fmkdocs-embed-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEnveloppe%2Fmkdocs-embed-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEnveloppe%2Fmkdocs-embed-file/lists"}