{"action":"created","issue":{"url":"https://api.github.com/repos/litten/hexo-theme-yilia/issues/279","repository_url":"https://api.github.com/repos/litten/hexo-theme-yilia","labels_url":"https://api.github.com/repos/litten/hexo-theme-yilia/issues/279/labels{/name}","comments_url":"https://api.github.com/repos/litten/hexo-theme-yilia/issues/279/comments","events_url":"https://api.github.com/repos/litten/hexo-theme-yilia/issues/279/events","html_url":"https://github.com/litten/hexo-theme-yilia/issues/279","id":171016629,"number":279,"title":"关于头像的解决方法","user":{"login":"TopGrd","id":4202848,"avatar_url":"https://avatars.githubusercontent.com/u/4202848?v=3","gravatar_id":"","url":"https://api.github.com/users/TopGrd","html_url":"https://github.com/TopGrd","followers_url":"https://api.github.com/users/TopGrd/followers","following_url":"https://api.github.com/users/TopGrd/following{/other_user}","gists_url":"https://api.github.com/users/TopGrd/gists{/gist_id}","starred_url":"https://api.github.com/users/TopGrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TopGrd/subscriptions","organizations_url":"https://api.github.com/users/TopGrd/orgs","repos_url":"https://api.github.com/users/TopGrd/repos","events_url":"https://api.github.com/users/TopGrd/events{/privacy}","received_events_url":"https://api.github.com/users/TopGrd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-13T16:42:37Z","updated_at":"2016-08-22T06:43:10Z","closed_at":null,"body":"我头像用的外链，无法正常显示，看控制台说root不对，应该可以修改下代码，在主题代码layout/_partial/after-footer.ejs，root修改为空：\r\n```js\r\n\tvar yiliaConfig = {\r\n\t\tfancybox: <%=theme.fancybox%>,\r\n\t\tmathjax: <%=theme.mathjax%>,\r\n\t\tanimate: <%=theme.animate%>,\r\n\t\tisHome: <%=is_home()%>,\r\n\t\tisPost: <%=is_post()%>,\r\n\t\tisArchive: <%=is_archive()%>,\r\n\t\tisTag: <%=is_tag()%>,\r\n\t\tisCategory: <%=is_category()%>,\r\n\t\topen_in_new: <%=theme.open_in_new%>,\r\n\t\troot: ''\r\n\t}\r\n```\r\nlayout\\_partial\\left-col.ejs里改成如下： \r\n```html\r\n<img lazy-src=\"<%=theme.avatar%>\" class=\"js-avatar\">\r\n```\r\n**如果你的页面开启https的话**，将\\layout\\_partial\\after-footer.ejs 里的js链接前面的http改为https \r\n```\r\n<%- js('https://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min') %>\r\n``` \r\n同理layout\\_partial\\mathjax.ejs里也改为 https\r\n```\r\n<script type=\"text/javascript\" src=\"https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\">\r\n```\r\n经测试，这么修改的话，本地和外链头像都可以，不过你的外链头像如果是http链接，则可能使https失效，不过仍可以访问。\r\n上面的也可以解决tag和category不生效。"},"comment":{"url":"https://api.github.com/repos/litten/hexo-theme-yilia/issues/comments/241326778","html_url":"https://github.com/litten/hexo-theme-yilia/issues/279#issuecomment-241326778","issue_url":"https://api.github.com/repos/litten/hexo-theme-yilia/issues/279","id":241326778,"user":{"login":"archerU","id":13237958,"avatar_url":"https://avatars.githubusercontent.com/u/13237958?v=3","gravatar_id":"","url":"https://api.github.com/users/archerU","html_url":"https://github.com/archerU","followers_url":"https://api.github.com/users/archerU/followers","following_url":"https://api.github.com/users/archerU/following{/other_user}","gists_url":"https://api.github.com/users/archerU/gists{/gist_id}","starred_url":"https://api.github.com/users/archerU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archerU/subscriptions","organizations_url":"https://api.github.com/users/archerU/orgs","repos_url":"https://api.github.com/users/archerU/repos","events_url":"https://api.github.com/users/archerU/events{/privacy}","received_events_url":"https://api.github.com/users/archerU/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T06:43:10Z","updated_at":"2016-08-22T06:43:10Z","body":"@TopGrd 不好意思这么晚回复。解决了，应该是http的问题。依照你上面的方案把http改成https就可以了。原来的是用外链和本地的都不行。好吧，尴尬了不知道怎么贴图。\r\n\r\n- [Warning] The page at https://archeru.github.io/ was allowed to display insecure content from http://ww2.sinaimg.cn/mw690/997884acgw1f6wignzkcuj207s07s0si.jpg. (archeru.github.io, line 261)\r\n\r\n[Warning] [blocked] The page at https://archeru.github.io/ was not allowed to run insecure content from http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js. (archeru.github.io, line 975)\r\n\r\n[Warning] Invalid CSS property declaration at: * (style.css, line 178)\r\n[Warning] Invalid CSS property declaration at: * (style.css, line 589)\r\n[Warning] Invalid CSS property declaration at: * (style.css, line 591)\r\n[Warning] [blocked] The page at https://archeru.github.io/ was not allowed to run insecure content from http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js.\r\n\r\n[Error] ReferenceError: Can't find variable: require\r\n\tglobal code (main.js:1)\r\n"}}
{"actor":{"display_login":"archerU"}}