rib icon indicating copy to clipboard operation
rib copied to clipboard

Add `routeUri`

Open srid opened this issue 5 years ago • 0 comments

Like routeUrl but returns Text.URI.URI (constructured properly without HasCallStack)

cf. https://github.com/srid/neuron/pull/147/files#diff-0a2c15e31c048b676c97d761d186541fR59-R66

Then re-implement routeUrl using the URI.


Consider passing a parameter that can take the site base url (needed for neuron):

newtype BaseUrl = BaseUrl { unBaseUrl :: URI } -- Use smart constructor to ensure it is absolute
data UrlType
  = AbsoluteUrl BaseUrl
  | RelativeUrl 
  | RelativeUrlFromRoot

srid avatar Apr 28 '20 17:04 srid