Import and filesDocs menu

DocsImport and files

Import a Markdown manuscript

Updated

If you write in Markdown, the Import page brings your files into a book as chapters. Each file is split into chapters on the page first so you can check them. Nothing reaches your book until you press Add to book.

You need one or more .md or .markdown files.

Step 1: Open the Import page

  1. Open the book you want to import into.
  2. In the sidebar, choose Tools.
  3. Under Files, choose Import.
The sidebar of a book with the Tools tab open. Under the Files heading, Import is selected, above Media.The sidebar of a book with the Tools tab open. Under the Files heading, Import is selected, above Media.

Step 2: Upload your files

  1. Press Upload files.
  2. Pick your Markdown files. You can pick several at once, or drop the files anywhere on the page instead.
  3. Wait while the files are read.
The empty Import page: a drop area titled Bring a manuscript in, with an Upload files button and a From Google Drive button.The empty Import page: a drop area titled Bring a manuscript in, with an Upload files button and a From Google Drive button.

Your files appear under Source files, and the chapters found in them appear under Chapters. The strip at the top counts the chapters, words and files you are about to add.

The Import page after a Markdown file is read: a strip of counts at the top, the file under Source files, and five chapters listed under Chapters.The Import page after a Markdown file is read: a strip of counts at the top, the file under Source files, and five chapters listed under Chapters.

To bring in more files, press Add files at the top of the page.

Step 3: Choose how each file is split

Each file has a Book or Single switch on its row.

  • Book splits the file into chapters at each top-level heading (# Title). If the file has none, it splits at each second-level heading (## Title). A section with no heading is titled with its chapter number.
  • Single imports the whole file as one chapter. Use it when you keep one chapter per file.
A Markdown file under Source files with the Book and Single switch on its row, and its details open showing an image and a link were removed on import.A Markdown file under Source files with the Book and Single switch on its row, and its details open showing an image and a link were removed on import.

Press the arrow at the start of a file’s row to see what was removed from it. Here is what happens to Markdown on import:

  • Headings, lists and blockquotes are kept.
  • A thematic break (*** or ---) becomes a scene break.
  • A front-matter block at the top of the file is removed.
  • Links keep their words but not their web address.
  • Images, tables, footnotes, code blocks and raw HTML are removed. Add images afterwards from Media.

The Cleaned count at the top shows how many things were removed in all.

Step 4: Review the chapters

Before anything is saved you can change the list under Chapters:

  • Rename a chapter: click its title and type a new one.
  • Reorder chapters: drag a chapter by the handle at the start of its row.
  • Leave a chapter out: clear the checkbox at the end of its row. A chapter you leave out takes no chapter number. Include all turns every chapter on or off.
  • Remove a file: press the trash button on the file’s row. Its chapters leave the list.
The chapter list with five chapters. The fourth has its checkbox cleared, is greyed out and shows a dash instead of a chapter number.The chapter list with five chapters. The fourth has its checkbox cleared, is greyed out and shows a dash instead of a chapter number.

A chapter whose title matches one already in your book, or another one in this import, is marked with a warning so you can spot an accidental double import. You can still add it.

Step 5: Add the chapters to your book

  1. Check the count beside the button, for example “4 of 5 chapters included”.
  2. Press Add to book.
The strip at the top of the Import page showing the counts of chapters, words, files and cleaned items, the note 4 of 5 chapters included, and the Add to book button.The strip at the top of the Import page showing the counts of chapters, words, files and cleaned items, the note 4 of 5 chapters included, and the Add to book button.

The new chapters are added after the chapters your book already has, in the order shown. To see them, choose Content in the sidebar.

The Content tab of the sidebar listing the book’s first chapter followed by the four imported chapters.The Content tab of the sidebar listing the book’s first chapter followed by the four imported chapters.

If a chapter could not be added, it is listed on the Import page with the reason, and everything else is still added. Fix the file and import that chapter again.

For a reminder of these rules while you work, press How this works at the top of the Import page.

Start your book free. Go Pro when you need more.

Free for one book. Pro is $20 a month or $200 a year.

Start your book free