Skip to content

Implement Relative urls#152

Closed
maks wants to merge 4 commits intoJasonette:developfrom
maks:relative-urls
Closed

Implement Relative urls#152
maks wants to merge 4 commits intoJasonette:developfrom
maks:relative-urls

Conversation

@maks
Copy link
Contributor

@maks maks commented Jul 28, 2017

Implement relative urls in jasonette

This will now resolve url values prefixed with a forward-slash as relative to the url of the jasonette json they are included in.

This works for urls used for mixins as well as images and other uses or urls within Jasonette JSON.

Also included are improvements to error logging to help debug this work and help with future debugging.

This is a reworking of the original PR (#35) by @brad

Fixes: #151

maks added 4 commits July 27, 2017 12:58
This will now resolve url values prefixed with a forward-slash
as relative to the url of the jasonette json they are included in.
This works for urls used for mixins as well as images.
@gliechtenstein
Copy link
Contributor

Thanks for the PR! I will think about this for a bit. I do realize its usefulness (I read your comment on another thread where you explain why you need it) and just trying to think about the iOS side and if this may introduce any unexpected side effects in the future.

Like I mentioned in the other thread, I am just being cautious because I keep running into cases where some new feature I added innocently because it was so simple came back to bite with side effects, so just want to make sure even though it sounds harmless at first sight.

I'll keep you posted.

@maks
Copy link
Contributor Author

maks commented Jul 29, 2017

@gliechtenstein Thanks. Yes definitely this is a fairly big change so I can understand the caution. The reason I worked on this as a top-priority was as soon as I tried to use mixins I found it almost impossible as I need to move around diff environments and having to hardcode the urls makes that very difficult.

An alternative could be to include a "base url" property in the head?

But for now this lets me progress my app dev, so I'll just keep forward-porting this branch.

@maks maks closed this Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support relative urls

2 participants