{"id":13791200,"url":"https://github.com/shafayetShafee/collapse-callout","last_synced_at":"2025-05-12T09:34:10.907Z","repository":{"id":145216808,"uuid":"555925433","full_name":"shafayetShafee/collapse-callout","owner":"shafayetShafee","description":"Make the Callout Blocks collapsible globally in your HTML document","archived":false,"fork":false,"pushed_at":"2023-02-16T21:19:22.000Z","size":256,"stargazers_count":25,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-18T05:38:43.973Z","etag":null,"topics":["pandoc-filter","quarto","quarto-extension","quarto-filter","quarto-pub","quartopub"],"latest_commit_sha":null,"homepage":"","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/shafayetShafee.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}},"created_at":"2022-10-22T16:57:23.000Z","updated_at":"2024-10-06T05:12:09.000Z","dependencies_parsed_at":"2024-01-05T23:47:35.643Z","dependency_job_id":"66151c14-e094-478c-b79d-5380b3ec97bf","html_url":"https://github.com/shafayetShafee/collapse-callout","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafayetShafee%2Fcollapse-callout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafayetShafee%2Fcollapse-callout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafayetShafee%2Fcollapse-callout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafayetShafee%2Fcollapse-callout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shafayetShafee","download_url":"https://codeload.github.com/shafayetShafee/collapse-callout/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253709563,"owners_count":21951183,"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":["pandoc-filter","quarto","quarto-extension","quarto-filter","quarto-pub","quartopub"],"created_at":"2024-08-03T22:00:57.231Z","updated_at":"2025-05-12T09:34:10.095Z","avatar_url":"https://github.com/shafayetShafee.png","language":"Lua","funding_links":[],"categories":["Extensions","Lua"],"sub_categories":[],"readme":"# collapse-callout\n\nA very simple filter extension For Quarto that provides options from document yaml header (i.e. global options) to make the [`Callout Blocks`](https://quarto.org/docs/authoring/callouts.html) in your document [`collapsible`](https://quarto.org/docs/authoring/callouts.html#collapse). By specifying `true` or `false`, you can either make the Callout Blocks collapsed or keep them expanded by default.\n\nAnd Note that, Callout blocks collapsibility works only for `html` format.\n\n## Installing\n\n``` bash\nquarto install extension shafayetShafee/collapse-callout\n```\n\nThis will install the extension under the `_extensions` subdirectory. If you're using version control, you will want to check in this directory.\n\n## Using\n\n### Collapsing all types of callout blocks\n\nAdd the following to yaml header of your document to make all of the callout blocks in your document collapsed by default.\n\n    title: \"Collapse-callout Example\"\n    filters:\n      - collapse-callout\n    collapse-callout:\n      all: true\n    format: html\n    ---\n\nhere `all` can be either `true` or `false`.\n\n### Collapsing specific types of callout blocks\n\nYou can also set the collapsibility for specfic types of callout blocks in the following way,\n\n    ---\n    title: \"Collapse-callout Example\"\n    filters:\n      - collapse-callout\n    collapse-callout:\n      tip: true\n      note: false\n      warning: false\n      important: false\n      caution: true\n    ---\n\nhere `tip` and `caution` types Callout blocks will be in collapsed form and rest of the callout blocks will be in expanded form by default.\n\nIf you do not want to make a specfic type of Callout Blocks collapsible, simply do not include its name under `collapse-callout` in the yaml header.\n\nTherefore, the following will not do anything for `important` type Callout blocks,\n\n    ---\n    title: \"Collapse-callout Example\"\n    filters:\n      - collapse-callout\n    collapse-callout:\n      tip: true\n      note: false\n      warning: false\n      caution: true\n    ---\n\nA few things to note,\n\n-   If you use `all` option, specific options (i.e. `tip`, `important` etc.) will not be used.\n\n-   **if you set `collapse=false` or `collapse=true` manually in the callout divs in the document source file (that is in the qmd file), this filter will not overwrite that.**\n\n## Example\n\n| **Source Files** | **Rendered HTML Output** |\n|:---:|:---:|\n| A minimal example where all `Callout Blocks` are collapsible and collapsed (with `all: true`) [example_all_true.qmd](example_all_true.qmd) | [Rendered Output](https://shafayetshafee.github.io/collapse-callout/example_all_true.html) |\n| A minimal example where all `Callout Blocks` are collapsible and expanded (with `all: false`) [example_all_false.qmd](example_all_false.qmd) | [Rendered Output](https://shafayetshafee.github.io/collapse-callout/example_all_false.html) |\n| A minimal example where some specific types of `Callout Blocks` are collapsible and collapsed or expanded [example_specific.qmd](example_specific.qmd) | [Rendered Output](https://shafayetshafee.github.io/collapse-callout/example_specific.html) |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FshafayetShafee%2Fcollapse-callout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FshafayetShafee%2Fcollapse-callout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FshafayetShafee%2Fcollapse-callout/lists"}