{"action":"created","issue":{"url":"https://api.github.com/repos/metamaps/metamaps_gen002/issues/423","labels_url":"https://api.github.com/repos/metamaps/metamaps_gen002/issues/423/labels{/name}","comments_url":"https://api.github.com/repos/metamaps/metamaps_gen002/issues/423/comments","events_url":"https://api.github.com/repos/metamaps/metamaps_gen002/issues/423/events","html_url":"https://github.com/metamaps/metamaps_gen002/issues/423","id":113965270,"number":423,"title":"map titles in url as aliases","user":{"login":"devvmh","id":1393708,"avatar_url":"https://avatars.githubusercontent.com/u/1393708?v=3","gravatar_id":"","url":"https://api.github.com/users/devvmh","html_url":"https://github.com/devvmh","followers_url":"https://api.github.com/users/devvmh/followers","following_url":"https://api.github.com/users/devvmh/following{/other_user}","gists_url":"https://api.github.com/users/devvmh/gists{/gist_id}","starred_url":"https://api.github.com/users/devvmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devvmh/subscriptions","organizations_url":"https://api.github.com/users/devvmh/orgs","repos_url":"https://api.github.com/users/devvmh/repos","events_url":"https://api.github.com/users/devvmh/events{/privacy}","received_events_url":"https://api.github.com/users/devvmh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/metamaps/metamaps_gen002/labels/enhancement","name":"enhancement","color":"eb6420"},{"url":"https://api.github.com/repos/metamaps/metamaps_gen002/labels/javascript","name":"javascript","color":"c7def8"},{"url":"https://api.github.com/repos/metamaps/metamaps_gen002/labels/ruby","name":"ruby","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/metamaps/metamaps_gen002/milestones/18","html_url":"https://github.com/metamaps/metamaps_gen002/milestones/Someday","labels_url":"https://api.github.com/repos/metamaps/metamaps_gen002/milestones/18/labels","id":1382577,"number":18,"title":"Someday","description":"","creator":{"login":"devvmh","id":1393708,"avatar_url":"https://avatars.githubusercontent.com/u/1393708?v=3","gravatar_id":"","url":"https://api.github.com/users/devvmh","html_url":"https://github.com/devvmh","followers_url":"https://api.github.com/users/devvmh/followers","following_url":"https://api.github.com/users/devvmh/following{/other_user}","gists_url":"https://api.github.com/users/devvmh/gists{/gist_id}","starred_url":"https://api.github.com/users/devvmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devvmh/subscriptions","organizations_url":"https://api.github.com/users/devvmh/orgs","repos_url":"https://api.github.com/users/devvmh/repos","events_url":"https://api.github.com/users/devvmh/events{/privacy}","received_events_url":"https://api.github.com/users/devvmh/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":0,"state":"open","created_at":"2015-10-29T02:15:20Z","updated_at":"2015-10-29T05:23:22Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-10-29T02:26:08Z","updated_at":"2015-10-29T17:39:59Z","closed_at":null,"body":"We should use Backbone's router to modify the map URL to be an alias of the map's title. That way a map titled \"Devin's Cool Map - The Map Of Doom\" found at http://metamaps.cc/map/1456 might also be accessible from\r\n\r\nhttp://metamaps.cc/map/devins-cool-map-map-doom\r\n\r\nI suggest this scheme because it's similar to Drupal's url alias settings; it drops punctuation and some common words.\r\n\r\nWe would need to store map aliases in the ruby database\r\n\r\nWe would also need to store map redirects in the ruby database. This is complicated - if you change my map above to be called \"Devin's Cool Map - The Map of Doom Version II\" then the alias changes, but any links out in the wild on the web should still resolve to my map!\r\n\r\nThis makes me realize these url aliases should probably be namespaced by the user who owns the map: http://metamaps.cc/devvmh/devins-cool-map-map-doom-version-ii.\r\n\r\nAnother issue is redirect loops. We would have to make sure that map title redirects only ever pointed to the id of the map (e.g. http://metamaps.cc/map/1456), because if you changed the name of the map back to the original name, then you'd have two redirects pointing to each other in a loop. You can bypass that with Backbone or ruby, I believe, by having the \"real\" url be the map id.\r\n\r\n - [ ] Ruby system for redirects and aliases using map id as the key (with potential to someday be aliases to any page on metamaps???)\r\n - [ ] Find and implement an algorithm to create a url alias from a title\r\n - [ ] Store map aliases in database on creation - ruby-side\r\n - [ ] Store map aliases in database on creation - javascript side\r\n - [ ] Store/update map redirects/aliases in database when title/owner is modified - ruby side\r\n - [ ] Store/update map redirects/aliases in database when title/owner is modified - javascript side\r\n - [ ] Update Backbone router to display map alias instead of map id\r\n - [ ] Make sure it's still easy to find the map id url - perhaps include it on the map info card"},"comment":{"url":"https://api.github.com/repos/metamaps/metamaps_gen002/issues/comments/152260589","html_url":"https://github.com/metamaps/metamaps_gen002/issues/423#issuecomment-152260589","issue_url":"https://api.github.com/repos/metamaps/metamaps_gen002/issues/423","id":152260589,"user":{"login":"Connoropolous","id":1409121,"avatar_url":"https://avatars.githubusercontent.com/u/1409121?v=3","gravatar_id":"","url":"https://api.github.com/users/Connoropolous","html_url":"https://github.com/Connoropolous","followers_url":"https://api.github.com/users/Connoropolous/followers","following_url":"https://api.github.com/users/Connoropolous/following{/other_user}","gists_url":"https://api.github.com/users/Connoropolous/gists{/gist_id}","starred_url":"https://api.github.com/users/Connoropolous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Connoropolous/subscriptions","organizations_url":"https://api.github.com/users/Connoropolous/orgs","repos_url":"https://api.github.com/users/Connoropolous/repos","events_url":"https://api.github.com/users/Connoropolous/events{/privacy}","received_events_url":"https://api.github.com/users/Connoropolous/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T17:39:59Z","updated_at":"2015-10-29T17:39:59Z","body":"We could try to implement it like hackpad does... \r\n\r\nthey slugify the title of the document, and that part can be constantly changing, but the actual reference for the hackpad is its ID, which also shows up in the url... so the url looks like\r\n\r\nhackpad.com/some-document-title-12ndkj2349sdf\r\nand if you change the title it will be\r\nhackpad.com/some-other-document-title-12ndkj2349sdf\r\n\r\nbut the first one will redirect to the second one based on the ID part of the url\r\n\r\nI also remember seeing some stuff that Loomio does with \"slugs\"\r\nhttps://github.com/loomio/loomio/search?utf8=%E2%9C%93&q=slug"}}