This repository contains the source files for the B-Cubed documentation website.
The website makes use of Astro (a web framework) and Starlights (a documentation theme for Astro) to transform markdown and configuration files to a static website. A GitHub action will automatically rebuild the site on GitHub Pages for each commit on the main branch.
To preview the site locally, use:
npm install: install dependencies.npm run dev: start a local development server atlocalhost:4321to preview the site.
See astro.config.mjs for site configuration.
The site contains two types of pages/tutorials: source pages and external pages. The way they are updated differs.
Source pages are maintained in this repository. Follow these steps to update:
- Browse to the markdown file for the page (in
src/content/docs). You can reach the markdown file directly by clicking theEdit pagelink at the bottom of every page on the website. - Make changes in the markdown file (either in your browser or locally).
- Commit your changes to a new branch (and push).
- Create a pull request and assign a reviewer.
- Once accepted and merged, your changes will go live on the site.
Does your page contain images or data? Place them in public/<page-type>/<name-of-page>/. It's best to do this locally on your new branch. To refer to images in markdown, use:

Source pages are licensed under a Creative Commons Attribution 4.0 International License.
External pages are maintained elsewhere. We currently only consider vignettes, which are tutorials maintained with the source code for an R package (example). We use a script to include these in the website (and its search functionality). Follow these steps to update a vignette:
- Clone this repository.
- Check if vignette is listed in
vignettes.yml(organized by R package). If not, add it (use the other vignettes as examples). - Open
documentation.Rprojin R Studio and openrmd_to_md.Rmd. - Select the package and run all code. Thanks to b3doc, this will rebuild all vignettes and put the markdown and images files in the appropriate folders.
- Check if you encountered any errors. If yes, fix and rebuild again.
- Commit your changes to a new branch (and push).
- Create a pull request and assign a reviewer.
- Once accepted and merged, your changes will go live on the site.
Do you want to include an external page that is not a vignette? Create an issue.
The repository structure is that of an Astro + Starlight project, with the following directories:
├── src/
│ ├── content/
│ │ └── docs/ : Source markdown files
│ ├── rmd_to_md/ : Script to create markdown files from external tutorials
│ │
│ ├── assets/ : Theme assets
│ ├── layouts/ : Theme layouts
│ └── styles/ : Theme style
│
└── public/ : Static files referenced in the markdown files (figures, data)