{"id":13791383,"url":"https://github.com/shafayetShafee/downloadthis","last_synced_at":"2025-05-12T10:31:43.040Z","repository":{"id":65629947,"uuid":"595258297","full_name":"shafayetShafee/downloadthis","owner":"shafayetShafee","description":"A Quarto shortcode extension to embed download buttons (to download embedded image/pdf/txt/csv files) in HTML document","archived":false,"fork":false,"pushed_at":"2023-04-19T16:11:57.000Z","size":1020,"stargazers_count":46,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-18T05:38:56.682Z","etag":null,"topics":["quarto","quarto-extension","quarto-pub","quarto-shortcode","quartopub"],"latest_commit_sha":null,"homepage":"https://shafayetshafee.github.io/downloadthis/example.html","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":"2023-01-30T18:09:43.000Z","updated_at":"2024-11-02T22:45:57.000Z","dependencies_parsed_at":"2024-01-05T23:51:21.514Z","dependency_job_id":"55046329-632b-4589-8ac3-db9475ff7350","html_url":"https://github.com/shafayetShafee/downloadthis","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafayetShafee%2Fdownloadthis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafayetShafee%2Fdownloadthis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafayetShafee%2Fdownloadthis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafayetShafee%2Fdownloadthis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shafayetShafee","download_url":"https://codeload.github.com/shafayetShafee/downloadthis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253719971,"owners_count":21952934,"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":["quarto","quarto-extension","quarto-pub","quarto-shortcode","quartopub"],"created_at":"2024-08-03T22:00:59.591Z","updated_at":"2025-05-12T10:31:42.659Z","avatar_url":"https://github.com/shafayetShafee.png","language":"Lua","funding_links":[],"categories":["Extensions"],"sub_categories":[],"readme":"# Downloadthis Extension For Quarto\n\nThis extension shortcode provides support for adding download buttons in the html files with attached small image/pdf/txt/csv files using shortcode `{{\u003c downloadthis \u003e}}`.\n\n[`View Live Demo`](https://shafayetshafee.github.io/downloadthis/example.html)\n\n## Installing\n\n```bash\nquarto add shafayetShafee/downloadthis\n```\n\nThis will install the extension under the `_extensions` subdirectory.\nIf you're using version control, you will want to check in this directory.\n\n## Using\n\nTo embed a file downloadable from the rendered html document, use the `{{\u003c downloadthis \u003e}}` shortcode. For example, \n\n```\n{{\u003c downloadthis image.png \u003e}}\n```\n\nwould create a download button [styled with bootstrap](https://getbootstrap.com/docs/5.3/components/buttons/#examples) with which `file.png` can be downloaded.\n\n\n### Options\n\nThere are six additional arguments you can specify for this shortcode, which are,\n\n- **`dname`** : The filename (without file extension!) which will be assigned to the downloaded file (default value is `file`)\n- **`label`** : Button label (default is `Download`).\n- **`icon`**: [Bootstrap Icon](https://icons.getbootstrap.com/) for the button (default is [`download`](https://icons.getbootstrap.com/icons/download/)).\n- **`type`**: [Bootstrap button styles](https://getbootstrap.com/docs/5.3/components/buttons/#examples), which are `primary`, `secondary`, `success`, `warning`, `danger`, `info`, `light`, `dark`,\n`light` (default value is `default`).\n- **`class`**: CSS class to be assigned to this button.\n- **`id`**: CSS id to be assigned to this button.\n\nAn example using all these arguments as follows,\n\n```\n{{\u003c downloadthis files/mtcars.csv dname=\"mtcars.csv\" label=\"Download the mtcars data\" icon=\"database-fill-down\" type=\"info\" \u003e}}\n```\nwhere `mtcars.csv` is in a folder named `files` and the `files` folder is in the same folder with source `.qmd` file.\n\n### Styling Buttons\n\nUsing the option `class` or `id`, it is very simple to style the button using CSS.\n\nSee the [example_styling.qmd](example_styling.qmd) for an example and the rendered [`html output`](https://shafayetshafee.github.io/downloadthis/example_styling.html)\n\n## Example\n\nHere is the source code for examples: [example.qmd](example.qmd) and the rendered html output: [example.html](https://shafayetshafee.github.io/downloadthis/example.html)\n\n\n## Acknowledgement\n\nThis shortcode extension is inspired by the R package [`{downloadthis}`](https://fmmattioni.github.io/downloadthis/index.html).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FshafayetShafee%2Fdownloadthis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FshafayetShafee%2Fdownloadthis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FshafayetShafee%2Fdownloadthis/lists"}