---
title: "Publishing and Deployment"
description: "Publishing and deployment involves preparing your documentation for production, generating social share cards, and exporting content into portable offline formats such as EPUB. You can build and de..."
last_updated: "2026-10-12T07:55:48.675683+00:00"
canonical_url: "https://www.doc0.dev/docs/e8872a72-1909-479c-b585-dc74c6e26726/guide/how-to-guides/publishing-and-deployment"
---

## Overview

### Publishing and Deployment Summary

Publishing and deployment involves preparing your documentation for production, generating social share cards, and exporting content into portable offline formats such as EPUB. You can build and deploy your documentation site to standard hosting platforms, automatically generate Open Graph (OG) social preview images for every page, and package your documentation into downloadable e-books.

---

### Social Cards and Open Graph Images

#### Open Graph Image Overview

Documentation pages can automatically generate Open Graph (OG) images to provide rich visual previews when shared on social media platforms and messaging apps.

#### Image Generation Options

The software supports rendering dynamic social cards with customizable titles, descriptions, branding, site names, and accent colors. 

> [!NOTE]
> Social images are generated at a standard resolution of 1200x630 pixels.

---

### Exporting Documentation to EPUB

#### EPUB Export Overview

You can export your entire documentation site into an EPUB e-book format for offline reading.

#### Exporting Steps

1. Add the EPUB export dependency to your project:
   ```bash
   pnpm add fumadocs-epub
   ```
2. Enable `includeProcessedMarkdown: true` in your documentation collection configuration.
3. Scaffold the export endpoint for your application framework. For Next.js projects, set an `EXPORT_SECRET` environment variable to secure the export endpoint.
4. Run your project's production build command (for example, `pnpm build`).
5. Start your production server and keep it running in the background.
6. Run the export command via the command line tool, specifying your framework:
   ```bash
   fumadocs export epub --framework next
   ```

#### Supported Frameworks for EPUB Export

The CLI export command supports the following frameworks via the `--framework` flag:

| Framework Identifier | Description |
| :--- | :--- |
| `next` | Next.js App Router projects |
| `tanstack-start` | TanStack Start projects |
| `react-router` | React Router projects |
| `waku` | Waku server components framework |

> [!IMPORTANT]
> When exporting from a Next.js project, make sure the production server is running locally and the `EXPORT_SECRET` environment variable matches on both the server and your export command environment.

## Related

- [Framework Setup](https://www.doc0.dev/docs/e8872a72-1909-479c-b585-dc74c6e26726/guide/getting-started/framework-setup)
- [Troubleshooting Issues](https://www.doc0.dev/docs/e8872a72-1909-479c-b585-dc74c6e26726/guide/troubleshooting/troubleshooting-issues)


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/e8872a72-1909-479c-b585-dc74c6e26726/llms.txt) for all pages in this wiki.
