{"id":25280543,"url":"https://github.com/mcanouil/quarto-div-reuse","last_synced_at":"2026-02-21T14:12:20.997Z","repository":{"id":275978974,"uuid":"926815540","full_name":"mcanouil/quarto-div-reuse","owner":"mcanouil","description":"The power of \"code/content reuse\" for seamless and efficient content creation.","archived":false,"fork":false,"pushed_at":"2026-02-16T21:12:48.000Z","size":58,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-17T02:58:47.523Z","etag":null,"topics":["code-reuse","div-reuse","filter","lua","quarto","quarto-extension","quarto-filter","stable"],"latest_commit_sha":null,"homepage":"https://m.canouil.dev/quarto-div-reuse/","language":"Lua","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/mcanouil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","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},"funding":{"github":"mcanouil","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2025-02-03T22:45:14.000Z","updated_at":"2026-02-16T21:12:51.000Z","dependencies_parsed_at":"2025-08-20T22:21:01.811Z","dependency_job_id":null,"html_url":"https://github.com/mcanouil/quarto-div-reuse","commit_stats":null,"previous_names":["mcanouil/quarto-div-reuse"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/mcanouil/quarto-div-reuse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcanouil%2Fquarto-div-reuse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcanouil%2Fquarto-div-reuse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcanouil%2Fquarto-div-reuse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcanouil%2Fquarto-div-reuse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcanouil","download_url":"https://codeload.github.com/mcanouil/quarto-div-reuse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcanouil%2Fquarto-div-reuse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29682765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T13:29:26.630Z","status":"ssl_error","status_checked_at":"2026-02-21T13:26:50.125Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["code-reuse","div-reuse","filter","lua","quarto","quarto-extension","quarto-filter","stable"],"created_at":"2025-02-12T18:42:42.587Z","updated_at":"2026-02-21T14:12:20.992Z","avatar_url":"https://github.com/mcanouil.png","language":"Lua","funding_links":["https://github.com/sponsors/mcanouil"],"categories":[],"sub_categories":[],"readme":"# Div-reuse Extension For Quarto\n\nThis is a Quarto extension applying the concept of \"code reuse\" to the content of a Markdown fenced div.\n\n## Installation\n\n```bash\nquarto add mcanouil/quarto-div-reuse@1.2.0\n```\n\nThis will install the extension under the `_extensions` subdirectory.\n\nIf you're using version control, you will want to check in this directory.\n\n## Usage\n\nTo activate the filter, add the following to your YAML front matter:\n\n- Old (\u003c1.8.21):\n\n  ```yml\n  filters:\n    - quarto\n    - div-reuse\n  ```\n\n- New (\u003e=1.8.21):\n\n  ```yml\n  filters:\n    - path: div-reuse\n      at: post-quarto\n  ```\n\nThen, you can reuse any fenced div by using their ID in the following way:\n\n```markdown\n## Original Div\n\n::: {#my-div}\n{{\u003c lipsum \u003e}}\n:::\n\n## Reused Div\n\n::: {reuse=\"my-div\"}\n:::\n```\n\n\u003e [!IMPORTANT]\n\u003e The \"reuse\" attribute acts like a copy-paste of the original `div` content.\n\u003e Consequently, content and their attributes, including the ID, are duplicated.\n\u003e This can result in unexpected behaviour if the same ID is used multiple times within the same document.\n\u003e\n\u003e Therefore, it is recommended to use the \"reuse\" attribute primarily with text content.\n\n## Example\n\nHere is the source code for a minimal example: [example.qmd](example.qmd).\n\nOutput of `example.qmd`:\n\n- [HTML](https://m.canouil.dev/quarto-div-reuse/)\n- [Typst/PDF](https://m.canouil.dev/quarto-div-reuse/div-reuse-typst.pdf)\n- [LaTeX/PDF](https://m.canouil.dev/quarto-div-reuse/div-reuse-latex.pdf)\n- [Word/Docx](https://m.canouil.dev/quarto-div-reuse/div-reuse-openxml.docx)\n- [Reveal.js](https://m.canouil.dev/quarto-div-reuse/div-reuse-revealjs.html)\n- [Beamer/PDF](https://m.canouil.dev/quarto-div-reuse/div-reuse-beamer.pdf)\n- [PowerPoint/Pptx](https://m.canouil.dev/quarto-div-reuse/div-reuse-pptx.pptx)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcanouil%2Fquarto-div-reuse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcanouil%2Fquarto-div-reuse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcanouil%2Fquarto-div-reuse/lists"}