{"action":"created","comment":{"url":"https://api.github.com/repos/ngzhian/mkdocs/pulls/comments/27761406","id":27761406,"diff_hunk":"@@ -148,11 +147,22 @@ def validate_config(user_config):\n \n     package_dir = os.path.dirname(__file__)\n \n-    if config['theme_url']:\n-        install_theme(config['theme_url'],\n-                      os.path.join(package_dir, 'themes'))\n+    theme_dir = []\n \n-    theme_dir = [os.path.join(package_dir, 'themes', config['theme'])]\n+    if config['theme'] is not None:\n+        internal_theme = os.path.join(package_dir, 'themes', config['theme'])\n+        if os.path.exists(internal_theme):\n+            theme_dir = [internal_theme, ]\n+        else:\n+            log.warning((\"No theme can be found with the name %s \"\n+                         \"in the builtin MkDocs themes\"), config['theme'])\n+\n+    if config['theme_url']:\n+        config_dir = os.path.dirname(config['config'])","path":"mkdocs/config.py","position":40,"original_position":40,"commit_id":"516eee473120e4575c6550fc6ef5422e94aa6d8d","original_commit_id":"516eee473120e4575c6550fc6ef5422e94aa6d8d","user":{"login":"d0ugal","id":48211,"avatar_url":"https://avatars.githubusercontent.com/u/48211?v=3","gravatar_id":"","url":"https://api.github.com/users/d0ugal","html_url":"https://github.com/d0ugal","followers_url":"https://api.github.com/users/d0ugal/followers","following_url":"https://api.github.com/users/d0ugal/following{/other_user}","gists_url":"https://api.github.com/users/d0ugal/gists{/gist_id}","starred_url":"https://api.github.com/users/d0ugal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d0ugal/subscriptions","organizations_url":"https://api.github.com/users/d0ugal/orgs","repos_url":"https://api.github.com/users/d0ugal/repos","events_url":"https://api.github.com/users/d0ugal/events{/privacy}","received_events_url":"https://api.github.com/users/d0ugal/received_events","type":"User","site_admin":false},"body":"This wouldn't actually be configurable, so I don't think that is needed. We just calculate it based on the mkdocs.yml location.","created_at":"2015-04-03T22:54:42Z","updated_at":"2015-04-03T22:54:42Z","html_url":"https://github.com/ngzhian/mkdocs/pull/1#discussion_r27761406","pull_request_url":"https://api.github.com/repos/ngzhian/mkdocs/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ngzhian/mkdocs/pulls/comments/27761406"},"html":{"href":"https://github.com/ngzhian/mkdocs/pull/1#discussion_r27761406"},"pull_request":{"href":"https://api.github.com/repos/ngzhian/mkdocs/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ngzhian/mkdocs/pulls/1","id":32620793,"html_url":"https://github.com/ngzhian/mkdocs/pull/1","diff_url":"https://github.com/ngzhian/mkdocs/pull/1.diff","patch_url":"https://github.com/ngzhian/mkdocs/pull/1.patch","issue_url":"https://api.github.com/repos/ngzhian/mkdocs/issues/1","number":1,"state":"open","locked":false,"title":"Improvements to the theme_url setting","user":{"login":"d0ugal","id":48211,"avatar_url":"https://avatars.githubusercontent.com/u/48211?v=3","gravatar_id":"","url":"https://api.github.com/users/d0ugal","html_url":"https://github.com/d0ugal","followers_url":"https://api.github.com/users/d0ugal/followers","following_url":"https://api.github.com/users/d0ugal/following{/other_user}","gists_url":"https://api.github.com/users/d0ugal/gists{/gist_id}","starred_url":"https://api.github.com/users/d0ugal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d0ugal/subscriptions","organizations_url":"https://api.github.com/users/d0ugal/orgs","repos_url":"https://api.github.com/users/d0ugal/repos","events_url":"https://api.github.com/users/d0ugal/events{/privacy}","received_events_url":"https://api.github.com/users/d0ugal/received_events","type":"User","site_admin":false},"body":"- Don't install themes into the site-packages, we don't want to edit\r\n  that. It should be considered read-only for us. Instead, download the\r\n  theme to a .mkdocs directory in the same location as the mkdocs.yml\r\n- When installing a theme, use it like a custom theme would be used by\r\n  adding it to the theme_dir.\r\n- Rather than include a zip file in the tests, create one on the fly\r\n  that can be used - this makes it more flxible and clearer what is\r\n  happening.\r\n- Compare the extracted theme with the original zipped theme\r\n- Use a pre-build theme zip for integration tests only","created_at":"2015-04-03T22:23:19Z","updated_at":"2015-04-03T22:54:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"012a3393461803cf7976699e0d60d415524027e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ngzhian/mkdocs/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ngzhian/mkdocs/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ngzhian/mkdocs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ngzhian/mkdocs/issues/1/comments","statuses_url":"https://api.github.com/repos/ngzhian/mkdocs/statuses/516eee473120e4575c6550fc6ef5422e94aa6d8d","head":{"label":"d0ugal:theme-url","ref":"theme-url","sha":"516eee473120e4575c6550fc6ef5422e94aa6d8d","user":{"login":"d0ugal","id":48211,"avatar_url":"https://avatars.githubusercontent.com/u/48211?v=3","gravatar_id":"","url":"https://api.github.com/users/d0ugal","html_url":"https://github.com/d0ugal","followers_url":"https://api.github.com/users/d0ugal/followers","following_url":"https://api.github.com/users/d0ugal/following{/other_user}","gists_url":"https://api.github.com/users/d0ugal/gists{/gist_id}","starred_url":"https://api.github.com/users/d0ugal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d0ugal/subscriptions","organizations_url":"https://api.github.com/users/d0ugal/orgs","repos_url":"https://api.github.com/users/d0ugal/repos","events_url":"https://api.github.com/users/d0ugal/events{/privacy}","received_events_url":"https://api.github.com/users/d0ugal/received_events","type":"User","site_admin":false},"repo":{"id":22102812,"name":"mkdocs","full_name":"d0ugal/mkdocs","owner":{"login":"d0ugal","id":48211,"avatar_url":"https://avatars.githubusercontent.com/u/48211?v=3","gravatar_id":"","url":"https://api.github.com/users/d0ugal","html_url":"https://github.com/d0ugal","followers_url":"https://api.github.com/users/d0ugal/followers","following_url":"https://api.github.com/users/d0ugal/following{/other_user}","gists_url":"https://api.github.com/users/d0ugal/gists{/gist_id}","starred_url":"https://api.github.com/users/d0ugal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d0ugal/subscriptions","organizations_url":"https://api.github.com/users/d0ugal/orgs","repos_url":"https://api.github.com/users/d0ugal/repos","events_url":"https://api.github.com/users/d0ugal/events{/privacy}","received_events_url":"https://api.github.com/users/d0ugal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/d0ugal/mkdocs","description":"Project documentation with Markdown.","fork":true,"url":"https://api.github.com/repos/d0ugal/mkdocs","forks_url":"https://api.github.com/repos/d0ugal/mkdocs/forks","keys_url":"https://api.github.com/repos/d0ugal/mkdocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/d0ugal/mkdocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/d0ugal/mkdocs/teams","hooks_url":"https://api.github.com/repos/d0ugal/mkdocs/hooks","issue_events_url":"https://api.github.com/repos/d0ugal/mkdocs/issues/events{/number}","events_url":"https://api.github.com/repos/d0ugal/mkdocs/events","assignees_url":"https://api.github.com/repos/d0ugal/mkdocs/assignees{/user}","branches_url":"https://api.github.com/repos/d0ugal/mkdocs/branches{/branch}","tags_url":"https://api.github.com/repos/d0ugal/mkdocs/tags","blobs_url":"https://api.github.com/repos/d0ugal/mkdocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/d0ugal/mkdocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/d0ugal/mkdocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/d0ugal/mkdocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/d0ugal/mkdocs/statuses/{sha}","languages_url":"https://api.github.com/repos/d0ugal/mkdocs/languages","stargazers_url":"https://api.github.com/repos/d0ugal/mkdocs/stargazers","contributors_url":"https://api.github.com/repos/d0ugal/mkdocs/contributors","subscribers_url":"https://api.github.com/repos/d0ugal/mkdocs/subscribers","subscription_url":"https://api.github.com/repos/d0ugal/mkdocs/subscription","commits_url":"https://api.github.com/repos/d0ugal/mkdocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/d0ugal/mkdocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/d0ugal/mkdocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/d0ugal/mkdocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/d0ugal/mkdocs/contents/{+path}","compare_url":"https://api.github.com/repos/d0ugal/mkdocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/d0ugal/mkdocs/merges","archive_url":"https://api.github.com/repos/d0ugal/mkdocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/d0ugal/mkdocs/downloads","issues_url":"https://api.github.com/repos/d0ugal/mkdocs/issues{/number}","pulls_url":"https://api.github.com/repos/d0ugal/mkdocs/pulls{/number}","milestones_url":"https://api.github.com/repos/d0ugal/mkdocs/milestones{/number}","notifications_url":"https://api.github.com/repos/d0ugal/mkdocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/d0ugal/mkdocs/labels{/name}","releases_url":"https://api.github.com/repos/d0ugal/mkdocs/releases{/id}","created_at":"2014-07-22T12:20:40Z","updated_at":"2015-04-02T20:36:45Z","pushed_at":"2015-04-03T22:21:52Z","git_url":"git://github.com/d0ugal/mkdocs.git","ssh_url":"git@github.com:d0ugal/mkdocs.git","clone_url":"https://github.com/d0ugal/mkdocs.git","svn_url":"https://github.com/d0ugal/mkdocs","homepage":"http://www.mkdocs.org","size":2306,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ngzhian:theme-url","ref":"theme-url","sha":"e06aee866a7470c87392dea2f79e550781325446","user":{"login":"ngzhian","id":1749303,"avatar_url":"https://avatars.githubusercontent.com/u/1749303?v=3","gravatar_id":"","url":"https://api.github.com/users/ngzhian","html_url":"https://github.com/ngzhian","followers_url":"https://api.github.com/users/ngzhian/followers","following_url":"https://api.github.com/users/ngzhian/following{/other_user}","gists_url":"https://api.github.com/users/ngzhian/gists{/gist_id}","starred_url":"https://api.github.com/users/ngzhian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngzhian/subscriptions","organizations_url":"https://api.github.com/users/ngzhian/orgs","repos_url":"https://api.github.com/users/ngzhian/repos","events_url":"https://api.github.com/users/ngzhian/events{/privacy}","received_events_url":"https://api.github.com/users/ngzhian/received_events","type":"User","site_admin":false},"repo":{"id":25430238,"name":"mkdocs","full_name":"ngzhian/mkdocs","owner":{"login":"ngzhian","id":1749303,"avatar_url":"https://avatars.githubusercontent.com/u/1749303?v=3","gravatar_id":"","url":"https://api.github.com/users/ngzhian","html_url":"https://github.com/ngzhian","followers_url":"https://api.github.com/users/ngzhian/followers","following_url":"https://api.github.com/users/ngzhian/following{/other_user}","gists_url":"https://api.github.com/users/ngzhian/gists{/gist_id}","starred_url":"https://api.github.com/users/ngzhian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngzhian/subscriptions","organizations_url":"https://api.github.com/users/ngzhian/orgs","repos_url":"https://api.github.com/users/ngzhian/repos","events_url":"https://api.github.com/users/ngzhian/events{/privacy}","received_events_url":"https://api.github.com/users/ngzhian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ngzhian/mkdocs","description":"Project documentation with Markdown.","fork":true,"url":"https://api.github.com/repos/ngzhian/mkdocs","forks_url":"https://api.github.com/repos/ngzhian/mkdocs/forks","keys_url":"https://api.github.com/repos/ngzhian/mkdocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ngzhian/mkdocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ngzhian/mkdocs/teams","hooks_url":"https://api.github.com/repos/ngzhian/mkdocs/hooks","issue_events_url":"https://api.github.com/repos/ngzhian/mkdocs/issues/events{/number}","events_url":"https://api.github.com/repos/ngzhian/mkdocs/events","assignees_url":"https://api.github.com/repos/ngzhian/mkdocs/assignees{/user}","branches_url":"https://api.github.com/repos/ngzhian/mkdocs/branches{/branch}","tags_url":"https://api.github.com/repos/ngzhian/mkdocs/tags","blobs_url":"https://api.github.com/repos/ngzhian/mkdocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ngzhian/mkdocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ngzhian/mkdocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ngzhian/mkdocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ngzhian/mkdocs/statuses/{sha}","languages_url":"https://api.github.com/repos/ngzhian/mkdocs/languages","stargazers_url":"https://api.github.com/repos/ngzhian/mkdocs/stargazers","contributors_url":"https://api.github.com/repos/ngzhian/mkdocs/contributors","subscribers_url":"https://api.github.com/repos/ngzhian/mkdocs/subscribers","subscription_url":"https://api.github.com/repos/ngzhian/mkdocs/subscription","commits_url":"https://api.github.com/repos/ngzhian/mkdocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ngzhian/mkdocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ngzhian/mkdocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ngzhian/mkdocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ngzhian/mkdocs/contents/{+path}","compare_url":"https://api.github.com/repos/ngzhian/mkdocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ngzhian/mkdocs/merges","archive_url":"https://api.github.com/repos/ngzhian/mkdocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ngzhian/mkdocs/downloads","issues_url":"https://api.github.com/repos/ngzhian/mkdocs/issues{/number}","pulls_url":"https://api.github.com/repos/ngzhian/mkdocs/pulls{/number}","milestones_url":"https://api.github.com/repos/ngzhian/mkdocs/milestones{/number}","notifications_url":"https://api.github.com/repos/ngzhian/mkdocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ngzhian/mkdocs/labels{/name}","releases_url":"https://api.github.com/repos/ngzhian/mkdocs/releases{/id}","created_at":"2014-10-19T14:59:49Z","updated_at":"2015-04-03T17:38:28Z","pushed_at":"2015-04-03T22:23:21Z","git_url":"git://github.com/ngzhian/mkdocs.git","ssh_url":"git@github.com:ngzhian/mkdocs.git","clone_url":"https://github.com/ngzhian/mkdocs.git","svn_url":"https://github.com/ngzhian/mkdocs","homepage":"http://www.mkdocs.org","size":19591,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ngzhian/mkdocs/pulls/1"},"html":{"href":"https://github.com/ngzhian/mkdocs/pull/1"},"issue":{"href":"https://api.github.com/repos/ngzhian/mkdocs/issues/1"},"comments":{"href":"https://api.github.com/repos/ngzhian/mkdocs/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ngzhian/mkdocs/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ngzhian/mkdocs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ngzhian/mkdocs/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ngzhian/mkdocs/statuses/516eee473120e4575c6550fc6ef5422e94aa6d8d"}}}}