CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is Viktor Rognås’s personal website built with Quarto and deployed on Netlify. The site serves as a professional hub containing:
- CV/Resume and professional background
- Portfolio of scientific and software development projects
- Documentation and educational content related to pharmacometrics, clinical pharmacology, and drug development
- Tools and resources for pharmaceutical modeling and analysis
Build and Development Commands
Build the site
Preview during development
Install dependencies
Project Architecture
Content Structure
- Source files: Content is written in
.qmd(Quarto Markdown) files in thedocs/directory - Output: Generated HTML files are placed in
_site/directory - Configuration:
_quarto.ymlcontains the main site configuration including navigation, themes, and formatting options
Key Directories
docs/: Main content organized by topic areas:aux/: Auxiliary skills (data visualization, communication, coding practices)concepts/: Pharmacokinetics, pharmacodynamics, clinical studies conceptsmodeling/: Mathematical modeling techniques and goodness-of-fit approachespathology-primers/: Disease state overviewspharmacopeia/: Drug classification and mechanism informationtools-of-the-trade/: Technical tools and software guides
images/: Site-wide images and assets_site/: Generated static site (do not edit directly)_freeze/: Quarto’s computational cache
Specialized Content Features
- Bibliography: Uses
refs.bibfor citations withclinical-microbiology-and-infection.cslstyle - Mathematical content: Includes pharmacokinetic operators loaded via
pk-operators.html - Code execution: Quarto documents can include executable R, Python, and other code blocks
- Cross-references: Extensive internal linking between concepts and topics
Deployment
- Platform: Netlify with automatic deployments from GitHub
- Plugin: Uses
@quarto/netlify-plugin-quartofor Quarto-specific build process - Performance: Includes Lighthouse CI for performance monitoring
- Redirects: Historical URL redirects defined in
netlify.toml
Content Guidelines
File Naming
- Use descriptive, lowercase names with hyphens (e.g.,
hepatic-impairment-studies.qmd) - Organize content files within appropriate subdirectories under
docs/
Styling and Themes
- Dual theme support (light/dark) with custom SCSS files
- Images should be optimized and use appropriate formats (
.avifpreferred for photos) - Code blocks are set to fold by default with copy functionality enabled
Claude Code Web
A SessionStart hook (.claude/hooks/session-start.sh) automatically installs dev tools: - npm dependencies including mcp-server-gsc for Google Search Console - GitHub CLI for repo/issue/PR management - Netlify API helper for deployment and site management
GitHub CLI Workaround
Claude Code Web blocks the literal gh command at system level to enforce branch naming conventions. Use ghcli instead:
The ghcli command is a symlink to the actual gh binary, created by the startup hook.
Netlify API Workaround
The Netlify CLI has compatibility issues with personal access tokens. Use the netlify-api helper instead:
The netlify-api script is a curl wrapper that handles authentication automatically using NETLIFY_AUTH_TOKEN.
Environment Variables for Authentication
Set these environment variables to enable service integrations:
| Variable | Purpose | How to Get |
|---|---|---|
NETLIFY_AUTH_TOKEN |
Netlify API access | Netlify User Settings > Applications |
GOOGLE_CREDENTIALS_BASE64 |
Google Search Console & Analytics | Base64-encode your service account JSON: cat creds.json \| base64 -w 0 |
The startup hook will: - Create the netlify-api helper and verify access if NETLIFY_AUTH_TOKEN is set - Decode and store Google credentials if GOOGLE_CREDENTIALS_BASE64 is set - Configure the GSC MCP server to use the credentials