{"id":23150983,"url":"https://github.com/coatless-quarto/options","last_synced_at":"2025-04-04T14:44:08.239Z","repository":{"id":236828273,"uuid":"793230891","full_name":"coatless-quarto/options","owner":"coatless-quarto","description":"A Quarto developer extension that introduces option checking","archived":false,"fork":false,"pushed_at":"2024-04-28T19:56:15.000Z","size":362,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-10T00:39:05.583Z","etag":null,"topics":["defaults","options","quarto","quarto-extension"],"latest_commit_sha":null,"homepage":"http://quarto.thecoatlessprofessor.com/options/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coatless-quarto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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},"funding":{"github":["coatless"],"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":"2024-04-28T19:29:47.000Z","updated_at":"2024-04-29T21:29:24.000Z","dependencies_parsed_at":"2024-04-28T20:42:33.076Z","dependency_job_id":null,"html_url":"https://github.com/coatless-quarto/options","commit_stats":null,"previous_names":["coatless-quarto/options"],"tags_count":0,"template":false,"template_full_name":"coatless-devcontainer/quarto-extension-dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-quarto%2Foptions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-quarto%2Foptions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-quarto%2Foptions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-quarto%2Foptions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coatless-quarto","download_url":"https://codeload.github.com/coatless-quarto/options/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198431,"owners_count":20900079,"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":["defaults","options","quarto","quarto-extension"],"created_at":"2024-12-17T18:19:41.539Z","updated_at":"2025-04-04T14:44:08.221Z","avatar_url":"https://github.com/coatless-quarto.png","language":"Lua","funding_links":["https://github.com/sponsors/coatless"],"categories":[],"sub_categories":[],"readme":"# options: A Quarto Developer Extension for Working With Option Data\n\nThe `options` Quarto extension allows developers to craft options that incorporate default parameters.\n\n## Usage\n\nThe `options` extension does not introduce significant enhancements to your document's content. Instead, it serves as a way for authors to quickly bootstrap working with option tables through an [extension embedding](https://quarto.org/docs/journals/formats.html#extension-embedding).\n\n## Installation\n\nTo install the `options` extension inside of your own extension, follow these steps:\n\n1. Open your terminal.\n\n2. Navigate to where your own extension's development location is.\n\n3. Execute the following command:\n\n```sh\nquarto add coatless-quarto/options --embed \u003cyour-extension-name\u003e\n```\n\nThis command will download and install the extension under the `_extensions` subdirectory of your Quarto extension project. If you are using version control, ensure that you include this directory in your repository.\n\n### File structure\n\nWhen embedding the extension inside of your own extension, you should see the following folder structure:\n\n```sh\n.\n└── _extensions\n    └── \u003cyour-extension-name\u003e\n        └── _extensions\n            └── coatless-quarto\n                └── options\n\n```\n\n### Registering the extension\n\nInside of the `_extension.yml`, please include the nested extension under `filters` as the first extension to run: \n\n```yml\ntitle: My Extension\nauthor: My Name\nversion: 0.1.1\nquarto-required: \"\u003e=1.4.549\"\ncontributes:\n  format:\n    common:\n      filters:\n        - coatless-quarto/options \n        - \u003cyour-extension\u003e.lua\n```\n\n## Retrieving Options\n\nInside of the Lua filter, this extension can be used to setup:\n\n```lua\n-- Store function calls in a table value\nlocal options = require(\"_extensions.coatless-quarto.options.options\")\n\n-- Attempt to retrieve option\n-- If it fails, we default to return `nil`.\nlocal my_option_attempt = options.tryOption(options, key)\n\n-- Retrieve option if present, otherwise use default\nlocal my_option = options.getOption(options, key, default)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoatless-quarto%2Foptions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoatless-quarto%2Foptions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoatless-quarto%2Foptions/lists"}