When User is about to create a new story medium redirects to /new-story then a uid is returned and the the user is shown the uri => /p/uid/edit
Now once the User gives the title name and add some content to the body and publishes a static uri is created by appending the title and the uid separated by dash ( -) .
So for example if the title is “my first title” and the id is 98f535ad899e then the uri you will see is my-first-title-98f535ad899e in the url.
After that you can change the title in the page but the uri never changes :) clever technique is used here ! Why I mentioned this ? Thats how you can build your blog platform REST apis :)