feat: auto-import Jupyter Notebooks as blog posts

This commit is contained in:
Splitter
2023-11-05 00:09:06 +00:00
parent 1c5431cc8d
commit aed5880e02
6 changed files with 149 additions and 180 deletions

View File

@@ -0,0 +1,34 @@
---
title: Blog with Jupyter Notebooks!
date: '2023-11-04'
summary: Easily blog from Jupyter notebooks!
---
```python
from IPython.core.display import Image
Image('https://www.python.org/static/community_logos/python-logo-master-v3-TM-flattened.png')
```
![png](output_1_0.png)
```python
print("Welcome to Academic!")
```
Welcome to Academic!
## Organize your notebooks
Place the notebooks that you would like to publish in a `notebooks` folder at the root of your website.
## Import the notebooks into your site
```bash
pipx install academic
academic import 'notebooks/**.ipynb' content/post/ --verbose
```
The notebooks will be published to the folder you specify above. In this case, they will be published to your `content/post/` folder.