Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow relative URLs in resources #50

Open
pushred opened this issue Jul 26, 2013 · 7 comments
Open

Allow relative URLs in resources #50

pushred opened this issue Jul 26, 2013 · 7 comments

Comments

@pushred
Copy link
Member

pushred commented Jul 26, 2013

Sometimes it may be helpful to store static JSON data in a site's repo and access it in templates. For example I might have this file: /data/lipsum.json. I'd like to be able to access it from my templates with /data/lipsum.json but currently Solidus is telling me this is invalid:

[SOLIDUS] Error retrieving resource "lipsum": [Error: Invalid URI "/data/lipsum.json"]

Requiring the server's full host to support this is dangerous because it's environment-specific.

@Fauntleroy
Copy link
Contributor

Forgive me if I'm wrong, but aren't you against storing data like this inside the site itself?

@pushred
Copy link
Member Author

pushred commented Aug 3, 2013

I think there's definitely utility in that, allowing Solidus to work somewhat like a static site generator. For example you could add a step in your Gruntfile to convert Markdown files into JSON objects you could use on your site for static content. Static JSON content is a common feature in the static site generator frameworks out there like Middleman, Roots, Wintersmith, Mixture.io, etc. Our pages aren't compiled to HTML when deployed so we're not a static site generator, but I can see the value of being able to mix in some static resources alongside dynamic content.

@pushred
Copy link
Member Author

pushred commented Oct 2, 2013

@Fauntleroy Can you expedite this? Would make the Solidus stuff @monikahoex is working on much easier.

@Fauntleroy
Copy link
Contributor

I don't consider this to be a feature worth adding, considering our ideas about pulling in data from third parties. Why not just put this data elsewhere and pull it in?

@pushred
Copy link
Member Author

pushred commented Oct 2, 2013

Because that requires uploading the data somewhere else. If it's local static data why bother with that?

@Fauntleroy
Copy link
Contributor

If it's local static data I don't see why it's being put into JSON at all. Why not just write it as static markup? What exactly is the use case for this?

@pushred
Copy link
Member Author

pushred commented Oct 2, 2013

Because writing documentation with code examples as static markup is painful. I'm no weirdo, why do you think so many static site generators exist?

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

No branches or pull requests

2 participants