Skip to content

Commit 7d1e69d

Browse files
jwbowersclaude
andcommitted
Standardize language file naming to underscore convention
- Rename 18 Spanish/French guides from .es.qmd/.fr.qmd to _es.qmd/_fr.qmd - Rename how-to-read.qmd and indices.qmd to include _en suffix - Update _quarto.yml sidebar links to match new filenames - Add CLAUDE.md for Claude Code guidance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 64c9e30 commit 7d1e69d

22 files changed

Lines changed: 105 additions & 29 deletions

CLAUDE.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is the EGAP (Evidence in Governance and Politics) Methods website, a Quarto-based multilingual educational resource for impact evaluation methodology. The site provides methods guides, software tools catalog, and teaching materials for researchers and practitioners.
8+
9+
## Build and Development Commands
10+
11+
```bash
12+
# Preview the site locally (starts dev server with live reload)
13+
quarto preview
14+
15+
# Build the site (outputs to _site/)
16+
quarto render
17+
18+
# Render a single guide
19+
quarto render guides/research-questions/effect-types_en.qmd
20+
21+
# Restore R package dependencies (required before first build)
22+
# R will auto-activate renv via .Rprofile
23+
R -e "renv::restore()"
24+
```
25+
26+
## Architecture
27+
28+
### Content Structure
29+
30+
- **guides/** — Methods guides organized by topic subdirectories:
31+
- `analysis-procedures/`, `assessing-designs/`, `causal-inference/`, `data-collection/`, `implementation/`, `interpretation/`, `planning/`, `research-questions/`
32+
- **index.qmd** — Homepage with featured guides listing
33+
- **guides.qmd** — Main guides index using Quarto listings
34+
- **software.qmd** — Searchable R/Stata software catalog (uses DataTables)
35+
- **teaching.qmd** — Links to Learning Days coursebook
36+
37+
### Multilingual File Naming Convention
38+
39+
Guides use underscore + language code before `.qmd`:
40+
- English: `*_en.qmd` (e.g., `effect-types_en.qmd`)
41+
- Spanish: `*_es.qmd` (e.g., `effect-types_es.qmd`)
42+
- French: `*_fr.qmd` (e.g., `effect-types_fr.qmd`)
43+
44+
Language switching uses sidebar configuration in `_quarto.yml` with flag icons linking between translations.
45+
46+
### Guide YAML Frontmatter
47+
48+
Each guide includes:
49+
- `title:` — Guide title
50+
- `author:` — List with name/url pairs
51+
- `image:` — Thumbnail image filename (stored alongside the .qmd)
52+
- `bibliography:` — BibTeX file for references
53+
- `sidebar:` — ID matching `_quarto.yml` sidebar for language switcher (translations only)
54+
- `abstract:` — Summary shown at top of guide
55+
56+
### Configuration Files
57+
58+
- `_quarto.yml` — Site structure, navigation, sidebar definitions, HTML format options
59+
- `_language.yml` — Custom labels (author, date display)
60+
- `renv.lock` / `renv/` — R package versions for reproducibility
61+
- `DESCRIPTION` — R package dependencies list
62+
63+
### Quarto Features in Use
64+
65+
- `freeze: auto` — Caches code execution results in `_freeze/`
66+
- `cache: true` — R code chunk caching
67+
- `code-fold: true` — Collapsible code blocks
68+
- Listings for grid-based guide indexes
69+
- Custom partials in `partials/` for title blocks and TOC
70+
71+
## Deployment
72+
73+
GitHub Actions (`.github/workflows/build-quarto.yml`) builds and publishes to GitHub Pages on push to `main`. The workflow:
74+
1. Sets up R with renv
75+
2. Installs system dependencies (libgit2, udunits2, gdal, geos, proj)
76+
3. Runs `quarto render` and publishes to `gh-pages` branch

_quarto.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,108 +23,108 @@ website:
2323
- title: ""
2424
# contents:
2525
# - text: "How to read this guide"
26-
# href: /guides/how-to-read.html
26+
# href: /guides/how-to-read_en.html
2727

2828
- title: "Guides"
2929

3030
- title: ""
3131
id: effect-types
3232
contents:
3333
- text: "How to read this guide"
34-
href: /guides/how-to-read.html
34+
href: /guides/how-to-read_en.html
3535
# - text: "What is a simulation?"
3636
- text: "Language"
3737
contents:
3838
- text: "<img src='https://flagcdn.com/w20/gb.png' width=20px>&nbsp;&nbsp;English"
39-
href: /guides/research-questions/effect-types.en.html
39+
href: /guides/research-questions/effect-types_en.html
4040
- text: "<img src='https://flagcdn.com/w20/fr.png' width=20px>&nbsp;&nbsp;French"
41-
href: /guides/research-questions/effect-types.fr.html
41+
href: /guides/research-questions/effect-types_fr.html
4242
- text: "<img src='https://flagcdn.com/w20/es.png' width=20px>&nbsp;&nbsp;Spanish"
43-
href: /guides/research-questions/effect-types.es.html
43+
href: /guides/research-questions/effect-types_es.html
4444

4545
- title: ""
4646
id: hypothesis-testing
4747
contents:
4848
- text: "How to read this guide"
49-
href: /guides/how-to-read.html
49+
href: /guides/how-to-read_en.html
5050
- text: "Language"
5151
contents:
5252
- text: "<img src='https://flagcdn.com/w20/gb.png' width=20px>&nbsp;&nbsp;English"
53-
href: /guides/analysis-procedures/hypothesis-testing.en.html
53+
href: /guides/analysis-procedures/hypothesis-testing_en.html
5454
# - text: "<img src='https://flagcdn.com/w20/fr.png' width=20px>&nbsp;&nbsp;French"
55-
# href: /guides/analysis-procedures/hypothesis-testing.fr.html
55+
# href: /guides/analysis-procedures/hypothesis-testing_fr.html
5656
- text: "<img src='https://flagcdn.com/w20/es.png' width=20px>&nbsp;&nbsp;Spanish"
57-
href: /guides/analysis-procedures/hypothesis-testing.es.html
57+
href: /guides/analysis-procedures/hypothesis-testing_es.html
5858

5959
- title: ""
6060
id: external-validity
6161
contents:
6262
- text: "How to read this guide"
63-
href: /guides/how-to-read.html
63+
href: /guides/how-to-read_en.html
6464
- text: "Language"
6565
contents:
6666
- text: "<img src='https://flagcdn.com/w20/gb.png' width=20px>&nbsp;&nbsp;English"
67-
href: /guides/assessing-designs/external-validity.en.html
67+
href: /guides/assessing-designs/external-validity_en.html
6868
- text: "<img src='https://flagcdn.com/w20/fr.png' width=20px>&nbsp;&nbsp;French"
69-
href: /guides/assessing-designs/external-validity.fr.html
69+
href: /guides/assessing-designs/external-validity_fr.html
7070
- text: "<img src='https://flagcdn.com/w20/es.png' width=20px>&nbsp;&nbsp;Spanish"
71-
href: /guides/assessing-designs/external-validity.es.html
71+
href: /guides/assessing-designs/external-validity_es.html
7272

7373
- title: ""
7474
id: power
7575
contents:
7676
- text: "How to read this guide"
77-
href: /guides/how-to-read.html
77+
href: /guides/how-to-read_en.html
7878
- text: "Language"
7979
contents:
8080
- text: "<img src='https://flagcdn.com/w20/gb.png' width=20px>&nbsp;&nbsp;English"
81-
href: /guides/assessing-designs/power.en.html
81+
href: /guides/assessing-designs/power_en.html
8282
- text: "<img src='https://flagcdn.com/w20/fr.png' width=20px>&nbsp;&nbsp;French"
83-
href: /guides/assessing-designs/power.fr.html
83+
href: /guides/assessing-designs/power_fr.html
8484
- text: "<img src='https://flagcdn.com/w20/es.png' width=20px>&nbsp;&nbsp;Spanish"
85-
href: /guides/assessing-designs/power.es.html
85+
href: /guides/assessing-designs/power_es.html
8686

8787
- title: ""
8888
id: mechanisms
8989
contents:
9090
- text: "How to read this guide"
91-
href: /guides/how-to-read.html
91+
href: /guides/how-to-read_en.html
9292
- text: "Language"
9393
contents:
9494
- text: "<img src='https://flagcdn.com/w20/gb.png' width=20px>&nbsp;&nbsp;English"
95-
href: /guides/research-questions/mechanisms.en.html
95+
href: /guides/research-questions/mechanisms_en.html
9696
- text: "<img src='https://flagcdn.com/w20/fr.png' width=20px>&nbsp;&nbsp;French"
97-
href: /guides/research-questions/mechanisms.fr.html
97+
href: /guides/research-questions/mechanisms_fr.html
9898
- text: "<img src='https://flagcdn.com/w20/es.png' width=20px>&nbsp;&nbsp;Spanish"
99-
href: /guides/research-questions/mechanisms.es.html
99+
href: /guides/research-questions/mechanisms_es.html
100100

101101
- title: ""
102102
id: pap
103103
contents:
104104
- text: "How to read this guide"
105-
href: /guides/how-to-read.html
105+
href: /guides/how-to-read_en.html
106106
- text: "Language"
107107
contents:
108108
- text: "<img src='https://flagcdn.com/w20/gb.png' width=20px>&nbsp;&nbsp;English"
109-
href: /guides/planning/pap.en.html
109+
href: /guides/planning/pap_en.html
110110
- text: "<img src='https://flagcdn.com/w20/fr.png' width=20px>&nbsp;&nbsp;French"
111-
href: /guides/planning/pap.fr.html
111+
href: /guides/planning/pap_fr.html
112112
- text: "<img src='https://flagcdn.com/w20/es.png' width=20px>&nbsp;&nbsp;Spanish"
113-
href: /guides/planning/pap.es.html
113+
href: /guides/planning/pap_es.html
114114

115115
- title: ""
116116
id: xcausey
117117
contents:
118118
- text: "How to read this guide"
119-
href: /guides/how-to-read.html
119+
href: /guides/how-to-read_en.html
120120
- text: "Language"
121121
contents:
122122
- text: "<img src='https://flagcdn.com/w20/gb.png' width=20px>&nbsp;&nbsp;English"
123-
href: /guides/causal-inference/x-cause-y.en.html
123+
href: /guides/causal-inference/x-cause-y_en.html
124124
- text: "<img src='https://flagcdn.com/w20/fr.png' width=20px>&nbsp;&nbsp;French"
125-
href: /guides/causal-inference/x-cause-y.fr.html
125+
href: /guides/causal-inference/x-cause-y_fr.html
126126
- text: "<img src='https://flagcdn.com/w20/es.png' width=20px>&nbsp;&nbsp;Spanish"
127-
href: /guides/causal-inference/x-cause-y.es.html
127+
href: /guides/causal-inference/x-cause-y_es.html
128128

129129

130130
format:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)