-
Notifications
You must be signed in to change notification settings - Fork 0
SEO and Structured Data
PutOut includes built-in search engine optimization so your book's website is discoverable and looks great when shared on social media. Most of it works automatically — but there are a few things you should set up.
These are generated for every page without any extra work:
- Open Graph tags — Title, description, and cover image for Facebook, LinkedIn, and other platforms
- Twitter Cards — Large image cards for Twitter/X sharing
- Canonical URLs — Tells search engines the official URL for each page
-
JSON-LD structured data — The homepage includes a
Bookschema (title, author, description, formats); each chapter includes anArticleschema with its position in the book and a breadcrumb trail -
XML sitemap — Lists all pages at
yourdomain.com/sitemap.xmlfor search engine crawlers - robots.txt — Allows all search engines to index your site
To get the most out of these features, make sure you've set the following in src/_data/site.js:
url: "https://yourdomain.com",This is the most important setting for SEO. It affects your sitemap, canonical URLs, social sharing previews, and structured data. Set this before deploying — without it, search engines and social platforms won't have correct links.
description: "A comprehensive guide to modern bread baking techniques.",This appears in search results and when someone shares your homepage on social media.
In each chapter's frontmatter:
---
title: "Sourdough Basics"
description: "Learn how to create and maintain a sourdough starter from scratch."
permalink: "/sourdough-basics/"
---Chapter descriptions appear in search results and social shares for that specific page. Make them unique and descriptive — they're your chance to tell readers what the chapter covers.
coverImage: "/assets/cover.png",This image is used as the social sharing preview image across all pages. When someone shares any page from your site on Twitter, Facebook, or LinkedIn, this image appears in the card.
Good permalinks help both readers and search engines:
# Good — descriptive and readable
permalink: "/sourdough-basics/"
permalink: "/introduction/"
# Avoid — not descriptive
permalink: "/ch1/"
permalink: "/chapter-one/"PutOut generates page titles automatically:
- Homepage: "Book Title by Author Name"
- Chapter pages: "Chapter Title - Book Title"
These appear in browser tabs and search results.
When someone shares a link to your site on Twitter, Facebook, LinkedIn, or messaging apps, they'll see a card with:
- Your book's title
- The page description (site description for the homepage, chapter description for chapters)
- Your cover image
To test what your links look like when shared, use Twitter's Card Validator or Facebook's Sharing Debugger after deploying.
- Configuration — Set your URL, description, and cover image
-
Deployment — Remember to update
site.urlbefore going live