meta
Shortcodes for Precise Includes
This is an example site to showcase the use of meta
shortcodes for more precise includes using Quarto.
It accompanies the blog post at: https://quarto.org/docs/blog/posts/2024-12-20-includes-meta
The pages for New York and Pennsylvania are generated by including the same snippet:
_snippets/facts.qmd
{{< meta state >}} covers approximately {{< meta square-miles >}} making it the {{< meta size-rank >}} largest state in the United States. As of 2023, {{< meta state >}} has an approximate population of about {{< meta population >}}.
{{< meta state >}}'s official flower is the {{< meta flower >}}, pictured below:
![The official {{< meta state >}} state flower, the {{< meta flower >}}](/images/{{< meta state-abbr >}}/flower.png)
Lastly, {{< meta state >}}'s official animal is the {{< meta animal >}}, pictured below:
![The official {{< meta state >}} state animal, the {{< meta animal >}}](/images/{{< meta state-abbr >}}/animal.png)
Where the relevant variables are set in each page’s metadata, e.g.:
new-york.qmd
---
title: New York
state-abbr: ny
state: New York
size-rank: 27th
square-miles: 54,555
population: 19.8 million
flower: Rose
animal: Beaver
---