Content Preparation

Now that you have a good understanding of the PutOut tool, it's time to get your eBook chapters ready as markdown files. For this, you just need to understand 2 things:

  1. Chapter Frontmatter
  2. Content Formatting

1. Chapter Frontmatter

Each chapter file needs frontmatter at the very top. Frontmatter is written between triple-dashed lines (---) and uses YAML syntax to define metadata about your chapter.

For example, a sample markdown chapter file with the frontmatter looks like this:

---
title: "Chapter Title"
description: "A short, engaging description of the chapter's content."
customSlug: "chapter-slug"
---
Your chapter content goes here... 
  • title (required): The title of your chapter.
  • description (required): A brief and interesting description of the chapter. This will appear on the website.
  • customSlug (optional): By default, the chapter URL is generated from the filename. Use customSlug to specify a different URL.

2. Content Formatting

Your eBook chapters are formatted using the standard Markdown syntax, that looks something like below (you'll learn more about this in this section of the documentation):

Example:

# This is a Heading 1

This is a paragraph of text.

## This is a Heading 2

- List item 1
- List item 2

**Bold text**

_Italic text_

[Link to a website](https://www.example.com)

![Image Alt Text](/assets/image.jpg)

For a comprehensive Markdown guide, you can also visit the Markdown Guide Cheat Sheet web page.

Previewing Your Ebook

Before you publish the ebook online, you can also preview the website locally by running the following command:

npm run start

This will start a local development server and the generated static website can be checked at the terminal-provided URL (usually http://localhost:8080/) in your web browser.