{"id":13608552,"url":"https://github.com/timkpaine/jupyterlab_iframe","last_synced_at":"2025-04-12T14:56:02.598Z","repository":{"id":30412084,"uuid":"124823433","full_name":"timkpaine/jupyterlab_iframe","owner":"timkpaine","description":"View html as an embedded iframe in JupyterLab","archived":false,"fork":false,"pushed_at":"2024-10-15T19:20:20.000Z","size":1813,"stargazers_count":112,"open_issues_count":6,"forks_count":21,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-17T05:00:18.672Z","etag":null,"topics":["jlab","jupyter","jupyterlab","jupyterlab-extension"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timkpaine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-12T02:34:47.000Z","updated_at":"2024-10-15T19:20:24.000Z","dependencies_parsed_at":"2023-02-10T04:45:37.987Z","dependency_job_id":"ab841002-3498-45f2-8c5b-ef57ea01728a","html_url":"https://github.com/timkpaine/jupyterlab_iframe","commit_stats":{"total_commits":269,"total_committers":6,"mean_commits":"44.833333333333336","dds":"0.14869888475836435","last_synced_commit":"5ae51fb5af8f18d5eaec9f651cb7e73f23dd5c48"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Fjupyterlab_iframe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Fjupyterlab_iframe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Fjupyterlab_iframe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Fjupyterlab_iframe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timkpaine","download_url":"https://codeload.github.com/timkpaine/jupyterlab_iframe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586245,"owners_count":21128996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jlab","jupyter","jupyterlab","jupyterlab-extension"],"created_at":"2024-08-01T19:01:28.205Z","updated_at":"2025-04-12T14:56:02.566Z","avatar_url":"https://github.com/timkpaine.png","language":"JavaScript","funding_links":[],"categories":["JupyterLab扩展","JupyterLab Extensions","others"],"sub_categories":[],"readme":"# jupyterlab_iframe\n\nOpen a site in a widget, or add a set of \"quicklinks\".\n\n[![Build Status](https://github.com/timkpaine/jupyterlab_iframe/workflows/Build%20Status/badge.svg?branch=main)](https://github.com/timkpaine/jupyterlab_iframe/actions?query=workflow%3A%22Build+Status%22)\n[![codecov](https://codecov.io/gh/timkpaine/jupyterlab_iframe/branch/main/graph/badge.svg)](https://codecov.io/gh/timkpaine/jupyterlab_iframe)\n[![PyPI](https://img.shields.io/pypi/l/jupyterlab_iframe.svg)](https://pypi.python.org/pypi/jupyterlab_iframe)\n[![PyPI](https://img.shields.io/pypi/v/jupyterlab_iframe.svg)](https://pypi.python.org/pypi/jupyterlab_iframe)\n[![npm](https://img.shields.io/npm/v/jupyterlab_iframe.svg)](https://www.npmjs.com/package/jupyterlab_iframe)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/timkpaine/jupyterlab_iframe/main?urlpath=lab)\n\n![](https://raw.githubusercontent.com/timkpaine/jupyterlab_iframe/main/docs/example1.gif)\n\n## Install\n\n```bash\npip install jupyterlab_iframe\njupyter labextension install jupyterlab_iframe\njupyter serverextension enable --py jupyterlab_iframe\n```\n\n## Options\n\n### External Sites\n\ninstall the server extension, and add the following to `jupyter_notebook_config.py`\n\n```python3\nc.JupyterLabIFrame.iframes = ['list', 'of', 'sites']\n```\n\nIn this example, `list`, `of`, and `sites` will be available as links in the command palette.\n\n### Landing page on initial page load\n\n```python3\nc.JupyterLabIFrame.iframes = ['list', 'of', 'sites']\nc.JupyterLabIFrame.welcome = 'a site to show on initial load'\nc.JupyterLabIFrame.local_files = ['list', 'of', 'local', 'html', 'files']\n```\n\nIn this example, `a site` will open by default the first time JupyterLab is opened.\n\n### Open local html file in iframe\n\n```python3\nc.JupyterLabIFrame.local_files = ['list', 'of', 'local', 'html', 'files']\n```\n\nAny 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://`.\n\n## Caveats\n\n### Update for version v0.0.12 - Most of these are covered by [#31](https://github.com/timkpaine/jupyterlab_iframe/issues/31)\n\n~~This package uses iframes, so is subject to a few restrictions:~~\n~~- If Jlab is served over SSL, so must the sites (http/https must match)~~\n~~- If the underlying site enforces same-origin, then we cannot navigate to them (e.g. google)~~\n\n\n## Similar Packages\n\n- [Jupyterlab-html](https://github.com/mflevine/jupyterlab_html) displays local html files as websites in an iframe\n- [Jupyterlab-sandbox](https://github.com/canavandl/jupyterlab_sandbox)\n- [Main JLab Issue](https://github.com/jupyterlab/jupyterlab/issues/2369)\n\n\n\n## Configuring Binder with a landing page\n\nTo configure binder to serve a landing page, simply add the following configuration:\n\nTo requirements.txt:\n\n`jupyterlab_iframe\u003e=0.2`\n\nTo postBuild:\n\n```bash\njupyter labextension install jupyterlab_iframe@^0.2\njupyter serverextension enable --py jupyterlab_iframe\n\nconfig=\"c.JupyterLabIFrame.welcome = 'local://binder/landing.html'\"\nmkdir -p ~/.jupyter\necho -e $config \u003e ~/.jupyter/jupyter_notebook_config.py\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimkpaine%2Fjupyterlab_iframe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimkpaine%2Fjupyterlab_iframe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimkpaine%2Fjupyterlab_iframe/lists"}