astroprint Markdown to web and PDF
Examples: 3 ways to publish Markdown
These examples use a CV so you can compare the same concrete document across every path. The same approaches work for reports, notes, and other Markdown-first documents. Start with a normal Astro Markdown page; add generated routes for a separate Paged.js preview, or use an Astro content collection when several documents share one structure.
- 1. Astro Markdown page — easiest start · default theme
Put a.mdfile insrc/pagesand select the astroprint layout in its frontmatter. Astro creates the URL; no injected-route configuration is needed. The page is responsive and browser-printable, andwithPreviewShelladds Home and Print controls. - 2. Generated routes from one Markdown file — Web + Paged · modern theme
Keep Markdown outsidesrc/pagesand let astroprint create a normal route plus an optional Paged.js preview route from the same source. This example also shows a small custom layout and CSS theme built on top of the academic layout. - 3. Generated routes from a content collection — structured · editorial theme
Content collections are an Astro feature for organizing and validating related content. Render one named entry, or publish the whole collection when you maintain several CV variants; the whole-collection form is the batch version of the single-entry form.One entry: Web example · Paged example
Whole collection: Main Web · Main Paged
Variant: Selected Work · Paged
Collection schema
Main source
Variant source
Layout · Theme CSS
How the pages connect
- This page explains the authoring choices and links to their source.
- The native Markdown page is responsive and browser-printable on its Astro-created URL.
- Generated examples pair a Web route with a Paged route from the same source.
- The Paged route visualizes page breaks and page count from the same source.
- Home returns here from every document route.
- PDF export renders a Web route; it is an output format, not a fourth authoring path.
Start a project
Install the integration with npx astro add astroprint, then start with a normal Markdown page
or configure generated routes when you need them. The README
includes the complete setup and PDF backend instructions.