-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathexport-html.jlmd
More file actions
64 lines (44 loc) · 3.16 KB
/
Copy pathexport-html.jlmd
File metadata and controls
64 lines (44 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: "📗 Export to HTML"
description: "How to export a Pluto.jl notebook to an HTML file."
tags: ["docs", "publishing", "html", "file", "export", "share", "web"]
layout: "md.jlmd"
order: 1.2
---
{#html}
# Export to HTML
This is a snapshot of your notebook with all outputs in a standalone HTML file. You can share this `.html` file via email, and other people can double-click the file to read your notebook.
!!! info
Important: you can open an HTML export file **on any computer**, you do not need to have Julia or Pluto installed!
For some examples of HTML export files, check out our [featured notebooks](https://featured.plutojl.org/).
> ### Step 1
> Open your notebook in Pluto, and wait for all cells to finish running.
>
> ### Step 2
> Press the **Share** button in the top right.
>
> <img src="$(root_url)/assets/img/Share button screenshot.png" alt="Screenshot of the Share button" width="1532" height="282">
>
> ### Step 3
> Choose "Static HTML".
>
> <img src="$(root_url)/assets/img/export options html.png" alt="Screenshot of the export options" width="1882" height="468">
>
> ### Step 4
> Choose "Download HTML file".
>
> <img src="$(root_url)/assets/img/export html local or plutoland local.png" alt="Screenshot of the export options" style="max-width: 400px;" width="852" height="896">
>
> _You can learn more about pluto.land [here](../export-plutoland/)._
## Reproducibility
What's really cool about HTML export files is that they are **reproducible**: every HTML export file from Pluto **includes the `.jl` source code**! That means that someone who reads the notebook can also run the original code and make changes!
Every HTML export contains an **Edit or run** button in the top right. When you press it, you see a screen where you can:
1. Run the notebook with **[binder](https://mybinder.org/)**, a free service to run scientific notebooks in the cloud. This works on any browser (including mobile), without needing to install Julia or Pluto.
2. **Download the `.jl` notebook file** that was used to generate the HTML export. You can open this file with Pluto.
<img src="$(root_url)/assets/img/Edit or run menu screenshot.png" alt="Screenshot of the 'Edit or run' menu with the option to download the notebook file." width="1312" height="1454">
## Offline support
HTML export files are all-inclusive, which means that you can open them without an internet connection. This is why the HTML files are quite large (around 8MB plus your content): it includes all the assets (JavaScript, CSS, fonts) that are needed to display the notebook.
Some heavy assets like the JuliaMono font are not included in the file itself, and will load progressively if you have an internet connection.
## Using HTML files
The HTML can be shared as a file (like PDF), and people can open it by double-clicking the file. But you can also host the HTML file online, and use it as a web page. <a href="../notebooks-online/" class="arrow">Learn more</a>
When sharing HTML files online, [frontmatter](../frontmatter/) can be used to set the title, description, and author of the page. This information is used in the HTML `<meta>` tags, which are important for search engines and social media sharing.