Take always into consideration the instructions in @AGENTS.md.
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a minimalist personal website/blog for Jaime Gómez-Obregón. It's a static single-page application built with vanilla JavaScript, HTML, and CSS—no frameworks or external libraries. The project follows a philosophy of radical simplicity, technical excellence, and human-centered design.
The site has two content types defined in httpdocs/index.json (a JSON Feed):
- Posts (
/httpdocs/posts/): Articles with adate_publishedfield, displayed chronologically - Pages (
/httpdocs/pages/): Timeless content without publication dates
Each content item is a directory containing at minimum an index.html file with the article content. Additional resources (images, styles, etc.) live in the same directory. An optional poster.png is used for social media sharing.
The application is a SPA with client-side routing:
httpdocs/modules/website.js- Main blog logic and routinghttpdocs/modules/strings.js- String utilities (HTML escaping, slugification)httpdocs/modules/element.js- DOM utilities
Web Components:
httpdocs/components/initial.js- Decorative initial letters (William Morris style)httpdocs/components/separator.js- Thematic separators
- Development:
yarn serveornpm run serve- Runs esbuild dev server with watch mode - Production:
yarn buildornpm run build- Bundles assets and generates static HTML with metadata
The build script (bin/build.sh):
- Copies
httpdocs/tobuild/ - Bundles and minifies JS/CSS with esbuild to
build/assets/ - Generates individual HTML files for each post/page with proper metadata (OpenGraph, Twitter cards)
- Extracts metadata from
index.jsonand injects it into each page's<head>
Deploys to Netlify on push to master branch. Configuration in netlify.toml.
To add new content:
- Create a directory in
httpdocs/posts/(for posts) orhttpdocs/pages/(for pages) - Add
index.htmlwith content (must include an<h1>for the title) - Add entry to
httpdocs/index.json:- Include
date_publishedfor posts - Omit
date_publishedfor pages - Add
"Destacado"totagsarray to feature on homepage
- Include
Posts with future date_published dates won't appear on the homepage until that date.
- Em dashes: The code prevents orphaned em dashes (—) by inserting Unicode WORD JOINER (U+2060) characters
- Decorative initials: First letter of paragraphs can be styled with William Morris SVG letters from
/httpdocs/initials/ - Roman numerals: Rendered in small caps per RAE recommendations
- Tweets: Use
<blockquote class="tweet" data-id="[tweet_id]"></blockquote>- the Twitter widgets library loads dynamically - YouTube videos: Automatically resized to 16:9 aspect ratio
- Footnotes: Use
<a class="note" href="#note-id">and<ol id="notes">- automatically numbered and cross-linked
All <h2> elements are automatically converted to anchors for section linking.
# Install dependencies
yarn install
# or
npm install
# Start development server (esbuild with watch mode)
yarn serve
# or
npm run serve
# Build for production
yarn build
# or
npm run buildThe project uses:
- Prettier: Configured with
semi: falseandsingleQuote: true(seepackage.json) - Stylelint: For CSS linting (extends
stylelint-config-standardandstylelint-config-recess-order) - EditorConfig: Enforces 2-space indentation, LF line endings, UTF-8, max line length 80
httpdocs/- Source files served in developmentbuild/- Production output (gitignored, generated by build script)httpdocs/tmp/- Temporary file sharing directory (cleared on each deploy)bin/build.js- Node.js build utilitiesbin/build.sh- Main build script (Bash)bin/serve.sh- Development server script
- No external JavaScript libraries or frameworks
- No backend/database - purely static
- No tracking cookies or analytics
- Semantic HTML5 markup
- All code must validate against W3C specifications
- PageSpeed Insights score target: 97-100/100