1 Quick Start
This guide gets you from zero to a working Camp site in a few minutes using the built-in site template. If you’d rather understand each piece as you build it, skip ahead to Building a Camp Site, which constructs a site from scratch.
1.1 Installation
Camp requires Racket 8.13 or later. If you don’t have Racket installed, download it from racket-lang.org. The installation includes DrRacket (an IDE) and the raco command-line tool you’ll use to interact with Camp.
Install Camp from the package server by running:
raco pkg install camp |
This installs Camp and its dependencies. The process may take a minute or two as Racket downloads and compiles the packages.
1.2 Creating a Site
Camp includes a new command that generates a starter site with sensible defaults. Create a new site called “mysite” by running:
raco camp new mysite |
✓ Created mysite |
Next steps: |
cd mysite |
raco pkg install |
raco camp build |
raco camp serve |
This creates a "mysite" directory containing everything you need: a site configuration, a sample blog post, a simple render module, basic CSS, and package metadata. Change into the new directory to explore what was created:
cd mysite |
The key files are "site.rkt", which configures your site’s structure, and "render.rkt", which defines how pages are transformed into HTML. The "main.rkt" file provides bindings that all source documents can access. The "blog" folder contains source documents, and "static" holds assets like stylesheets that are copied to the output unchanged.
1.3 Building and Previewing
Build the site with:
raco camp build |
Camp reads your configuration, processes each source document through its designated render function, and writes the results to the "publish" folder. You’ll see output indicating which phases completed and how long each took.
To preview your site locally, start the development server:
raco camp serve |
Open http://localhost:8000 in your browser to see your site. The server watches for changes to your source files; when you edit a document or template, Camp automatically rebuilds and you can refresh the browser to see your changes.
Press CtrlC in the terminal to stop the server when you’re done.
1.4 Package Integration
Notice that source files in the generated site start with #lang punct mysite rather than plain #lang punct. This tells Punct to import all bindings from "mysite/main.rkt", giving your source documents access to Camp’s collection and cross-reference functions.
Once installed, you can also build your site by name from anywhere:
raco camp build mysite |
This is equivalent to running raco camp build from within the site directory.
1.5 Next Steps
You now have a working Camp site. The generated template is intentionally minimal—
To understand how the pieces fit together and customize your site, continue to Building a Camp Site, which walks through building a blog from scratch. You’ll learn how to configure collections, write render functions, and generate feeds. The Library Reference section provides complete documentation of Camp’s modules and functions when you need to look something up.