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

Serve files from tracks/:track_id/img path #3312

Closed
masters3d opened this issue Dec 16, 2016 · 5 comments
Closed

Serve files from tracks/:track_id/img path #3312

masters3d opened this issue Dec 16, 2016 · 5 comments

Comments

@masters3d
Copy link

Cross Post
exercism/swift#223 (comment)

This file was updated
https://github.com/exercism/xswift/blob/master/docs/TESTS.md

The website shows broken links to images now.
http://exercism.io/languages/swift/tests

How do we fix these?

@Insti
Copy link

Insti commented Dec 16, 2016

Exercism does not currently support* serving arbitrary files from tracks.

* I'm only 90% sure of this.

We probably need to wait from Katrina to get back from her break so she can decide what she wants to do about serving image files from tracks.

In the meantime, I suggest updating to the links to point directly to the raw images in the xswift repository on Github.

https://raw.githubusercontent.com/exercism/xswift/master/img/page_assets/001-splash.png

BUT it's unlikely the changes will make it to the live site until Katrina gets back from her break since she is the one that does the live deployments.

@masters3d
Copy link
Author

Katrina said to put them there :)
exercism/swift#212 (comment)

She just deployed something yesterday. nobody else deploys? :)

@Insti
Copy link

Insti commented Dec 16, 2016

Katrina said to put them there :)

Ah ok. 😄 That's one decision made!

We still need to add support for serving them.

@Insti Insti changed the title Broken Links for Images on the Swift Track Serve files from track/:track_id/img path Dec 16, 2016
@Insti Insti changed the title Serve files from track/:track_id/img path Serve files from tracks/:track_id/img path Dec 16, 2016
@Insti
Copy link

Insti commented Dec 16, 2016

Good first patch

What do I need to know?

Ruby, basic HTTP request theory.

What will I learn?

Sinatra routes, a bit more about how Exercism works behind the scenes. (Trackler)

What is Trackler?

Trackler is a gem that contains all the files for all the Exercism tracks:
https://github.com/exercism/trackler

Where do I start?

Sinatra (serves the main exercism.io website):
https://github.com/exercism/exercism.io/blob/master/app/routes/tracks.rb#L33

Trackler:
https://github.com/exercism/trackler/blob/master/lib/trackler/track.rb#L87
img might not be the right method, but it shows you how to refer to files from the track repository.

Where do I find more help?

Check out the contributing guide in each of the repositories.
Ask in the Developer chatroom
Or post your question to this thread.

kytrinyx pushed a commit to exercism/DEPRECATED.trackler that referenced this issue Dec 16, 2016
In order to avoid hard-coding complete API paths for images, we need to add
a way to let the caller define where the documentation images can be found.

This also lets us see the images in the markdown on GitHub by defaulting to the
./docs/img path location.

It's kind of magical, but it makes a lot more sense than what we've been doing
and it makes it easier to contribute.

See exercism/exercism#3312"
kytrinyx pushed a commit to exercism/DEPRECATED.trackler that referenced this issue Dec 16, 2016
In order to avoid hard-coding complete API paths for images, we need to add
a way to let the caller define where the documentation images can be found.

This also lets us see the images in the markdown on GitHub by defaulting to the
./docs/img path location.

It's kind of magical, but it makes a lot more sense than what we've been doing
and it makes it easier to contribute.

See exercism/exercism#3312"
kytrinyx pushed a commit to exercism/DEPRECATED.trackler that referenced this issue Dec 16, 2016
In order to avoid hard-coding complete API paths for images, we need to add
a way to let the caller define where the documentation images can be found.

This also lets us see the images in the markdown on GitHub by defaulting to the
./docs/img path location.

It's kind of magical, but it makes a lot more sense than what we've been doing
and it makes it easier to contribute.

See exercism/exercism#3312
@kytrinyx
Copy link
Member

Fixed in #3313

kytrinyx pushed a commit that referenced this issue Dec 16, 2016
This addresses confusion that is documented in #3312
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

3 participants