A reusable GECO project template for building a single-page, full-screen Leaflet raster map with R and Quarto.
The included example provides:
- a full-viewport Leaflet map;
- a reproducible raster layer generated in R;
- a responsive, expandable information and references panel;
- GECO colours and branding; and
- a Quarto book project ready for GitHub Pages.
- Select Use this template on GitHub.
- Choose an owner and a descriptive repository name.
- Clone the new repository.
- Replace the example title, text, references, and raster code in
index.qmd. - Update the project title in
_quarto.yml.
- Quarto
- R
- The R packages
leafletandraster
Install the R dependencies with:
install.packages(c("leaflet", "raster"))From the project directory, run:
quarto previewquarto renderThe rendered website is written to _site/, which is intentionally excluded from version control.
Publish the rendered project to the repository's gh-pages branch:
quarto publish gh-pages --no-browserIn the repository settings, configure Pages → Build and deployment to deploy from the gh-pages branch and its root directory.
.
├── _quarto.yml # Quarto book and HTML configuration
├── index.qmd # Raster preparation, map, panel content and behaviour
├── styles.css # Full-screen layout and GECO visual styling
├── images/
│ └── geco-logo.png # GECO logo asset
└── README.md # Template setup and publishing guide
The visual styling and logo treatment are adapted from the GECO R book template.