Code block with filename#

app.py
1
2
3
4
from shiny.express import input, ui
import shinyswatch

ui.input_slider("num", "Number:", min=10, max=100, value=30)

Code block without filename#

1
print("hello world")

Another filename#

_quarto.yml
1
2
3
4
5
project:
  type: website
format:
  html:
    theme: cosmo

Plain text with filename#

Makefile
build:
    echo "building..."

Filename with code-line-numbers#

app.py
1
2
3
from shiny.express import input, ui

ui.input_slider("num", "Number:", min=10, max=100, value=30)

Filename with custom class#

example.py
1
print("hello world")

Filename with shortcodes=false#

_quarto.yml
1
2
project:
  type: website

Filename with path#

src/app.py
1
2
3
from shiny.express import input, ui

ui.input_slider("num", "Number:", min=10, max=100, value=30)

Long filename#

this-is-a-very-long-descriptive-filename-that-might-overflow.py
1
print("testing label overflow")

R code with filename#

analysis.R
1
2
3
4
library(ggplot2)

ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point()