Code Monkey home page Code Monkey logo

jntwp.io's Introduction

Jupyter Notebooks To Web Page starter

Colab

This repository contains a boilerplate for:

Installation

To install:

1.Clone this repository:

git clone [email protected]:AAYBS/jntwp.io.git

2.Create virtual environment and activate it:

python3 -m venv jntwp
source qtp/bin/activate

3.Install Python packages into your virtual environment:

pip install -r requirements.txt

Development

All of the jupyter notebooks that should be converted to pages must be inside notebooks directory.

Run locally

Run the pelican command to generate site:

pelican content

Now, the site is generated inside output directory. To launch pelican web server:

cd output
python -m pelican.server

Preview the site by navigating to http://localhost:8000/ in your browser.

Converting notebooks

Use nbconvert to convert a Jupyter notebook (input) to a a different format (output). The basic command structure is:

jupyter nbconvert --to <output format> <input notebook> --output <output_dir>

The current setup uses markdown so run:

jupyter nbconvert --to markdown notebooks/mynotebook.ipynb --output /content

Markdown structure

Note: Each markdown file must have:

  • Title: My First Review
  • Date: 2010-12-03 10:20
  • Category: Review

Publish to gihub pages

To publish a Pelican site as a Project Page you need to push the content of the output dir generated by Pelican to a repository’s gh-pages branch on GitHub.

pelican content -o output -s pelicanconf.py
ghp-import output

Then push to gh-pages branch:

git push origin gh-pages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.