--- name: jekyll-research-theme description: Create production-grade, accessible Jekyll themes for researchers conducting "research in public." Generates complete lab notebook-style themes with Tufte-inspired sidenotes, KaTeX math rendering, and WCAG 2.1 AA compliance. Use when building Jekyll themes for scientific journals, experiment logs, field notes, or research documentation sites. Supports collections for organizing experiments and field notes, responsive sidenote rendering (sidebar on desktop, inline on mobile), and full-width layout options. --- # Jekyll Research Log Theme Generator Generate a complete, production-ready Jekyll theme designed for researchers who work in public. The theme prioritizes accessibility, elegant typography, and scientific workflows with Tufte-style sidenotes and math rendering. ## Design Philosophy Create a lab notebook aesthetic that feels like a refined scientist's journal: - **Typography-first**: Serif display fonts paired with readable body text - **Breathing room**: Generous whitespace and margins for sidenotes - **Accessibility-first**: WCAG 2.1 AA compliant by default - **Responsive sidenotes**: Desktop sidebar positioning, mobile inline rendering - **Math-ready**: KaTeX integration for equations and formulas ## Theme Structure Generate a complete Jekyll theme with this directory structure: ``` theme-name/ ├── _layouts/ │ ├── default.html │ ├── experiment.html │ ├── field-note.html │ └── home.html ├── _includes/ │ ├── head.html │ ├── header.html │ ├── footer.html │ ├── sidenote.html │ └── math.html ├── _sass/ │ ├── _base.scss │ ├── _typography.scss │ ├── _layout.scss │ ├── _sidenotes.scss │ ├── _accessibility.scss │ └── main.scss ├── assets/ │ ├── css/ │ │ └── main.scss │ └── js/ │ └── sidenotes.js ├── _config.yml ├── index.html └── README.md ``` ## Core Features Implementation ### 1. Collections Configuration In `_config.yml`, define collections for content types: ```yaml collections: experiments: output: true permalink: /experiments/:title/ field_notes: output: true permalink: /notes/:title/ defaults: - scope: path: "" type: "experiments" values: layout: "experiment" full_width: false - scope: path: "" type: "field_notes" values: layout: "field-note" full_width: false ``` ### 2. Tufte-Style Sidenotes Implement responsive sidenotes that adapt to viewport: **HTML Pattern** (`_includes/sidenote.html`): ```html {{ include.content }} ``` **CSS Requirements** (`_sass/_sidenotes.scss`): - Desktop (>768px): Position sidenotes in right margin (float or CSS Grid) - Mobile (≤768px): Hide margin-toggle checkbox, display sidenotes inline after reference - Ensure `.sidenote-number` has proper ARIA labels for screen readers - Use `counter-reset` and `counter-increment` for automatic numbering **JavaScript Enhancement** (`assets/js/sidenotes.js`): - Progressive enhancement for keyboard navigation - Ensure sidenotes are accessible via Tab key - Add ARIA attributes dynamically if needed ### 3. Full-Width Layout Support In layout files, check for `full_width` frontmatter: ```liquid {% if page.full_width %}
{% else %}
{% endif %} ``` CSS handles width constraints: ```scss .content-sidenotes { max-width: 55%; // Leaves room for sidenotes } .content-full-width { max-width: 90%; // Full reading width } ``` ### 4. KaTeX Math Rendering In `_includes/math.html`: ```html ``` Include in `` of layouts that need math support. ### 5. Experiment Layout `_layouts/experiment.html` should include: - Title and metadata (date, tags, status) - Hypothesis section - Methodology section - Results/observations section - Sidenote support throughout - Tag display with links to filtered views ### 6. Field Note Layout `_layouts/field-note.html` should include: - Timestamp - Quick-capture formatting (less structured than experiments) - Tag support - Sidenote support - Optional linking to related experiments ## Accessibility Requirements ### Semantic HTML - Use proper heading hierarchy (h1 → h2 → h3) - `
`, `