{"id":38529595,"url":"https://github.com/mcanouil/quarto-collapse-output","last_synced_at":"2026-01-17T06:53:22.126Z","repository":{"id":320543869,"uuid":"1073213440","full_name":"mcanouil/quarto-collapse-output","owner":"mcanouil","description":"A Quarto extension that provides the ability to collapse code cell outputs in HTML documents using collapsible `\u003cdetails\u003e` elements.","archived":false,"fork":false,"pushed_at":"2026-01-01T19:05:50.000Z","size":130,"stargazers_count":17,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-07T02:48:42.780Z","etag":null,"topics":["collapse-output","computing","details","quarto","quarto-extension","stable","summary"],"latest_commit_sha":null,"homepage":"https://m.canouil.dev/quarto-collapse-output/","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,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-10-09T19:23:20.000Z","updated_at":"2026-01-01T19:05:54.000Z","dependencies_parsed_at":"2025-10-24T12:26:43.519Z","dependency_job_id":"b8562d06-2755-4f3e-9517-ac677888403d","html_url":"https://github.com/mcanouil/quarto-collapse-output","commit_stats":null,"previous_names":["mcanouil/quarto-collapse-output"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mcanouil/quarto-collapse-output","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcanouil%2Fquarto-collapse-output","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcanouil%2Fquarto-collapse-output/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcanouil%2Fquarto-collapse-output/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcanouil%2Fquarto-collapse-output/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcanouil","download_url":"https://codeload.github.com/mcanouil/quarto-collapse-output/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcanouil%2Fquarto-collapse-output/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28502972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"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":["collapse-output","computing","details","quarto","quarto-extension","stable","summary"],"created_at":"2026-01-17T06:53:22.048Z","updated_at":"2026-01-17T06:53:22.108Z","avatar_url":"https://github.com/mcanouil.png","language":"Lua","funding_links":["https://github.com/sponsors/mcanouil"],"categories":[],"sub_categories":[],"readme":"# Collapse Output Extension For Quarto\n\nA Quarto extension that provides the ability to collapse code cell outputs in HTML documents using collapsible `\u003cdetails\u003e` elements.\n\n## Installation\n\n```bash\nquarto add mcanouil/quarto-collapse-output\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\nAdd the filter to your document's YAML header:\n\n```yaml\nfilters:\n  - collapse-output\n```\n\n### Configuration Options\n\nYou can configure the extension using the `extensions.collapse-output` section:\n\n```yaml\nextensions:\n  collapse-output:\n    method: lua  # or \"javascript\" (default: \"lua\")\n```\n\n#### Method Option\n\n- **`lua`** (default): Processes the collapse using Lua at build time. The output is wrapped in HTML `\u003cdetails\u003e` elements during rendering.\n- **`javascript`**: Delegates the collapse to JavaScript at runtime. The JavaScript file will be loaded and handles the collapse dynamically.\n\n### Using `output-fold` Code Cell Option\n\nTo collapse output for a specific code cell, use the `output-fold: true` code cell option:\n\n````markdown\n```{language}\n#| output-fold: true\n\n# Your code here\n```\n````\n\nYou can also customise the summary text with the `output-summary` code cell option:\n\n````markdown\n```{language}\n#| output-fold: true\n#| output-summary: \"Click to view results\"\n\n# Your code here\n```\n````\n\n### Code Cell Options\n\n- **`output-fold`**: Set to `true` to enable collapsing for the cell's output.\n- **`output-summary`**: Customise the summary text (default: \"Code Output\").\n\n## Use Cases\n\nThe collapse output extension is particularly useful for:\n\n- **Long outputs**: Hide lengthy console output, tables, or plots by default.\n- **Tutorial documents**: Keep code visible whilst hiding output until needed.\n- **Reports**: Show results on demand without cluttering the main document.\n- **Interactive exploration**: Allow readers to selectively view outputs of interest.\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-collapse-output/)\n\n## Notes\n\n- The `output-fold` code cell option only works with HTML output formats.\n- When using the Lua method (default), the collapse is applied at build time.\n- When using the JavaScript method, the collapse happens in the browser.\n- The default summary text is \"Code Output\" if `output-summary` is not specified.\n- Both `output-fold` and `output-summary` are code cell options (use `#|` prefix).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcanouil%2Fquarto-collapse-output","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcanouil%2Fquarto-collapse-output","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcanouil%2Fquarto-collapse-output/lists"}