0.2.0 • Published 4 years ago
@rafaelquintanilha/gatsby-transformer-ipynb v0.2.0
gatsby-transformer-ipynb
Parses jupyter notebook files.
Install
npm install --save @gatsby-contrib/gatsby-transformer-ipynb
How to use
// In your gatsby-config.js
plugins: [`@gatsby-contrib/gatsby-transformer-ipynb`];Parsing algorithm
It recognizes files with the ipynb extension.
Each notebook file is parsed into a node of type JupyterNotebook.
This plugin adds additional fields to the JupyterNotebook GraphQL type
including:
html: html string created using the react componentNotebookRenderfrom@gatsby-contrib/notebook-render.metadata: jupyter notebooks can embed metadata to indicate authors, titles...json: the json notebook code converted into a javascript object withJSON.parse.internal.content: contains the raw notebook code, it can be used to feed the react componentNotebookPreviewfrom@gatsby-contrib/notebook-preview.
How to query
A sample GraphQL query to get JupyterNotebook nodes:
{
query
JupyterQuery {
allJupyterNotebook {
edges {
node {
id
metadata {
kernelspec {
name
language
display_name
}
}
html
json {
nbformat
nbformat_minor
cells {
cell_type
execution_count
}
}
internal {
content
}
}
}
}
}
}0.2.0
4 years ago
0.1.21
5 years ago
0.1.20
5 years ago
0.1.18
5 years ago
0.1.16
5 years ago
0.1.17
5 years ago
0.1.15
5 years ago
0.1.14
5 years ago
0.1.13
5 years ago
0.1.12
5 years ago
0.1.11
5 years ago
0.1.10
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago
0.0.6
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago