Build Personal Blog -- Integrate Hexo with Jupyter Notebook
Embed Local File
npm install hexo-jupyter-notebook –save`
brew install pandoc
pip install nbconvert
Update
_config.yml
in hexo folder –>post_asset_folder: true
Create new folder named jupyter under folder _post to save the ipynb code blocks
mkdir jupyter-demo
Add the following code to your target md file
<script src="http://code.jquery.com/jquery-2.0.0.js"></script>
If you want to change the height and width of the iframe, please go to
node_module
of hexo, and findmain.py
inhexo-jupyter-notebook
, change the relative configuration.1
2
3<iframe id='ipynb' marginheight="0" frameborder="0" width='924px'
height='680px' srcdoc="%s" style="scrolling:yes;">
</iframe>
Embed Online File
Go to https://nbviewer.jupyter.org/ and paste the link of online jupyter notebook, like
https://github.com/kinglin/YTClip/blob/cliptrial/02_Code/01_Scripts/FrameSampling.ipynb
Use the following code block and input the generated URL by nbviewer:
1 | <iframe src="your_URL" width="700" height="500"></iframe> |
- Post link: https://leisurelyfool.com/posts/29937.html
- Copyright Notice: All articles in this blog are licensed under BY-NC-SA unless stating additionally.