Getting Started

Imprensa is a documentation toolkit for Ilha: imprensa provides the Vite integration, MDX routing, search, Shiki highlighting, static prerendering, sitemap output, and AI-friendly llms.txt files. This starter is a ready-to-edit Imprensa site.

Create a site

npx giget@latest gh:ilhajs/imprensa/templates/starter my-docs
cd my-docs
bun install
bun dev

Open http://localhost:5173. Start by editing files in src/pages/(content)/.

Project structure

my-docs/
├── public/                 # static assets, including logo.svg
├── src/
│   ├── pages/
│   │   ├── index.tsx       # landing page
│   │   ├── +layout.tsx     # root app layout
│   │   └── (content)/      # docs routes; group name is not in the URL
│   │       ├── +layout.tsx # docs shell: sidebar, toolbar, pager
│   │       └── *.mdx       # documentation pages
│   ├── app.css             # global styles and theme tokens
│   └── main.ts             # client entry + prerender export
└── vite.config.ts          # imprensa() configuration

(content) is an Ilha route group. For example, src/pages/(content)/guide/writing.mdx becomes /guide/writing.

Add content

Create an .mdx file under src/pages/(content)/:

---
title: My Page
description: A short description for search, metadata, and AI exports.
---

# My Page

Write documentation here.

The page is added to the sidebar, command search, sitemap, and AI exports automatically.

Configure Imprensa

// vite.config.ts
import { defineConfig } from "vite";
import { imprensa } from "imprensa";

export default defineConfig({
  plugins: [
    imprensa({
      hostname: "https://docs.example.com",
      socials: [{ service: "github", url: "https://github.com/you/repo" }],
    }),
  ],
});

Next: customize Configuration, Navigation, and Theming.