CLAUDE.md
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What This Repository Is
This is the source for rweekly.org, a weekly community-curated newsletter about the R programming language. It is a Jekyll-based static site hosted on GitHub Pages (gh-pages branch is the main branch).
Site Architecture
- Jekyll site:
_config.ymlconfigures the site,_layouts/holds HTML templates,_includes/holds partials and static assets (CSS/JS vendored inline). - Published posts:
_posts/β one Markdown file per weekly issue, namedYYYY-MM-DD-<issue>.md. - Current draft:
draft.mdβ the live working draft for the next issue. Contributors submit PRs adding links here. - RSS feed list:
rss_feeds.csvβ CSV with columnsURL,ENABLE,TWITTER. New blog feeds are added here (setENABLE=1). - R scripts:
scripts/β automation scripts for content collection and processing.
Draft Post Format
Links in draft.md (and posts) use this format:
+ [Title](URL) - optional description

Sections in the draft: Highlight, Insights, R in the Real World, R in Organizations, R in Academia, Tutorials, Resources, New Packages, Updated Packages, Videos and Podcasts, Gist & Cookbook, Shiny Apps, Upcoming Events. Editors vote for the Highlight section β contributors should not add content there.
When populating the Highlight section, copy links from their original sections β do not remove them. A highlight link should appear in both the ### Highlight section and its original section.
Images must be HTTPS and hosted at https://raw.githubusercontent.com/. Do not add images directly to this repo (keeps repo size small).
Social embeds (rtistry, Quotes of the Week)
The ### rtistry and ### Quotes of the Week sections use raw social embed HTML β not + [Title](URL) links. Paste the full embed blockquote code from Bluesky, Mastodon, or Twitter directly into the section. Each platform uses a different blockquote class:
- Bluesky:
<blockquote class="bluesky-embed" ...>with<script async src="https://embed.bsky.app/static/embed.js"> - Mastodon:
<blockquote class="mastodon-embed" ...>with<script data-allowed-prefixes="https://fosstodon.org/" async src="https://fosstodon.org/embed.js">
R Scripts
All scripts are run from the repo root directory.
| Script | Purpose |
|---|---|
scripts/curatinator.R |
Scrapes enabled RSS feeds (rss_feeds.csv) for posts from the last 6 days, fetches new/updated CRAN packages from CRANberries, and writes curatinator_latest.md |
scripts/get_rss.R |
Helper used by curatinator.R β fetches and filters RSS posts by date and reachability |
scripts/find_duplicates.R |
Checks draft.md for links already present in the last ~20 published posts |
scripts/parse_curinator.R |
Parses curatinator_latest.md into a tidy data frame |
scripts/process_curinator.R |
Uses ellmer + OpenAI to classify RSS posts as R-related |
scripts/gen_json.R |
Parses _posts/ into JSON files in temp_json/ for the live index |
check_url.R |
URL health check β used by Travis CI to verify links in posts and draft |
scripts/build.R |
Generates default.nix via the rix package for a Nix-based dev environment |
Run the curatinator to collect content for a new issue:
Rscript -e 'source("scripts/curatinator.R")'
Check for duplicate links before publishing:
Rscript -e 'source("scripts/find_duplicates.R"); get_dups()'
GitHub Actions
.github/workflows/actions.yml β runs curatinator.R automatically every Saturday at 09:00 UTC, commits the result to curatinator_latest.md.
Nix Dev Environment
A default.nix is generated by scripts/build.R using the rix package (R 4.5.1). It includes all R package dependencies and system packages (quarto, chromium, curl, imagemagick), plus two GitHub-only packages: rweekly.tools and rweekly.highlights.
Jekyll / Site Build
Build and serve locally with standard Jekyll:
bundle install
bundle exec jekyll serve
CI (Travis) runs Rscript check_url.R on gh-pages branch commits to validate links. Fails if more than 300 broken links are found.
Fetching Website Content
To read a webpage as clean text (e.g. to inspect a linked article), use any of these:
- WebFetch tool β built-in Claude Code tool; use it directly.
- Jina Reader β
curl https://r.jina.ai/https://www.example.comβ fallback if WebFetch fails. - Defuddle β
curl https://defuddle.md/example.comβ second fallback.
Git Commits
When committing, do not add Claude co-authorship (Co-Authored-By: trailers). Commits should appear under the userβs name only.
Contributing Workflow
- Add links to
draft.mdunder the appropriate section. - Submit a PR against
gh-pages. - The PR template asks contributors to identify which section(s) the content belongs to.
- Editors merge PRs and handle the weekly release (freeze on Sunday, publish Monday).
- To add an RSS feed permanently, add a row to
rss_feeds.csvwithENABLE=1.