To export all the highlights from all your documents as CSV or Markdown, go to the Export page and select the desired format at the bottom of the page:
The CSV option will immediately generate a download containing all of your highlights. Selecting the Markdown option will take you to a customization page where you can edit the formatting.
Export per document
You can export highlights from a single document to Markdown from your Library. First, click the down arrow on the right side of the document.
Then click "Export highlights."
This will start a download of a Markdown file containing the highlights and notes from the selected document.
Metadata (such as author, URL, category, title, image)
Highlight header (parent of your new highlights added)
Sync notification (file that summarizes which files were added/updated on every export).
You can customize your export by going to the Markdown Export Preferences page and toggling on "Use custom formatting."
Each section of the export has a "template." You can customize each template string to format exactly how you like using the Jinja2 templating language.
The explanations below illustrate how customization works and give some useful examples.
Page Title
By default, Readwise will append "(highlights)" to each page so you can differentiate a Readwise created page from your own. Here's the default template:
{{ title }} {% if not is_new_page %}(Updated {{ date }}){% endif %}
Notice the {{ title }} variable. When a note is exported, that {{ title }} will be replaced with the book/article/tweet's actual title and {{ date }} with the current date.
You also have some other variables available to you. For example, here's how you can prepend each title with the category (i.e. is this a book, article, or tweet?)
{{category}}/{{title}}
This would result in something like Book/Atomic Habits.
If you want all of your Readwise highlights to just show up in one page (though we don't recommend this), you could set the template to a non-variable string such as this:
{{"All Highlights"}}
Of course, you can customize the title significantly further, using inline-if statements, Jinja2 filters, and much more. The templating language is quite powerful!
Page metadata
From the Markdown Export Preferences page, you can also edit your page metadata, including the author, URL, category, title, image, and anything else you want to show up when each new book/article/tweet is imported.
Here's the default template:
{% if image_url -%}![]({{image_url}}){% endif -%}## Metadata- Author: {{author}}- Full Title: {{full_title}}- Category: #{{category}}{% if url %}- URL: {{url}}{% endif %}
Highlight Header
You can customize how the Header text above each set of synced highlights is formatted. By default, each time your highlights are synced they will be sub-bullets of this default header:
{% if is_new_page %} Highlights first synced by #Readwise [[{{date}}]] {% elif has_new_highlights %} New highlights added [[{{date}}]] at {{time}} {% endif %}<br>{% if is_new_page %}Highlights{% elif has_new_highlights %}New highlights added {{date}} at {{time}}{% endif %}<br>
Note the if statement used above. By default, the header is formatted differently when the highlights are for a newly synced page versus new highlights on a previously synced page.
A common use case may be that you don't want the highlights backlinked to the date (the day they are synced). If that's the case, you can simply remove the [[]] wrapping the date, e.g:
Highlights synced by #Readwise: {{date}} at {{time}}
Sync Notification
Finally, every time you export your Markdown highlights, we can optionally generate a special markdown file which summarizes which files were added/updated.
This setting is off by default, but it can be especially useful in note-taking apps that create a page for the date the highlights were exported and can be linked to that.
We're pretty familiar with our product, so we occasionally fall victim to the Curse of Knowledge. If any part of this documentation confuses you or seems incomplete, please let us know!