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

Already on GitHub? Sign in to your account

Display SVG graphics properly when serving files with WEBrick #88

Merged
merged 1 commit into from Mar 23, 2013

Conversation

Projects
None yet
2 participants
Contributor

turboroot commented Mar 23, 2013

I wanted to make some changes to the site, but letting Jekyll serve the files locally through WEBrick displays broken images. SVGs are not given the correct content-type.

Jekyll's fix seems to be in the next release. This will be a temporary fix.

Hopefully others won't run into the same issue.

Contributor

saivann commented Mar 23, 2013

jekyll --server cannot be used correctly right now anyway, because the site uses clean urls and jekyll WebRick server doesn't translate urls to filenames. (/en/about -> /en/about.html). So I think it would make sense to fix this problem first. Otherwise adding SVG support won't help so much.

Do you have any idea how (or if) it can be done?

Contributor

turboroot commented Mar 23, 2013

Jekyll can generate a directory with a single index.html (en/about -> en/about/index.html) for each page so that those paths would route cleanly without the aid of github's pretty urls.

Contributor

saivann commented Mar 23, 2013

Isn't there a feature somewhere in WebRick server to handle this gracefully?

Most servers allow to do url to filename translation pretty easily. At a first glance, I'd say having a ton of index files seems a bit hackish. It might cause troubles with relative paths and would add a trailing / at the end of all urls. And we should try to avoid changing urls as much as possible.

Maybe the answer can be found somewhere in there :
http://www.ruby-doc.org/stdlib-1.9.3/libdoc/webrick/rdoc/WEBrick/Config.html

Contributor

saivann commented Mar 23, 2013

So far from what I read, it seems that it requires patching the WebRick server.. Ugh.. Ok so let's merge your improvement and keep cleanurls as a seperate subject. Thanks!

saivann added a commit that referenced this pull request Mar 23, 2013

Merge pull request #88 from turboroot/master
Display SVG graphics properly when serving files with WEBrick

@saivann saivann merged commit 836b14c into bitcoin-dot-org:master Mar 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment