The extendr.rs website provides documentation and news for extendr, a developer-first utility for building R packages that call Rust code. The website is built using the Rust-powered static site generator, Zola.
- Zola — Rust-powered static site generator, a simplified version of Hugo with a powerful templating engine
- Tailwind CSS v4 — utility-first CSS framework
- basecoat-css — a lightweight shadcn/ui components library built with Tailwind CSS
- knitr — an R package that executes code chunks, interleaves output, and writes back to markdown
- Bun — javascript runtime and package manager
- iconify — a Tailwind extension for icons (currently limited to fa7-brands, lucide, and mdi icons)
The build pipeline:
- Tailwind compiles
css/*.csstostatic/style.css. - knitr executes code in
r-markdown/**/*.qmdand compiles to commonmark incontent/**/*.md. - Zola compiles commonmark in
content/to HTML and builds site inpublic/.
.
├── zola.toml # Site configuration
├── justfile # All build/dev/scaffolding tasks
├── content/ # Zola markdown
│ ├── blog/ # Blog posts
│ ├── contributing/ # Contributor docs
│ ├── development/ # Development docs
│ ├── publishing/ # Publishing docs
│ └── rust-intro/ # Rust intro for R users
├── r-markdown/ # R markdown
├── templates/ # Zola HTML templates + shortcodes and macros
├── css/ # Tailwind input
├── static/ # Compiled CSS, JS, assets
├── bun.lock # Pinned dependency versions
├── package.json # Bun project manifest
├── packages/ # Example R packages built with extendr
└── scripts/ # R scripts
Prerequisites
In addition to the stack software listed above, you will need R installed and
the most recent release version of the rextendr package. The just command line
runner will also be very beneficial to you.
Installation
# install Node.js dependencies
just install
Development
# start a local development server (Zola serve and Tailwind watcher)
just dev
Building
# render Tailwind style.css and call zola build
just build
Available recipes
Run just without arguments to list available recipes.
Available recipes:
build # Compile Tailwind css, then build the site with Zola
check # Try to build site without rendering (checks links)
dev # Run Tailwind watch and Zola live serve in parallel
install # Install Node.js dependencies
page path # Create a new documentation page at r-markdown/{{path}}.qmd
post title # Create a new blog post at r-markdown/blog/{{title}}/index.qmd
render path="." # Render page or project in r-markdown/ (ignores r-markdown/blog/ when rendering project)
reset # Clear public directory generated by Zola
tailwind-build # Generate Tailwind static/style.css from css/style.css