yadunut.dev/CLAUDE.md
Yadunand Prem 705e1e3dab
All checks were successful
Build OCI Image / docker (push) Successful in 36s
Add my content
2025-08-05 12:55:30 +08:00

2.4 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is a static website built with Zine, a static site generator written in Zig. The site uses:

  • SuperMD (.smd) for content pages - a Markdown superset with embedded templating
  • SuperHTML (.shtml) for layout templates - HTML with templating extensions
  • Nix for development environment and dependency management

Development Commands

Development Server

# Start development server with live reload (default: localhost:1990)
zine

# Start with custom host/port
zine --port 8080 --host 0.0.0.0

# Include draft pages
zine --drafts

Build for Production

# Generate static site for deployment
zine release

Environment Setup

# Enter development shell with zine available
nix develop

Project Structure

Content Files (.smd)

  • content/ - All site content in SuperMD format
    • index.smd - Homepage
    • about.smd - About page
    • blog/ - Blog posts and index
    • devlog/ - Microblog entries

Layout Templates (.shtml)

  • layouts/ - SuperHTML templates
    • templates/base.shtml - Base template with site navigation
    • index.shtml, page.shtml, post.shtml - Page-specific layouts
    • blog.shtml, devlog.shtml - Section layouts
    • *.xml - RSS feed templates

Configuration

  • zine.ziggy - Site configuration (title, URLs, asset paths)
  • flake.nix - Nix development environment with Zine binary

Assets

  • assets/ - Static assets (CSS, JS, images)
    • Includes math rendering (Temml) and syntax highlighting

Architecture Notes

Content Types

  1. Pages - Individual content files with frontmatter and layout assignment
  2. Blog - Traditional blog with separate pages per post
  3. Devlog - Microblog format with multiple entries on single page

Templating System

  • Uses Scripty expression language for logic
  • SuperHTML templates extend base template via <extend template="base.shtml">
  • Content rendered via $page.content(), metadata via $page.title, etc.
  • Site-wide variables available via $site.*

Asset Handling

  • Static assets referenced via $site.asset('filename').link()
  • Page-specific assets stored alongside content files
  • CSS and JS assets included in base template

The development server automatically rebuilds on file changes with configurable debounce timing.