I have a Resource that represents a page. What is the proper way to get the URL for this page? These resources are coming from search Hit objects.
// in my case, paths are coming from search Hit objects
Resource pageResource = resourceResolver.getResource(path);
Page page = pageResource.adaptTo(Page.class);
String url = ...?