Skip to main content

Section 24.2 Landing Page

A single book can yield many different outputs—an online HTML version, a PDF for the screen or for print (Chapter 44), perhaps an EPUB or a packet of worksheets. We think every project deserves one thing more: a landing page, the home page of a small website devoted to the project as a whole. It is the front door—the one stable, memorable URL you advertise on a syllabus, cite in a talk, or hand to a colleague—and from it a reader can reach whichever version they prefer.
A landing page is not the HTML index page (Subsection 29.1.1). That index page is the index.html file PreTeXt builds inside your HTML output so that a directory URL resolves to a sensible first page of the book; it belongs to a single output. A landing page sits above all of your outputs and introduces the project itself: a short description, a cover image, links to the current online version and to a downloadable PDF, perhaps errata or news, and a way to contact you or to adopt the book.
Because the landing page is what endures as versions come and go, and as hosting arrangements change, it is worth situating at a domain name you own and control (Chapter 40), so the project can move without breaking the links others have already made to it.
The PreTeXt-CLI can assemble such a site for you. When you deploy more than one target (Subsection 5.2.5), you place your landing page in a site folder at the root of your project, and pretext deploy stages that page together with each target’s output as a single website. For hosting, GitHub Pages is a natural, free home (Chapter 40). This holds even when the book itself is hosted elsewhere: a Runestone book, for instance, already lives in a GitHub repository, so GitHub Pages is immediately available to carry the project’s landing page.