Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 2.88 KB

File metadata and controls

61 lines (41 loc) · 2.88 KB

CLAUDE.md

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

Project Overview

This is the documentation site for Genezio, an AI Visibility platform. It's a zero-dependency static site generator that converts Markdown content into styled HTML pages. No framework — just a single build.js Node.js script.

Build Commands

  • Build: npm run build (runs node build.js, outputs to dist/)
  • Clean: npm run clean (removes dist/)
  • No test suite or linter is configured.

Architecture

Build Pipeline (build.js)

The entire site is generated by build.js, which:

  1. Reads Markdown files from content/ directory
  2. Converts them to HTML using a custom inline Markdown parser (no external libraries)
  3. Applies an HTML shell template with navigation sidebar
  4. Writes output to dist/

Key data structures in build.js:

  • sections array: Defines all doc sections, their slugs, and ordered page lists. This is the single source of truth for site navigation.
  • standaloneDocs array: Top-level pages outside section hierarchy (e.g., Getting Started).
  • PAGE_OVERRIDES object: Per-page metadata overrides (summary, goals, workflow, metrics) keyed as "section-slug::Page Title".
  • PARTIAL_SECTIONS set: Sections where only some pages have Markdown content files; missing pages get auto-generated placeholder content.

Content Structure

  • content/docs/{section-slug}/ — Markdown source files per section
  • Page filenames are slugified from the title in the sections array (e.g., "How LLM Search Works" → how-llm-search-works.md)
  • content/docs/{section-slug}/index.md — Section landing pages (currently empty/unused; the build generates index pages from section metadata)

Adding a New Page

  1. Add the page title to the appropriate section in the sections array in build.js
  2. Create the corresponding .md file in content/docs/{section-slug}/
  3. Optionally add entry to PAGE_OVERRIDES for custom metadata
  4. Run npm run build

Adding a New Section

  1. Add a new object to sections in build.js with slug, title, description, and pages array
  2. Create content/docs/{new-slug}/ directory with Markdown files
  3. Run npm run build

Deployment

  • Vercel: Configured via vercel.json (build command: npm run build, output: dist/)
  • GitHub Pages: Deployed via .github/workflows/deploy-pages.yml on push to main
  • The dist/ directory is checked into git (deploy artifacts are committed)

Conventions

  • The Markdown parser is custom and limited — it supports headings, paragraphs, inline code, bold, italic, links, lists, blockquotes, code blocks, and tables. No MDX or advanced Markdown features.
  • Links in Markdown use .md extensions; the build rewrites them to .html.
  • All styling is inline CSS generated within build.js (no external CSS files).