Refactor #canonical_url away from note_path to be more reusable