Code
---
: Simple Lightbox Example
title:
filters- lightbox
: auto
lightbox---
Tony Duan
December 31, 2022
Extensions are a powerful way to modify and extend the behavior of Quarto. Quarto v1.2 Required for Quarto Extensions.
An extension that uses the GLightbox javascript library to add lightbox styling and behavior to images in your HTML documents.
quarto install extension quarto-ext/lightbox
The Lightbox extension can automatically give images in your web page a lightbox treatment. You can enable this like:
in header yaml:
In addition to simply providing a lightbox treatment for individual images, you can also group images into a ‘gallery’. When the user activates the lightbox, they will be able to page through the images in the gallery without returning to the main document.
in content:
code:example.qmd
website:example.qmd.
go to folder which have added quarto extension
If you run the quarto remove extension command with no extension-id, you will be presented with a list of extensions that are present and you may select which extensions to remove.
https://quarto.org/docs/extensions/
https://github.com/quarto-ext/lightbox
---
title: "introduction to Quarto ex"
author: "Tony Duan"
date: "2022-12-31"
categories: [R]
execute:
warning: false
error: false
format:
html:
toc: true
toc-location: left
code-fold: show
code-tools: true
number-sections: true
code-block-bg: true
code-block-border-left: "#31BAE9"
---
# Introduction to Quarto
{width="650"}
# Quarto Extensioins
{width="650"}
Extensions are a powerful way to modify and extend the behavior of Quarto. Quarto v1.2 Required for Quarto Extensions.
## quarto extension: lightbox
An extension that uses the GLightbox javascript library to add lightbox styling and behavior to images in your HTML documents.
### Installation:
quarto install extension quarto-ext/lightbox
### Usage:
The Lightbox extension can automatically give images in your web page a lightbox treatment. You can enable this like:
in header yaml:
```{r}
#| eval: false
---
title: Simple Lightbox Example
filters:
- lightbox
lightbox: auto
---
```
In addition to simply providing a lightbox treatment for individual images, you can also group images into a 'gallery'. When the user activates the lightbox, they will be able to page through the images in the gallery without returning to the main document.
in content:
```{r}
#| eval: false
{group="my-gallery"
description="its a picture"}
```
### quarto extension lightbox example:
code:[example.qmd](https://github.com/quarto-ext/lightbox/blob/main/example.qmd)
website:[example.qmd](https://quarto-ext.github.io/lightbox/).
### list quarto extension
go to folder which have added quarto extension
```{r}
#| eval: false
quarto list extensions
```

### update quarto extension
```{r}
#| eval: false
quarto update quarto-ext/fontawesome
```
### remove quarto extension
```{r}
#| eval: false
quarto remove quarto-ext/fontawesome
```
If you run the quarto remove extension command with no extension-id, you will be presented with a list of extensions that are present and you may select which extensions to remove.
## Reference
https://quarto.org/docs/extensions/
https://github.com/quarto-ext/lightbox