{"action":"created","issue":{"url":"https://api.github.com/repos/getgrav/grav/issues/178","labels_url":"https://api.github.com/repos/getgrav/grav/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/getgrav/grav/issues/178/comments","events_url":"https://api.github.com/repos/getgrav/grav/issues/178/events","html_url":"https://github.com/getgrav/grav/issues/178","id":69640017,"number":178,"title":"*Feature Enhancement* Custom Routing","user":{"login":"t35h","id":639953,"avatar_url":"https://avatars.githubusercontent.com/u/639953?v=3","gravatar_id":"","url":"https://api.github.com/users/t35h","html_url":"https://github.com/t35h","followers_url":"https://api.github.com/users/t35h/followers","following_url":"https://api.github.com/users/t35h/following{/other_user}","gists_url":"https://api.github.com/users/t35h/gists{/gist_id}","starred_url":"https://api.github.com/users/t35h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t35h/subscriptions","organizations_url":"https://api.github.com/users/t35h/orgs","repos_url":"https://api.github.com/users/t35h/repos","events_url":"https://api.github.com/users/t35h/events{/privacy}","received_events_url":"https://api.github.com/users/t35h/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/getgrav/grav/labels/enhancement","name":"enhancement","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-20T17:36:47Z","updated_at":"2015-04-21T06:35:02Z","closed_at":null,"body":"In some situations unique slugs may not be desirable for a permalink structure for whatever reasons - e.g: post titles may change and/or the same post title may be used often. \r\n\r\nSo a sequential number as the unique identifier for the blog post followed by a url friendly title (just for aesthetics) can be used instead. This is kinda similar to how Stackoverflow handles it's permalinks to questions. When question titles are edited the old permalinks still work.\r\n\r\n/blog/1/default.md\r\n/blog/2/default.md\r\netc.\r\n\r\nIf routing supported more than 1 wildcard this could be as simple as\r\n\r\n```\r\nroutes:\r\n   /blog/<wildcard1>/<wildcard2>: /blog/<wildcard1>\r\n```\r\n\r\n`/blog/1/just-for-looks` would route to `/blog/1`\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/getgrav/grav/issues/comments/94653827","html_url":"https://github.com/getgrav/grav/issues/178#issuecomment-94653827","issue_url":"https://api.github.com/repos/getgrav/grav/issues/178","id":94653827,"user":{"login":"mahagr","id":854915,"avatar_url":"https://avatars.githubusercontent.com/u/854915?v=3","gravatar_id":"","url":"https://api.github.com/users/mahagr","html_url":"https://github.com/mahagr","followers_url":"https://api.github.com/users/mahagr/followers","following_url":"https://api.github.com/users/mahagr/following{/other_user}","gists_url":"https://api.github.com/users/mahagr/gists{/gist_id}","starred_url":"https://api.github.com/users/mahagr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahagr/subscriptions","organizations_url":"https://api.github.com/users/mahagr/orgs","repos_url":"https://api.github.com/users/mahagr/repos","events_url":"https://api.github.com/users/mahagr/events{/privacy}","received_events_url":"https://api.github.com/users/mahagr/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T06:35:02Z","updated_at":"2015-04-21T06:35:02Z","body":"Just some background info:\r\n\r\nRight now Grav only does simple array lookup to figure out if path exists or not. So our routing mechanism doesn't support wildcards at all. The reason why we didn't originally add support for more advanced routers was the speed -- all advanced routers took too much time to initialize.\r\n\r\nAdding wildcard support may seem to be easy, but in reality it's the most complicated part of most routers and also slow down routing considerably."}}