URLs generated by `phx.gen.auth` should be in kebab-case and not snake_case
glhrmv opened this issue · 0 comments
Hi everyone, keeping this short and simple: Phoenix's (amazing) phx.gen.auth
generator results in changing the router like so:
# ...
live "/users/register", UserRegistrationLive, :new
live "/users/log_in", UserLoginLive, :new
live "/users/reset_password", UserForgotPasswordLive, :new
live "/users/reset_password/:token", UserResetPasswordLive, :edit
I was taken aback by the use of snake_case in the URL paths here.
There is no authoritative standard on URL naming conventions, and I know the developer can very easily change these URLs manually, but we all know that kebab-case is far more widespread on the web, and I have reason to believe this was an oversight: every single "official" Elixir-related webpage (such as elixir-lang.org
, phoenixframework.org
, elixirforum.com
, hex.pm
, etc.) uses hyphen and not underscore as the word separator in multi-word URL paths.
In the interest of maintaining consistency and cohesive alignment with the rest of the ecosystem (and the wider web), I believe we should change the casing of these URLs in the source (the generator). I can open a PR to address this, just let me know.