-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.qmd
58 lines (40 loc) · 1.58 KB
/
index.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
title: "`mkgallery` shortcode for Quarto"
description: "mkgallery, a quarto shortcode extension, makes easy to put images in the specified directory on the document."
date: now
toc: true
filters:
- t-arae/mkgallery
engine: knitr
lightbox: true
---
:::{.callout-note}
`mkgallery` only available when rendering HTML document.
For other rendering format, it will just list up the images.
:::
## Instalation
To use the mkgallery extension in your Quarto project, follow these steps:
1. Run the following command in your terminal within the project's working directory. This will install the extension under the `_extensions` subdirectory:
```bash
quarto add t-arae/mkgallery
```
2. Once installed, apply the `mkgallery` filter by adding the following lines to the YAML header of your `.qmd` file:
```yaml
filters:
- t-arae/mkgallery
```
## Using the shortcode
To display images from the `articles/imgs/` directory in your Quarto document using the `mkgallery` shortcode, use the following syntax:
```markdown
{{{< mkgallery articles/imgs >}}}
```
This will embed all images from the `articles/imgs/` directory onto your document.
{{< mkgallery articles/imgs >}}
## Example
You can find the source code for several examples of the `mkgallery` shortcode usage at the following link: [example.qmd](https://github.com/t-arae/mkgallery/blob/main/articles/example.qmd).
To see the rendered version of this example, visit the following link: [here](https://t-arae.quarto.pub/mkgallery/).
## Version info
The version of Quarto built-in Pandoc and Lua:
```{bash}
quarto pandoc --version 2>&1 | head -3
```