Links

Publish a notebook

With the introduction of Reader Mode, the Workspace editor has become a great interface for both creating and reading analysis work. To simplify user flows, we've decided to remove publication support, except in workspaces used for certification practical exams and competitions. The instructions below are therefore only relevant for those specific use cases.

Publish a notebook

To publish a notebook:
  1. 1.
    Open your workspace.
  2. 2.
    Click the Publish button in the left-hand sidebar.
  3. 3.
    Select the notebook file you want to publish.
  4. 4.
    Click Publish.
Creating a publication from a notebook in your workspace
There are two publishing 'modes':
  • By default, your notebook will be run from top to bottom before publishing. This ensures full reproducibility, i.e. all cells run without error and the outputs are the result of executing the notebook in order.
  • If you're not worried about reproducibility (you just want to fix some typos or styles, for example), you can switch the "run notebook from top to bottom" toggle off before clicking Publish. A snapshot of your current notebook is taken and turned into a publication quasi-instantly.

Viewing your published notebook

Publish panel when notebook was published successfully
If publishing was successful, your published notebook will become available through a unique link that you can visit by clicking "Open live publication" (shown above). This is also how others will see your published notebook.

Who can see my published notebook?

To determine who can view your publication, the permissions on your workspace are followed.
  • If your workspace is private to you and shared with no-one, only you can see this published notebook.
  • If your workspace is only shared with specific people, only those people will be able to view your published notebook.
  • If your group workspace is shared with an entire group, only the members in that group will be able to view the published notebook.
  • If your workspace is public, your published notebook can be viewed by anyone.

Hiding cells in a published notebook

When you publish, by default all the cells of your notebook will be included. If you would like to hide certain cells (such as package installs or pieces of code that are not relevant to your readers), you can follow the steps in Hiding and showing cells.

Resolving errors

If an error was encountered in your code while rerunning your notebook, publishing will fail. In the Publishing pane, you can click View errors to see exactly what went wrong so you can correct your notebook and try again.
Special care is needed when both of the below are true:
  • Your notebook uses additional packages on top of the packages that are available in Workspace by default.
  • You're publishing with the 'Run notebook from top to bottom' option enabled.
In this case, you should make sure to install these additional packages at the top of your notebook.
This is necessary because publishing happens in a brand-new session, that no longer has your additional packages available. If you do the installs at the top of the notebook, these installs happen again as the first step, after which the rest of the notebook is executed.
Read Working with packagesto learn more about how to install and use additional packages in your notebook.

One publication per workspace

For every workspace, you can only create a single publication. It is currently not possible to publish two notebooks from the same workspace. If you have more than one notebook in your workspaces, you'll be able to select which notebook you want to publish.

Updating a published workspace

If you made changes to your notebook after publishing, these changes are not automatically reflected in the published notebook. For the changes to ripple through to your publication, open up the publish pane again and hit the "Update" button. The published notebook URL as well as its sharing settings are preserved.