Code Monkey home page Code Monkey logo

jupyterlab_iframe's Introduction

jupyterlab_iframe

Open a site in a widget, or add a set of "quicklinks".

Build Status codecov PyPI PyPI npm Binder

Install

pip install jupyterlab_iframe
jupyter labextension install jupyterlab_iframe
jupyter serverextension enable --py jupyterlab_iframe

Options

External Sites

install the server extension, and add the following to jupyter_notebook_config.py

c.JupyterLabIFrame.iframes = ['list', 'of', 'sites']

In this example, list, of, and sites will be available as links in the command palette.

Landing page on initial page load

c.JupyterLabIFrame.iframes = ['list', 'of', 'sites']
c.JupyterLabIFrame.welcome = 'a site to show on initial load'
c.JupyterLabIFrame.local_files = ['list', 'of', 'local', 'html', 'files']

In this example, a site will open by default the first time JupyterLab is opened.

Open local html file in iframe

c.JupyterLabIFrame.local_files = ['list', 'of', 'local', 'html', 'files']

Any files specified by 'local_files' will be served up as local links. By default any file on the filesystem is allowed, to disable this and only allow the list specifically designated here, set c.JupyterLabIFrame.allow_any_local = False. If you allow all, in the open dialog start the file path with local://.

Caveats

Update for version v0.0.12 - Most of these are covered by #31

This package uses iframes, so is subject to a few restrictions: - If Jlab is served over SSL, so must the sites (http/https must match) - If the underlying site enforces same-origin, then we cannot navigate to them (e.g. google)

Similar Packages

Configuring Binder with a landing page

To configure binder to serve a landing page, simply add the following configuration:

To requirements.txt:

jupyterlab_iframe>=0.2

To postBuild:

jupyter labextension install jupyterlab_iframe@^0.2
jupyter serverextension enable --py jupyterlab_iframe

config="c.JupyterLabIFrame.welcome = 'local://binder/landing.html'"
mkdir -p ~/.jupyter
echo -e $config > ~/.jupyter/jupyter_notebook_config.py

jupyterlab_iframe's People

Contributors

stv0g avatar timkpaine avatar

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.