This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the Inkdrop documentation website built with Next.js 16 App Router, Markdoc, and Tailwind CSS v4. The site serves as the official documentation for Inkdrop, a Markdown note-taking application.
# Development
npm run dev # Start development server at http://localhost:3000
# Build & Production
npm run build # Generate routes JSON and build for production
npm start # Run production server
# Code Quality
npm run lint # Run ESLint with Next.js rules- Documentation pages live in
/src/app/using Next.js App Router structure - Each page is a
page.mdfile in its own directory (e.g.,/src/app/start-guide/creating-notebook/page.md) - Pages are organized into logical sections:
start-guide/,reference/,writing/,examples/
- Navigation: Centrally managed in
/src/lib/navigation.ts- all navigation changes should be made here - Route Generation: Running
npm run buildautomatically generates/public/routes.jsonfrom navigation.ts - Markdown Processing: Uses Markdoc with custom tags defined in
/src/markdoc/ - Search: FlexSearch implementation with Algolia Autocomplete UI in
/src/components/Search.tsx
/src/lib/navigation.ts: Central navigation structure - edit this to add/remove/reorder pages/src/markdoc/tags.js: Custom Markdoc components (Callout, Figure, etc.)/next.config.mjs: Markdoc + search wiring, plus a webpack patch that tags generatedpage.mdmodules with the RSC layer (see Page Metadata below)/vercel.json: Extensive redirect configuration for legacy URLs/public/images/: All documentation images and screenshots
- Create a new directory under the appropriate section in
/src/app/ - Add a
page.mdfile with frontmatter. Set both the top-leveltitle:(used by the in-page header) and anextjs.metadatablock for the HTML<title>/description:--- title: Basic usage nextjs: metadata: title: Basic usage description: How to interact with Inkdrop ---
- Update
/src/lib/navigation.tsto include the new page in navigation - Place any images in
/public/images/with descriptive names
The HTML <title> and <meta name="description"> for each page come from the
nextjs.metadata frontmatter, surfaced via @markdoc/next.js's
nextjsExports: ['metadata', 'revalidate'] in next.config.mjs.
On Next 16, the RSC transform rejects a metadata export unless the generated
page module compiles in the server layer, and @markdoc/next.js registers its
loader without one. next.config.mjs therefore patches the markdoc webpack rule
to tag it with the 'rsc' layer (bundleLayer). Do not remove metadata
from nextjsExports or the RSC-layer webpack patch — doing so makes every page
title silently fall back to the root-layout default Inkdrop User Manual, even
though the build still passes. Re-verify the patch after major Next upgrades
('rsc' is a Next internal).
- TypeScript with strict mode enabled
- Prettier configured: single quotes, no semicolons
- Tailwind CSS for styling with Typography plugin
- Path alias:
@/*maps to./src/*
- Use
<Callout>component for important notes/warnings - Use
<Figure>for images with captions - Code blocks automatically get syntax highlighting via Prism.js
- Internal links should use relative paths from docs root
- GitHub Actions configured for Claude AI code reviews on PRs
- Vercel handles automatic deployments on push to main
- No formal test suite - rely on TypeScript, ESLint, and build validation
- Framework: Next.js 16 (App Router)
- Markdown: Markdoc (
@markdoc/next.js) - Styling: Tailwind CSS v4 + Typography plugin
- Search: FlexSearch + Algolia Autocomplete
- Deployment: Vercel
- Analytics: Fathom