{"action":"created","issue":{"url":"https://api.github.com/repos/jupyter/notebook/issues/879","repository_url":"https://api.github.com/repos/jupyter/notebook","labels_url":"https://api.github.com/repos/jupyter/notebook/issues/879/labels{/name}","comments_url":"https://api.github.com/repos/jupyter/notebook/issues/879/comments","events_url":"https://api.github.com/repos/jupyter/notebook/issues/879/events","html_url":"https://github.com/jupyter/notebook/pull/879","id":122671570,"number":879,"title":"Adding prototype nbextensions argument to NotebookApp","user":{"login":"ellisonbg","id":27600,"avatar_url":"https://avatars.githubusercontent.com/u/27600?v=3","gravatar_id":"","url":"https://api.github.com/users/ellisonbg","html_url":"https://github.com/ellisonbg","followers_url":"https://api.github.com/users/ellisonbg/followers","following_url":"https://api.github.com/users/ellisonbg/following{/other_user}","gists_url":"https://api.github.com/users/ellisonbg/gists{/gist_id}","starred_url":"https://api.github.com/users/ellisonbg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ellisonbg/subscriptions","organizations_url":"https://api.github.com/users/ellisonbg/orgs","repos_url":"https://api.github.com/users/ellisonbg/repos","events_url":"https://api.github.com/users/ellisonbg/events{/privacy}","received_events_url":"https://api.github.com/users/ellisonbg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jupyter/notebook/milestones/7","html_url":"https://github.com/jupyter/notebook/milestones/4.2","labels_url":"https://api.github.com/repos/jupyter/notebook/milestones/7/labels","id":1308320,"number":7,"title":"4.2","description":"","creator":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":40,"state":"open","created_at":"2015-09-16T11:58:11Z","updated_at":"2016-03-12T01:54:38Z","due_on":null,"closed_at":null},"comments":90,"created_at":"2015-12-17T06:34:37Z","updated_at":"2016-03-14T16:12:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jupyter/notebook/pulls/879","html_url":"https://github.com/jupyter/notebook/pull/879","diff_url":"https://github.com/jupyter/notebook/pull/879.diff","patch_url":"https://github.com/jupyter/notebook/pull/879.patch"},"body":"This is working draft exploring the feasibility of the first part of the work described in #878 \r\n\r\nSo far this does:\r\n\r\n* Adds an `nbextensions` config traitlet to the main `NotebookApp`.\r\n* Adds logic to the templates and handlers to json serialize that list, put it into the template and get it into a location that `main.js` could access it.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jupyter/notebook/issues/comments/196388380","html_url":"https://github.com/jupyter/notebook/pull/879#issuecomment-196388380","issue_url":"https://api.github.com/repos/jupyter/notebook/issues/879","id":196388380,"user":{"login":"malev","id":55977,"avatar_url":"https://avatars.githubusercontent.com/u/55977?v=3","gravatar_id":"","url":"https://api.github.com/users/malev","html_url":"https://github.com/malev","followers_url":"https://api.github.com/users/malev/followers","following_url":"https://api.github.com/users/malev/following{/other_user}","gists_url":"https://api.github.com/users/malev/gists{/gist_id}","starred_url":"https://api.github.com/users/malev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malev/subscriptions","organizations_url":"https://api.github.com/users/malev/orgs","repos_url":"https://api.github.com/users/malev/repos","events_url":"https://api.github.com/users/malev/events{/privacy}","received_events_url":"https://api.github.com/users/malev/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T16:12:07Z","updated_at":"2016-03-14T16:12:07Z","body":"In order to have your extension working you need something like:\r\n```\r\ndef _jupyter_nbextension_paths():\r\n    return [{\r\n            'section': \"notebook\",\r\n            'src': os.path.join(\"static\"),\r\n            'dest': \"my_extension/\",\r\n            'require' \"my_extension/main\")\r\n    ]\r\n```\r\nThe key `dest` is the destination and the value has a `/` at the end of the string, [1] will join the path, but the resulting path will also have a `/` at the end of the string. [2] will fail to create a symlink because it will consider that you want to create a symlink inside the folder `full_dest` which at this point does not exist.\r\n`normpath` will normalize the `full_dest` string and will remove the `/` at the end. This will avoid the failure and will work fine.\r\n\r\n[1] https://github.com/ellisonbg/notebook/blob/nbext-pain/notebook/nbextensions.py#L183\r\n[2] https://github.com/ellisonbg/notebook/blob/nbext-pain/notebook/nbextensions.py#L197"}}