SHIP Sites

Site config reference

Every key of site.config.ts, the file that sets the structure of a SHIP site. Each key is required, and an unknown key stops the build.

site.config.ts is at the root of the site repository. It exports the config through defineSiteConfig, which checks it when the file loads.

site.config.ts
import { defineSiteConfig } from "@lets-ship/site/config";

export const site = defineSiteConfig({
	origin: "https://example.com",
	titleSeparator: "|",
	sections: {
		website: { path: "/", content: "./content/pages" },
		blog: false,
		docs: { path: "/docs", content: "./content/docs", editUrl: false, tabs: [] },
	},
	nav: [{ label: "Docs", href: "/docs" }],
	mdxComponents: [],
	footer: { columns: [], social: "brand-links", badge: true },
	features: { search: true, markdownCopies: true, llms: true },
	integrations: { analytics: { provider: "none" } },
});

The config has no defaults. Each key states one choice, so a reader of the file sees every choice. The site name, the description, the colours and the fonts are not in this file, because they come from the brand DNA.

Editor support

The JSON Schema of the config is at https://letsship.ai/schema/site.json. SHIP generates it from the same schema that ship-site checks the config with. The schema has no rules that join two keys. The build checks those, for example two sections at one path.

Top-level keys

KeyTypeEffect
originstringThe https origin of the site in lowercase, without a path and without a slash at the end. Canonical links, feeds and the sitemap use it.
titleSeparatorstring, 1 to 3 charactersThe mark between a page title and the site name, for example `"
sectionsobjectThe website, blog and docs sections. See below.
navarray of { label, href }The links in the header.
mdxComponentsarray of namesYour own MDX components, on top of the allow-list. Each name starts with a capital letter.
footerobjectThe footer columns, the social links and the badge. See below.
featuresobjectThe optional files. See below.
integrationsobjectThe analytics provider. See below.

Sections

Set each section to an object to turn it on, or to false to turn it off. At least one section must be on, and no two sections can have the same path. A path starts with / and has lowercase segments.

sections.website

KeyTypeEffect
pathpathWhere the website pages start, usually /.
contentstringThe folder of the pages, for example ./content/pages. A file index.mdx is the page at the section path.

sections.blog

KeyTypeEffect
pathpathWhere the blog index is, for example /blog.
contentstringThe folder of the posts.
categoriesarray, at least oneEach category has a slug, a name for its tab, and a title and a description for its page. Each post names one category.
authorsarray, at least oneEach author has a name, a path for the author link, a bio and an x. The x key is the X handle of the author, for example @name, or null. A post by an author with a handle names that handle in its X card.
feedsbooleanBuilds the RSS, Atom and JSON feeds at the site root.
layout"list", "grid" or "magazine"How the index shows the posts. The magazine layout shows the featured posts first.

A category page exists only when at least one post is in that category.

sections.docs

KeyTypeEffect
pathpathWhere the docs start, for example /docs.
contentstringThe folder of the docs pages, with meta.json files for the sidebar order.
editUrlURL or falseThe base of the "Edit on GitHub" link, for example https://github.com/acme/site/blob/main. The link adds the content folder and the file path. false shows no link.
tabsarray of { label, path }Tabs above the sidebar. Use an empty array for no tabs.
KeyTypeEffect
columnsarray of { title, links }Link columns. Each link is { label, href }.
social"brand-links" or "none"Shows the links from the brand DNA, or no social links.
badgebooleanShows the "Built with SHIP" badge. When it is true, the build checks that each page shows it.

Features

KeyTypeEffect
searchbooleanBuilds the static search index and shows the search dialog.
markdownCopiesbooleanBuilds a Markdown copy of each page under /md/ and links it from the page.
llmsbooleanBuilds /llms.txt and /llms-full.txt. Needs markdownCopies.

A feature that is off has no route in the build, so the site serves a 404 for its files.

Integrations

integrations.analytics names one analytics provider. Each page loads the script of that provider in its head, with the key you give.

ValueEffect
{ provider: "none" }No analytics script.
{ provider: "plausible", key }Plausible. The key is the domain of the site in Plausible.
{ provider: "umami", key }Umami Cloud. The key is the website ID.
{ provider: "fathom", key }Fathom. The key is the site ID.

How is this page?

On this page