{"id":15975930,"url":"https://github.com/gadenbuie/quarto-partials","last_synced_at":"2025-06-21T22:41:28.872Z","repository":{"id":250051675,"uuid":"833328750","full_name":"gadenbuie/quarto-partials","owner":"gadenbuie","description":"Partial content templates for Quarto","archived":false,"fork":false,"pushed_at":"2025-03-19T18:55:19.000Z","size":26,"stargazers_count":19,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T07:51:10.560Z","etag":null,"topics":["quarto","quarto-extension","quarto-shortcode"],"latest_commit_sha":null,"homepage":"http://pkg.garrickadenbuie.com/quarto-partials/","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/gadenbuie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-07-24T20:19:40.000Z","updated_at":"2025-03-27T11:30:56.000Z","dependencies_parsed_at":"2024-07-24T23:13:18.796Z","dependency_job_id":"ba61caff-81c0-4ee0-9aaa-df5b967c087a","html_url":"https://github.com/gadenbuie/quarto-partials","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"da14cc03ce19bd08c7679c5e1029287c78c9cd1d"},"previous_names":["gadenbuie/quarto-partials"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gadenbuie/quarto-partials","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fquarto-partials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fquarto-partials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fquarto-partials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fquarto-partials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gadenbuie","download_url":"https://codeload.github.com/gadenbuie/quarto-partials/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fquarto-partials/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261205690,"owners_count":23124813,"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-shortcode"],"created_at":"2024-10-07T22:06:27.445Z","updated_at":"2025-06-21T22:41:23.861Z","avatar_url":"https://github.com/gadenbuie.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Partial content templates for Quarto\n\n\n## Installing\n\n``` bash\nquarto add gadenbuie/quarto-partials\n```\n\nThis will install the extension under the `_extensions` subdirectory. If\nyou’re using version control, you will want to check in this directory.\n\nOnce you’ve install the extension, you can use the\n`{{\u003c partial file ... \u003e}}` shortcode to include partial content from\n`file` in your [Quarto document](https://quarto.org)!\n\n## Example\n\nUse the `{{\u003c partial file ... \u003e}}` shortcode to include partial content\nfrom `file` in your Quarto document. The partial content can use\n[mustache templating syntax](https://mustache.github.io) and you can\nprovide named key-value pairs in the shortcode to provide the template\ndata.\n\nFor example, `_hello.md` contains the following content\n\n\u003cdiv class=\"code-with-filename\"\u003e\n\n**\\_hello.md**\n\n``` markdown\nHello, {{ name }}!\n```\n\n\u003c/div\u003e\n\nand we can include the partial, providing our own value for\n`{{ name }}`:\n\n\u003e ``` markdown\n\u003e {{\u003c partial _hello.md name=\"weary traveler\" \u003e}}\n\u003e ```\n\u003e\n\u003e Hello, weary traveler!\n\nYou can also include the partial data in the frontmatter of your\ndocument, using the `partial-data` key, e.g. \n\n``` yaml\npartial-data:\n  name: \"friend\"\n```\n\n\u003e ``` markdown\n\u003e {{\u003c partial _hello.md \u003e}}\n\u003e\n\u003e Or used inline: To you I say \"{{\u003c partial _hello.md \u003e}}\"\n\u003e ```\n\u003e\n\u003e Hello, !\n\u003e\n\u003e Or used inline: To you I say “Hello, !”\n\nAlternatively, the second argument of the shortcode can point to a\ncustom key in your YAML frontmatter, e.g.\n\n``` yaml\nmy-data:\n  friends:\n    name: amigo\n```\n\n\u003e ``` markdown\n\u003e {{\u003c partial _hello.md my-data.friends \u003e}}\n\u003e ```\n\u003e\n\u003e Hello, !\n\nAnother, possibly less convenient, option is to provide JSON in the\nshortcode data. Any key-value pair that starts with `{` or `[` will be\nparsed into a JSON object or array.\n\nNote that the file type affects the output. The next example, in\naddition to using JSON data, uses a `.qmd` file to render the output as\nQuarto-processed markdown.\n\n\u003cdiv class=\"code-with-filename\"\u003e\n\n**\\_hello_first_last.qmd**\n\n``` markdown\n::: {.callout-tip title=\"Hi there!\"}\n{{#person}}\nHello, {{ honorific }} {{ name.first }} {{ name.last }}!\n{{/person}}\n:::\n```\n\n\u003c/div\u003e\n\n\u003e ``` markdown\n\u003e {{\u003c partial _hello_first_last.qmd person='{\"honorific\": \"Mr.\", \"name\": {\"first\": \"Garrick\", \"last\": \"Aden-Buie\"}}' \u003e}}\n\u003e ```\n\u003e\n\u003e \u003e [!TIP]\n\u003e \u003e\n\u003e \u003e ### Hi there!\n\u003e \u003e\n\u003e \u003e Hello, Mr. Garrick Aden-Buie!\n\nFinally, remember that you can use the full power of [mustache\ntemplating](https://mustache.github.io)! The next example creates a\nmarkdown list from an array of my favorite fruits.\n\n\u003cdiv class=\"code-with-filename\"\u003e\n\n**\\_favorite_fruits.md**\n\n``` markdown\nThese are a few of my favorite fruits:\n\n{{#fruits}}\n- {{.}}\n{{/fruits}}\n```\n\n\u003c/div\u003e\n\n\u003e ``` markdown\n\u003e {{\u003c partial _favorite_fruits.md fruits='[\"apple\", \"banana\", \"coconut\", \"mango\"]' \u003e}}\n\u003e ```\n\u003e\n\u003e These are a few of my favorite fruits:\n\u003e\n\u003e - apple\n\u003e - banana\n\u003e - coconut\n\u003e - mango\n\n## Thanks!\n\n`partials` embeds [lustache](https://github.com/Olivine-Labs/lustache),\na pure-Lua implementation of [mustache](https://mustache.github.io).\nThanks to the authors and contributors of these projects!\n\nThanks, as always, to the developers of [Quarto](https://quarto.org)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgadenbuie%2Fquarto-partials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgadenbuie%2Fquarto-partials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgadenbuie%2Fquarto-partials/lists"}