Turn Jupyter Notebook into Website in 3 minutes
Would you like to quickly turn your Python notebook into static website? It is very easy with Mercury framework.
You need to do simple 3 steps:
- Install Mercury framework.
- Add code cell with
Appobject and set
- Run notebook in Mercury.
You can read more here about different ways to install Mercury package.
The easiest way is to run:
pip install mercury
Please open the notebook that you would like to convert to a static website. You need to add following code in it:
import mercury as mr
# configure App properties
app = mr.App(title="Static notebook", description="Display static notebook", static_notebook=True)
static_notebook=True - it will do the magic!
The last step is to run Mercury Server. Please run the following command:
You should see in the web browser at address
http://127.0.0.1:8000 a website like in the image below:
In the above screenshot only one notebook is served. Please click in the notebook title and you will see selected notebook website:
You can download notebook as PDF or HTML format.