{"action":"created","issue":{"url":"https://api.github.com/repos/TryGhost/Ghost/issues/6939","repository_url":"https://api.github.com/repos/TryGhost/Ghost","labels_url":"https://api.github.com/repos/TryGhost/Ghost/issues/6939/labels{/name}","comments_url":"https://api.github.com/repos/TryGhost/Ghost/issues/6939/comments","events_url":"https://api.github.com/repos/TryGhost/Ghost/issues/6939/events","html_url":"https://github.com/TryGhost/Ghost/issues/6939","id":159114148,"number":6939,"title":"\"http://builtwith.com/yourblog.com\" style URLs do not work on the front-end","user":{"login":"kevinansfield","id":415,"avatar_url":"https://avatars.githubusercontent.com/u/415?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinansfield","html_url":"https://github.com/kevinansfield","followers_url":"https://api.github.com/users/kevinansfield/followers","following_url":"https://api.github.com/users/kevinansfield/following{/other_user}","gists_url":"https://api.github.com/users/kevinansfield/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinansfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinansfield/subscriptions","organizations_url":"https://api.github.com/users/kevinansfield/orgs","repos_url":"https://api.github.com/users/kevinansfield/repos","events_url":"https://api.github.com/users/kevinansfield/events{/privacy}","received_events_url":"https://api.github.com/users/kevinansfield/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-08T09:06:30Z","updated_at":"2016-06-08T11:15:24Z","closed_at":null,"body":"### Issue Summary\r\n\r\nThe front end does not respect navigation URLs where the blog URL forms part of the URL such as with http://builtwith.com/yourblog.com \r\n\r\n### Steps to Reproduce\r\n\r\n1. In the Navigation section of the admin area, add a new entry `http://builtwith.com/localhost:2368` (change the `localhost:2368` to match your blog URL), then save\r\n2. Open the front-end of your blog, note that the `href` for the newly added navigation link is `http://localhost:2368` (or your blog URL) not the full `http://builtwith.com/x` URL"},"comment":{"url":"https://api.github.com/repos/TryGhost/Ghost/issues/comments/224559685","html_url":"https://github.com/TryGhost/Ghost/issues/6939#issuecomment-224559685","issue_url":"https://api.github.com/repos/TryGhost/Ghost/issues/6939","id":224559685,"user":{"login":"sakulstra","id":4396533,"avatar_url":"https://avatars.githubusercontent.com/u/4396533?v=3","gravatar_id":"","url":"https://api.github.com/users/sakulstra","html_url":"https://github.com/sakulstra","followers_url":"https://api.github.com/users/sakulstra/followers","following_url":"https://api.github.com/users/sakulstra/following{/other_user}","gists_url":"https://api.github.com/users/sakulstra/gists{/gist_id}","starred_url":"https://api.github.com/users/sakulstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakulstra/subscriptions","organizations_url":"https://api.github.com/users/sakulstra/orgs","repos_url":"https://api.github.com/users/sakulstra/repos","events_url":"https://api.github.com/users/sakulstra/events{/privacy}","received_events_url":"https://api.github.com/users/sakulstra/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T11:15:24Z","updated_at":"2016-06-08T11:15:24Z","body":"The problem is located in config/url.js\r\n\r\n```js\r\nurlPath = data.nav.url; // http://url.org/localhost:2368/\r\n            secure = data.nav.secure || secure;\r\n            baseUrl = getBaseUrl(secure); // http://localhost:2368\r\n            hostname = baseUrl.split('//')[1] + ghostConfig.paths.subdir; // localhost:2368\r\n            if (urlPath.indexOf(hostname) > -1 // hostname not at start\r\n                && urlPath.indexOf('.' + hostname) === -1 // hostname not behind subdomain\r\n                && urlPath.indexOf('mailto:') !== 0) { // no mailto\r\n                // make link relative to account for possible\r\n                // mismatch in http/https etc, force absolute\r\n                // do not do so if link is a subdomain of blog url\r\n                urlPath = urlPath.split(hostname)[1]; // [ 'http://url.org/', '/' ] --> '/'\r\n                if (urlPath.substring(0, 1) !== '/') {\r\n                    urlPath = '/' + urlPath;\r\n                }\r\n                absolute = true;\r\n            }\r\n```"}}
{"actor":{"display_login":"sakulstra"}}