Skip to content

Commit 28082eb

Browse files
committed
Add some more detail to homepage
1 parent 9c52cba commit 28082eb

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed
Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
11
---
22
title: "`meta` Shortcodes for Precise Includes"
3+
author: Ashley Henry
34
---
45

56
This is an example site to showcase the use of `meta` shortcodes for more precise includes using Quarto.
67

7-
Features showcased:
8+
It accompanies the blog post at: <https://quarto.org/docs/blog/posts/2024-12-20-includes-meta>
89

9-
- meta
10-
- includes
10+
The pages for [New York](new-york.qmd) and [Pennsylvania](pa.qmd) are generated by including the same snippet:
11+
12+
````{.markdown filename="_snippets/facts.qmd" shortcodes="false"}
13+
{{< 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 >}}.
14+
15+
{{< meta state >}}'s official flower is the {{< meta flower >}}, pictured below:
16+
17+
![The official {{< meta state >}} state flower, the {{< meta flower >}}](/images/{{< meta state-abbr >}}/flower.png)
18+
19+
Lastly, {{< meta state >}}'s official animal is the {{< meta animal >}}, pictured below:
20+
21+
![The official {{< meta state >}} state animal, the {{< meta animal >}}](/images/{{< meta state-abbr >}}/animal.png)
22+
````
23+
24+
Where the relevant variables are set in each page's metadata, e.g.:
25+
26+
```{.yaml filename="new-york.qmd"}
27+
---
28+
title: New York
29+
state-abbr: ny
30+
state: New York
31+
size-rank: 27th
32+
square-miles: 54,555
33+
population: 19.8 million
34+
flower: Rose
35+
animal: Beaver
36+
---
37+
```

0 commit comments

Comments
 (0)